summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakov Smolic <jakov.smolic@sartura.hr>2021-02-14 11:32:57 +0100
committerDavid Seifert <soap@gentoo.org>2021-02-14 11:32:57 +0100
commiteab7bcd2b21a9fcdbeffa663549547007740e523 (patch)
tree781c0c03efa23516a48667dcd5fd2eef308e6b6c /net-print
parentnet-misc/cgminer: Remove old (diff)
downloadgentoo-eab7bcd2b21a9fcdbeffa663549547007740e523.tar.gz
gentoo-eab7bcd2b21a9fcdbeffa663549547007740e523.tar.bz2
gentoo-eab7bcd2b21a9fcdbeffa663549547007740e523.zip
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 <jakov.smolic@sartura.hr> Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'net-print')
-rw-r--r--net-print/mtink/files/mtink-1.0.16-flags.patch5
-rw-r--r--net-print/mtink/files/mtink-1.0.16-fno-common.patch20
-rw-r--r--net-print/mtink/files/mtink-1.0.16-motif.patch49
-rw-r--r--net-print/mtink/files/mtink-1.0.16-overflow.patch4
-rw-r--r--net-print/mtink/metadata.xml8
-rw-r--r--net-print/mtink/mtink-1.0.16-r2.ebuild35
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 bee6c339e3f8..f1c4fe680247 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.000000000 +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 000000000000..289e2af1517c
--- /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 <ginggs@debian.org>
+--- 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 000000000000..ac66c450b056
--- /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 d57e2cd0139e..b0858485293e 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.000000000 +0000
-+++ b/server/mtinkd.c 2012-01-15 13:03:58.000000000 +0000
+--- a/server/mtinkd.c
++++ b/server/mtinkd.c
@@ -244,7 +244,7 @@
/* look for pid into /var/run/mtink(<fifo> */
if ( (fp = fopen(runFile,"r")) )
diff --git a/net-print/mtink/metadata.xml b/net-print/mtink/metadata.xml
index c439b06d8c84..8223018128a3 100644
--- a/net-print/mtink/metadata.xml
+++ b/net-print/mtink/metadata.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="project">
- <email>printing@gentoo.org</email>
- <name>Gentoo Printing Project</name>
-</maintainer>
+ <maintainer type="project">
+ <email>printing@gentoo.org</email>
+ <name>Gentoo Printing Project</name>
+ </maintainer>
</pkgmetadata>
diff --git a/net-print/mtink/mtink-1.0.16-r2.ebuild b/net-print/mtink/mtink-1.0.16-r2.ebuild
index 79e369b73084..8f231fa1e74e 100644
--- a/net-print/mtink/mtink-1.0.16-r2.ebuild
+++ b/net-print/mtink/mtink-1.0.16-r2.ebuild
@@ -1,7 +1,9 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
+
+inherit toolchain-funcs
DESCRIPTION="mtink is a status monitor and inkjet cartridge changer for some Epson printers"
HOMEPAGE="http://xwtools.automatix.de/"
@@ -12,19 +14,31 @@ SLOT="0"
KEYWORDS="amd64 ~ppc ~sparc x86"
IUSE="cups doc X"
-DEPEND="X? ( x11-libs/libX11
+DEPEND="
+ virtual/libusb:0
+ cups? ( net-print/cups )
+ X? (
+ x11-libs/libX11
x11-libs/libXpm
x11-libs/libXt
- >=x11-libs/motif-2.3:0 )
+ x11-libs/motif:0
+ )
cups? ( net-print/cups )
virtual/libusb:0"
RDEPEND="${DEPEND}"
PATCHES=(
- "${FILESDIR}/${P}-overflow.patch"
- "${FILESDIR}/${P}-flags.patch"
+ "${FILESDIR}"/${P}-overflow.patch
+ "${FILESDIR}"/${P}-flags.patch
+ "${FILESDIR}"/${P}-motif.patch
+ "${FILESDIR}"/${P}-fno-common.patch
)
+src_prepare() {
+ default
+ sed -i -e "s/gcc/$(tc-getCC)/g" Makefile.ORG || die
+}
+
src_configure() {
if use X ; then
./Configure || die
@@ -48,9 +62,7 @@ src_compile() {
src_install() {
dobin ttink detect/askPrinter
- if use X; then
- dobin mtinkc mtink
- fi
+ use X && dobin mtinkc mtink
dosbin mtinkd
@@ -62,9 +74,8 @@ src_install() {
doexe etc/mtink-cups
fi
- dodoc README CHANGE.LOG
- use doc && \
- dohtml html/*.gif html/*.html
+ dodoc html/README CHANGE.LOG
+ use doc && dodoc -r html/*.{gif,html}
}
pkg_postinst() {