media-libs/mlt: convert to python-single-r1
authorAlexis Ballier <aballier@gentoo.org>
Fri, 21 Aug 2015 12:38:19 +0000 (14:38 +0200)
committerAlexis Ballier <aballier@gentoo.org>
Fri, 21 Aug 2015 12:38:19 +0000 (14:38 +0200)
Package-Manager: portage-2.2.20.1

media-libs/mlt/mlt-0.9.8.ebuild

index 3f52506761f0eb40fec38728e0b413e7e6c36d67..e7ec6d2a9b65eae89cb971125c94ca3523788695 100644 (file)
@@ -3,8 +3,8 @@
 # $Id$
 
 EAPI=5
-PYTHON_DEPEND="python? 2:2.6"
-inherit eutils toolchain-funcs multilib python
+PYTHON_COMPAT=( python2_7 )
+inherit eutils toolchain-funcs multilib python-single-r1
 
 DESCRIPTION="An open source multimedia framework, designed and developed for television broadcasting"
 HOMEPAGE="http://www.mltframework.org/"
@@ -60,7 +60,7 @@ DEPEND="${RDEPEND}
        compressed-lumas? ( || ( media-gfx/imagemagick[png]
                        media-gfx/graphicsmagick[imagemagick,png] ) )
        lua? ( ${SWIG_DEPEND} virtual/pkgconfig )
-       python? ( ${SWIG_DEPEND} )
+       python? ( ${SWIG_DEPEND} ${PYTHON_DEPS} )
        ruby? ( ${SWIG_DEPEND} )"
 #      java? ( ${SWIG_DEPEND} >=virtual/jdk-1.5 )
 #      perl? ( ${SWIG_DEPEND} )
@@ -68,8 +68,7 @@ DEPEND="${RDEPEND}
 #      tcl? ( ${SWIG_DEPEND} )
 
 pkg_setup() {
-       python_set_active_version 2
-       python_pkg_setup
+       python-single-r1_pkg_setup
 }
 
 src_prepare() {
@@ -164,6 +163,7 @@ src_install() {
                exeinto $(python_get_sitedir)
                doexe _mlt.so
                dodoc play.py
+               python_optimize
        fi
 
        if use ruby; then
@@ -174,15 +174,3 @@ src_install() {
        fi
        # TODO: java perl php tcl
 }
-
-pkg_postinst() {
-       if use python; then
-               python_mod_optimize mlt.py
-       fi
-}
-
-pkg_postrm() {
-       if use python; then
-               python_mod_cleanup mlt.py
-       fi
-}