From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 1378E58973 for ; Thu, 11 Feb 2016 02:22:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D98C721C017; Thu, 11 Feb 2016 02:22:27 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7161721C017 for ; Thu, 11 Feb 2016 02:22:27 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 32F8E340B81 for ; Thu, 11 Feb 2016 02:22:26 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 14B6ACEE for ; Thu, 11 Feb 2016 02:22:24 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1455157252.75f35a8155a706cf370d89683c268d1b8246e425.vapier@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-print/cups-filters/, net-print/cups-filters/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-print/cups-filters/cups-filters-1.8.1-r1.ebuild net-print/cups-filters/files/cups-filters-1.8.1-allow-disable-ghostscript.patch X-VCS-Directories: net-print/cups-filters/files/ net-print/cups-filters/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 75f35a8155a706cf370d89683c268d1b8246e425 X-VCS-Branch: master Date: Thu, 11 Feb 2016 02:22:24 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 9ab8db2d-4c34-428e-8b05-6625a933705b X-Archives-Hash: 42ae22d0d393b7325e90f3e35daaef70 commit: 75f35a8155a706cf370d89683c268d1b8246e425 Author: Brian Norris chromium org> AuthorDate: Mon Feb 8 21:54:52 2016 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Thu Feb 11 02:20:52 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75f35a81 net-print/cups-filters: add --disable-{foomatic,ghostscript} support Support a new USE flag to allow disabling ghostscript-based filters in a CUPS installation. Requires patching in a new --disable-ghostscript option to the configure script. Patch supplied in upstream bug: https://bugs.linuxfoundation.org/show_bug.cgi?id=1342 Also support a proper configure flag for foomatic at the same time. .../cups-filters/cups-filters-1.8.1-r1.ebuild | 22 ++- ...s-filters-1.8.1-allow-disable-ghostscript.patch | 187 +++++++++++++++++++++ 2 files changed, 197 insertions(+), 12 deletions(-) diff --git a/net-print/cups-filters/cups-filters-1.8.1-r1.ebuild b/net-print/cups-filters/cups-filters-1.8.1-r1.ebuild index a7a1a9a..d6f6ef2 100644 --- a/net-print/cups-filters/cups-filters-1.8.1-r1.ebuild +++ b/net-print/cups-filters/cups-filters-1.8.1-r1.ebuild @@ -21,10 +21,10 @@ HOMEPAGE="http://www.linuxfoundation.org/collaborate/workgroups/openprinting/pdf LICENSE="MIT GPL-2" SLOT="0" -IUSE="dbus +foomatic jpeg perl png static-libs tiff zeroconf" +IUSE="dbus +foomatic jpeg perl png +postscript static-libs tiff zeroconf" RDEPEND=" - >=app-text/ghostscript-gpl-9.09[cups] + postscript? ( >=app-text/ghostscript-gpl-9.09[cups] ) app-text/poppler:=[cxx,jpeg?,lcms,tiff?,utils,xpdf-headers(+)] >=app-text/qpdf-3.0.2:= media-libs/fontconfig @@ -48,6 +48,7 @@ DEPEND="${RDEPEND} src_prepare() { base_src_prepare + epatch "${FILESDIR}/${P}-allow-disable-ghostscript.patch" sed -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" -i configure.ac || die eautoreconf } @@ -58,6 +59,8 @@ src_configure() { $(use_enable dbus) \ $(use_enable zeroconf avahi) \ $(use_enable static-libs static) \ + $(use_enable foomatic) \ + $(use_enable postscript ghostscript) \ --with-fontdir="fonts/conf.avail" \ --with-pdftops=pdftops \ --enable-imagefilters \ @@ -90,9 +93,11 @@ src_install() { popd > /dev/null fi - # workaround: some printer drivers still require pstoraster and pstopxl, bug #383831 - dosym gstoraster /usr/libexec/cups/filter/pstoraster - dosym gstopxl /usr/libexec/cups/filter/pstopxl + if use ghostscript; then + # workaround: some printer drivers still require pstoraster and pstopxl, bug #383831 + dosym gstoraster /usr/libexec/cups/filter/pstoraster + dosym gstopxl /usr/libexec/cups/filter/pstopxl + fi prune_libtool_files --all @@ -103,13 +108,6 @@ src_install() { sed -i -e 's:cups\.service avahi-daemon\.service:cups.service:g' "${S}"/utils/cups-browsed.service || die fi - if ! use foomatic ; then - # this needs an upstream solution / configure switch - rm -v "${ED}/usr/bin/foomatic-rip" || die - rm -v "${ED}/usr/libexec/cups/filter/foomatic-rip" || die - rm -v "${ED}/usr/share/man/man1/foomatic-rip.1" || die - fi - doinitd "${T}"/cups-browsed systemd_dounit "${S}/utils/cups-browsed.service" } diff --git a/net-print/cups-filters/files/cups-filters-1.8.1-allow-disable-ghostscript.patch b/net-print/cups-filters/files/cups-filters-1.8.1-allow-disable-ghostscript.patch new file mode 100644 index 0000000..a9c63da --- /dev/null +++ b/net-print/cups-filters/files/cups-filters-1.8.1-allow-disable-ghostscript.patch @@ -0,0 +1,187 @@ +Allow disabling ghostscript and foomatic. Pulled from upstream bzr rev 7447: + +https://bugs.linuxfoundation.org/show_bug.cgi?id=1342 + +--- a/Makefile.am ++++ b/Makefile.am +@@ -412,11 +412,14 @@ pdftopdf_LDADD = \ + # Simple filter binaries + # ====================== + pkgfilter_SCRIPTS = \ +- filter/gstopxl \ + filter/imagetops \ + filter/pstopdf \ + filter/textonly \ + filter/texttops ++if ENABLE_GHOSTSCRIPT ++pkgfilter_SCRIPTS += \ ++ filter/gstopxl ++endif + if ENABLE_BRAILLE + nodist_pkgfilter_SCRIPTS = \ + filter/braille/drivers/generic/brftoembosser \ +@@ -420,8 +423,6 @@ pdftopdf_LDADD = \ + bannertopdf \ + commandtoescpx \ + commandtopclx \ +- foomatic-rip \ +- gstoraster \ + pdftoijs \ + sys5ippprinter \ + pdftops \ +@@ -432,6 +433,14 @@ pkgfilter_PROGRAMS += \ + texttopdf \ + urftopdf \ + rastertopdf ++if ENABLE_GHOSTSCRIPT ++pkgfilter_PROGRAMS += \ ++ gstoraster ++endif ++if ENABLE_FOOMATIC ++pkgfilter_PROGRAMS += \ ++ foomatic-rip ++endif + if ENABLE_IMAGEFILTERS + pkgfilter_PROGRAMS += \ + imagetopdf \ +@@ -737,8 +746,11 @@ initrcdir = $(INITDDIR) + initrc_SCRIPTS = utils/cups-browsed + man_MANS = \ + utils/cups-browsed.8 \ +- utils/cups-browsed.conf.5 \ ++ utils/cups-browsed.conf.5 ++if ENABLE_FOOMATIC ++man_MANS += \ + filter/foomatic-rip/foomatic-rip.1 ++endif + EXTRA_DIST += utils/cups-browsed.in \ + $(man_MANS) + utils/org.cups.cupsd.Notifier.xml +@@ -752,9 +764,12 @@ ppd_DATA = \ + ppd/HP-Color_LaserJet_CM3530_MFP-PDF.ppd \ + ppd/HP-PhotoSmart_Pro_B8300-hpijs-pdftoijs.ppd \ + ppd/Ricoh-PDF_Printer-PDF.ppd \ +- ppd/pxlcolor.ppd \ +- ppd/pxlmono.ppd \ + ppd/textonly.ppd ++if ENABLE_GHOSTSCRIPT ++ppd_DATA += \ ++ ppd/pxlcolor.ppd \ ++ ppd/pxlmono.ppd ++endif + + EXTRA_DIST += $(ppd_DATA) + +@@ -782,7 +797,9 @@ distclean-local: + install-exec-hook: + $(INSTALL) -d -m 755 $(DESTDIR)$(bindir) + $(INSTALL) -d -m 755 $(DESTDIR)$(pkgfilterdir) ++if ENABLE_FOOMATIC + $(LN_S) -f $(pkgfilterdir)/foomatic-rip $(DESTDIR)$(bindir) ++endif + if ENABLE_BRAILLE + $(LN_S) -f imagetobrf $(DESTDIR)$(pkgfilterdir)/imagetoubrl + $(LN_S) -f textbrftoindexv3 $(DESTDIR)$(pkgfilterdir)/textbrftoindexv4 +@@ -806,7 +823,9 @@ if RCLINKS + fi + endif + $(RM) $(DESTDIR)$(pkgcharsetdir)/pdf.utf-8 ++if ENABLE_FOOMATIC + $(RM) $(DESTDIR)$(bindir)/foomatic-rip ++endif + if ENABLE_BRAILLE + $(RM) $(DESTDIR)$(pkgfilterdir)/imagetoubrl + $(RM) $(DESTDIR)$(pkgfilterdir)/textbrftoindexv4 +--- a/configure.ac ++++ b/configure.ac +@@ -431,6 +431,11 @@ AS_IF([test x"$long_long_found" = "xyes"], [ + # ================ + # Check for pdf2ps + # ================ ++AC_ARG_ENABLE([ghostscript], ++ [AS_HELP_STRING([--disable-ghostscript], [Disable filters using Ghostscript.])], ++ [enable_ghostscript="$enableval"], ++ [enable_ghostscript=yes] ++) + AC_ARG_WITH([pdftops], + [AS_HELP_STRING([--with-pdftops=value], [Set which pdftops to use (gs,pdftops,pdftocairo,acroread,hybrid).])], + [with_pdftops="$withval"], +@@ -471,25 +476,35 @@ AS_CASE([x$with_pdftops_maxres], + [AC_MSG_ERROR([Unknown value of with-pdftops-maxres provided: $with_pdftops])] + ) + +-AS_IF([test "x$with_gs_path" != "xsystem"], [ +- CUPS_GHOSTSCRIPT="$with_gs_path" +-], [ +- AC_PATH_PROG(CUPS_GHOSTSCRIPT, [gs], [AC_MSG_ERROR([Required gs binary is missing. Please install ghostscript-gpl package.])]) +-]) +-AS_IF([test "x$CUPS_GHOSTSCRIPT" != "x"], [ +- AC_DEFINE([HAVE_GHOSTSCRIPT], [], [Define that we provide ghostscript binary]) +- AS_IF([test x"$with_pdftops" = xgs], [AC_DEFINE_UNQUOTED([CUPS_PDFTOPS_RENDERER], [GS], [Define default renderer])]) +- +- AC_MSG_CHECKING(whether gs supports the ps2write device) +- AS_IF([`$CUPS_GHOSTSCRIPT -h 2>&1 | grep -q ps2write`], [ +- AC_MSG_RESULT([yes]) +- AC_DEFINE([HAVE_GHOSTSCRIPT_PS2WRITE], [], [gs supports ps2write]) ++CUPS_GHOSTSCRIPT="" ++AS_IF([test "x$enable_ghostscript" != "xyes"], [ ++ AS_IF([test "x$with_gs_path" != "xsystem"], [ ++ AC_MSG_ERROR([Cannot supply both --disable-ghostscript and --gs-path=]) + ], [ +- AC_MSG_RESULT([no]) ++ with_gs_path="" + ]) + ], [ +- CUPS_GHOSTSCRIPT="gs" ++ AS_IF([test "x$with_gs_path" != "xsystem"], [ ++ CUPS_GHOSTSCRIPT="$with_gs_path" ++ ], [ ++ AC_PATH_PROG(CUPS_GHOSTSCRIPT, [gs], [AC_MSG_ERROR([Required gs binary is missing. Please install ghostscript-gpl package.])]) ++ ]) ++ AS_IF([test "x$CUPS_GHOSTSCRIPT" != "x"], [ ++ AC_DEFINE([HAVE_GHOSTSCRIPT], [], [Define that we provide ghostscript binary]) ++ AS_IF([test x"$with_pdftops" = xgs], [AC_DEFINE_UNQUOTED([CUPS_PDFTOPS_RENDERER], [GS], [Define default renderer])]) ++ ++ AC_MSG_CHECKING(whether gs supports the ps2write device) ++ AS_IF([`$CUPS_GHOSTSCRIPT -h 2>&1 | grep -q ps2write`], [ ++ AC_MSG_RESULT([yes]) ++ AC_DEFINE([HAVE_GHOSTSCRIPT_PS2WRITE], [], [gs supports ps2write]) ++ ], [ ++ AC_MSG_RESULT([no]) ++ ]) ++ ], [ ++ CUPS_GHOSTSCRIPT="gs" ++ ]) + ]) ++AM_CONDITIONAL(ENABLE_GHOSTSCRIPT, test "x$enable_ghostscript" = xyes) + + AS_IF([test "x$with_pdftops_path" != "xsystem"], [ + CUPS_PDFTOPS="$with_pdftops_path" +@@ -550,6 +565,16 @@ AC_DEFINE_UNQUOTED([CUPS_POPPLER_PDFTOCAIRO], "$CUPS_PDFTOCAIRO", [pdftocairo bi + AC_DEFINE_UNQUOTED([CUPS_ACROREAD], "$CUPS_ACROREAD", [acroread binary to use.]) + AC_DEFINE_UNQUOTED([CUPS_PDFTOPS_MAX_RESOLUTION], [$CUPS_PDFTOPS_MAXRES], [max resolution used for pdftops when converting images]) + ++# ================== ++# Check for foomatic ++# ================== ++AC_ARG_ENABLE([foomatic], ++ [AS_HELP_STRING([--disable-foomatic], [Disable Foomatic-based filters.])], ++ [enable_foomatic="$enableval"], ++ [enable_foomatic=yes] ++) ++AM_CONDITIONAL([ENABLE_FOOMATIC], [test "x$enable_foomatic" = "xyes"]) ++ + # ============= + # Check for php + # ============= +@@ -658,8 +683,10 @@ Environment settings: + Build configuration: + cups-config: ${with_cups_config} + font directory: ${sysconfdir}/${FONTDIR} ++ foomatic: ${enable_foomatic} + init directory: ${INITDDIR} + cups dom socket: ${CUPS_DEFAULT_DOMAINSOCKET} ++ ghostscript: ${enable_ghostscript} + gs-path: ${with_gs_path} + imagefilters: ${enable_imagefilters} + jpeg: ${with_jpeg}