Lines 4-14
Link Here
|
4 |
|
4 |
|
5 |
EAPI=5 |
5 |
EAPI=5 |
6 |
|
6 |
|
7 |
PYTHON_DEPEND="!minimal? 2" |
7 |
PYTHON_COMPAT=( python{2_6,2_7} ) |
8 |
PYTHON_USE_WITH="threads xml" |
8 |
PYTHON_REQ_USE="threads,xml" |
9 |
PYTHON_USE_WITH_OPT="!minimal" |
|
|
10 |
|
9 |
|
11 |
inherit eutils fdo-mime linux-info python udev autotools toolchain-funcs |
10 |
inherit eutils fdo-mime linux-info python-single-r1 udev autotools toolchain-funcs |
12 |
|
11 |
|
13 |
DESCRIPTION="HP Linux Imaging and Printing. Includes printer, scanner, fax drivers and service tools." |
12 |
DESCRIPTION="HP Linux Imaging and Printing. Includes printer, scanner, fax drivers and service tools." |
14 |
HOMEPAGE="http://hplipopensource.com/hplip-web/index.html" |
13 |
HOMEPAGE="http://hplipopensource.com/hplip-web/index.html" |
Lines 23-32
Link Here
|
23 |
# Thus support for it is also disabled in hplip. |
22 |
# Thus support for it is also disabled in hplip. |
24 |
IUSE="doc fax +hpcups hpijs kde libnotify -libusb0 minimal parport policykit qt4 scanner snmp static-ppds X" |
23 |
IUSE="doc fax +hpcups hpijs kde libnotify -libusb0 minimal parport policykit qt4 scanner snmp static-ppds X" |
25 |
|
24 |
|
|
|
25 |
# TODO: check if net-print/cups, sys-apps/dbus/dbus, net-analyzer/net-snmp |
26 |
# and dev-python/notify-python are migrated to python-r1 |
27 |
|
26 |
COMMON_DEPEND=" |
28 |
COMMON_DEPEND=" |
27 |
virtual/jpeg |
29 |
virtual/jpeg |
28 |
hpijs? ( >=net-print/foomatic-filters-3.0.20080507[cups] ) |
30 |
hpijs? ( >=net-print/foomatic-filters-3.0.20080507[cups] ) |
29 |
!minimal? ( |
31 |
!minimal? ( |
|
|
32 |
${PYTHON_DEPS} |
30 |
>=net-print/cups-1.4.0 |
33 |
>=net-print/cups-1.4.0 |
31 |
!libusb0? ( virtual/libusb:1 ) |
34 |
!libusb0? ( virtual/libusb:1 ) |
32 |
libusb0? ( virtual/libusb:0 ) |
35 |
libusb0? ( virtual/libusb:0 ) |
Lines 43-57
Link Here
|
43 |
|
46 |
|
44 |
RDEPEND="${COMMON_DEPEND} |
47 |
RDEPEND="${COMMON_DEPEND} |
45 |
>=app-text/ghostscript-gpl-8.71-r3 |
48 |
>=app-text/ghostscript-gpl-8.71-r3 |
46 |
dev-python/dbus-python |
49 |
>=dev-python/dbus-python-1.1.1-r1[${PYTHON_USEDEP}] |
47 |
policykit? ( |
50 |
policykit? ( |
48 |
sys-auth/polkit |
51 |
sys-auth/polkit |
49 |
) |
52 |
) |
50 |
!minimal? ( |
53 |
!minimal? ( |
51 |
dev-python/pygobject:2 |
54 |
>=dev-python/pygobject-2.28.6-r53:2[${PYTHON_USEDEP}] |
52 |
kernel_linux? ( virtual/udev !<sys-fs/udev-114 ) |
55 |
kernel_linux? ( virtual/udev !<sys-fs/udev-114 ) |
53 |
scanner? ( |
56 |
scanner? ( |
54 |
dev-python/imaging |
57 |
>=dev-python/imaging-1.1.7-r2[${PYTHON_USEDEP}] |
55 |
X? ( || ( |
58 |
X? ( || ( |
56 |
kde? ( kde-misc/skanlite ) |
59 |
kde? ( kde-misc/skanlite ) |
57 |
media-gfx/xsane |
60 |
media-gfx/xsane |
Lines 59-69
Link Here
|
59 |
) ) |
62 |
) ) |
60 |
) |
63 |
) |
61 |
fax? ( |
64 |
fax? ( |
62 |
dev-python/reportlab |
65 |
>=dev-python/reportlab-2.6[${PYTHON_USEDEP}] |
63 |
dev-python/dbus-python |
66 |
>=dev-python/dbus-python-1.1.1-r1[${PYTHON_USEDEP}] |
64 |
) |
67 |
) |
65 |
qt4? ( |
68 |
qt4? ( |
66 |
dev-python/PyQt4[dbus,X] |
69 |
>=dev-python/PyQt4-4.9.6-r2[dbus,X,${PYTHON_USEDEP}] |
67 |
libnotify? ( |
70 |
libnotify? ( |
68 |
dev-python/notify-python |
71 |
dev-python/notify-python |
69 |
) |
72 |
) |
Lines 74-83
Link Here
|
74 |
ERROR_PARPORT="Please make sure kernel parallel port support is enabled (PARPORT and PPDEV)." |
77 |
ERROR_PARPORT="Please make sure kernel parallel port support is enabled (PARPORT and PPDEV)." |
75 |
|
78 |
|
76 |
pkg_setup() { |
79 |
pkg_setup() { |
77 |
if ! use minimal; then |
80 |
use !minimal && python-single-r1_pkg_setup |
78 |
python_set_active_version 2 |
|
|
79 |
python_pkg_setup |
80 |
fi |
81 |
|
81 |
|
82 |
! use qt4 && ewarn "You need USE=qt4 for the hplip GUI." |
82 |
! use qt4 && ewarn "You need USE=qt4 for the hplip GUI." |
83 |
|
83 |
|
Lines 99-105
Link Here
|
99 |
} |
99 |
} |
100 |
|
100 |
|
101 |
src_prepare() { |
101 |
src_prepare() { |
102 |
use !minimal && python_convert_shebangs -q -r 2 . |
102 |
if use !minimal ; then |
|
|
103 |
python_export EPYTHON PYTHON |
104 |
python_fix_shebang . |
105 |
fi |
103 |
|
106 |
|
104 |
EPATCH_SUFFIX="patch" \ |
107 |
EPATCH_SUFFIX="patch" \ |
105 |
EPATCH_FORCE="yes" \ |
108 |
EPATCH_FORCE="yes" \ |
Lines 236-247
Link Here
|
236 |
rm -rf "${D}"/usr/share/hal || die |
239 |
rm -rf "${D}"/usr/share/hal || die |
237 |
|
240 |
|
238 |
find "${D}" -name '*.la' -exec rm -rf {} + || die |
241 |
find "${D}" -name '*.la' -exec rm -rf {} + || die |
|
|
242 |
|
243 |
if use !minimal ; then |
244 |
python_export EPYTHON PYTHON |
245 |
python_optimize "${D}"/usr/share/hplip |
246 |
fi |
239 |
} |
247 |
} |
240 |
|
248 |
|
241 |
pkg_postinst() { |
249 |
pkg_postinst() { |
242 |
use !minimal && python_mod_optimize /usr/share/${PN} |
|
|
243 |
fdo-mime_desktop_database_update |
244 |
|
245 |
if [[ -z "${REPLACING_VERSIONS}" ]]; then |
250 |
if [[ -z "${REPLACING_VERSIONS}" ]]; then |
246 |
elog "For more information on setting up your printer please take" |
251 |
elog "For more information on setting up your printer please take" |
247 |
elog "a look at the hplip section of the gentoo printing guide:" |
252 |
elog "a look at the hplip section of the gentoo printing guide:" |
Lines 250-257
Link Here
|
250 |
elog "Any user who wants to print must be in the lp group." |
255 |
elog "Any user who wants to print must be in the lp group." |
251 |
fi |
256 |
fi |
252 |
} |
257 |
} |
253 |
|
|
|
254 |
pkg_postrm() { |
255 |
use !minimal && python_mod_cleanup /usr/share/${PN} |
256 |
fdo-mime_desktop_database_update |
257 |
} |