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

(-)../../../portage/net-print/hplip/hplip-2.8.7.ebuild (-12 / +21 lines)
Lines 2-8 Link Here
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.2 2009/03/14 19:04:39 armin76 Exp $
3
# $Header: /var/cvsroot/gentoo-x86/net-print/hplip/hplip-2.8.7.ebuild,v 1.2 2009/03/14 19:04:39 armin76 Exp $
4
4
5
inherit eutils linux-info python
5
EAPI="2"
6
7
inherit eutils fdo-mime linux-info python
6
8
7
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 net-print/hpijs, scanner drivers and service tools."
8
HOMEPAGE="http://hplip.sourceforge.net/"
10
HOMEPAGE="http://hplip.sourceforge.net/"
Lines 46-52 Link Here
46
		) )
48
		) )
47
		qt3? (
49
		qt3? (
48
			>=dev-python/PyQt-3.14
50
			>=dev-python/PyQt-3.14
49
			dev-python/ctypes
50
			dbus? ( >=dev-python/dbus-python-0.80 )
51
			dbus? ( >=dev-python/dbus-python-0.80 )
51
			fax? ( dev-python/reportlab )
52
			fax? ( dev-python/reportlab )
52
		)
53
		)
Lines 73-82 Link Here
73
	fi
74
	fi
74
}
75
}
75
76
76
src_unpack() {
77
src_prepare() {
77
	unpack ${A}
78
	cd "${S}"
79
80
	sed -i -e "s:\$(doc_DATA)::" Makefile.in || die "Patching Makefile.in failed"
78
	sed -i -e "s:\$(doc_DATA)::" Makefile.in || die "Patching Makefile.in failed"
81
	sed -i -e "s/'skipstone']/'skipstone', 'epiphany']/" \
79
	sed -i -e "s/'skipstone']/'skipstone', 'epiphany']/" \
82
		-e "s/'skipstone': ''}/'skipstone': '', 'epiphany': '--new-window'}/" \
80
		-e "s/'skipstone': ''}/'skipstone': '', 'epiphany': '--new-window'}/" \
Lines 95-107 Link Here
95
	cp "${FILESDIR}"/70-hpmud.rules data/rules
93
	cp "${FILESDIR}"/70-hpmud.rules data/rules
96
	sed -i -e "s/55-hpmud.rules/70-hpmud.rules/g" Makefile.* */*.html || die "sed failed"
94
	sed -i -e "s/55-hpmud.rules/70-hpmud.rules/g" Makefile.* */*.html || die "sed failed"
97
95
96
	sed -i \
97
		-e s:\/usr\/lib\/cups\/driver:$(cups-config --serverbin)\/driver:g \
98
		installer/core_install.py || die "sed core_install.py"
99
98
	# Use system foomatic-rip instead of foomatic-rip-hplip
100
	# Use system foomatic-rip instead of foomatic-rip-hplip
99
	sed -i -e 's/foomatic-rip-hplip/foomatic-rip/' ppd/*.ppd || die "sed failed"
101
	local i
102
	for i in ppd/*.ppd.gz
103
	do
104
	    rm -f $i.temp
105
	    gunzip -c $i | sed 's/foomatic-rip-hplip/foomatic-rip/g' | gzip > $i.temp || die "*.ppd.gz sed failed"
106
	    mv $i.temp $i
107
	done
100
108
101
	# Qt4 is still undocumented by upstream, so use with caution
109
	# Qt4 is still undocumented by upstream, so use with caution
102
	local QT_VER
110
	local QT_VER
103
	use qt4 && QT_VER="4"
104
	use qt3 && QT_VER="3"
111
	use qt3 && QT_VER="3"
112
	use qt4 && QT_VER="4"
105
	sed -i \
113
	sed -i \
106
		-e "s/%s --force-startup/%s --force-startup --qt${QT_VER}/" \
114
		-e "s/%s --force-startup/%s --force-startup --qt${QT_VER}/" \
107
		-e "s/'--force-startup'/'--force-startup', '--qt${QT_VER}'/" \
115
		-e "s/'--force-startup'/'--force-startup', '--qt${QT_VER}'/" \
Lines 111-122 Link Here
111
		hplip-systray.desktop.in || die "sed failed"
119
		hplip-systray.desktop.in || die "sed failed"
112
}
120
}
113
121
114
src_compile() {
122
src_configure() {
115
	if use qt3 || use qt4 ; then
123
	if use qt3 || use qt4 ; then
116
		local GUI_BUILD="--enable-gui-build"
124
		local GUI_BUILD="--enable-gui-build"
117
	else
125
	else
118
		local GUI_BUILD="--disable-gui-build"
126
		local GUI_BUILD="--disable-gui-build"
119
	fi
127
	fi
128
	use qt4 && GUI_BUILD="$GUI_BUILD --enable-qt4 --disable-qt3"
120
129
121
	econf \
130
	econf \
122
		--disable-dependency-tracking \
131
		--disable-dependency-tracking \
Lines 133-141 Link Here
133
		$(use_enable parport pp-build) \
142
		$(use_enable parport pp-build) \
134
		$(use_enable ppds foomatic-ppd-install) \
143
		$(use_enable ppds foomatic-ppd-install) \
135
		$(use_enable scanner scan-build) \
144
		$(use_enable scanner scan-build) \
136
		$(use_enable snmp network-build) \
145
		$(use_enable snmp network-build)
137
		|| die "econf failed"
138
	emake || die "Compilation failed"
139
}
146
}
140
147
141
src_install() {
148
src_install() {
Lines 157-162 Link Here
157
164
158
pkg_postinst() {
165
pkg_postinst() {
159
	python_mod_optimize /usr/share/${PN}
166
	python_mod_optimize /usr/share/${PN}
167
	fdo-mime_desktop_database_update
160
168
161
	elog "You should run hp-setup as root if you are installing hplip for the first time, and may also"
169
	elog "You should run hp-setup as root if you are installing hplip for the first time, and may also"
162
	elog "need to run it if you are upgrading from an earlier version."
170
	elog "need to run it if you are upgrading from an earlier version."
Lines 169-172 Link Here
169
177
170
pkg_postrm() {
178
pkg_postrm() {
171
	python_mod_cleanup /usr/share/${PN}
179
	python_mod_cleanup /usr/share/${PN}
180
	fdo-mime_desktop_database_update
172
}
181
}

Return to bug 245136