updated on Wed Jan 18 08:00:29 UTC 2012
[aur-mirror.git] / ghostscript-svn / PKGBUILD
blobcf43bdd8a388ad1358c392bab7cc8e7f3094e6e4
1 # Maintainer: PyroPeter <abi1789@com.googlemail>
2 # Contributor: AndyRTR <andyrtr@archlinux.org>
4 pkgname=ghostscript-svn
5 pkgver=0
6 pkgrel=2
7 pkgdesc="An interpreter for the PostScript language"
8 arch=('i686' 'x86_64')
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'
14             'gtk2:              gsx')
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
24 _svnmod=gs
26 build() {
27   cd "$srcdir"
29   if [ -d $_svnmod/.svn ]; then
30     (cd $_svnmod && svn up -r $pkgver)
31   else
32     svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
33   fi
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
48   fi
50   # Build IJS
51   cd ${srcdir}/gs/ijs
52   ./autogen.sh
53   ./configure --prefix=/usr --enable-shared --disable-static
54   make || return 1
55   make -j1 DESTDIR=${pkgdir} install || return 1
57   cd ..
58   ./autogen.sh
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
63   make || return 1
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/
70   
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]*