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

Collapse All | Expand All

(-)hplip-2.8.7.ebuild (-9 / +95 lines)
Lines 1-19 Link Here
1
# Copyright 1999-2008 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-2.8.7.ebuild,v 1.1 2008/08/17 12:46:53 calchan Exp $
3
# $Header: $
4
4
5
inherit eutils linux-info python
5
EAPI="1"
6
7
inherit eutils flag-o-matic linux-info python
8
9
IUSE="cupsddk dbus doc fax gtk minimal parport ppds plugins qt3 qt4 scanner snmp"
6
10
7
DESCRIPTION="HP Linux Imaging and Printing System. Includes net-print/hpijs, scanner drivers and service tools."
11
DESCRIPTION="HP Linux Imaging and Printing System. Includes net-print/hpijs, scanner drivers and service tools."
8
HOMEPAGE="http://hplip.sourceforge.net/"
12
HOMEPAGE="http://hplip.sourceforge.net/"
9
SRC_URI="mirror://sourceforge/hplip/${P}.tar.gz"
13
SRC_URI="plugins? ( http://www.linuxprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-${PV}-plugin.run )
14
	mirror://sourceforge/hplip/${P}.tar.gz"
10
15
11
LICENSE="GPL-2"
16
LICENSE="GPL-2"
12
SLOT="0"
17
SLOT="0"
13
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
18
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
14
19
15
IUSE="cupsddk dbus doc fax gtk minimal parport ppds qt3 qt4 scanner snmp"
16
17
DEPEND="!net-print/hpijs
20
DEPEND="!net-print/hpijs
18
	!net-print/hpoj
21
	!net-print/hpoj
19
	virtual/ghostscript
22
	virtual/ghostscript
Lines 32-37 Link Here
32
	)"
35
	)"
33
36
34
RDEPEND="${DEPEND}
37
RDEPEND="${DEPEND}
38
	app-arch/gzip
