[gentoo-commits] repo/gentoo:master commit in: net-print/mtink/, net-print/mtink/files/

2024-03-11 Thread Sam James
commit: 65c4d815a053b023f48cf96ca632a2afe8cb394a
Author: Eli Schwartz  gmail  com>
AuthorDate: Tue Mar 12 04:07:17 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Mar 12 05:15:39 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65c4d815

net-print/mtink: fix LTO and Modern C bugs

Import a patch from debian which fixes both issues by:
- including the correct headers
- avoiding conflicting definitions of two functions by deleting the
  conflicting one and #include'ing the other one everywhere

Closes: https://bugs.gentoo.org/861854
Closes: https://bugs.gentoo.org/885963
Signed-off-by: Eli Schwartz  gmail.com>
Signed-off-by: Sam James  gentoo.org>

 .../mtink-1.0.16-fix-function-declarations.patch   | 57 ++
 net-print/mtink/mtink-1.0.16-r2.ebuild |  1 +
 2 files changed, 58 insertions(+)

diff --git a/net-print/mtink/files/mtink-1.0.16-fix-function-declarations.patch 
b/net-print/mtink/files/mtink-1.0.16-fix-function-declarations.patch
new file mode 100644
index ..459341f63a79
--- /dev/null
+++ b/net-print/mtink/files/mtink-1.0.16-fix-function-declarations.patch
@@ -0,0 +1,57 @@
+Description: fix function declarations
+ This patch fixes various conflicting and implicit function declarations
+ reported by goto-cc from the cbmc package.
+Bug-Debian: http://bugs.debian.org/749433
+Author: Graham Inggs 
+Forwarded: No, nothing left to forward to
+Last-Update: 2015-05-31
+--- a/mainSrc/cmd.h
 b/mainSrc/cmd.h
+@@ -70,6 +70,4 @@
+ }
+ #endif
+ 
+-extern int devRead(int fd, unsigned char *buf, int len, int timeout); 
+-extern int devWrite(int fd, unsigned char *buf, int len, int timeout); 
+ #endif
+--- a/mainSrc/rw.c
 b/mainSrc/rw.c
+@@ -18,6 +18,8 @@
+  
+ #ifndef MACOS
+ #include 
++#include 
++#include 
+ #include 
+ #include 
+ #include 
+--- a/mainSrc/cmd.c
 b/mainSrc/cmd.c
+@@ -53,6 +53,7 @@
+ #include "mtink.h"
+ #include "cmd.h"
+ #include "d4lib.h"
++#include "rw.h"
+ 
+ #ifdef MACOS
+ #include "usbHlp.h"
+--- a/mainSrc/gimp-mtink.c
 b/mainSrc/gimp-mtink.c
+@@ -23,6 +23,7 @@
+ 
+ #include 
+ #include 
++#include 
+ #include 
+ #include 
+ #include 
+--- a/detect/askPrinter.c
 b/detect/askPrinter.c
+@@ -1,6 +1,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ #include 
+ #include 
+ #include 

