Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 287005 | Differences between
and this patch

Collapse All | Expand All

(-)hplip-3.9.8.ebuild (-81 / +88 lines)
Lines 1-93 Link Here
1
# Copyright 1999-2009 Gentoo Foundation
1
# Copyright 1999-2009 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/net-print/hplip/hplip-3.9.8.ebuild,v 1.1 2009/09/24 19:55:40 flameeyes Exp $
3
# $Header: $
4
4
5
EAPI="2"
5
EAPI="2"
6
6
7
inherit eutils fdo-mime linux-info python autotools
7
inherit eutils fdo-mime linux-info python autotools
8
8
9
DESCRIPTION="HP Linux Imaging and Printing System. Includes net-print/hpijs, scanner drivers and service tools."
9
DESCRIPTION="HP Linux Imaging and Printing System. Includes printer, scanner, fax drivers and service tools."
10
HOMEPAGE="http://hplip.sourceforge.net/"
10
HOMEPAGE="http://hplip.sourceforge.net/"
11
SRC_URI="mirror://sourceforge/hplip/${P}.tar.gz"
11
SRC_URI="mirror://sourceforge/hplip/${P}.tar.gz"
12
12
13
LICENSE="GPL-2"
13
LICENSE="GPL-2"
14
SLOT="0"
14
SLOT="0"
15
KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
15
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
16
16
17
IUSE="+cups cupsddk dbus doc fax gtk minimal parport policykit ppds qt3 qt4 scanner snmp"
17
IUSE="dbus doc fax gtk +hpcups hpijs parport policykit qt3 qt4 scanner snmp static"
18
18
19
# Note : libusb-compat untested (calchan 20090516)
19
# Note : libusb-compat untested (calchan 20090516)
20
20
21
DEPEND="!net-print/hpijs
21
COMMON_DEPEND="
22
	!net-print/hpoj
22
	media-libs/jpeg
23
	>=dev-lang/python-2.4.4[threads]
23
	>=dev-lang/python-2.4.4[threads]
24
	virtual/ghostscript
24
	virtual/ghostscript
25
	media-libs/jpeg
25
	net-print/cups
26
	!minimal? (
26
	virtual/libusb:0
27
	hpijs? ( >=net-print/foomatic-filters-3.0.20080507[cups] )
28
	hpcups? (
27
		net-print/cups
29
		net-print/cups
28
		virtual/libusb:0
30
		net-print/cupsddk
29
		cupsddk? (
31
	)
30
			foomatic? ( >=net-print/foomatic-filters-3.0.20080507[cups] )
32
	scanner? ( >=media-gfx/sane-backends-1.0.19-r1 )
31
			|| ( >=net-print/cups-1.4.0 net-print/cupsddk )
33
	snmp? (
32
		)
34
		net-analyzer/net-snmp
33
		ppds? (
35
		dev-libs/openssl
34
			foomatic? ( >=net-print/foomatic-filters-3.0.20080507[cups] )
35
		)
36
		scanner? ( >=media-gfx/sane-backends-1.0.19-r1 )
37
		snmp? (
38
			net-analyzer/net-snmp
39
			dev-libs/openssl
40
		)
41
	)"
36
	)"
42
37
43
RDEPEND="${DEPEND}
38
DEPEND="${COMMON_DEPEND}
44
	!minimal? (
39
	dev-util/pkgconfig"
45
		kernel_linux? ( >=sys-fs/udev-114 )
40
46
		scanner? (
41
RDEPEND="${COMMON_DEPEND}
47
			dev-python/imaging
42
	kernel_linux? ( >=sys-fs/udev-114 )
48
			dev-python/reportlab
43
	scanner? (
49
			gtk? ( media-gfx/xsane )
44
		dev-python/imaging
50
			!gtk? ( media-gfx/sane-frontends )
45
		dev-python/reportlab
51
		)
46
		gtk? ( media-gfx/xsane )
52
		fax? (
47
		!gtk? ( media-gfx/sane-frontends )
53
			dev-python/reportlab
48
	)
54
		)
49
	fax? (
55
		qt3? ( !qt4? (
50
		dev-python/reportlab
56
			dev-python/PyQt
51
	)
57
		) )
52
	qt3? ( !qt4? (
58
		qt4? (
53
		dev-python/PyQt
59
			dev-python/PyQt4[X]
54
	) )
60
		)
55
	qt4? (
61
		dbus? (
56
		dev-python/PyQt4[X]
62
			sys-apps/dbus
57
	)
63
			dev-python/dbus-python
58
	dbus? (
64
			dev-python/pygobject
59
		sys-apps/dbus
65
		)
60
		dev-python/dbus-python
66
		policykit? (
61
		dev-python/pygobject
67
			sys-auth/policykit
62
	)
68
			dev-python/pygobject
63
	policykit? (
69
			dev-python/dbus-python
64
		sys-auth/policykit
70
		)
65
		dev-python/pygobject
66
		dev-python/dbus-python
71
	)"
67
	)"
