--- libcap-ng-0.7.3.ebuild 2013-02-21 00:01:31.000000000 +0000 +++ libcap-ng-0.7.3.ebuild 2013-02-25 05:47:34.047346836 +0000 @@ -3,11 +3,9 @@ # $Header: /var/cvsroot/gentoo-x86/sys-libs/libcap-ng/libcap-ng-0.7.3.ebuild,v 1.4 2013/02/20 23:32:06 zmedico Exp $ EAPI=5 +PYTHON_COMPAT=( python{2_5,2_6,2_7,3_1,3_2,3_3} ) -SUPPORT_PYTHON_ABIS="1" -RESTRICT_PYTHON_ABIS="*-jython *-pypy-*" - -inherit autotools flag-o-matic python +inherit autotools eutils flag-o-matic python-r1 DESCRIPTION="POSIX 1003.1e capabilities" HOMEPAGE="http://people.redhat.com/sgrubb/libcap-ng/" @@ -18,15 +16,13 @@ SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~arm-linux ~x86-linux" IUSE="python static-libs" -RDEPEND="python? ( dev-lang/python )" +RDEPEND="python? ( ${PYTHON_DEPS} )" DEPEND="${RDEPEND} sys-kernel/linux-headers python? ( >=dev-lang/swig-2 )" -PYTHON_CFLAGS=("2.* + -fno-strict-aliasing") - pkg_setup() { - use python && python_pkg_setup + use python && python_export_best } src_prepare() { @@ -52,16 +48,21 @@ src_compile() { default if use python; then - python_copy_sources bindings/python - building() { - emake \ + if [[ ${EPYTHON} = python2.* ]]; then + local CFLAGS="${CFLAGS}" + append-cflags -fno-strict-aliasing + fi + + cp -pr bindings/python{,-${EPYTHON}} || die + + emake -C bindings/python-${EPYTHON} \ CFLAGS="${CFLAGS}" \ - PYTHON_VERSION="$(python_get_version)" \ + PYTHON_VERSION="${EPYTHON#python}" \ pyexecdir="$(python_get_sitedir)" \ pythondir="$(python_get_sitedir)" } - python_execute_function -s --source-dir bindings/python building + python_foreach_impl building fi } @@ -75,14 +76,14 @@ src_test() { if use python; then testing() { - emake \ - PYTHON_VERSION="$(python_get_version)" \ + emake -C bindings/python-${EPYTHON} \ + PYTHON_VERSION="${EPYTHON#python}" \ pyexecdir="$(python_get_sitedir)" \ pythondir="$(python_get_sitedir)" \ TESTS_ENVIRONMENT="PYTHONPATH=..:../.libs" \ check } - python_execute_function -s --source-dir bindings/python testing + python_foreach_impl testing fi } @@ -91,25 +92,16 @@ src_install() { if use python; then installation() { - emake \ + emake -C bindings/python-${EPYTHON} \ DESTDIR="${D}" \ - PYTHON_VERSION="$(python_get_version)" \ + PYTHON_VERSION="${EPYTHON#python}" \ pyexecdir="$(python_get_sitedir)" \ pythondir="$(python_get_sitedir)" \ install + python_optimize } - python_execute_function -s --source-dir bindings/python installation - - python_clean_installation_image + python_foreach_impl installation fi - rm -f "${ED}"/usr/lib*/${PN}.la -} - -pkg_postinst() { - use python && python_mod_optimize capng.py -} - -pkg_postrm() { - use python && python_mod_cleanup capng.py + prune_libtool_files --modules }