From b2c34e86772c33a88fb514cd82d1f3c56969c91c Mon Sep 17 00:00:00 2001 From: Jakov Smolic Date: Sun, 29 Nov 2020 00:09:03 +0100 Subject: net-print/c2esp: fix build with gcc-10 * Thanks to Sam James for providing the patch link Closes: https://bugs.gentoo.org/708236 Package-Manager: Portage-3.0.9, Repoman-3.0.1 Signed-off-by: Jakov Smolic Signed-off-by: David Seifert --- net-print/c2esp/c2esp-27.ebuild | 6 ++-- .../files/0001-Fix-various-missing-includes.patch | 35 ---------------------- net-print/c2esp/files/c2esp-27-fno-common.patch | 32 ++++++++++++++++++++ .../c2esp/files/c2esp-27-missing-includes.patch | 35 ++++++++++++++++++++++ 4 files changed, 71 insertions(+), 37 deletions(-) delete mode 100644 net-print/c2esp/files/0001-Fix-various-missing-includes.patch create mode 100644 net-print/c2esp/files/c2esp-27-fno-common.patch create mode 100644 net-print/c2esp/files/c2esp-27-missing-includes.patch (limited to 'net-print') diff --git a/net-print/c2esp/c2esp-27.ebuild b/net-print/c2esp/c2esp-27.ebuild index 69e58fbb92f9..f7fe2a2c6a37 100644 --- a/net-print/c2esp/c2esp-27.ebuild +++ b/net-print/c2esp/c2esp-27.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -6,6 +6,7 @@ EAPI=7 DESCRIPTION="A CUPS filter for Kodak ESP printers" HOMEPAGE="https://sourceforge.net/projects/cupsdriverkodak" SRC_URI="mirror://sourceforge/cupsdriverkodak/files/${P}.tar.gz" + LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~arm ~x86" @@ -17,7 +18,8 @@ DEPEND=">=media-libs/jbigkit-2.0-r1:= RDEPEND="${DEPEND}" PATCHES=( - "${FILESDIR}"/0001-Fix-various-missing-includes.patch + "${FILESDIR}"/${P}-missing-includes.patch + "${FILESDIR}"/${P}-fno-common.patch ) src_configure() { diff --git a/net-print/c2esp/files/0001-Fix-various-missing-includes.patch b/net-print/c2esp/files/0001-Fix-various-missing-includes.patch deleted file mode 100644 index bde86e666688..000000000000 --- a/net-print/c2esp/files/0001-Fix-various-missing-includes.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 4341f243a34dbb8140800337d189345c370dc499 Mon Sep 17 00:00:00 2001 -From: Didier Raboud -Date: Fri, 9 Feb 2018 17:23:25 +0100 -Subject: Fix various missing includes - -Last-Update: 2016-10-03 ---- - src/c2espcommon.h | 1 + - src/command2esp.c | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/src/c2espcommon.h b/src/c2espcommon.h -index 471f46a..088a2b8 100644 ---- a/src/c2espcommon.h -+++ b/src/c2espcommon.h -@@ -19,6 +19,7 @@ - */ - - #include //FlushBackChannel, and the side channel functions and constants -+#include // FILE - #include //files - #include //time functions used for debugging - -diff --git a/src/command2esp.c b/src/command2esp.c -index 529342c..e30357e 100644 ---- a/src/command2esp.c -+++ b/src/command2esp.c -@@ -44,6 +44,7 @@ Maintenance=003? - #include - #include //FlushBackChannel, and the side channel functions and constants - #include "string.h" -+#include "strings.h" // strncasecmp - #include - #include //files - #include //time functions used for debugging diff --git a/net-print/c2esp/files/c2esp-27-fno-common.patch b/net-print/c2esp/files/c2esp-27-fno-common.patch new file mode 100644 index 000000000000..8e4dc81519e2 --- /dev/null +++ b/net-print/c2esp/files/c2esp-27-fno-common.patch @@ -0,0 +1,32 @@ +Taken from: https://sources.debian.org/patches/c2esp/27-8/0002-Add-extern-stanzas-to-variable-definitions-in-header.patch/ +Author: Didier Raboud + +--- a/src/c2espcommon.c ++++ b/src/c2espcommon.c +@@ -42,11 +42,11 @@ + * Globals... + */ + char CallerName[50]; /* String that identifies the calling program */ +-int DoBack; /* Enables the back channel comms */ ++extern int DoBack; /* Enables the back channel comms */ + char BackBuf[32000]; //for the back channel replies from the printer + int BackBufLen=sizeof(BackBuf)-1; + FILE *LogFile = NULL; //file descriptor for log file +-time_t StartTime; ++extern time_t StartTime; + int BlackPercent, ColourPercent; + + time_t KeepAwake(time_t Start, int Interval, FILE *PrintFile) +--- a/src/c2espcommon.h ++++ b/src/c2espcommon.h +@@ -35,8 +35,8 @@ + /* + * Globals... + */ +-char BackBuf[32000]; //for the back channel replies from the printer +-int ColourPercent, BlackPercent; //to store the detected marker levels ++extern char BackBuf[32000]; //for the back channel replies from the printer ++extern int ColourPercent, BlackPercent; //to store the detected marker levels + + + time_t KeepAwake(time_t Start, int Interval, FILE *PrintFile); diff --git a/net-print/c2esp/files/c2esp-27-missing-includes.patch b/net-print/c2esp/files/c2esp-27-missing-includes.patch new file mode 100644 index 000000000000..bde86e666688 --- /dev/null +++ b/net-print/c2esp/files/c2esp-27-missing-includes.patch @@ -0,0 +1,35 @@ +From 4341f243a34dbb8140800337d189345c370dc499 Mon Sep 17 00:00:00 2001 +From: Didier Raboud +Date: Fri, 9 Feb 2018 17:23:25 +0100 +Subject: Fix various missing includes + +Last-Update: 2016-10-03 +--- + src/c2espcommon.h | 1 + + src/command2esp.c | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/src/c2espcommon.h b/src/c2espcommon.h +index 471f46a..088a2b8 100644 +--- a/src/c2espcommon.h ++++ b/src/c2espcommon.h +@@ -19,6 +19,7 @@ + */ + + #include //FlushBackChannel, and the side channel functions and constants ++#include // FILE + #include //files + #include //time functions used for debugging + +diff --git a/src/command2esp.c b/src/command2esp.c +index 529342c..e30357e 100644 +--- a/src/command2esp.c ++++ b/src/command2esp.c +@@ -44,6 +44,7 @@ Maintenance=003? + #include + #include //FlushBackChannel, and the side channel functions and constants + #include "string.h" ++#include "strings.h" // strncasecmp + #include + #include //files + #include //time functions used for debugging -- cgit v1.2.3-65-gdbad