gutenprint: add recipe for version 5.3.1.

This commit is contained in:
Jerome Duval
2018-09-29 15:58:54 +02:00
parent 499b4148c7
commit 9c68aecfb2
2 changed files with 260 additions and 0 deletions

View File

@@ -0,0 +1,75 @@
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-2018 The authors of Gutenprint"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://downloads.sourceforge.net/gimp-print/gutenprint-$portVersion.tar.xz"
CHECKSUM_SHA256="d80d8f5272d15bca5710f6ef4a2bb95e76d34e1155c5bcd5e83cb9f0a111d0d4"
SOURCE_DIR="gutenprint-$portVersion"
PATCHES="gutenprint-$portVersion.patchset"
ARCHITECTURES="?x86_gcc2 ?x86 x86_64"
SECONDARY_ARCHITECTURES="?x86_gcc2 ?x86"
PROVIDES="
gutenprint8$secondaryArchSuffix = $portVersion
lib:libgutenprint$secondaryArchSuffix = 8.1.0 compat >= 8
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
gutenprint8${secondaryArchSuffix}_devel = $portVersion
devel:libgutenprint$secondaryArchSuffix = 8.1.0 compat >= 8
"
REQUIRES_devel="
gutenprint8$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:sed
"
BUILD()
{
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
rm $libDir/libgutenprint.la
rm -rf $binDir $manDir
prepareInstalledDevelLibs libgutenprint
fixPkgconfig
# devel package
packageEntries devel \
$developDir
}

View File

@@ -0,0 +1,185 @@
From d3e74adb7d4c9bfb016abc379cca2ced3dbdc863 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 2474d69..3a6f00d 100644
--- a/src/testpattern/testpattern.c
+++ b/src/testpattern/testpattern.c
@@ -36,6 +36,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 048a31b..7c85598 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 31d6197..27d0998 100644
--- a/src/testpattern/testpatternl.l
+++ b/src/testpattern/testpatternl.l
@@ -27,6 +27,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 2344ffb..7c0c08b 100644
--- a/src/testpattern/testpatterny.c
+++ b/src/testpattern/testpatterny.c
@@ -73,6 +73,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 4678949..d2ab025 100644
--- a/src/testpattern/testpatterny.y
+++ b/src/testpattern/testpatterny.y
@@ -28,6 +28,9 @@
#include <strings.h>
#include <stdio.h>
#include <stdlib.h>
+#ifdef __HAIKU__
+#undef PAGESIZE
+#endif
#include "testpattern.h"
extern int mylineno;
--
2.19.0
From d03b91aca94d8bebbe9a44508eb6cce0483bde4d 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 2aeb15e..83efd76 100644
--- a/src/main/curve.c
+++ b/src/main/curve.c
@@ -30,6 +30,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 19d1b98..3580842 100644
--- a/src/main/escp2-papers.c
+++ b/src/main/escp2-papers.c
@@ -22,6 +22,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 751424d..2838983 100644
--- a/src/main/print-ps.c
+++ b/src/main/print-ps.c
@@ -32,6 +32,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.19.0
From dc847513f434177d034d7307228b549a7b1b41dc Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sat, 1 Apr 2017 15:24:54 +0200
Subject: Make gcc2 happy.
diff --git a/src/main/print-canon.c b/src/main/print-canon.c
index 6ba401a..51fc7ab 100644
--- a/src/main/print-canon.c
+++ b/src/main/print-canon.c
@@ -3832,7 +3832,6 @@ canon_init_setPageMargins2(const stp_vars_t *v, canon_privdata_t *init)
rather than calculated.
*/
unsigned char arg_ESCP_1 = (init->pt) ? canon_size_type(v,init->caps) : 0x03; /* default size A4 */
- stp_dprintf(STP_DBG_CANON, v,"setPageMargins2: arg_ESCP_1 = '%x'\n",arg_ESCP_1);
/* TOFIX: what exactly is to be sent?
* Is it the printable length or the bottom border?
@@ -3846,6 +3845,7 @@ canon_init_setPageMargins2(const stp_vars_t *v, canon_privdata_t *init)
const char* input_slot = stp_get_string_parameter(v, "InputSlot");
int print_cd = (input_slot && (!strcmp(input_slot, "CD")));
+ stp_dprintf(STP_DBG_CANON, v,"setPageMargins2: arg_ESCP_1 = '%x'\n",arg_ESCP_1);
stp_dprintf(STP_DBG_CANON, v,"setPageMargins2: print_cd = %d\n",print_cd);
test_cd = 1;
--
2.19.0
From 6f1aea7b3e69a41ea23149d2248de019991af591 Mon Sep 17 00:00:00 2001
From: Schrijvers Luc <Begasus@users.noreply.github.com>
Date: Mon, 21 May 2018 07:42:56 +0200
Subject: Make gcc2 happy, suite.
diff --git a/src/main/channel.c b/src/main/channel.c
index 6cd4ca9..a19d6a7 100644
--- a/src/main/channel.c
+++ b/src/main/channel.c
@@ -1201,6 +1201,7 @@ stp_channel_get_output_8bit(const stp_vars_t *v)
if (! cg->output_data_8bit)
cg->output_data_8bit = stp_malloc(sizeof(unsigned char) *
cg->total_channels * cg->width);
+ {
int i;
(void) memset(cg->output_data_8bit, 0, sizeof(unsigned char) *
cg->total_channels * cg->width);
@@ -1208,4 +1209,5 @@ stp_channel_get_output_8bit(const stp_vars_t *v)
cg->output_data_8bit[i] = cg->output_data[i] / (unsigned short) 257;
cg->valid_8bit = 1;
return cg->output_data_8bit;
+ }
}
--
2.19.0