summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Matteo Bernardini2017-05-30 21:13:56 +0200
committer Matteo Bernardini2020-01-26 11:56:58 +0100
commit0c6c1e52143a8e09e587ad69d6e32cbfbe3be8e2 (patch)
tree5a703dc989f0a117727b5cee3544555e1ee37a4c
parent192ba2be163f6c90f8b56e4d4a59c6b7ef3b1b5c (diff)
downloadslackbuilds-xnp2.tar.gz
system/xnp2: Patched for gcc >= 6.x.xnp2
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r--system/xnp2/gcc6.patch17
-rw-r--r--system/xnp2/xnp2.SlackBuild3
2 files changed, 20 insertions, 0 deletions
diff --git a/system/xnp2/gcc6.patch b/system/xnp2/gcc6.patch
new file mode 100644
index 0000000000..6265959666
--- /dev/null
+++ b/system/xnp2/gcc6.patch
@@ -0,0 +1,17 @@
+--- xnp2-0.86/x11/compiler.h.old 2016-03-08 18:25:50.000000000 +0100
++++ xnp2-0.86/x11/compiler.h 2016-07-05 23:48:04.507937827 +0200
+@@ -117,12 +117,14 @@
+ #define MAX_PATH MAXPATHLEN
+ #endif
+
++#ifndef __cplusplus
+ #ifndef max
+ #define max(a,b) (((a) > (b)) ? (a) : (b))
+ #endif
+ #ifndef min
+ #define min(a,b) (((a) < (b)) ? (a) : (b))
+ #endif
++#endif /* __cplusplus */
+
+ #ifndef ZeroMemory
+ #define ZeroMemory(d,n) memset((d), 0, (n))
diff --git a/system/xnp2/xnp2.SlackBuild b/system/xnp2/xnp2.SlackBuild
index bbd8e9d826..b8a467720c 100644
--- a/system/xnp2/xnp2.SlackBuild
+++ b/system/xnp2/xnp2.SlackBuild
@@ -69,6 +69,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# Thanks to the archlinux folks!
+patch -p2 < $CWD/gcc6.patch
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \