On 14/02/16 19:55 +0200, Alexander Ploumistos wrote:
Yesterday I was notified that liborigin failed to build in rawhide: https://bugzilla.redhat.com/show_bug.cgi?id=1307729
The problem is that the package defines a type 'function' in the global namespace, but also puts 'using namespace std;" in the global namespace, in a header. That causes the 'function' struct and 'std::function' to be ambiguous. This is why 'using namespace std' should never appear in (or before) headers. This patch fixes the build, but only by hacking around the problem, not fixing the evil 'using namespace std' in the header.
diff --git a/liborigin-20080225-cxx11.patch b/liborigin-20080225-cxx11.patch new file mode 100644 index 0000000..da2d893 --- /dev/null +++ b/liborigin-20080225-cxx11.patch @@ -0,0 +1,8 @@ +767c767 +< vector <function> FUNCTION; +--- +> vector <::function> FUNCTION; +927c927 +< FUNCTION.push_back(function(sname, dataIndex)); +--- +> FUNCTION.push_back(::function(sname, dataIndex)); diff --git a/liborigin.spec b/liborigin.spec index bcd2014..b95d0ce 100644 --- a/liborigin.spec +++ b/liborigin.spec @@ -1,6 +1,6 @@ Name: liborigin Version: 20080225 -Release: 16%{?dist} +Release: 17%{?dist} Summary: Library for reading OriginLab OPJ project files License: GPLv2 @@ -10,6 +10,7 @@ URL: http://sourceforge.net/projects/%{name}/ Source: http://belnet.dl.sourceforge.net/sourceforge/liborigin/%{name}-%{version}.tar.gz # Include <cstddef> into tree.hh Patch0: %{name}-%{version}-gcc.patch +Patch1: %{name}-%{version}-cxx11.patch BuildRequires: cmake Requires(post): /sbin/ldconfig @@ -65,6 +66,9 @@ chmod 0644 ws4.opj %{_libdir}/%{name}.so %changelog +* Mon Feb 15 2016 Jonathan Wakely <jwakely@xxxxxxxxxx> - 20080225-17 +- Patched for C++11 compatibility + * Thu Feb 04 2016 Fedora Release Engineering <releng@xxxxxxxxxxxxxxxxx> - 20080225-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
-- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx http://lists.fedoraproject.org/admin/lists/devel@xxxxxxxxxxxxxxxxxxxxxxx