ghostscript: add cups build_option

This commit is contained in:
Owen Rafferty 2019-10-15 15:50:08 -05:00 committed by Juan RP
parent b6fd02fe37
commit 6773c53b1a

View file

@ -1,7 +1,7 @@
# Template file for 'ghostscript'
pkgname=ghostscript
version=9.27
revision=1
revision=2
short_desc="Interpreter for the PostScript language"
maintainer="Orphaned <orphan@voidlinux.org>"
license="AGPL-3.0-or-later, CPL-1.0"
@ -10,17 +10,20 @@ distfiles="https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/downlo
checksum=fc0f1fbacd3610c67a9f080487a0e021f14390c38a4b4df9723e2bdf2b90b619
hostmakedepends="automake libtool pkg-config"
makedepends="cups-devel dbus-devel fontconfig-devel jasper-devel jbig2dec-devel
makedepends="$(vopt_if cups cups-devel) dbus-devel fontconfig-devel jasper-devel jbig2dec-devel
lcms2-devel libXext-devel libXt-devel libopenjpeg2-devel libpaper-devel"
depends="gsfonts"
build_options="cups"
build_options_default="cups"
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" ${makedepends}"
fi
pre_configure() {
# force it to use system libs.
rm -rf cups/libs freetype jbig2dec jpeg lcms2mt libpng openjpeg tiff zlib
rm -rf $(vopt_if cups cups/libs) freetype jbig2dec jpeg lcms2mt libpng openjpeg tiff zlib
# add missing LDFLAGS
sed -i 's/-L$(BINDIR)/& $(LDFLAGS)/g' base/unix-dll.mak
@ -40,7 +43,8 @@ do_configure() {
--with-fontpath=/usr/share/fonts/Type1:/usr/share/fonts \
--enable-fontconfig --enable-freetype --enable-openjpeg \
--with-libpaper --without-luratech --without-omni \
--with-system-libtiff --disable-compile-inits
--with-system-libtiff --disable-compile-inits \
$(vopt_if cups '' '--disable-cups')
# configure libijs
cd ijs
@ -58,8 +62,7 @@ do_build() {
do_install() {
# install ghostscript
make DESTDIR=${DESTDIR} cups_serverroot=${DESTDIR}/etc/cups \
cups_serverbin=${DESTDIR}/usr/lib/cups install install-so
make DESTDIR=${DESTDIR} $(vopt_if cups 'cups_serverroot=${DESTDIR}/etc/cups cups_serverbin=${DESTDIR}/usr/lib/cups') install install-so
# install license
vlicense LICENSE
@ -71,7 +74,7 @@ do_install() {
make DESTDIR=${DESTDIR} install
# Remove conflicting files with cups-filters.
rm -f ${DESTDIR}/usr/lib/cups/filter/{gstopxl,gstoraster}
$(vopt_if cups 'rm -f ${DESTDIR}/usr/lib/cups/filter/{gstopxl,gstoraster}')
cd ..
# Install missing file