python-texttable: update to 1.3.1
[void-packages.git] / srcpkgs / ghostscript / template
blob071f7957f4d995b861ec06eec84f2ba5ac246353
1 # Template file for 'ghostscript'
2 pkgname=ghostscript
3 version=9.23
4 revision=3
5 short_desc="An interpreter for the PostScript language"
6 maintainer="Juan RP <xtraeme@voidlinux.eu>"
7 homepage="http://www.ghostscript.com/"
8 license="AGPL-3.0-or-later, CPL-1.0"
9 distfiles="https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${version/./}/ghostscript-${version}.tar.xz"
10 checksum=1fcedc27d4d6081105cdf35606cb3f809523423a6cf9e3c23cead3525d6ae8d9
12 hostmakedepends="automake libtool pkg-config"
13 makedepends="cups-devel dbus-devel fontconfig-devel jasper-devel jbig2dec-devel
14  lcms2-devel libXext-devel libXt-devel libpaper-devel libopenjpeg2-devel"
15 depends="gsfonts"
17 if [ "$CROSS_BUILD" ]; then
18         hostmakedepends+=" ${makedepends}"
21 pre_configure() {
22         # force it to use system libs.
23         rm -rf zlib jpeg libpng jasper expat tiff lcms2art freetype cups/libs jbig2dec openjpeg
25         # add missing LDFLAGS
26         sed -i 's/-L$(BINDIR)/& $(LDFLAGS)/g' base/unix-dll.mak
28         cd ijs
29         autoreconf -fi
32 do_configure() {
33         cd ${wrksrc}
34         # configure ghostscript
35         if [ "$CROSS_BUILD" ]; then
36                 export CCAUX=cc CFLAGSAUX=${XBPS_CFLAGS}
37         fi
38         ./configure ${configure_args} --enable-dynamic --with-ijs \
39                 --with-jbig2dec --with-omni --with-x --with-drivers=ALL \
40                 --with-fontpath=/usr/share/fonts/Type1:/usr/share/fonts \
41                 --enable-fontconfig --enable-freetype --enable-openjpeg \
42                 --with-libpaper --without-luratech --without-omni \
43                 --with-system-libtiff --disable-compile-inits
45         # configure libijs
46         cd ijs
47         ./configure ${configure_args} --enable-shared --disable-static
50 do_build() {
51         # build ghostscript
52         make ${makejobs}
53         make ${makejobs} so
54         # build libijs
55         cd ijs
56         make ${makejobs}
59 do_install() {
60         # install ghostscript
61         make DESTDIR=${DESTDIR} cups_serverroot=${DESTDIR}/etc/cups \
62                 cups_serverbin=${DESTDIR}/usr/lib/cups install install-so
63         # install missing doc files # http://bugs.archlinux.org/task/18023
64         install -m644 doc/{VectorDevices.htm,gs-vms.hlp,gsdoc.el,pscet_status.txt} \
65                 ${DESTDIR}/usr/share/ghostscript/$version/doc/
66         # install license
67         vlicense LICENSE
69         # remove unwanted localized man-pages
70         rm -rf ${DESTDIR}/usr/share/man/[^man1]*
72         # install libijs
73         cd ijs
74         make DESTDIR=${DESTDIR} install
76         # Remove conflicting files with cups-filters.
77         rm -f ${DESTDIR}/usr/lib/cups/filter/{gstopxl,gstoraster}
79         cd ..
80         # Install missing file
81         vinstall base/gserrors.h 644 usr/include/ghostscript
85 libgs_package() {
86         short_desc+=" - runtime shared library"
87         pkg_install() {
88                 vmove "usr/lib/libgs.so*"
89         }
92 libijs_package() {
93         short_desc+=" - IJS runtime shared library"
94         pkg_install() {
95                 vmove "usr/lib/libijs*"
96         }
99 ghostscript-devel_package() {
100         depends="libijs>=${version}_${revision} libgs>=${version}_${revision}"
101         short_desc+=" - development files"
102         pkg_install() {
103                 vmove usr/include
104                 vmove usr/lib/pkgconfig
105         }