From a33d64800e845b5b341e38357d0e2792d40cf2b6 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Tue, 6 Oct 2015 14:05:19 +0200 Subject: testing/gutenprint: new aport Printer Drivers Package http://gimp-print.sourceforge.net/ fixes #4656 --- testing/gutenprint/APKBUILD | 89 +++++++++ testing/gutenprint/gutenprint-O6.patch | 281 +++++++++++++++++++++++++++ testing/gutenprint/musl-fix-header.patch | 12 ++ testing/gutenprint/pagesize-name-clash.patch | 14 ++ 4 files changed, 396 insertions(+) create mode 100644 testing/gutenprint/APKBUILD create mode 100644 testing/gutenprint/gutenprint-O6.patch create mode 100644 testing/gutenprint/musl-fix-header.patch create mode 100644 testing/gutenprint/pagesize-name-clash.patch (limited to 'testing/gutenprint') diff --git a/testing/gutenprint/APKBUILD b/testing/gutenprint/APKBUILD new file mode 100644 index 000000000..5a1a3d65c --- /dev/null +++ b/testing/gutenprint/APKBUILD @@ -0,0 +1,89 @@ +# Contributor: Natanael Copa +# Maintainer: +pkgname=gutenprint +pkgver=5.2.10 +pkgrel=0 +pkgdesc="Printer Drivers Package" +url="http://gimp-print.sourceforge.net/" +arch="all" +license="GPLv2+" +depends="" +depends_dev="" +makedepends="$depends_dev cups-dev tiff-dev libjpeg-turbo-dev libpng-dev + ghostscript-dev libusb-dev autoconf automake libtool" +install="" +subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-libs + $pkgname-cups $pkgname-samples" +source="http://downloads.sourceforge.net/gimp-print/gutenprint-$pkgver.tar.bz2 + musl-fix-header.patch + pagesize-name-clash.patch + gutenprint-O6.patch + " + +_builddir="$srcdir"/gutenprint-$pkgver +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done + mkdir -p m4local + autoreconf -vif || return 1 +} + +build() { + cd "$_builddir" + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var \ + --disable-nls \ + --disable-cups-ppds \ + --enable-simplified-cups-ppds \ + || return 1 + make || return 1 +} + +package() { + cd "$_builddir" + make DESTDIR="$pkgdir" install || return 1 + rm -r "$pkgdir"/usr/share/gutenprint/doc \ + "$pkgdir"/etc/cups/command.types \ + || return 1 +} + +cups() { + pkgdesc="CUPS drivers for Canon, Epson, HP and compatible printers" + for d in usr/share usr/lib usr/bin usr/sbin etc; do + mkdir -p "$subpkgdir"/$d || return 1 + mv "$pkgdir"/$d/cups* "$subpkgdir"/$d/ || return 1 + done +} + +samples() { + pkgdesc="Sample test pattern generator for gutenprint-dev" + mkdir -p "$subpkgdir"/usr/share/gutenprint "$subpkgdir"/usr/bin + mv "$pkgdir"/usr/share/gutenprint/samples \ + "$subpkgdir"/usr/share/gutenprint/ || return 1 + mv "$pkgdir"/usr/bin/testpattern "$subpkgdir"/usr/bin/ || return 1 + +} + +md5sums="9ff027103bafac419c37e19da75163ae gutenprint-5.2.10.tar.bz2 +8bf8113137aca7ae6b14d7247fd4df53 musl-fix-header.patch +ccedfc1a47b3e05534fbd7fe63d808f8 pagesize-name-clash.patch +bc3422ed9a1f2fe251449bf727ca4d72 gutenprint-O6.patch" +sha256sums="431f352b412dfb9809d126a85a37a1fcd1c1826275ace8cdcd4fd9a6ee360e59 gutenprint-5.2.10.tar.bz2 +a79e23f424494073fc0e940ae275fd2ca53f9de1d2fb931db96711bec943b313 musl-fix-header.patch +1eda1a8e300185dace67b663ac571c6992dd680355bd0a125701c4368736ac34 pagesize-name-clash.patch +d7208080f43199930df7abff9e68513e85b548c3bc362c7a392646abfb0c8285 gutenprint-O6.patch" +sha512sums="bb71fd5c127748730dde01471b09907d500b72c35401abaf92c631d04156bacafd4b1a9baef61f48db6c4a622fd612a1e2834ed30207b5b178767ea9d9d5e1ac gutenprint-5.2.10.tar.bz2 +97c38aa2d7931af25e577e27949f659bd45be3e9deab0af86e437587a526d5d37006d0fddd57ad22e1bbe39f25dfa34926e75690a243c7736840cf85ca5ae2df musl-fix-header.patch +8b17b4d3dd3f9dbeff7c3a3da38395cde8bea51abe5a8ebeac62b9e442dc451341b3571de02437d035a63da83d10316a4ce0da143cc90a935678a01fb5efb224 pagesize-name-clash.patch +81cdbd3ff271fec2d7d17313772db6d2617da90bd532a6e2d834e8bfde9e5329a62b01876714be145dbf23071a053374b1b78dd173ea999d0e873b895b49d0a6 gutenprint-O6.patch" diff --git a/testing/gutenprint/gutenprint-O6.patch b/testing/gutenprint/gutenprint-O6.patch new file mode 100644 index 000000000..0c1084b66 --- /dev/null +++ b/testing/gutenprint/gutenprint-O6.patch @@ -0,0 +1,281 @@ +diff -up gutenprint-5.2.7/configure.ac.O6 gutenprint-5.2.7/configure.ac +--- gutenprint-5.2.7/configure.ac.O6 2011-05-02 03:20:49.000000000 +0200 ++++ gutenprint-5.2.7/configure.ac 2011-05-05 12:40:29.000000000 +0200 +@@ -625,27 +625,6 @@ AH_TEMPLATE(PKGMODULEDIR,, [Package modu + PKGMODULEDIR="${PACKAGE_LIB_DIR}/${GUTENPRINT_RELEASE_VERSION}/modules" + AC_DEFINE_UNQUOTED(PKGMODULEDIR, ["$PKGMODULEDIR"]) + +-dnl Compiler flags +-if test x$ac_compiler_gnu = "xyes"; then +- STP_ADD_COMPILER_ARGS([-Wall -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wwrite-strings -Werror-implicit-function-declaration -Winline -Wformat=2 -finline-limit=131072],, [GNUCFLAGS]) +- if test x${USE_MAINTAINER_MODE} = xyes ; then +- STP_ADD_COMPILER_ARGS([-pedantic -Waggregate-return -Wcast-qual -Wshadow -Wredundant-decls],, [GNUCFLAGS]) +- fi +- if test x$ENABLE_DEBUG = xyes ; then +- STP_ADD_COMPILER_ARG([-g]) +- else +- STP_ADD_FIRST_COMPILER_ARG([-O6 -O3 -O2 -O1 -O]) +- fi +-else +- if test x$ENABLE_DEBUG = xyes ; then +- STP_ADD_COMPILER_ARG([-g]) +- else +- STP_ADD_FIRST_COMPILER_ARG([-O]) +- fi +-fi +-if test x$ENABLE_PROFILE = xyes ; then +- STP_ADD_COMPILER_ARG([-pg]) +-fi + AC_SUBST(GNUCFLAGS) + + AH_TEMPLATE([HAVE_GCC_ATTRIBUTES], +diff -up gutenprint-5.2.7/configure.O6 gutenprint-5.2.7/configure +--- gutenprint-5.2.7/configure.O6 2011-05-02 03:32:21.000000000 +0200 ++++ gutenprint-5.2.7/configure 2011-05-05 12:52:09.000000000 +0200 +@@ -16589,246 +16589,6 @@ cat >>confdefs.h <<_ACEOF + #define PKGMODULEDIR "$PKGMODULEDIR" + _ACEOF + +- +-if test x$ac_compiler_gnu = "xyes"; then +- +- for stp_ac_arg in -Wall -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wwrite-strings -Werror-implicit-function-declaration -Winline -Wformat=2 -finline-limit=131072 ; do +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports ${stp_ac_arg}" >&5 +-$as_echo_n "checking if ${CC} supports ${stp_ac_arg}... " >&6; } +- stp_acOLDCFLAGS="${CFLAGS}" +- CFLAGS="${GNUCFLAGS} ${stp_ac_arg}" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-int +-main () +-{ +- +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; }; +- stp_newCFLAGS="$CFLAGS" +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; }; +- stp_newCFLAGS="$stp_acOLDCFLAGS" +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- CFLAGS="$stp_acOLDCFLAGS" +- GNUCFLAGS="${stp_newCFLAGS}" +- +- done +- +- if test x${USE_MAINTAINER_MODE} = xyes ; then +- +- for stp_ac_arg in -pedantic -Waggregate-return -Wcast-qual -Wshadow -Wredundant-decls ; do +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports ${stp_ac_arg}" >&5 +-$as_echo_n "checking if ${CC} supports ${stp_ac_arg}... " >&6; } +- stp_acOLDCFLAGS="${CFLAGS}" +- CFLAGS="${GNUCFLAGS} ${stp_ac_arg}" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-int +-main () +-{ +- +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; }; +- stp_newCFLAGS="$CFLAGS" +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; }; +- stp_newCFLAGS="$stp_acOLDCFLAGS" +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- CFLAGS="$stp_acOLDCFLAGS" +- GNUCFLAGS="${stp_newCFLAGS}" +- +- done +- +- fi +- if test x$ENABLE_DEBUG = xyes ; then +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports -g" >&5 +-$as_echo_n "checking if ${CC} supports -g... " >&6; } +- stp_acOLDCFLAGS="${CFLAGS}" +- CFLAGS="${CFLAGS} -g" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-int +-main () +-{ +- +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; }; +- stp_newCFLAGS="$CFLAGS" +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; }; +- stp_newCFLAGS="$stp_acOLDCFLAGS" +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- CFLAGS="$stp_acOLDCFLAGS" +- CFLAGS="${stp_newCFLAGS}" +- +- else +- +- for stp_ac_arg in -O6 -O3 -O2 -O1 -O ; do +- stp_ac_save_CFLAGS="${CFLAGS}" +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports ${stp_ac_arg}" >&5 +-$as_echo_n "checking if ${CC} supports ${stp_ac_arg}... " >&6; } +- stp_acOLDCFLAGS="${CFLAGS}" +- CFLAGS="${CFLAGS} ${stp_ac_arg}" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-int +-main () +-{ +- +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; }; +- stp_newCFLAGS="$CFLAGS" +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; }; +- stp_newCFLAGS="$stp_acOLDCFLAGS" +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- CFLAGS="$stp_acOLDCFLAGS" +- CFLAGS="${stp_newCFLAGS}" +- +- test "${stp_ac_save_CFLAGS}" != "${CFLAGS}" && break +- done +- +- fi +-else +- if test x$ENABLE_DEBUG = xyes ; then +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports -g" >&5 +-$as_echo_n "checking if ${CC} supports -g... " >&6; } +- stp_acOLDCFLAGS="${CFLAGS}" +- CFLAGS="${CFLAGS} -g" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-int +-main () +-{ +- +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; }; +- stp_newCFLAGS="$CFLAGS" +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; }; +- stp_newCFLAGS="$stp_acOLDCFLAGS" +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- CFLAGS="$stp_acOLDCFLAGS" +- CFLAGS="${stp_newCFLAGS}" +- +- else +- +- for stp_ac_arg in -O ; do +- stp_ac_save_CFLAGS="${CFLAGS}" +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports ${stp_ac_arg}" >&5 +-$as_echo_n "checking if ${CC} supports ${stp_ac_arg}... " >&6; } +- stp_acOLDCFLAGS="${CFLAGS}" +- CFLAGS="${CFLAGS} ${stp_ac_arg}" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-int +-main () +-{ +- +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; }; +- stp_newCFLAGS="$CFLAGS" +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; }; +- stp_newCFLAGS="$stp_acOLDCFLAGS" +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- CFLAGS="$stp_acOLDCFLAGS" +- CFLAGS="${stp_newCFLAGS}" +- +- test "${stp_ac_save_CFLAGS}" != "${CFLAGS}" && break +- done +- +- fi +-fi +-if test x$ENABLE_PROFILE = xyes ; then +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports -pg" >&5 +-$as_echo_n "checking if ${CC} supports -pg... " >&6; } +- stp_acOLDCFLAGS="${CFLAGS}" +- CFLAGS="${CFLAGS} -pg" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-int +-main () +-{ +- +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; }; +- stp_newCFLAGS="$CFLAGS" +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; }; +- stp_newCFLAGS="$stp_acOLDCFLAGS" +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- CFLAGS="$stp_acOLDCFLAGS" +- CFLAGS="${stp_newCFLAGS}" +- +-fi +- +- +- + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports __attribute__ syntax" >&5 + $as_echo_n "checking if $CC supports __attribute__ syntax... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext diff --git a/testing/gutenprint/musl-fix-header.patch b/testing/gutenprint/musl-fix-header.patch new file mode 100644 index 000000000..8a74a56ac --- /dev/null +++ b/testing/gutenprint/musl-fix-header.patch @@ -0,0 +1,12 @@ +diff --git a/src/main/print-olympus.c b/src/main/print-olympus.c +index 42c4897..b11b020 100644 +--- a/src/main/print-olympus.c ++++ b/src/main/print-olympus.c +@@ -40,6 +40,7 @@ + #include + #include + #include ++#include + + #ifdef __GNUC__ + #define inline __inline__ diff --git a/testing/gutenprint/pagesize-name-clash.patch b/testing/gutenprint/pagesize-name-clash.patch new file mode 100644 index 000000000..932ae2da0 --- /dev/null +++ b/testing/gutenprint/pagesize-name-clash.patch @@ -0,0 +1,14 @@ +diff --git a/src/testpattern/testpatterny.h b/src/testpattern/testpatterny.h +index 010e17a..986d1d7 100644 +--- a/src/testpattern/testpatterny.h ++++ b/src/testpattern/testpatterny.h +@@ -36,6 +36,9 @@ + /* Tokens. */ + #ifndef YYTOKENTYPE + # define YYTOKENTYPE ++#ifdef PAGESIZE ++#undef PAGESIZE ++#endif + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { -- cgit v1.2.3