From f6e1c2514a86ddd89204d9c394451ead339ce912 Mon Sep 17 00:00:00 2001 From: Owen Rafferty Date: Tue, 15 Oct 2019 15:50:08 -0500 Subject: [PATCH] ghostscript: add cups build_option --- srcpkgs/ghostscript/template | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/srcpkgs/ghostscript/template b/srcpkgs/ghostscript/template index 6e6507be8fd..38e281a259c 100644 --- a/srcpkgs/ghostscript/template +++ b/srcpkgs/ghostscript/template @@ -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 " 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