72
68
73
CONFIG_CHECK="~PARPORT ~PPDEV"
69
CONFIG_CHECK="~PARPORT ~PPDEV"
74
ERROR_PARPORT="Please make sure parallel port support is enabled in your kernel (PARPORT and PPDEV)."
70
ERROR_PARPORT="Please make sure parallel port support is enabled in your kernel (PARPORT and PPDEV)."
75
71
76
pkg_setup() {
72
pkg_setup() {
77
	! use qt3 && ! use qt4 && ewarn "You need USE=qt3 or USE=qt4 for the hplip GUI."
73
	! use qt3 && ! use qt4 && ewarn "You need USE=qt4 or USE=qt3 for the hplip GUI."
78
74
79
	use scanner && ! use gtk && ewarn "You need USE=gtk for the scanner GUI."
75
	use scanner && ! use gtk && ewarn "You need USE=gtk for the scanner GUI."
80
76
81
	if ! use ppds && ! use cupsddk && ! use cups; then
77
	if ! use hpcups && ! use hpijs ; then
82
		ewarn "Installing neither static (USE=-ppds) nor dynamic (USE=-cupsddk) PPD files,"
78
		ewarn "Installing neither hpcups (USE=-hpcups) nor hpijs (USE=-hpijs) driver,"
83
		ewarn "nor hpcups driver (USE=-cups) which is probably not what you want."
79
		ewarn "which is probably not what you want."
84
		ewarn "You will almost certainly not be able to print (recommended: USE=\"cups -cupsddk -ppds\")."
80
		ewarn "You will almost certainly not be able to print."
81
		ewarn "Recommended USE flags: USE=\"hpcups -hpijs\")."
85
	fi
82
	fi
86
83
87
	if use minimal ; then
84
	use parport && linux-info_pkg_setup
88
		ewarn "Installing hpijs driver only, make sure you know what you are doing."
85
89
	else
86
	if use fax && ! use dbus ; then
90
		use parport && linux-info_pkg_setup
87
		eerror "USE=fax needs USE=dbus."
88
89
		die "fax USE flag need dbus USE flag"
91
	fi
90
	fi
92
}
91
}
93
92
Lines 144-190 Link Here
144
}
143
}
145
144
146
src_configure() {
145
src_configure() {
147
	local myconf
146
	local drv_build gui_build
148
147
149
	if use qt3 || use qt4 ; then
148
	if use qt3 || use qt4 ; then
150
		local gui_build="--enable-gui-build"
149
		gui_build="--enable-gui-build"
151
		if use qt4; then
150
		if use qt4 ; then
152
			gui_build="${gui_build} --enable-qt4 --disable-qt3"
151
			gui_build="${gui_build} --enable-qt4 --disable-qt3"
153
		else
152
		else
154
			use qt3 && gui_build="${gui_build} --enable-qt3 --disable-qt4"
153
			use qt3 && gui_build="${gui_build} --enable-qt3 --disable-qt4"
155
		fi
154
		fi
156
	else
155
	else
157
		local gui_build="--disable-gui-build"
156
		gui_build="--disable-gui-build"
158
	fi
157
	fi
159
158
160
	if use cupsddk; then
159
	if use hpcups ; then
161
		myconf="${myconf} $(use_enable foomatic foomatic-drv-install)"
160
		drv_build="${drv_build} $(use_enable hpcups hpcups-install)"
162
	else
161
		if use static ; then
163
		myconf="${myconf} --disable-foomatic-drv-install"
162
			drv_build="${drv_build} --enable-cups-ppd-install"
163
			drv_build="${drv_build} --disable-cups-drv-install"
164
		else
165
			drv_build="${drv_build} $(use_enable dynamic cups-drv-install)"
166
			drv_build="${drv_build} --disable-cups-ppd-install"
167
		fi
164
	fi
168
	fi
165
169
166
	if use ppds; then
170
	if use hpijs ; then
167
		myconf="${myconf} $(use_enable foomatic foomatic-ppd-install)"
171
		drv_build="${drv_build} $(use_enable hpijs hpijs-install)"
168
	else
172
		if use static ; then
169
		myconf="${myconf} --disable-foomatic-ppd-install"
173
			drv_build="${drv_build} --enable-foomatic-ppd-install"
174
			drv_build="${drv_build} --disable-foomatc-drv-install"
175
		else
176
			drv_build="${drv_build} $(use_enable dynamic foomatic-drv-install)"
177
			drv_build="${drv_build} --disable-foomatic-ppd-install"
178
		fi
170
	fi
179
	fi
171
180
172
	econf \
181
	econf \
173
		--disable-dependency-tracking \
182
		--disable-dependency-tracking \
174
		--disable-cups11-build \
183
		--disable-cups11-build \
184
		--disable-lite-build \
185
		--disable-hpijs-only-build \
186
		--disable-new-hpcups \
187
		--disable-foomatic-rip-hplip-install \
188
		--disable-shadow-build \
175
		--with-cupsbackenddir=$(cups-config --serverbin)/backend \
189
		--with-cupsbackenddir=$(cups-config --serverbin)/backend \
176
		--with-cupsfilterdir=$(cups-config --serverbin)/filter \
190
		--with-cupsfilterdir=$(cups-config --serverbin)/filter \
177
		--disable-foomatic-rip-hplip-install \
178
		--enable-udev-acl-rules \
191
		--enable-udev-acl-rules \
179
		${myconf} \
192
		${drv_build} \
180
		${gui_build} \
193
		${gui_build} \
181
		$(use_enable doc doc-build) \
194
		$(use_enable doc doc-build) \
182
		$(use_enable cups hpcups-install) \
183
		$(use_enable ppds cups-ppd-install) \
184
		$(use_enable cupsddk cups-drv-install) \
185
		$(use_enable dbus dbus-build) \
195
		$(use_enable dbus dbus-build) \
186
		$(use_enable fax fax-build) \
196
		$(use_enable fax fax-build) \
187
		$(use_enable minimal hpijs-only-build) \
188
		$(use_enable parport pp-build) \
197
		$(use_enable parport pp-build) \
189
		$(use_enable scanner scan-build) \
198
		$(use_enable scanner scan-build) \
190
		$(use_enable snmp network-build) \
199
		$(use_enable snmp network-build) \
Lines 195-209 Link Here
195
	emake DESTDIR="${D}" install || die "emake install failed"
204
	emake DESTDIR="${D}" install || die "emake install failed"
196
	rm -f "${D}"/etc/sane.d/dll.conf
205
	rm -f "${D}"/etc/sane.d/dll.conf
197
206
198
	use minimal && rm -r "${D}"/usr/$(get_libdir)
199
200
	# bug 106035/259763
207
	# bug 106035/259763
201
	if ! use qt3 && ! use qt4; then
208
	if ! use qt3 && ! use qt4 ; then
202
		rm -r "${D}"/usr/share/applications "${D}"/etc/xdg
209
		rm -r "${D}"/usr/share/applications "${D}"/etc/xdg
203
	fi
210
	fi
204
211
205
	# kde3 autostart hack
212
	# kde3 autostart hack
206
	if [[ -d /usr/kde/3.5/share/autostart ]] && use !minimal ; then
213
	if [[ -d /usr/kde/3.5/share/autostart ]] ; then
207
		insinto /usr/kde/3.5/share/autostart
214
		insinto /usr/kde/3.5/share/autostart
208
		doins hplip-systray.desktop
215
		doins hplip-systray.desktop
209
	fi
216
	fi
Lines 215-221 Link Here
215
222
216
pkg_preinst() {
223
pkg_preinst() {
217
	# avoid collisions with cups-1.2 compat symlinks
224
	# avoid collisions with cups-1.2 compat symlinks
218
	if [ -e "${ROOT}"/usr/lib/cups/backend/hp ] && [ -e "${ROOT}"/usr/libexec/cups/backend/hp ]; then
225
	if [ -e "${ROOT}"/usr/lib/cups/backend/hp ] && [ -e "${ROOT}"/usr/libexec/cups/backend/hp ] ; then
219
		rm "${ROOT}"/usr/libexec/cups/backend/hp{,fax}
226
		rm "${ROOT}"/usr/libexec/cups/backend/hp{,fax}
220
	fi
227
	fi
221
}
228
}

Return to bug 287005