summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author M.Dinslage2021-08-06 19:19:57 +0200
committer Willy Sudiarto Raharjo2021-08-07 05:28:42 +0200
commit867ba40e68b19ec98514b3624e3a0d7a4a931d57 (patch)
tree128facde1ecd7b2fa204d298fcd7a73c252e5e24
parentb284566b7d6e7e73e27bfd7aa4ec9ab9cc644015 (diff)
downloadslackbuilds-867ba40e68b19ec98514b3624e3a0d7a4a931d57.tar.gz
system/cnijfilter2: Patch for gcc >= 10.x.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--system/cnijfilter2/cnijfilter2.SlackBuild2
-rw-r--r--system/cnijfilter2/gcc10.patch21
2 files changed, 23 insertions, 0 deletions
diff --git a/system/cnijfilter2/cnijfilter2.SlackBuild b/system/cnijfilter2/cnijfilter2.SlackBuild
index fd467c601a..c412f110fd 100644
--- a/system/cnijfilter2/cnijfilter2.SlackBuild
+++ b/system/cnijfilter2/cnijfilter2.SlackBuild
@@ -92,6 +92,8 @@ find -L . \
\( -type f \! -name autogen.sh \) \
-exec chmod 644 {} \;
+patch -p1 < $CWD/gcc10.patch
+
common_pkg="cmdtocanonij2 cmdtocanonij3 cnijbe2 lgmon3 rastertocanonij tocanonij tocnpwg"
for dir in $common_pkg; do
cd $dir
diff --git a/system/cnijfilter2/gcc10.patch b/system/cnijfilter2/gcc10.patch
new file mode 100644
index 0000000000..78c1b82156
--- /dev/null
+++ b/system/cnijfilter2/gcc10.patch
@@ -0,0 +1,21 @@
+From
+https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24688d64544b43f2c14be54531ad8764419dde09
+
+Fix build error:
+
+libtool: link: gcc -O2 -Wall -I/usr/include/libusb-1.0 -I./common -I/usr/include/libxml2 -o cnijlgmon3 cnijcomif.o cnijifusb.o cnijlgmon3.o cnijifnet.o keytext.o cnijifnet2.o cnijutil.o -L../../com/libs_bin64 -ldl -lusb-1.0 -lcnnet2 -lxml2 -lcnbpcnclapicom2 -lcnbpnet30 -lcups
+/usr/bin/ld: cnijifnet2.o:(.bss+0x0): multiple definition of `GET_PROTOCOL'; cnijlgmon3.o:(.bss+0x0): first defined here
+collect2: error: ld returned 1 exit status
+
+diff -Naur cnijfilter2-source-5.90-1.orig/lgmon3/src/cnijlgmon3.c cnijfilter2-source-5.90-1/lgmon3/src/cnijlgmon3.c
+--- cnijfilter2-source-5.90-1.orig/lgmon3/src/cnijlgmon3.c 2019-07-23 03:07:22.000000000 +0200
++++ cnijfilter2-source-5.90-1/lgmon3/src/cnijlgmon3.c 2021-08-06 19:15:46.556546000 +0200
+@@ -55,7 +55,7 @@
+ int (*GET_STATUS)(char *, int, int *, int * , char *);
+ int (*GET_STATUS2)(char *, int, char *, int *, int * , char *, char *);
+ int (*GET_STATUS2_MAINTENANCE)(char *, int, char *, int *, int * , char *, char *);
+-int (*GET_PROTOCOL)(char *, size_t);
++static int (*GET_PROTOCOL)(char *, size_t);
+
+
+ int main(int argc, char *argv[])