35
	!minimal? (
39
	!minimal? (
36
		!<sys-fs/udev-114
40
		!<sys-fs/udev-114
37
		scanner? (
41
		scanner? (
Lines 54-59 Link Here
54
58
55
CONFIG_CHECK="PARPORT PPDEV"
59
CONFIG_CHECK="PARPORT PPDEV"
56
ERROR_PARPORT="Please make sure parallel port support is enabled in your kernel (PARPORT and PPDEV)."
60
ERROR_PARPORT="Please make sure parallel port support is enabled in your kernel (PARPORT and PPDEV)."
61
RESTRICT="plugins? ( strip )"
57
62
58
pkg_setup() {
63
pkg_setup() {
59
	! use qt3 && ! use qt4 && ewarn "You need USE=qt3 (recommended) or USE=qt4 for the hplip GUI."
64
	! use qt3 && ! use qt4 && ewarn "You need USE=qt3 (recommended) or USE=qt4 for the hplip GUI."
Lines 74-82 Link Here
74
}
79
}
75
80
76
src_unpack() {
81
src_unpack() {
77
	unpack ${A}
82
	unpack ${P}.tar.gz
83
84
	if use plugins; then
85
	    echo ">>> Unpacking hplip-${PV}-plugin.tar.gz to ${WORKDIR}/plugins"
86
	    mkdir -p "${WORKDIR}"/plugins
87
	    cd "${WORKDIR}"/plugins
88
	    tail -c +8874 "${DISTDIR}"/hplip-${PV}-plugin.run > hplip-${PV}-plugin.tar.gz
89
	    tar xf "${WORKDIR}"/plugins/hplip-${PV}-plugin.tar.gz
90
	    rm -f "${WORKDIR}"/plugins/hplip-${PV}-plugin.tar.gz
91
	fi
92
78
	cd "${S}"
93
	cd "${S}"
79
94
95
	sed -i -e "s:\/usr\/share\/hal\/fdi\/preprobe\/10osvendor:\/etc\/hal\/fdi\/preprobe:g" Makefile.in || die "Patching hplip.list.in failed"
80
	sed -i -e "s:\$(doc_DATA)::" Makefile.in || die "Patching Makefile.in failed"
96
	sed -i -e "s:\$(doc_DATA)::" Makefile.in || die "Patching Makefile.in failed"
81
	sed -i -e "s/'skipstone']/'skipstone', 'epiphany']/" \
97
	sed -i -e "s/'skipstone']/'skipstone', 'epiphany']/" \
82
		-e "s/'skipstone': ''}/'skipstone': '', 'epiphany': '--new-window'}/" \
98
		-e "s/'skipstone': ''}/'skipstone': '', 'epiphany': '--new-window'}/" \
Lines 96-102 Link Here
96
	sed -i -e "s/55-hpmud.rules/70-hpmud.rules/g" Makefile.* */*.html || die "sed failed"
112
	sed -i -e "s/55-hpmud.rules/70-hpmud.rules/g" Makefile.* */*.html || die "sed failed"
97
113
98
	# Use system foomatic-rip instead of foomatic-rip-hplip
114
	# Use system foomatic-rip instead of foomatic-rip-hplip
99
	sed -i -e 's/foomatic-rip-hplip/foomatic-rip/' ppd/*.ppd || die "sed failed"
115
	local i
116
	for i in ppd/*.ppd.gz
117
	do
118
	    rm -f $i.temp
119
	    gunzip -c $i | sed 's/foomatic-rip-hplip/foomatic-rip/' | gzip > $i.temp || die "*.ppd.gz sed failed"
120
	    mv $i.temp $i
121
	done
100
122
101
	# Qt4 is still undocumented by upstream, so use with caution
123
	# Qt4 is still undocumented by upstream, so use with caution
102
	local QT_VER
124
	local QT_VER
Lines 139-151 Link Here
139
}
161
}
140
162
141
src_install() {
163
src_install() {
142
	emake -j1 DESTDIR="${D}" install || die "emake install failed"
164
	replace-flags "-j?" "-j1"
165
	emake DESTDIR="${D}" install || die "emake install failed"
143
	rm -f "${D}"/etc/sane.d/dll.conf
166
	rm -f "${D}"/etc/sane.d/dll.conf
144
167
168
	if use plugins; then
169
	    sed -i -e "s:SYSFS:ATTRS:g" "${WORKDIR}"/plugins/*.rules || die "sed failed"
170
171
	    insinto /etc/udev/rules.d
172
	    doins "${WORKDIR}"/plugins/86-hpmud-hp_laserjet_1000.rules
173
	    doins "${WORKDIR}"/plugins/86-hpmud-hp_laserjet_1005_series.rules
174
	    doins "${WORKDIR}"/plugins/86-hpmud-hp_laserjet_1018.rules
175
	    doins "${WORKDIR}"/plugins/86-hpmud-hp_laserjet_1020.rules
176
	    doins "${WORKDIR}"/plugins/86-hpmud-hp_laserjet_p1005.rules
177
	    doins "${WORKDIR}"/plugins/86-hpmud-hp_laserjet_p1006.rules
178
	    doins "${WORKDIR}"/plugins/86-hpmud-hp_laserjet_p1007.rules
179
	    doins "${WORKDIR}"/plugins/86-hpmud-hp_laserjet_p1008.rules
180
	    doins "${WORKDIR}"/plugins/86-hpmud-hp_laserjet_p1505.rules
181
182
	    # detect ARCH variable
183
	    if [[ "${ARCH}" == "amd64" ]] ; then
184
		arch_var="64"
185
	    else
186
		arch_var="32"
187
	    fi
188
	    cd "${D}"/usr/lib
189
	    dodir /usr/share/hplip/scan/plugins
190
	    dolib.so "${WORKDIR}"/plugins/bb_marvell-x86_"${arch_var}".so
191
	    ln -s bb_marvell-x86_"${arch_var}".so bb_marvell.so
192
	    dosym /usr/lib/bb_marvell-x86_"${arch_var}".so /usr/share/hplip/scan/plugins/bb_marvell.so
193
	    dosym /usr/lib/bb_marvell-x86_"${arch_var}".so /usr/share/hplip/scan/plugins/bb_marvell-x86_"${arch_var}".so
194
	    dolib.so "${WORKDIR}"/plugins/bb_soap-x86_"${arch_var}".so
195
	    ln -s bb_soap-x86_"${arch_var}".so bb_soap.so
196
	    dosym /usr/lib/bb_soap-x86_"${arch_var}".so /usr/share/hplip/scan/plugins/bb_soap.so
197
	    dosym /usr/lib/bb_soap-x86_"${arch_var}".so /usr/share/hplip/scan/plugins/bb_soap-x86_"${arch_var}".so
198
	    dolib.so "${WORKDIR}"/plugins/bb_soapht-x86_"${arch_var}".so
199
	    ln -s bb_soapht-x86_"${arch_var}".so bb_soapht.so
200
	    dosym /usr/lib/bb_soapht-x86_"${arch_var}".so /usr/share/hplip/scan/plugins/bb_soapht.so
201
	    dosym /usr/lib/bb_soapht-x86_"${arch_var}".so /usr/share/hplip/scan/plugins/bb_soapht-x86_"${arch_var}".so
202
	    dodir /usr/share/hplip/prnt/plugins
203
	    dolib.so "${WORKDIR}"/plugins/lj-x86_"${arch_var}".so
204
	    ln -s lj-x86_"${arch_var}".so lj.so
205
	    dosym /usr/lib/lj-x86_"${arch_var}".so /usr/share/hplip/prnt/plugins/lj.so
206
	    dosym /usr/lib/lj-x86_"${arch_var}".so /usr/share/hplip/prnt/plugins/lj-x86_"${arch_var}".so
207
208
	    dodir /usr/share/hplip/data/plugins
209
	    insinto /usr/share/hplip/data/plugins
210
	    doins "${WORKDIR}"/plugins/license.txt
211
212
	    dodir /usr/share/hplip/data/firmware
213
	    insinto /usr/share/hplip/data/firmware
214
	    doins "${WORKDIR}"/plugins/hp_laserjet_1000.fw.gz
215
	    doins "${WORKDIR}"/plugins/hp_laserjet_1005_series.fw.gz
216
	    doins "${WORKDIR}"/plugins/hp_laserjet_1018.fw.gz
217
	    doins "${WORKDIR}"/plugins/hp_laserjet_1020.fw.gz
218
	    doins "${WORKDIR}"/plugins/hp_laserjet_p1005.fw.gz
219
	    doins "${WORKDIR}"/plugins/hp_laserjet_p1006.fw.gz
220
	    doins "${WORKDIR}"/plugins/hp_laserjet_p1007.fw.gz
221
	    doins "${WORKDIR}"/plugins/hp_laserjet_p1008.fw.gz
222
	    doins "${WORKDIR}"/plugins/hp_laserjet_p1505.fw.gz
223
224
	    sed -i -e "s:version\=2\.8\.12:version\=2\.8\.12\\nplugin \= 1:" "${D}"/etc/hp/hplip.conf || die "sed failed"
225
	fi
226
145
	# bug 106035
227
	# bug 106035
146
	use qt3 || use qt4 || rm -Rf "${D}"/usr/share/applications
228
	use qt3 || use qt4 || rm -Rf "${D}"/usr/share/applications
147
229
148
	use minimal && rm -rf "${D}"/usr/lib
230
	use minimal && rm -rf "${D}"/usr/lib
231
232
	# install docs
233
	cp -af "${S}"/doc/* "${D}"/usr/share/doc/hplip-${PV}
234
149
}
235
}
150
236
151
pkg_preinst() {
237
pkg_preinst() {

Return to bug 245136