Gutenberg: update to 5.2.12

Adapted korlie's patches for the new release. Doesn't build for
x86_gcc2 any more. See build error at: http://sprunge.us/cSjQ

Marking as broken for x86_gcc2.
This commit is contained in:
Humdinger
2017-01-20 20:17:10 +01:00
parent b580b49fea
commit bca353cc61
2 changed files with 208 additions and 0 deletions

View File

@@ -0,0 +1,81 @@
SUMMARY="Suite of printer drivers"
DESCRIPTION="Gutenprint, formerly named Gimp-Print, is a suite of printer \
drivers that may be used with most common UNIX print spooling systems, \
including CUPS, lpr, LPRng, or others. These drivers provide high quality \
printing for UNIX (including Macintosh OS X 10.3 and newer) and Linux \
systems in many cases equal to or better than proprietary vendor-supplied \
drivers.
Gutenprint also includes an enhanced print plug-in for the GIMP image editor, \
replacing the Gimp-Print 4.2-based plugin supplied with GIMP 1.2, \
2.0, and 2.2, and offering an alternative with additional \
capabilities to the GtkPrint-based plugin supplied with GIMP 2.4 \
and beyond."
HOMEPAGE="http://gimp-print.sourceforge.net"
COPYRIGHT="1999-2010 by the authors of Gutenprint"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="http://prdownloads.sourceforge.net/gimp-print/gutenprint-$portVersion.tar.bz2"
CHECKSUM_SHA256="a42489fd7d6f2e4320811754bb80b0cd845db6632b52f819fbc2b4b75057341b"
PATCHES="gutenprint-5.2.12.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="!x86_gcc2 x86"
PROVIDES="
gutenprint$secondaryArchSuffix = $portVersion compat >= 5
cmd:escputil$secondaryArchSuffix = $portVersion compat >= 5
cmd:testpattern$secondaryArchSuffix = $portVersion compat >= 5
lib:libgutenprint$secondaryArchSuffix = 2.3.0 compat >= 2
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
gutenprint${secondaryArchSuffix}_devel = $portVersion compat >= 5
devel:libgutenprint$secondaryArchSuffix = 2.3.0 compat >= 2
"
REQUIRES_devel="
gutenprint$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize
cmd:make
cmd:sed
"
PATCH()
{
# git doesn't handle correctly multilines with straybackspaces.
sed -i '/#define DECLARE_MODEUSES.*/ {N;N;N;N;N; s/#define DECLARE_MODEUSES.*\}/#define DECLARE_MODEUSES(name) static const canon_modeuselist_t name##_modeuselist = \{ #name, sizeof(name##_modeuses) \/ sizeof(canon_modeuse_t), name##_modeuses \}/g}' src/main/canon-media-mode.h
}
BUILD()
{
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
rm $libDir/libgutenprint.la
prepareInstalledDevelLibs libgutenprint
fixPkgconfig
# devel package
packageEntries devel \
$developDir \
$manDir/man1
}

View File

@@ -0,0 +1,127 @@
From f9160c2bfdca75bafed242aaa7782f80a7e00693 Mon Sep 17 00:00:00 2001
From: Humdinger <humdingerb@gmail.com>
Date: Fri, 20 Jan 2017 19:56:14 +0100
Subject: undef PAGESIZE on HAIKU
Update patch by Jerome Duval to new release.
diff --git a/src/testpattern/testpattern.c b/src/testpattern/testpattern.c
index ca3d25d..fa19adf 100644
--- a/src/testpattern/testpattern.c
+++ b/src/testpattern/testpattern.c
@@ -37,6 +37,9 @@
#include <stdio.h>
#include <math.h>
#include <string.h>
+#ifdef __HAIKU__
+#undef PAGESIZE
+#endif
#include "testpattern.h"
#include <gutenprint/gutenprint-intl.h>
#include <errno.h>
diff --git a/src/testpattern/testpatternl.c b/src/testpattern/testpatternl.c
index 0c3b20b..d203cac 100644
--- a/src/testpattern/testpatternl.c
+++ b/src/testpattern/testpatternl.c
@@ -20,6 +20,9 @@
#include <string.h>
#include <errno.h>
#include <stdlib.h>
+#ifdef __HAIKU__
+#undef PAGESIZE
+#endif
/* end standard C headers. */
diff --git a/src/testpattern/testpatternl.l b/src/testpattern/testpatternl.l
index a340ce6..e5e7e42 100644
--- a/src/testpattern/testpatternl.l
+++ b/src/testpattern/testpatternl.l
@@ -28,6 +28,9 @@
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
+#ifdef __HAIKU__
+#undef PAGESIZE
+#endif
#include "testpattern.h"
#pragma GCC diagnostic ignored "-Wredundant-decls"
diff --git a/src/testpattern/testpatterny.c b/src/testpattern/testpatterny.c
index da90dcc..70173f2 100644
--- a/src/testpattern/testpatterny.c
+++ b/src/testpattern/testpatterny.c
@@ -74,6 +74,9 @@
#include <strings.h>
#include <stdio.h>
#include <stdlib.h>
+#ifdef __HAIKU__
+#undef PAGESIZE
+#endif
#include "testpattern.h"
extern int mylineno;
diff --git a/src/testpattern/testpatterny.y b/src/testpattern/testpatterny.y
index 3b89160..fc3b1c0 100644
--- a/src/testpattern/testpatterny.y
+++ b/src/testpattern/testpatterny.y
@@ -29,6 +29,9 @@
#include <strings.h>
#include <stdio.h>
#include <stdlib.h>
+#ifdef __HAIKU__
+#undef PAGESIZE
+#endif
#include "testpattern.h"
extern int mylineno;
--
2.7.0
From 6382c589b05b34566d3ec27cf95df7a93e07f198 Mon Sep 17 00:00:00 2001
From: Humdinger <humdingerb@gmail.com>
Date: Fri, 20 Jan 2017 19:58:12 +0100
Subject: strings.h fixes
Update patch by Jerome Duval to new release.
diff --git a/src/main/curve.c b/src/main/curve.c
index d552cc7..4c8a594 100644
--- a/src/main/curve.c
+++ b/src/main/curve.c
@@ -31,6 +31,7 @@
#include <ieeefp.h>
#endif
#include <string.h>
+#include <strings.h>
#include <stdlib.h>
#include <limits.h>
#include <unistd.h>
diff --git a/src/main/escp2-papers.c b/src/main/escp2-papers.c
index 5eebc49..c288749 100644
--- a/src/main/escp2-papers.c
+++ b/src/main/escp2-papers.c
@@ -23,6 +23,7 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
+#include <strings.h>
#include <gutenprint/gutenprint.h>
#include "gutenprint-internal.h"
#include <gutenprint/gutenprint-intl-internal.h>
diff --git a/src/main/print-ps.c b/src/main/print-ps.c
index 6a4a85f..4ef4a4e 100644
--- a/src/main/print-ps.c
+++ b/src/main/print-ps.c
@@ -33,6 +33,7 @@
#include "gutenprint-internal.h"
#include <time.h>
#include <string.h>
+#include <strings.h>
#include <math.h>
#ifdef HAVE_LIMITS_H
#include <limits.h>
--
2.7.0