Re: liborigin FTBFS

2016-02-20 Thread Alexander Ploumistos
On Sat, Feb 20, 2016 at 1:52 PM, Igor Gnatenko
 wrote:
> I think it is also good idea to update liborigin to 2.0 (it is something
> like 2 years after current fedora version)

That's why there is a liborigin2. As far as I can tell, they dropped
support for older versions of Origin at some point, hence the two
versions of the library. I've been trying to catch up with what has
happened and I think that's the reason Christian kept the 2008 version
around.
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org


Re: liborigin FTBFS

2016-02-20 Thread Igor Gnatenko
I think it is also good idea to update liborigin to 2.0 (it is something
like 2 years after current fedora version)

On Sat, Feb 20, 2016 at 12:41 PM Alexander Ploumistos <
alex.ploumis...@gmail.com> wrote:

> Thanks a bunch!
>
> There was also a
> %patch1 -p1
> missing, but I figured that before building the package.
>
> Now the package fails to build locally, but there is no problem in
> mock. I really need to read up more on gcc changes if I am to keep c++
> packages under my care...
> --
> devel mailing list
> devel@lists.fedoraproject.org
> http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org
>
-- 

-Igor Gnatenko
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org


Re: liborigin FTBFS

2016-02-20 Thread Alexander Ploumistos
Thanks a bunch!

There was also a
%patch1 -p1
missing, but I figured that before building the package.

Now the package fails to build locally, but there is no problem in
mock. I really need to read up more on gcc changes if I am to keep c++
packages under my care...
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org


Re: liborigin FTBFS

2016-02-20 Thread Jonathan Wakely

On 20/02/16 12:54 +0200, Alexander Ploumistos wrote:

I don't get it, I applied the patch, but I'm seeing pretty much the
same errors in mock and koji:
http://koji.fedoraproject.org/koji/taskinfo?taskID=13054384


Sorry, the patch was not in the right format, not sure how that
happened.

This should work.


diff --git a/liborigin-20080225-cxx11.patch b/liborigin-20080225-cxx11.patch
new file mode 100644
index 000..35a3c04
--- /dev/null
+++ b/liborigin-20080225-cxx11.patch
@@ -0,0 +1,22 @@
+--- liborigin-20080225/OPJFile.h.orig	2016-02-20 11:16:18.715237121 +
 liborigin-20080225/OPJFile.h	2016-02-20 11:16:20.880244480 +
+@@ -764,7 +764,7 @@
+ 	vector  SPREADSHEET;
+ 	vector  MATRIX;
+ 	vector  EXCEL;
+-	vector  FUNCTION;
++	vector <::function> FUNCTION;
+ 	vector  GRAPH;
+ 	vector  NOTE;
+ 	tree  projectTree;
+--- liborigin-20080225/OPJFile.cpp.orig	2016-02-20 11:17:21.955452074 +
 liborigin-20080225/OPJFile.cpp	2016-02-20 11:17:29.268476931 +
+@@ -924,7 +924,7 @@
+ break;
+ 			case 0x10C8:
+ fprintf(debug,"NEW FUNCTION\n");
+-FUNCTION.push_back(function(sname, dataIndex));
++FUNCTION.push_back(::function(sname, dataIndex));
+ dataIndex++;
+ 
+ char *cmd;
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  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  - 20080225-17
+- Patched for C++11 compatibility
+
 * Thu Feb 04 2016 Fedora Release Engineering  - 20080225-16
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
 
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org


Re: liborigin FTBFS

2016-02-20 Thread Alexander Ploumistos
I don't get it, I applied the patch, but I'm seeing pretty much the
same errors in mock and koji:
http://koji.fedoraproject.org/koji/taskinfo?taskID=13054384
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org


Re: liborigin FTBFS

2016-02-16 Thread Jonathan Wakely

On 15/02/16 19:12 +0200, Alexander Ploumistos wrote:

On Mon, Feb 15, 2016 at 3:44 PM, Jonathan Wakely
 wrote:

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.


Was that considered correct or acceptable at the time the library was
written (ca 2008)?


No, it was considered bad practice to put using-directives in headers
even in 2008.

It didn't actually cause an error until now because std::function was
not present in namespace std until the C++11 standard, but the same
error could have happened with different names. It was a bug waiting
to happen.
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org


Re: liborigin FTBFS

2016-02-15 Thread Alexander Ploumistos
On Mon, Feb 15, 2016 at 3:44 PM, Jonathan Wakely
 wrote:
> 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.

Was that considered correct or acceptable at the time the library was
written (ca 2008)?

> This patch fixes the build, but only by hacking around the problem,
> not fixing the evil 'using namespace std' in the header.

Thank you so much, I will apply this as soon as I get back!

Best regards
Alex
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org


Re: liborigin FTBFS

2016-02-15 Thread Jonathan Wakely

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 000..da2d893
--- /dev/null
+++ b/liborigin-20080225-cxx11.patch
@@ -0,0 +1,8 @@
+767c767
+<  vector  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  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  - 20080225-17
+- Patched for C++11 compatibility
+
 * Thu Feb 04 2016 Fedora Release Engineering  - 
20080225-16
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
 
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org


liborigin FTBFS

2016-02-14 Thread Alexander Ploumistos
Hello,

Yesterday I was notified that liborigin failed to build in rawhide:
https://bugzilla.redhat.com/show_bug.cgi?id=1307729

For the past couple of days I've been away on a work trip and I won't
be back until the end of next week. Unless this failure messes someone
else's packages, would it be OK to ignore the error until then?

Best regards
Alex
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org