diff options
author | Brian Norris <briannorris@chromium.org> | 2016-03-23 02:26:53 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2016-03-23 02:27:40 -0400 |
commit | 60b83034240153d49d9e422a5ef8e4dce196be2f (patch) | |
tree | 3f139f11af3c494aa8418e804f69883ce41eeaf8 /net-print | |
parent | net-print/cups-filters: fix paths to cups runtime state (diff) | |
download | gentoo-60b83034240153d49d9e422a5ef8e4dce196be2f.tar.gz gentoo-60b83034240153d49d9e422a5ef8e4dce196be2f.tar.bz2 gentoo-60b83034240153d49d9e422a5ef8e4dce196be2f.zip |
net-print/cups-filters: add upstream fixes for USE=-postscript
When ghostscript is disabled, make sure we still don't require features
from it at configure & runtime.
Diffstat (limited to 'net-print')
3 files changed, 141 insertions, 1 deletions
diff --git a/net-print/cups-filters/cups-filters-1.8.2-r1.ebuild b/net-print/cups-filters/cups-filters-1.8.2-r1.ebuild index 00d262666c84..844bf04bd6ab 100644 --- a/net-print/cups-filters/cups-filters-1.8.2-r1.ebuild +++ b/net-print/cups-filters/cups-filters-1.8.2-r1.ebuild @@ -6,7 +6,7 @@ EAPI=5 GENTOO_DEPEND_ON_PERL=no -inherit eutils perl-module systemd +inherit eutils perl-module autotools systemd if [[ "${PV}" == "9999" ]] ; then inherit bzr @@ -47,6 +47,12 @@ DEPEND="${RDEPEND} dev-util/gdbus-codegen " +src_prepare() { + epatch "${FILESDIR}"/${P}-disable-ijs.patch #574992 + epatch "${FILESDIR}"/${P}-gstoraster.patch + eautoreconf +} + src_configure() { econf \ --docdir="${EPREFIX}/usr/share/doc/${PF}" \ diff --git a/net-print/cups-filters/files/cups-filters-1.8.2-disable-ijs.patch b/net-print/cups-filters/files/cups-filters-1.8.2-disable-ijs.patch new file mode 100644 index 000000000000..7167c9c72489 --- /dev/null +++ b/net-print/cups-filters/files/cups-filters-1.8.2-disable-ijs.patch @@ -0,0 +1,68 @@ +ijs is part of the ghostscript package, so it needs to be dropped when we drop +ghostscript (i.e., USE="-postscript"). Patch accepted here: + +https://bugs.linuxfoundation.org/show_bug.cgi?id=1345 + +--- Makefile.am ++++ Makefile.am +@@ -490,7 +490,6 @@ + bannertopdf \ + commandtoescpx \ + commandtopclx \ +- pdftoijs \ + sys5ippprinter \ + pdftops \ + pdftoraster \ +@@ -499,6 +498,10 @@ + texttopdf \ + urftopdf \ + rastertopdf ++if ENABLE_IJS ++pkgfilter_PROGRAMS += \ ++ pdftoijs ++endif + if ENABLE_GHOSTSCRIPT + pkgfilter_PROGRAMS += \ + gstoraster +@@ -846,9 +849,12 @@ + ppd/Fuji_Xerox-DocuPrint_CM305_df-PDF.ppd \ + ppd/Generic-PDF_Printer-PDF.ppd \ + ppd/HP-Color_LaserJet_CM3530_MFP-PDF.ppd \ +- ppd/HP-PhotoSmart_Pro_B8300-hpijs-pdftoijs.ppd \ + ppd/Ricoh-PDF_Printer-PDF.ppd \ + ppd/textonly.ppd ++if ENABLE_IJS ++ppd_DATA += \ ++ ppd/HP-PhotoSmart_Pro_B8300-hpijs-pdftoijs.ppd ++endif + if ENABLE_GHOSTSCRIPT + ppd_DATA += \ + ppd/pxlcolor.ppd \ + +--- configure.ac ++++ configure.ac +@@ -443,7 +443,7 @@ + ]) + PKG_CHECK_MODULES([FREETYPE], [freetype2], [AC_DEFINE([HAVE_FREETYPE_H], [1], [Have FreeType2 include files])]) + PKG_CHECK_MODULES([FONTCONFIG], [fontconfig >= 2.0.0]) +-PKG_CHECK_MODULES([IJS], [ijs]) ++PKG_CHECK_MODULES([IJS], [ijs], [have_ijs=yes], [have_ijs=no]) + PKG_CHECK_MODULES([POPPLER], [poppler >= 0.18]) + PKG_CHECK_MODULES([ZLIB], [zlib]) + AC_DEFINE([HAVE_LIBZ], [], [Define that we use zlib]) +@@ -489,6 +489,15 @@ + [enable_ghostscript="$enableval"], + [enable_ghostscript=yes] + ) ++AC_ARG_ENABLE([ijs], ++ [AS_HELP_STRING([--disable-ijs], [Disable filters using IJS.])], ++ [enable_ijs="$enableval"], ++ [enable_ijs=yes] ++) ++AS_IF([test "x$enable_ijs" = "xyes" -a "x$have_ijs" != "xyes"], [ ++ AC_MSG_ERROR([IJS not found, but requested.]) ++]) ++AM_CONDITIONAL(ENABLE_IJS, test "x$enable_ijs" = "xyes") + AC_ARG_WITH([pdftops], + [AS_HELP_STRING([--with-pdftops=value], [Set which pdftops to use (gs,pdftops,pdftocairo,acroread,hybrid).])], + [with_pdftops="$withval"], diff --git a/net-print/cups-filters/files/cups-filters-1.8.2-gstoraster.patch b/net-print/cups-filters/files/cups-filters-1.8.2-gstoraster.patch new file mode 100644 index 000000000000..91fd49a7e571 --- /dev/null +++ b/net-print/cups-filters/files/cups-filters-1.8.2-gstoraster.patch @@ -0,0 +1,66 @@ +When we remove ghostscript-based filters, CUPS complains about a missing +'gstoraster' filter, even if it doesn't need it. The fix is to drop the +gstoraster rules from the MIME conversion rules. Patch accepted here: + +https://bugs.linuxfoundation.org/show_bug.cgi?id=1346 + +--- COPYING 2016-01-21 14:50:23 +0000 ++++ COPYING 2016-03-03 02:35:23 +0000 +@@ -103,7 +103,7 @@ + 1993-2007, Easy Software Products + License: GPL-2 + +-Files: mime/cupsfilters.convs* ++Files: mime/cupsfilters*.convs* + Copyright: 2007-2011, Apple Inc + 1997-2007, Easy Software Products + 2012-2016, Till Kamppeter + +--- Makefile.am 2016-03-03 02:39:23 +0000 ++++ Makefile.am 2016-03-03 02:44:15 +0000 +@@ -292,6 +292,10 @@ + pkgmime_DATA = \ + mime/cupsfilters.convs \ + mime/cupsfilters.types ++if ENABLE_GHOSTSCRIPT ++pkgmime_DATA += \ ++ mime/cupsfilters-ghostscript.convs ++endif + if ENABLE_BRAILLE + pkgmime_DATA += \ + mime/braille.convs \ + +--- mime/cupsfilters-ghostscript.convs 1970-01-01 00:00:00 +0000 ++++ mime/cupsfilters-ghostscript.convs 2016-03-03 02:31:30 +0000 +@@ -0,0 +1,19 @@ ++# ++# MIME conversions file for OpenPrinting CUPS Filters. ++# ++# Copyright 2007-2011 by Apple Inc. ++# Copyright 1997-2007 by Easy Software Products. ++# Copyright 2012-2016 by Till Kamppeter. ++# ++# These coded instructions, statements, and computer programs are the ++# property of Apple Inc. and are protected by Federal copyright ++# law. Distribution and use rights are outlined in the file "COPYING" ++# which should have been included with this file. ++# ++ ++# ++# Ghostscript-based filters... ++# ++ ++application/vnd.cups-pdf application/vnd.cups-raster 99 gstoraster ++application/vnd.cups-postscript application/vnd.cups-raster 175 gstoraster + +--- mime/cupsfilters.convs 2016-01-21 14:50:23 +0000 ++++ mime/cupsfilters.convs 2016-03-03 02:35:59 +0000 +@@ -83,8 +83,6 @@ + # Raster filters... + # + +-application/vnd.cups-pdf application/vnd.cups-raster 99 gstoraster +-application/vnd.cups-postscript application/vnd.cups-raster 175 gstoraster + application/vnd.cups-pdf application/vnd.cups-raster 100 pdftoraster + image/gif application/vnd.cups-raster 100 imagetoraster + image/png application/vnd.cups-raster 100 imagetoraster |