media-video/pymp: python-single-r1, EAPI=6
authorMichał Górny <mgorny@gentoo.org>
Mon, 20 Feb 2017 22:32:28 +0000 (23:32 +0100)
committerMichał Górny <mgorny@gentoo.org>
Tue, 21 Feb 2017 08:51:44 +0000 (09:51 +0100)
media-video/pymp/pymp-1.1-r1.ebuild [new file with mode: 0644]
media-video/pymp/pymp-1.1.ebuild [deleted file]

diff --git a/media-video/pymp/pymp-1.1-r1.ebuild b/media-video/pymp/pymp-1.1-r1.ebuild
new file mode 100644 (file)
index 0000000..9507113
--- /dev/null
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+inherit eutils python-single-r1
+
+DESCRIPTION="a lean, flexible frontend to mplayer written in python"
+HOMEPAGE="http://jdolan.dyndns.org/trac/wiki/Pymp"
+SRC_URI="http://jdolan.dyndns.org/jaydolan/files/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86 ~amd64-fbsd"
+IUSE=""
+
+RDEPEND="media-video/mplayer
+       dev-python/pygtk[${PYTHON_USEDEP}]
+       ${PYTHON_DEPS}"
+DEPEND="sys-apps/sed"
+
+REQUIRED_USE=${PYTHON_REQUIRED_USE}
+
+src_compile() {
+       python_fix_shebang pymp.py
+}
+
+src_install() {
+       python_moduleinto /usr/lib/pymp
+       python_domodule *.py
+
+       # note: pymp script is a horrible unnecessary wrapper
+       # a) with a dependency on sys-apps/which;
+       # b) that invokes compiled .pyc directly
+       # do not use it
+       dodir /usr/bin
+       dosym ../lib/pymp/pymp.py /usr/bin/pymp
+       fperms +x /usr/lib/pymp/pymp.py
+
+       dodoc CHANGELOG README
+       doicon pymp.png
+       make_desktop_entry pymp Pymp pymp
+}
diff --git a/media-video/pymp/pymp-1.1.ebuild b/media-video/pymp/pymp-1.1.ebuild
deleted file mode 100644 (file)
index 45f0b0c..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=3
-PYTHON_DEPEND="2:2.5"
-inherit eutils multilib python
-
-DESCRIPTION="a lean, flexible frontend to mplayer written in python"
-HOMEPAGE="http://jdolan.dyndns.org/trac/wiki/Pymp"
-SRC_URI="http://jdolan.dyndns.org/jaydolan/files/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 x86 ~amd64-fbsd"
-IUSE=""
-
-RDEPEND="media-video/mplayer
-       dev-python/pygtk"
-DEPEND="sys-apps/sed"
-
-pkg_setup() {
-       python_set_active_version 2
-       python_pkg_setup
-}
-
-src_prepare() {
-       sed -i -e "s/python/python2/" -e "s:PREFIX/lib:/usr/$(get_libdir):" pymp || die "sed failed"
-}
-
-src_compile() { :; }
-
-src_install() {
-       dobin pymp || die "dobin failed"
-       insinto /usr/$(get_libdir)/pymp
-       doins *.py || die "doins failed"
-       dodoc CHANGELOG README
-       doicon pymp.png
-       make_desktop_entry pymp Pymp pymp
-}
-
-pkg_postinst() {
-       python_mod_optimize /usr/$(get_libdir)/pymp
-}
-
-pkg_postrm() {
-       python_mod_cleanup /usr/$(get_libdir)/pymp
-}