Merge remote-tracking branch 'github/pr/536'.
[gentoo.git] / sci-chemistry / pymol-plugins-emovie / pymol-plugins-emovie-1.0.4.ebuild
index 38a48fd485fe6f3155c0b4bcefd4799ae8694ada..667dcf30bf1d1440e4a56c8772f52fe80fedd356 100644 (file)
@@ -1,14 +1,14 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI="3"
+EAPI=5
 
-SUPPORT_PYTHON_ABIS="1"
+PYTHON_COMPAT=( python2_7 )
 
-inherit eutils python
+inherit eutils python-r1
 
-DESCRIPTION="eMovie is a plug-in tool for the molecular visualization program PyMOL"
+DESCRIPTION="PyMOL plugin for convinient movie creation"
 SRC_URI="http://www.weizmann.ac.il/ISPC/eMovie_package.zip"
 HOMEPAGE="http://www.weizmann.ac.il/ISPC/eMovie.html"
 
@@ -17,38 +17,20 @@ LICENSE="GPL-2"
 KEYWORDS="~x86 ~amd64 ~x86-linux ~amd64-linux"
 IUSE=""
 
-RDEPEND=">sci-chemistry/pymol-0.99"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+       >sci-chemistry/pymol-0.99[${PYTHON_USEDEP}]"
 DEPEND="app-arch/unzip"
-#RESTRICT_PYTHON_ABIS="3.*"
+
+S="${WORKDIR}"
 
 src_prepare() {
        epatch "${FILESDIR}"/${PV}-indent.patch
-
-       mkdir ${P}
-       mv e* ${P}/
-
-       python_copy_sources
-
-       conversion() {
-               [[ "${PYTHON_ABI}" == 2.* ]] && return
-
-               2to3-${PYTHON_ABI} -w eMovie.py > /dev/null
-       }
-       python_execute_function --action-message 'Applying patches for Python ${PYTHON_ABI}' --failure-message 'Applying patches for Python ${PYTHON_ABI} failed' -s conversion
 }
 
 src_install(){
-       installation() {
-               insinto $(python_get_sitedir)/pmg_tk/startup/
-               doins eMovie.py || die
-       }
-       python_execute_function -s installation
-}
-
-pkg_postinst(){
-       python_mod_optimize pmg_tk/startup
-}
-
-pkg_postrm() {
-       python_mod_cleanup pmg_tk/startup
+       python_moduleinto pmg_tk/startup
+       python_foreach_impl python_domodule eMovie.py
+       python_foreach_impl python_optimize
 }