--- hplip-3.12.11.ebuild 2013-01-08 19:54:23.654553670 +0100 +++ hplip-3.12.11-r1.ebuild 2013-02-02 15:58:53.362215910 +0100 @@ -4,11 +4,10 @@ EAPI=5 -PYTHON_DEPEND="!minimal? 2" -PYTHON_USE_WITH="threads xml" -PYTHON_USE_WITH_OPT="!minimal" +PYTHON_COMPAT=( python{2_6,2_7} ) +PYTHON_REQ_USE="threads,xml" -inherit eutils fdo-mime linux-info python udev autotools toolchain-funcs +inherit eutils fdo-mime linux-info python-r1 udev autotools toolchain-funcs DESCRIPTION="HP Linux Imaging and Printing. Includes printer, scanner, fax drivers and service tools." HOMEPAGE="http://hplipopensource.com/hplip-web/index.html" @@ -27,6 +26,7 @@ virtual/jpeg hpijs? ( >=net-print/foomatic-filters-3.0.20080507[cups] ) !minimal? ( + ${PYTHON_DEPS} >=net-print/cups-1.4.0 !libusb0? ( virtual/libusb:1 ) libusb0? ( virtual/libusb:0 ) @@ -43,15 +43,15 @@ RDEPEND="${COMMON_DEPEND} >=app-text/ghostscript-gpl-8.71-r3 - dev-python/dbus-python + >=dev-python/dbus-python-1.1.1-r1[${PYTHON_USEDEP}] policykit? ( sys-auth/polkit ) !minimal? ( - dev-python/pygobject:2 + >=dev-python/pygobject-2.28.6-r53:2[${PYTHON_USEDEP}] kernel_linux? ( virtual/udev !=dev-python/imaging-1.1.7-r2[${PYTHON_USEDEP}] X? ( || ( kde? ( kde-misc/skanlite ) media-gfx/xsane @@ -59,26 +59,26 @@ ) ) ) fax? ( - dev-python/reportlab - dev-python/dbus-python + >=dev-python/reportlab-2.6[${PYTHON_USEDEP}] + >=dev-python/dbus-python-1.1.1-r1[${PYTHON_USEDEP}] ) qt4? ( - dev-python/PyQt4[dbus,X] + >=dev-python/PyQt4-4.9.6-r2[dbus,X,${PYTHON_USEDEP}] libnotify? ( dev-python/notify-python ) ) )" +# net-print/cups not migrated to python-r1 +# sys-apps/dbus/dbus not migrated to python-r1 +# net-analyzer/net-snmp not migrated to python-r1 +# dev-python/notify-python not migrated to python-r1 + CONFIG_CHECK="~PARPORT ~PPDEV" ERROR_PARPORT="Please make sure kernel parallel port support is enabled (PARPORT and PPDEV)." pkg_setup() { - if ! use minimal; then - python_set_active_version 2 - python_pkg_setup - fi - ! use qt4 && ewarn "You need USE=qt4 for the hplip GUI." use scanner && ! use X && ewarn "You need USE=X for the scanner GUI." @@ -99,8 +99,6 @@ } src_prepare() { - use !minimal && python_convert_shebangs -q -r 2 . - EPATCH_SUFFIX="patch" \ EPATCH_FORCE="yes" \ epatch "${WORKDIR}" @@ -236,10 +234,12 @@ rm -rf "${D}"/usr/share/hal || die find "${D}" -name '*.la' -exec rm -rf {} + || die + + python_export python2_7 EPYTHON PYTHON + python_optimize "${D}"/usr/share/hplip } pkg_postinst() { - use !minimal && python_mod_optimize /usr/share/${PN} fdo-mime_desktop_database_update if [[ -z "${REPLACING_VERSIONS}" ]]; then @@ -252,6 +252,5 @@ } pkg_postrm() { - use !minimal && python_mod_cleanup /usr/share/${PN} fdo-mime_desktop_database_update }