diff --git a/net-print/gutenprint/gutenprint-5.2.12.recipe b/net-print/gutenprint/gutenprint-5.2.12.recipe new file mode 100644 index 000000000..fd6890bd7 --- /dev/null +++ b/net-print/gutenprint/gutenprint-5.2.12.recipe @@ -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 +} diff --git a/net-print/gutenprint/patches/gutenprint-5.2.12.patchset b/net-print/gutenprint/patches/gutenprint-5.2.12.patchset new file mode 100644 index 000000000..13422242d --- /dev/null +++ b/net-print/gutenprint/patches/gutenprint-5.2.12.patchset @@ -0,0 +1,127 @@ +From f9160c2bfdca75bafed242aaa7782f80a7e00693 Mon Sep 17 00:00:00 2001 +From: Humdinger +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 + #include + #include ++#ifdef __HAIKU__ ++#undef PAGESIZE ++#endif + #include "testpattern.h" + #include + #include +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 + #include + #include ++#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 + #include + #include ++#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 + #include + #include ++#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 + #include + #include ++#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 +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 + #endif + #include ++#include + #include + #include + #include +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 + #endif ++#include + #include + #include "gutenprint-internal.h" + #include +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 + #include ++#include + #include + #ifdef HAVE_LIMITS_H + #include +-- +2.7.0 +