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/gutenprint/gutenprint-5.3.3-r2.ebuild | |
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/gutenprint/gutenprint-5.3.3-r2.ebuild')
-rw-r--r-- | net-print/gutenprint/gutenprint-5.3.3-r2.ebuild | 87 |
1 files changed, 87 insertions, 0 deletions
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 +} |