summaryrefslogtreecommitdiff
blob: 63989d31707c865b24a40cd1ee0f593f83d8a552 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-print/omni/omni-0.9.0.ebuild,v 1.3 2003/07/29 13:35:01 lanius Exp $

DESCRIPTION="Omni provides support for many printers with a pluggable framework (easy to add devices)"
HOMEPAGE="http://sourceforge.net/projects/omniprint"
MY_P=${P/o/O}
SRC_URI="mirror://sourceforge/omniprint/${MY_P}.tar.gz"
LICENSE="LGPL-2"
SLOT="0"
KEYWORDS="x86"
DEPEND=""
RDEPEND=">=app-text/ghostscript-7.05.3-r2
	>=dev-libs/libxml-1.8.6
	dev-libs/glib
	cups? ( >=net-print/cups-1.1.14 )
	X? ( >=dev-cpp/gtkmm-1.2.5 )
	>=dev-libs/libsigc++-1.01
	foomaticdb? ( net-print/foomatic-db-engine )"

S=${WORKDIR}/Omni

IUSE="cups X ppds foomaticdb static"

src_compile() {
	use X \
		&& myconf="${myconf} --enable-jobdialog" \
		|| myconf="${myconf} --disable-jobdialog"
	use cups \
		&& myconf="${myconf} --enable-cups" \
		|| myconf="${myconf} --disable-cups"
	use static \
		&& myconf="${myconf} --enable-static" \
		|| myconf="${myconf} --disable-static"
	
	./setupOmni ${myconf} || die

	if [ "`use ppds`" -a "`use cups`" ]; then
		cd CUPS
		cp Makefile Makefile.1
		sed -e "s/model\/foomatic/model\/omni/g" Makefile.1 > Makefile

		make generateBuildPPDs || die
		cd ..
	fi
	if [ `use foomaticdb` ]; then
		cd Foomatic
		make generateFoomaticData || die
		cd ..
	fi
}

src_install () {
	make DESTDIR=${D} install || die

	if [ `use foomaticdb` ]; then
		cd Foomatic
		make DESTDIR=${D} localInstall || die
		cd ..
	fi
}