sci-visualization/gle: fix building with -std=c++14
authorAndrey Grozin <grozin@gentoo.org>
Sat, 13 Jan 2018 08:14:40 +0000 (15:14 +0700)
committerAndrey Grozin <grozin@gentoo.org>
Sat, 13 Jan 2018 08:14:40 +0000 (15:14 +0700)
Closes: https://bugs.gentoo.org/638876
Package-Manager: Portage-2.3.19, Repoman-2.3.6

sci-visualization/gle/files/gle-4.2.5-c++14.patch [new file with mode: 0644]
sci-visualization/gle/files/gle-4.2.5-parallel.patch [new file with mode: 0644]
sci-visualization/gle/gle-4.2.5-r1.ebuild

diff --git a/sci-visualization/gle/files/gle-4.2.5-c++14.patch b/sci-visualization/gle/files/gle-4.2.5-c++14.patch
new file mode 100644 (file)
index 0000000..b548816
--- /dev/null
@@ -0,0 +1,27 @@
+diff -r -U2 gle-graphics-4.2.5.orig/src/gle/fitcf.h gle-graphics-4.2.5/src/gle/fitcf.h
+--- gle-graphics-4.2.5.orig/src/gle/fitcf.h    2015-08-16 13:51:24.000000000 +0600
++++ gle-graphics-4.2.5/src/gle/fitcf.h 2018-01-13 13:57:23.140749391 +0700
+@@ -182,8 +182,8 @@
+ typedef struct Namelist Namelist;
+ 
+-#define abs(x) ((x) >= 0 ? (x) : -(x))
++/*#define abs(x) ((x) >= 0 ? (x) : -(x))*/
+ #define dabs(x) (doublereal)abs(x)
+-#define min(a,b) ((a) <= (b) ? (a) : (b))
+-#define max(a,b) ((a) >= (b) ? (a) : (b))
++/*#define min(a,b) ((a) <= (b) ? (a) : (b))*/
++/*#define max(a,b) ((a) >= (b) ? (a) : (b))*/
+ #define dmin(a,b) (doublereal)min(a,b)
+ #define dmax(a,b) (doublereal)max(a,b)
+diff -r -U2 gle-graphics-4.2.5.orig/src/gle/surface/ffitcontour.cpp gle-graphics-4.2.5/src/gle/surface/ffitcontour.cpp
+--- gle-graphics-4.2.5.orig/src/gle/surface/ffitcontour.cpp    2015-08-16 13:51:24.000000000 +0600
++++ gle-graphics-4.2.5/src/gle/surface/ffitcontour.cpp 2018-01-13 14:08:08.169722265 +0700
+@@ -49,7 +49,7 @@
+ #include "f2c.h"
+ #else
+-#include "f2c.h"
+ #include <stdio.h>
+ #include <math.h>
++#include "f2c.h"
+ #endif
+ 
diff --git a/sci-visualization/gle/files/gle-4.2.5-parallel.patch b/sci-visualization/gle/files/gle-4.2.5-parallel.patch
new file mode 100644 (file)
index 0000000..eeca1f5
--- /dev/null
@@ -0,0 +1,20 @@
+diff -r -U2 gle-graphics-4.2.5.orig/src/gui/MakefileAC.in gle-graphics-4.2.5/src/gui/MakefileAC.in
+--- gle-graphics-4.2.5.orig/src/gui/MakefileAC.in      2015-08-16 13:51:24.000000000 +0600
++++ gle-graphics-4.2.5/src/gui/MakefileAC.in   2018-01-13 14:23:09.066684378 +0700
+@@ -83,12 +83,12 @@
+       $(QMAKE_PROG) $(QMAKE_OPTS)
+ 
+-domake:
+-      $(MAKE_PROG)
++domake: Makefile
++      $(MAKE)
+ 
+-repmake:
++repmake: Makefile
+       perl ../../platform/autopackage/qt-replace.pl Makefile
+ 
+ doclean:
+-      -$(MAKE_PROG) clean
++      -$(MAKE) clean
+       -@$(RM) qgle install_qgle_name_mac Makefile
+       -@$(RMDIR) moc
index b16b4ee3425d2f8f6bc578ce2d334826fdca9714..c9157c018093791d3dfa9f9ca5df801b002b6549 100644 (file)
@@ -1,7 +1,7 @@
 # Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=6
 inherit eutils elisp-common flag-o-matic autotools
 
 DESCRIPTION="Graphics Layout Engine"
@@ -30,8 +30,12 @@ RDEPEND="${DEPEND}
 
 S="${WORKDIR}"/${MY_P}
 
+PATCHES=( "${FILESDIR}"/${P}-parallel.patch
+                 "${FILESDIR}"/${P}-c++14.patch
+               )
+
 src_prepare() {
-       epatch "${FILESDIR}"/${PN}-4.2.4b-parallel.patch
+       default
        eaclocal
        eautoconf
 }