diff options
author | Pacho Ramos <pacho@gentoo.org> | 2020-11-10 11:34:31 +0100 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2020-11-10 11:34:31 +0100 |
commit | c311a98c641c766e363be4e8b2dc96e87154bb44 (patch) | |
tree | 9ec6c9a02d9cb61e17d413a219dbf4135b247b5e /net-print | |
parent | package.mask: Mask vulnerable dev-python/pillow and revdeps (kodi) (diff) | |
download | gentoo-c311a98c641c766e363be4e8b2dc96e87154bb44.tar.gz gentoo-c311a98c641c766e363be4e8b2dc96e87154bb44.tar.bz2 gentoo-c311a98c641c766e363be4e8b2dc96e87154bb44.zip |
net-print/gutenprint: Fix ROOT detection and canon/epson bugs
Fix ROOT detection with eapi7 and backport upstream fixes for some Canon and
Epson printers
Closes: https://bugs.gentoo.org/753815
Package-Manager: Portage-3.0.9, Repoman-3.0.1
Signed-off-by: Pacho Ramos <pacho@gentoo.org>
Diffstat (limited to 'net-print')
3 files changed, 163 insertions, 0 deletions
diff --git a/net-print/gutenprint/files/gutenprint-5.3.3-epson.patch b/net-print/gutenprint/files/gutenprint-5.3.3-epson.patch new file mode 100644 index 000000000000..28906470c7f6 --- /dev/null +++ b/net-print/gutenprint/files/gutenprint-5.3.3-epson.patch @@ -0,0 +1,54 @@ +From: Robert Krawitz <rlk@alum.mit.edu> +Date: Sun, 16 Feb 2020 11:21:23 -0500 +Subject: Updates for Epson Stylus Office printers + +Add duplex support for the following printers: + Epson Stylus Office BX525WD + Epson Stylus Office BX535WD + Epson Stylus Office BX62F5WD + Epson Stylus Office BX635FWD + Epson Stylus Office TX620FWD + +Origin: upstream +Closes: #951410 +--- + src/xml/printers/escp2.xml | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/src/xml/printers/escp2.xml b/src/xml/printers/escp2.xml +index 28716a4..79f5a70 100644 +--- a/src/xml/printers/escp2.xml ++++ b/src/xml/printers/escp2.xml +@@ -189,7 +189,7 @@ + <printer translate="name" name="Epson Stylus Office B30" driver="escp2-of-b30" manufacturer="Epson" model="85" parameters="standard_params" /> + <printer translate="name" name="Epson Stylus Office B33" driver="escp2-of-b33" manufacturer="Epson" model="85" parameters="standard_params" /> + <printer translate="name" name="Epson Stylus Office B40W" driver="escp2-of-b40w" manufacturer="Epson" model="92" parameters="standard_params" /> +- <printer translate="name" name="Epson Stylus Office B42WD" driver="escp2-of-b42wd" manufacturer="Epson" model="92" parameters="standard_params" /> ++ <printer translate="name" name="Epson Stylus Office B42WD" driver="escp2-of-b42wd" manufacturer="Epson" model="118" parameters="standard_params" /> + <printer translate="name" name="Epson Stylus Office B1100" driver="escp2-of-b1100" manufacturer="Epson" model="99" parameters="standard_params" /> + <printer translate="name" name="Epson Stylus Office T30" driver="escp2-of-t30" manufacturer="Epson" model="85" parameters="standard_params" /> + <printer translate="name" name="Epson Stylus Office T33" driver="escp2-of-t33" manufacturer="Epson" model="85" parameters="standard_params" /> +@@ -197,17 +197,18 @@ + <printer translate="name" name="Epson Stylus Office T1100" driver="escp2-of-t1100" manufacturer="Epson" model="99" parameters="standard_params" /> + <printer translate="name" name="Epson Stylus Office T1110" driver="escp2-of-t1110" manufacturer="Epson" model="99" parameters="standard_params" /> + <printer translate="name" name="Epson Stylus Office BX300F" driver="escp2-of-bx300f" manufacturer="Epson" model="94" parameters="standard_params" /> +- <printer translate="name" name="Epson Stylus Office BX525WD" driver="escp2-of-bx525wd" manufacturer="Epson" model="92" parameters="standard_params" /> +- <printer translate="name" name="Epson Stylus Office BX535WD" driver="escp2-of-bx535wd" manufacturer="Epson" model="92" parameters="standard_params" /> ++ <printer translate="name" name="Epson Stylus Office BX305F" driver="escp2-of-bx305f" manufacturer="Epson" model="94" parameters="standard_params" /> ++ <printer translate="name" name="Epson Stylus Office BX525WD" driver="escp2-of-bx525wd" manufacturer="Epson" model="118" parameters="standard_params" /> ++ <printer translate="name" name="Epson Stylus Office BX535WD" driver="escp2-of-bx535wd" manufacturer="Epson" model="118" parameters="standard_params" /> + <printer translate="name" name="Epson Stylus Office BX600FW" driver="escp2-of-bx600fw" manufacturer="Epson" model="92" parameters="standard_params" /> +- <printer translate="name" name="Epson Stylus Office BX625FWD" driver="escp2-of-bx625fwd" manufacturer="Epson" model="92" parameters="standard_params" /> ++ <printer translate="name" name="Epson Stylus Office BX625FWD" driver="escp2-of-bx625fwd" manufacturer="Epson" model="118" parameters="standard_params" /> + <printer translate="name" name="Epson Stylus Office BX630FW" driver="escp2-of-bx630fw" manufacturer="Epson" model="92" parameters="standard_params" /> +- <printer translate="name" name="Epson Stylus Office BX635FWD" driver="escp2-of-bx635fwd" manufacturer="Epson" model="92" parameters="standard_params" /> ++ <printer translate="name" name="Epson Stylus Office BX635FWD" driver="escp2-of-bx635fwd" manufacturer="Epson" model="118" parameters="standard_params" /> + <printer translate="name" name="Epson Stylus Office SX600FW" driver="escp2-of-sx600fw" manufacturer="Epson" model="92" parameters="standard_params" /> + <printer translate="name" name="Epson Stylus Office SX620FW" driver="escp2-of-sx620fw" manufacturer="Epson" model="92" parameters="standard_params" /> + <printer translate="name" name="Epson Stylus Office TX300F" driver="escp2-of-tx300f" manufacturer="Epson" model="94" parameters="standard_params" /> + <printer translate="name" name="Epson Stylus Office TX600FW" driver="escp2-of-tx600fw" manufacturer="Epson" model="92" parameters="standard_params" /> +- <printer translate="name" name="Epson Stylus Office TX620FWD" driver="escp2-of-tx620fwd" manufacturer="Epson" model="92" parameters="standard_params" /> ++ <printer translate="name" name="Epson Stylus Office TX620FWD" driver="escp2-of-tx620fwd" manufacturer="Epson" model="118" parameters="standard_params" /> + <printer translate="name" name="Epson Stylus Photo" driver="escp2-photo" manufacturer="Epson" model="9" parameters="standard_params" /> + <printer translate="name" name="Epson Stylus Photo 700" deviceid="MFG:EPSON;MDL:Stylus Photo 700;DES:EPSON Stylus Photo 700;CMD:ESCPL2,BDC;" driver="escp2-700" manufacturer="Epson" model="7" parameters="standard_params" /> + <printer translate="name" name="Epson Stylus Photo EX" deviceid="MFG:EPSON;MDL:Stylus Photo EX;CMD:ESCPL2,BDC;" driver="escp2-ex" manufacturer="Epson" model="8" parameters="standard_params" /> diff --git a/net-print/gutenprint/files/gutenprint-5.3.3-selphy-typo.patch b/net-print/gutenprint/files/gutenprint-5.3.3-selphy-typo.patch new file mode 100644 index 000000000000..393fa718fd36 --- /dev/null +++ b/net-print/gutenprint/files/gutenprint-5.3.3-selphy-typo.patch @@ -0,0 +1,22 @@ +From: "Andreas B. Mundt" <andi@debian.org> +Date: Mon, 4 Nov 2019 18:40:58 +0100 +Subject: Fix 'selpyh' for 'selphy' typo for Canon CP300 + +Closes: #943964 +--- + src/cups/backend_canonselphy.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/cups/backend_canonselphy.c b/src/cups/backend_canonselphy.c +index 978df0d..3ef0c31 100644 +--- a/src/cups/backend_canonselphy.c ++++ b/src/cups/backend_canonselphy.c +@@ -1165,7 +1165,7 @@ struct dyesub_backend canonselphy_backend = { + { USB_VID_CANON, USB_PID_CANON_CP100, P_CP_XXX, NULL, "canon-cp100"}, + { USB_VID_CANON, USB_PID_CANON_CP200, P_CP_XXX, NULL, "canon-cp200"}, + { USB_VID_CANON, USB_PID_CANON_CP220, P_CP_XXX, NULL, "canon-cp220"}, +- { USB_VID_CANON, USB_PID_CANON_CP300, P_CP_XXX, NULL, "selpyhcp300"}, ++ { USB_VID_CANON, USB_PID_CANON_CP300, P_CP_XXX, NULL, "selphycp300"}, + { USB_VID_CANON, USB_PID_CANON_CP330, P_CP_XXX, NULL, "canon-cp330"}, + { USB_VID_CANON, USB_PID_CANON_CP400, P_CP_XXX, NULL, "canon-cp400"}, + { USB_VID_CANON, USB_PID_CANON_CP500, P_CP_XXX, NULL, "canon-cp500"}, diff --git a/net-print/gutenprint/gutenprint-5.3.3-r2.ebuild b/net-print/gutenprint/gutenprint-5.3.3-r2.ebuild new file mode 100644 index 000000000000..2c2cceda92e9 --- /dev/null +++ b/net-print/gutenprint/gutenprint-5.3.3-r2.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="Ghostscript and cups printer drivers" +HOMEPAGE="http://gutenprint.sourceforge.net" + +MY_P="${P/_/-}" +S="${WORKDIR}/${MY_P}" +SRC_URI="mirror://sourceforge/gimp-print/${MY_P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" + +IUSE="cups gimp gtk nls readline ppds static-libs" +REQUIRED_USE="gimp? ( gtk )" + +BDEPEND=" + virtual/pkgconfig + nls? ( sys-devel/gettext ) +" +# gimp restriction: https://sourceforge.net/p/gimp-print/bugs/725/ +CDEPEND=" + dev-lang/perl + readline? ( sys-libs/readline:0= ) + cups? ( >=net-print/cups-1.1.14 ) + gimp? ( media-gfx/gimp:0/2 x11-libs/gtk+:2 ) + gtk? ( x11-libs/gtk+:2 ) + nls? ( virtual/libintl ) +" +RDEPEND="${CDEPEND}" +DEPEND="${CDEPEND}" + +RESTRICT="test" + +DOCS=( AUTHORS ChangeLog NEWS README doc/gutenprint-users-manual.{pdf,odt} ) + +PATCHES=( + "${FILESDIR}"/${PN}-5.3.1-cflags.patch + # From upstream, fixed in next version + "${FILESDIR}"/${P}-epson.patch + "${FILESDIR}"/${P}-selphy-typo.patch +) + +src_configure() { + local myeconfargs=( + --enable-test + --disable-translated-cups-ppds + $(use_enable gtk libgutenprintui2) + $(use_with gimp gimp2) + $(use_with gimp gimp2-as-gutenprint) + $(use_with cups) + $(use_enable nls) + $(use_with readline) + $(use_enable static-libs static) + ) + + if use cups && use ppds; then + myeconfargs+=( --enable-cups-ppds --enable-cups-level3-ppds ) + else + myeconfargs+=( --disable-cups-ppds ) + fi + + econf "${myeconfargs[@]}" +} + +src_install() { + default + + dodoc doc/FAQ.html + dodoc -r doc/gutenprintui2/html + rm -r "${ED}"/usr/share/gutenprint/doc || die + + find "${ED}" -name '*.la' -exec rm -f '{}' + || die +} + +pkg_postinst() { + if [[ -z ${ROOT} ]] && [[ -x /usr/sbin/cups-genppdupdate ]]; then + elog "Updating installed printer ppd files" + elog $(/usr/sbin/cups-genppdupdate) + else + elog "You need to update installed ppds manually using cups-genppdupdate" + fi +} |