1 # Maintainer: PyroPeter <abi1789@com.googlemail>
2 # Contributor: AndyRTR <andyrtr@archlinux.org>
4 pkgname=ghostscript-svn
7 pkgdesc="An interpreter for the PostScript language"
9 license=('GPL3' 'custom')
10 depends=('libxext' 'libxt' 'libcups>=1.4.2-3' 'fontconfig>=2.8.0' 'gnutls>=2.8.5' 'cairo>=1.8.8-2'
11 'jasper>=1.900.1-4' 'zlib' 'libpng>=1.4.0' 'libjpeg>=8' 'libidn')
12 makedepends=('subversion' 'automake' 'autoconf' 'gtk2>=2.18.6')
13 optdepends=('texlive-core: dvipdf'
15 replaces=('ghostscript-lrpng')
16 provides=('ghostscript=9.01' 'ghostscript-lprng')
17 conflicts=('ghostscript')
18 url="http://www.ghostscript.com/"
19 source=(ghostscript-fPIC.patch)
20 options=('!libtool' '!makeflags')
21 md5sums=('766d44c47c693f96941b658e360c1277')
23 _svntrunk=http://svn.ghostscript.com/ghostscript/trunk/gs
29 if [ -d $_svnmod/.svn ]; then
30 (cd $_svnmod && svn up -r $pkgver)
32 svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
35 msg "SVN checkout done or server timeout"
36 msg "Starting make..."
38 rm -rf "$srcdir/$_svnmod-build"
39 cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
40 cd "$srcdir/$_svnmod-build"
43 # force it to use system-libs
44 rm -rf jpeg libpng zlib jasper expat
46 if [ "$CARCH" = "x86_64" ]; then
47 patch -Np1 -i ${srcdir}/ghostscript-fPIC.patch || return 1
53 ./configure --prefix=/usr --enable-shared --disable-static
55 make -j1 DESTDIR=${pkgdir} install || return 1
59 ./configure --prefix=/usr --enable-dynamic --with-ijs \
60 --with-jbig2dec --with-omni --with-x --with-drivers=ALL\
61 --with-fontpath=/usr/share/fonts/Type1:/usr/share/fonts \
62 --disable-compile-inits # needed for linking with system-zlib
64 make -j1 DESTDIR=${pkgdir} \
65 cups_serverroot=${pkgdir}/etc/cups \
66 cups_serverbin=${pkgdir}/usr/lib/cups install soinstall
68 # install a missing doc files # http://bugs.archlinux.org/task/18023
69 install -m 644 ${srcdir}/gs/doc/{Ps2ps2.htm,gs-vms.hlp,gsdoc.el,pscet_status.txt} ${pkgdir}/usr/share/ghostscript/*/doc/
71 mkdir -p ${pkgdir}/usr/share/licenses/${pkgname}
72 install -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/
74 # remove unwanted localized man-pages
75 rm -rf "$pkgdir"/usr/share/man/[^man1]*