aboutsummaryrefslogtreecommitdiff
path: root/academic/chemtool
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackbuilds.org>2022-02-21 02:41:03 -0600
committerRobby Workman <rworkman@slackbuilds.org>2022-02-21 02:41:03 -0600
commit934ec4aeeba63f07817751f2b94f5a2465daa84d (patch)
tree6b327e2c8fa1a65ff5e6d372a814ac8f7a2338d1 /academic/chemtool
parent3cbb33c5e322f816f1e09711d0302fd0e7eb3544 (diff)
academic/chemtool: Fix build failure with gcc10.
Diffstat (limited to 'academic/chemtool')
-rw-r--r--academic/chemtool/chemtool.SlackBuild4
-rw-r--r--academic/chemtool/gcc10.patch37
2 files changed, 41 insertions, 0 deletions
diff --git a/academic/chemtool/chemtool.SlackBuild b/academic/chemtool/chemtool.SlackBuild
index a05d93d3f96f..975235e59a99 100644
--- a/academic/chemtool/chemtool.SlackBuild
+++ b/academic/chemtool/chemtool.SlackBuild
@@ -79,6 +79,10 @@ 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, Debian
+# https://salsa.debian.org/debichem-team/chemtool/-/blob/7d0413fe4f5bce35fe9c16fd196758319df05442/debian/patches/957084_gcc10.patch
+patch -p1 < $CWD/gcc10.patch
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/academic/chemtool/gcc10.patch b/academic/chemtool/gcc10.patch
new file mode 100644
index 000000000000..d782f8e4a625
--- /dev/null
+++ b/academic/chemtool/gcc10.patch
@@ -0,0 +1,37 @@
+--- a/ct1.h
++++ b/ct1.h
+@@ -273,12 +273,12 @@
+ extern float importfactor;
+ extern int importoffset;
+
+-char **intype;
+-char **inmode;
+-int babelin;
+-char **outtype;
+-char **outmode;
+-int babelout;
++extern char **intype;
++extern char **inmode;
++extern int babelin;
++extern char **outtype;
++extern char **outmode;
++extern int babelout;
+ extern char *babel;
+ extern GdkGC *mygc[8],*background_gc,*hlgc;
+ extern int curpen;
+--- a/inout.c
++++ b/inout.c
+@@ -30,6 +30,13 @@
+ extern GdkFont *font[7],*smallfont[7],*symbfont[7],*boldfont[7],*slfont[7];
+ #endif
+
++char **intype;
++char **inmode;
++int babelin;
++char **outtype;
++char **outmode;
++int babelout;
++
+ static char babeloutp[4];
+
+ int