/[gentoo-x86]/net-print/gutenprint/gutenprint-5.2.8.ebuild
Gentoo

Contents of /net-print/gutenprint/gutenprint-5.2.8.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Thu Jun 14 12:07:33 2012 UTC (12 months ago) by scarabeus
Branch: MAIN
CVS Tags: HEAD
Version bump wrt bug#420829.

(Portage version: 2.2.0_alpha110/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-print/gutenprint/gutenprint-5.2.7-r1.ebuild,v 1.10 2012/05/18 20:56:08 dilfridge Exp $
4
5 EAPI=4
6
7 inherit eutils multilib autotools
8
9 DESCRIPTION="Ghostscript and cups printer drivers"
10 HOMEPAGE="http://gutenprint.sourceforge.net"
11 SRC_URI="mirror://sourceforge/gimp-print/${P}.tar.bz2"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
16 IUSE="cups foomaticdb gimp gtk nls readline ppds static-libs"
17
18 RDEPEND="app-text/ghostscript-gpl
19 dev-lang/perl
20 readline? ( sys-libs/readline )
21 cups? ( >=net-print/cups-1.1.14 )
22 foomaticdb? ( net-print/foomatic-db-engine )
23 gimp? ( >=media-gfx/gimp-2.2 x11-libs/gtk+:2 )
24 gtk? ( x11-libs/gtk+:2 )
25 nls? ( virtual/libintl )"
26 DEPEND="${RDEPEND}
27 gtk? ( virtual/pkgconfig )
28 nls? ( sys-devel/gettext )"
29
30 RESTRICT="test"
31
32 REQUIRED_USE="gimp? ( gtk )"
33
34 DOCS=( AUTHORS ChangeLog NEWS README doc/gutenprint-users-manual.{pdf,odt} )
35
36 src_prepare() {
37 epatch "${FILESDIR}"/${PN}-5.2.4-CFLAGS.patch
38 epatch "${FILESDIR}"/${PN}-5.2.8-genppd.patch # bug 382927
39 sed -i -e "s:m4local:m4extra:" Makefile.am || die
40
41 eautoreconf
42 }
43
44 src_configure() {
45 local myconf=""
46
47 if use cups && use ppds; then
48 myconf+=" --enable-cups-ppds --enable-cups-level3-ppds"
49 else
50 myconf+=" --disable-cups-ppds"
51 fi
52
53 use foomaticdb \
54 && myconf+=" --with-foomatic3" \
55 || myconf+=" --without-foomatic"
56
57 econf \
58 --enable-test \
59 --with-ghostscript \
60 --disable-translated-cups-ppds \
61 $(use_enable gtk libgutenprintui2) \
62 $(use_with gimp gimp2) \
63 $(use_with gimp gimp2-as-gutenprint) \
64 $(use_with cups) \
65 $(use_enable nls) \
66 $(use_with readline) \
67 $(use_enable static-libs static) \
68 ${myconf}
69 }
70
71 src_install() {
72 default
73
74 dohtml doc/FAQ.html
75 dohtml -r doc/gutenprintui2/html
76 rm -fR "${ED}"/usr/share/gutenprint/doc
77 if ! use gtk; then
78 rm -f "${ED}"/usr/$(get_libdir)/pkgconfig/gutenprintui2.pc
79 rm -rf "${ED}"/usr/include/gutenprintui2
80 fi
81
82 find "${ED}" -name '*.la' -exec rm -f '{}' +
83 }
84
85 pkg_postinst() {
86 if [ "${ROOT}" == "/" ] && [ -x /usr/sbin/cups-genppdupdate ]; then
87 elog "Updating installed printer ppd files"
88 elog $(/usr/sbin/cups-genppdupdate)
89 else
90 elog "You need to update installed ppds manually using cups-genppdupdate"
91 fi
92 }

  ViewVC Help
Powered by ViewVC 1.1.20