diff --git a/net-print/mtink/mtink-1.0.16-r2.ebuild 
b/net-print/mtink/mtink-1.0.16-r2.ebuild
index 32b8c51473ac..4d46836b2d1f 100644
--- a/net-print/mtink/mtink-1.0.16-r2.ebuild
+++ b/net-print/mtink/mtink-1.0.16-r2.ebuild
@@ -32,6 +32,7 @@ PATCHES=(
"${FILESDIR}"/${P}-flags.patch
"${FILESDIR}"/${P}-motif.patch
"${FILESDIR}"/${P}-fno-common.patch
+   "${FILESDIR}"/${P}-fix-function-declarations.patch
 )
 
 src_prepare() {



[gentoo-commits] repo/gentoo:master commit in: net-print/mtink/, net-print/mtink/files/

2021-02-14 Thread David Seifert
commit: eab7bcd2b21a9fcdbeffa663549547007740e523
Author: Jakov Smolic  sartura  hr>
AuthorDate: Sun Feb 14 10:32:57 2021 +
Commit: David Seifert  gentoo  org>
CommitDate: Sun Feb 14 10:32:57 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eab7bcd2

net-print/mtink: Fix build issues

* Fix build with gcc-10
* Fix detection of lesstif library
* Do not call CC directly
* Fix broken README symlink

Closes: https://bugs.gentoo.org/708040
Closes: https://bugs.gentoo.org/679324
Closes: https://bugs.gentoo.org/727952
Closes: https://bugs.gentoo.org/725196
Closes: https://bugs.gentoo.org/741062
Signed-off-by: Jakov Smolic  sartura.hr>
Signed-off-by: David Seifert  gentoo.org>

 net-print/mtink/files/mtink-1.0.16-flags.patch |  5 +--
 .../mtink/files/mtink-1.0.16-fno-common.patch  | 20 +
 net-print/mtink/files/mtink-1.0.16-motif.patch | 49 ++
 net-print/mtink/files/mtink-1.0.16-overflow.patch  |  4 +-
 net-print/mtink/metadata.xml   |  8 ++--
 net-print/mtink/mtink-1.0.16-r2.ebuild | 35 ++--
 6 files changed, 100 insertions(+), 21 deletions(-)

diff --git a/net-print/mtink/files/mtink-1.0.16-flags.patch 
b/net-print/mtink/files/mtink-1.0.16-flags.patch
index bee6c339e3f..f1c4fe68024 100644
--- a/net-print/mtink/files/mtink-1.0.16-flags.patch
+++ b/net-print/mtink/files/mtink-1.0.16-flags.patch
@@ -1,6 +1,5 @@
-diff -ruN mtink-1.0.16.orig/Makefile.ORG mtink-1.0.16/Makefile.ORG
 mtink-1.0.16.orig/Makefile.ORG 2007-08-28 12:52:30.0 +0200
-+++ mtink-1.0.16/Makefile.ORG  2017-01-29 18:09:40.550182789 +0100
+--- a/Makefile.ORG
 b/Makefile.ORG
 @@ -4,7 +4,7 @@
  setUid=1
  gimpVersion=

diff --git a/net-print/mtink/files/mtink-1.0.16-fno-common.patch 
b/net-print/mtink/files/mtink-1.0.16-fno-common.patch
new file mode 100644
index 000..289e2af1517
--- /dev/null
+++ b/net-print/mtink/files/mtink-1.0.16-fno-common.patch
@@ -0,0 +1,20 @@
+https://sources.debian.org/patches/mtink/1.0.16-11/gcc-10/
+Author: Graham Inggs 
+--- a/mainSrc/mtink.h
 b/mainSrc/mtink.h
+@@ -133,11 +133,11 @@
+ 
+ #endif
+ 
+-wConfig_data_t firstConfig;
+-wConfig_data_t newPrinter;
++extern wConfig_data_t firstConfig;
++extern wConfig_data_t newPrinter;
+ 
+-wConfig_data_t exchangeCartridge;
+-wConfig_data_t alignHead;
++extern wConfig_data_t exchangeCartridge;
++extern wConfig_data_t alignHead;
+ 
+ #if WITH_X
+ extern Widget createNoPrinterBox(char *);

diff --git a/net-print/mtink/files/mtink-1.0.16-motif.patch 
b/net-print/mtink/files/mtink-1.0.16-motif.patch
new file mode 100644
index 000..ac66c450b05
--- /dev/null
+++ b/net-print/mtink/files/mtink-1.0.16-motif.patch
@@ -0,0 +1,49 @@
+https://sources.debian.org/patches/mtink/1.0.16-11/lesstif-multiarch/
+--- a/Configure
 b/Configure
+@@ -127,6 +127,8 @@
+ /usr/openwin/lib
+ /usr/local/lib
+ /usr/dt/lib'
++LIBDIRS="$LIBDIRS `${CC-gcc} -print-search-dirs 2>/dev/null |
++   awk '/^libraries:/{print $2}' | tr ':' ' '`"
+ 
+ # Add gimp-2.0 for fedora core 2
+ INCLDIRS='/usr/include/gimp-2.0/libgimp
+@@ -279,11 +281,6 @@
+   exit 1
+fi
+ 
+-   case $OS in
+-  Linux) . ./checkMotifVersion.sh;;
+-  Darwin) . ./checkMotifVersion.sh;;
+-   esac
+-
+if [ "$MotifLib" != "" ]
+then
+   mlCmd="s@^MOLIB.*@MOLIB = $MotifLib@"
+@@ -297,24 +294,6 @@
+   miCmd=
+fi
+ 
+-   # Check for the Xp libary, some Motif libraries need this
+-
+-   xplibFound=0
+-   for dir in $LIBDIRS
+-   do
+-  if [ "`ls -c $dir/libXp.* 2>/dev/null`" != "" ]
+-  then
+- xplibFound=1
+- break
+-  fi
+-   done
+-
+-   # but not for Solaris
+-   if [ `uname` = SunOS ]
+-   then
+-  xplibFound=0
+-   fi
+-
+# Gimp part 
+# check for gimp
+includeFileFound=0

diff --git a/net-print/mtink/files/mtink-1.0.16-overflow.patch 
b/net-print/mtink/files/mtink-1.0.16-overflow.patch
index d57e2cd0139..b0858485293 100644
--- a/net-print/mtink/files/mtink-1.0.16-overflow.patch
+++ b/net-print/mtink/files/mtink-1.0.16-overflow.patch
@@ -1,5 +1,5 @@
 a/server/mtinkd.c  2012-01-15 13:03:41.0 +
-+++ b/server/mtinkd.c  2012-01-15 13:03:58.0 +
+--- a/server/mtinkd.c
 b/server/mtinkd.c
 @@ -244,7 +244,7 @@
   /* look for pid into /var/run/mtink( */
   if ( (fp = fopen(runFile,"r")) )

diff --git a/net-print/mtink/metadata.xml b/net-print/mtink/metadata.xml
index c439b06d8c8..8223018128a 100644
--- a/net-print/mtink/metadata.xml
+++ b/net-print/mtink/metadata.xml
@@ -1,8 +1,8 @@
 
 http://www.gentoo.org/dtd/metadata.dtd;>
 
-
-   print...@gentoo.org
-   Gentoo Printing Project
-
+   
+   print...@gentoo.org
+   Gentoo Printing Project
+   
 

diff --git a/net-print/mtink/mtink-1.0.16-r2.ebuild 
b/net-print/mtink/mtink-1.0.16-r2.ebuild
index 79e369b7308..8f231fa1e74