| 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/foomatic-filters/foomatic-filters-4.0.12.ebuild,v 1.1 2012/03/08 08:48:48 scarabeus Exp $
|
| 4 |
|
| 5 |
EAPI=4
|
| 6 |
|
| 7 |
inherit autotools eutils versionator
|
| 8 |
|
| 9 |
DESCRIPTION="Foomatic wrapper scripts"
|
| 10 |
HOMEPAGE="http://www.linuxprinting.org/foomatic.html"
|
| 11 |
SRC_URI="http://www.openprinting.org/download/foomatic/${P}.tar.gz"
|
| 12 |
|
| 13 |
LICENSE="GPL-2"
|
| 14 |
SLOT="0"
|
| 15 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
|
| 16 |
IUSE="cups dbus"
|
| 17 |
|
| 18 |
RDEPEND="
|
| 19 |
dev-lang/perl
|
| 20 |
app-text/ghostscript-gpl
|
| 21 |
cups? ( >=net-print/cups-1.1.19 )
|
| 22 |
!cups? (
|
| 23 |
|| (
|
| 24 |
app-text/enscript
|
| 25 |
app-text/a2ps
|
| 26 |
app-text/mpage
|
| 27 |
)
|
| 28 |
)
|
| 29 |
dbus? ( sys-apps/dbus )"
|
| 30 |
DEPEND="${RDEPEND}"
|
| 31 |
|
| 32 |
src_prepare() {
|
| 33 |
if use cups; then
|
| 34 |
CUPS_SERVERBIN="$(cups-config --serverbin)"
|
| 35 |
else
|
| 36 |
CUPS_SERVERBIN=""
|
| 37 |
fi
|
| 38 |
|
| 39 |
# Search for libs in ${libdir}, not just /usr/lib
|
| 40 |
epatch "${FILESDIR}"/${PN}-4.0.9-multilib.patch
|
| 41 |
eautoreconf
|
| 42 |
|
| 43 |
export CUPS_BACKENDS=${CUPS_SERVERBIN}/backend \
|
| 44 |
CUPS_FILTERS=${CUPS_SERVERBIN}/filter CUPS=${CUPS_SERVERBIN}/
|
| 45 |
}
|
| 46 |
|
| 47 |
src_configure() {
|
| 48 |
econf $(use_enable dbus)
|
| 49 |
}
|
| 50 |
|
| 51 |
src_install() {
|
| 52 |
default
|
| 53 |
|
| 54 |
dosym /usr/bin/foomatic-rip /usr/bin/lpdomatic
|
| 55 |
|
| 56 |
if use cups; then
|
| 57 |
dosym /usr/bin/foomatic-gswrapper "${CUPS_SERVERBIN}/filter/foomatic-gswrapper"
|
| 58 |
dosym /usr/bin/foomatic-rip "${CUPS_SERVERBIN}/filter/cupsomatic"
|
| 59 |
else
|
| 60 |
rm -r "${ED}"/${CUPS_SERVERBIN}/filter
|
| 61 |
rm -r "${ED}"/${CUPS_SERVERBIN}/backend
|
| 62 |
fi
|
| 63 |
}
|