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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations) (download)
Thu Apr 25 18:43:59 2013 UTC (7 weeks, 4 days ago) by radhermit
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +7 -3 lines
Fix autoreconf failures with automake-1.13 (bug #467206).

(Portage version: 2.2.0_alpha173/cvs/Linux x86_64, signed Manifest commit with key 4AB3E85B4F064CA3)

1 # Copyright 1999-2013 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.9.ebuild,v 1.9 2012/12/30 15:03:55 ago 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 "s:m4local:m4extra:" Makefile.am || die
40
41 sed -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" \
42 -e "s/AM_PROG_CC_STDC/AC_PROG_CC/" \
43 -i configure.ac || die
44
45 eautoreconf
46 }
47
48 src_configure() {
49 local myconf=""
50
51 if use cups && use ppds; then
52 myconf+=" --enable-cups-ppds --enable-cups-level3-ppds"
53 else
54 myconf+=" --disable-cups-ppds"
55 fi
56
57 use foomaticdb \
58 && myconf+=" --with-foomatic3" \
59 || myconf+=" --without-foomatic"
60
61 econf \
62 --enable-test \
63 --with-ghostscript \
64 --disable-translated-cups-ppds \
65 $(use_enable gtk libgutenprintui2) \
66 $(use_with gimp gimp2) \
67 $(use_with gimp gimp2-as-gutenprint) \
68 $(use_with cups) \
69 $(use_enable nls) \
70 $(use_with readline) \
71 $(use_enable static-libs static) \
72 ${myconf}
73 }
74
75 src_install() {
76 default
77
78 dohtml doc/FAQ.html
79 dohtml -r doc/gutenprintui2/html
80 rm -fR "${ED}"/usr/share/gutenprint/doc
81 if ! use gtk; then
82 rm -f "${ED}"/usr/$(get_libdir)/pkgconfig/gutenprintui2.pc
83 rm -rf "${ED}"/usr/include/gutenprintui2
84 fi
85
86 find "${ED}" -name '*.la' -exec rm -f '{}' +
87 }
88
89 pkg_postinst() {
90 if [ "${ROOT}" == "/" ] && [ -x /usr/sbin/cups-genppdupdate ]; then
91 elog "Updating installed printer ppd files"
92 elog $(/usr/sbin/cups-genppdupdate)
93 else
94 elog "You need to update installed ppds manually using cups-genppdupdate"
95 fi
96 }

  ViewVC Help
Powered by ViewVC 1.1.20