[arch-commits] Commit in ghostscript/trunk (PKGBUILD ghostscript-system-jasper.patch)

andyrtr at archlinux.org andyrtr at archlinux.org
Thu Sep 3 06:58:03 UTC 2009


    Date: Thursday, September 3, 2009 @ 02:58:02
  Author: andyrtr
Revision: 50916

upgpkg: ghostscript 8.70-2
    safety rebuild for new cups; change build to link against system libraries, saves 15M size and should give some speed boost

Added:
  ghostscript/trunk/ghostscript-system-jasper.patch
Modified:
  ghostscript/trunk/PKGBUILD

---------------------------------+
 PKGBUILD                        |   33 +++++++++++++++++++++------------
 ghostscript-system-jasper.patch |   26 ++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 12 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-09-03 02:47:27 UTC (rev 50915)
+++ PKGBUILD	2009-09-03 06:58:02 UTC (rev 50916)
@@ -3,11 +3,12 @@
 
 pkgname=ghostscript
 pkgver=8.70
-pkgrel=1
+pkgrel=2
 pkgdesc="An interpreter for the PostScript language"
-arch=(i686 x86_64)
-license=('GPL' 'custom')
-depends=('libxext' 'libxt' 'libcups>=1.3.11' 'fontconfig>=2.6.0' 'gnutls>=2.8.1' 'cairo>=1.8.8')
+arch=('i686' 'x86_64')
+license=('GPL3' 'custom')
+depends=('libxext' 'libxt' 'libcups>=1.4.0' 'fontconfig>=2.6.0' 'gnutls>=2.8.3' 'cairo>=1.8.8' 
+          'jasper>=1.900.1-3' 'zlib' 'libpng>=1.2.39' 'libjpeg>=7')
 makedepends=('automake' 'autoconf' 'gtk2>=2.16.5')
 optdepends=('texlive-core:	dvipdf'
             'gtk2:		gsx')
@@ -15,14 +16,21 @@
 provides=('ghostscript-lprng')
 url="http://www.cs.wisc.edu/~ghost/"
 source=(http://ghostscript.com/releases/ghostscript-${pkgver}.tar.bz2
-	ghostscript-fPIC.patch)
-options=('!libtool') # '!makeflags'
+	ghostscript-fPIC.patch
+	ghostscript-system-jasper.patch)
+options=('!libtool') # '!makeflags')
 md5sums=('526366f8cb4fda0d3d293597cc5b984b'
-         '1a8fcacf0005214db823225c870f093d')
+         '1a8fcacf0005214db823225c870f093d'
+         '03e27cd02471ab3b642c344fa06b623e')
 
 build() {
   cd ${srcdir}/ghostscript-${pkgver}
-  
+  # force it to use system-libs
+  rm -rf jpeg libpng zlib jasper expat
+
+  # fix build with systems jasper
+  patch -Np1 -i ${srcdir}/ghostscript-system-jasper.patch || return 1
+
   if [ "$CARCH" = "x86_64" ]; then
     patch -Np1 -i ${srcdir}/ghostscript-fPIC.patch || return 1
   fi
@@ -32,14 +40,15 @@
   ./autogen.sh
   ./configure --prefix=/usr --enable-shared --disable-static
   make || return 1
-  make DESTDIR=${pkgdir} install || return 1
+  make -j1 DESTDIR=${pkgdir} install || return 1
 
   cd ..
-  ./configure --prefix=/usr --enable-dynamic --enable-threads --with-ijs \
+  ./configure --prefix=/usr --enable-dynamic --with-ijs \
               --with-jbig2dec --with-omni --with-x --with-drivers=ALL\
-	      --with-fontpath=/usr/share/fonts/Type1:/usr/share/fonts
+	      --with-fontpath=/usr/share/fonts/Type1:/usr/share/fonts \
+	      --disable-compile-inits # needed for linking with system-zlib
   make || return 1
-  make DESTDIR=${pkgdir} \
+  make -j1 DESTDIR=${pkgdir} \
 	cups_serverroot=${pkgdir}/etc/cups \
 	cups_serverbin=${pkgdir}/usr/lib/cups install soinstall
 

Added: ghostscript-system-jasper.patch
===================================================================
--- ghostscript-system-jasper.patch	                        (rev 0)
+++ ghostscript-system-jasper.patch	2009-09-03 06:58:02 UTC (rev 50916)
@@ -0,0 +1,26 @@
+diff -up ghostscript-8.64/base/sjpx.c.system-jasper ghostscript-8.64/base/sjpx.c
+--- ghostscript-8.64/base/sjpx.c.system-jasper	2008-08-21 00:22:49.000000000 +0100
++++ ghostscript-8.64/base/sjpx.c	2009-02-04 11:35:56.000000000 +0000
+@@ -34,14 +34,6 @@ static void s_jpxd_set_defaults(stream_s
+ private_st_jpxd_state(); /* creates a gc object for our state,
+ 			    defined in sjpx.h */
+ 
+-/* error reporting callback for the jpx library */
+-static void
+-s_jpx_jas_error_cb(jas_error_t err, char *msg)
+-{
+-  dprintf2("jasper (code %d) %s", (int)err, msg);
+-}
+-
+-
+ /* initialize the steam.
+    this involves allocating the stream and image structures, and
+    initializing the decoder.
+@@ -59,7 +51,6 @@ s_jpxd_init(stream_state * ss)
+     }
+ 
+     status = jas_init();
+-    jas_set_error_cb(s_jpx_jas_error_cb);
+ #ifdef JPX_DEBUG
+     /* raise the error reporting threshold from the default (0) */
+     jas_setdbglevel(1);




More information about the arch-commits mailing list