sys-power/phctool: python-single-r1, EAPI=6
authorMichał Górny <mgorny@gentoo.org>
Sun, 19 Feb 2017 23:20:25 +0000 (00:20 +0100)
committerMichał Górny <mgorny@gentoo.org>
Sun, 19 Feb 2017 23:20:42 +0000 (00:20 +0100)
sys-power/phctool/files/phctool-0.5.2.2_all_paths_tool_no_sudo.patch
sys-power/phctool/files/phctool-0.5.2.2_all_paths_tool_sudo.patch
sys-power/phctool/files/phctool-0.5.2.2_all_paths_tray.patch
sys-power/phctool/files/phctool-0.5.2.2_kernel_2.6.36.patch
sys-power/phctool/phctool-0.5.2.2-r3.ebuild [moved from sys-power/phctool/phctool-0.5.2.2-r2.ebuild with 67% similarity]

index 2c4de7d32b6a5091c2a9e40218208a5471b93a39..316e538abe0dd8ac9741a1ad7a2f592d79dd24c6 100644 (file)
@@ -1,5 +1,5 @@
---- phctool.sh 2007-10-27 22:32:35.000000000 +0200
-+++ phctool.sh 2009-09-05 23:20:18.000000000 +0200
+--- a/phctool.sh       2007-10-27 22:32:35.000000000 +0200
++++ b/phctool.sh       2009-09-05 23:20:18.000000000 +0200
 @@ -1,10 +1,7 @@
  #!/bin/sh
 -#this shellscript is just a wrapper to subphctool.sh
index 3ec8a9172403846e6d4b2f806c8c74c1152f382b..11b64c3bab076fa4fd42e4b2e11f9c4472008189 100644 (file)
@@ -1,5 +1,5 @@
---- phctool.sh 2007-10-27 22:32:35.000000000 +0200
-+++ phctool.sh 2009-09-05 23:20:18.000000000 +0200
+--- a/phctool.sh       2007-10-27 22:32:35.000000000 +0200
++++ b/phctool.sh       2009-09-05 23:20:18.000000000 +0200
 @@ -1,10 +1,7 @@
  #!/bin/sh
 -#this shellscript is just a wrapper to subphctool.sh
index 992ed5c7ef155eb85306f93a2a1781e68301ec86..1d2053a9c4b7d00542311914574d665cba171e63 100644 (file)
@@ -1,5 +1,5 @@
---- phctray.sh 2007-09-08 08:29:31.000000000 +0200
-+++ phctray.sh 2009-09-05 23:16:54.000000000 +0200
+--- a/phctray.sh       2007-09-08 08:29:31.000000000 +0200
++++ b/phctray.sh       2009-09-05 23:16:54.000000000 +0200
 @@ -2,6 +2,5 @@
  #this shellscript is just a wrapper to phctray.py
  #but necessary to run phctray from another directory
@@ -8,8 +8,8 @@
 -cd $PROGPATH
 +cd /usr/share/phctool
  ./phctray.py
---- phctray.py 2009-09-08 12:17:11.000000000 +0200
-+++ phctray.py 2009-09-08 12:17:33.000000000 +0200
+--- a/phctray.py       2009-09-08 12:17:11.000000000 +0200
++++ b/phctray.py       2009-09-08 12:17:33.000000000 +0200
 @@ -61,7 +61,7 @@
  t.show_all()
  
@@ -19,8 +19,8 @@
  subprocess.Popen(cmd, shell=False)            ##call the affinated programm
  
  gtk.main()
---- phctray.py 2009-09-08 12:22:28.000000000 +0200
-+++ phctray.py 2009-09-08 12:23:44.000000000 +0200
+--- a/phctray.py       2009-09-08 12:22:28.000000000 +0200
++++ b/phctray.py       2009-09-08 12:23:44.000000000 +0200
 @@ -11,7 +11,7 @@
        return;
  
index beb9efa7e5c5a83435547475970f988c7e68c1df..c3a2432aea2dfcc05e443f09fac2ed1de1a90325 100644 (file)
@@ -1,5 +1,5 @@
---- phctool-0.5.2-2/phctool/inc/libs/cpuinfo.py
-+++ phctool-0.5.2-2/phctool/inc/libs/cpuinfo.py
+--- phctool/inc/libs/cpuinfo.py
++++ phctool/inc/libs/cpuinfo.py
 @@ -14,33 +14,49 @@
  
  
similarity index 67%
rename from sys-power/phctool/phctool-0.5.2.2-r2.ebuild
rename to sys-power/phctool/phctool-0.5.2.2-r3.ebuild
index 638eda14b61b0868f62e7c50209c1c640dc9ac0e..c1447a7e812371d132f02042be560785242a3b23 100644 (file)
@@ -1,11 +1,11 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI=4
+EAPI=6
 
-PYTHON_DEPEND="2"
-inherit eutils python user
+PYTHON_COMPAT=( python2_7 )
+inherit python-single-r1 user
 
 DESCRIPTION="Processor Hardware Control userland configuration tool"
 HOMEPAGE="http://www.linux-phc.org/"
@@ -16,10 +16,14 @@ SLOT="0"
 KEYWORDS="~amd64 ~x86"
 IUSE="doc sudo"
 
-RDEPEND="dev-python/egg-python
-       dev-python/pygtk:2
+DEPEND="${PYTHON_DEPS}
+       dev-python/egg-python[${PYTHON_USEDEP}]
+       dev-python/pygtk:2[${PYTHON_USEDEP}]"
+RDEPEND="${DEPEND}
        sudo? ( app-admin/sudo )"
 
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
 S="${WORKDIR}/${PV%.*}-${PV##*.}/${PN}"
 
 pkg_setup() {
@@ -28,19 +32,21 @@ pkg_setup() {
                MY_GROUPNAME="phcusers"
                enewgroup ${MY_GROUPNAME}
        fi
-       python_pkg_setup
+       python-single-r1_pkg_setup
 }
 
 src_prepare() {
-       epatch "${FILESDIR}"/${P}_all_paths_tray.patch
+       eapply "${FILESDIR}"/${P}_all_paths_tray.patch
        if use sudo ; then
-               epatch "${FILESDIR}"/${P}_all_paths_tool_sudo.patch
+               eapply "${FILESDIR}"/${P}_all_paths_tool_sudo.patch
        else
-               epatch "${FILESDIR}"/${P}_all_paths_tool_no_sudo.patch
+               eapply "${FILESDIR}"/${P}_all_paths_tool_no_sudo.patch
        fi
-       epatch "${FILESDIR}"/${P}_kernel_2.6.36.patch
-       epatch "${FILESDIR}"/${P}_gui_kernel_2.6.38.patch
+       eapply "${FILESDIR}"/${P}_kernel_2.6.36.patch
+       eapply "${FILESDIR}"/${P}_gui_kernel_2.6.38.patch
+       eapply_user
        find . -name "*.pyc" -delete || die
+       python_fix_shebang .
 }
 
 src_install() {
@@ -49,8 +55,8 @@ src_install() {
 
        exeinto ${MY_PROGDIR}
        doexe phc{tool,tray}.py subphctool.sh
-       insinto ${MY_PROGDIR}
-       doins -r inc
+       python_moduleinto ${MY_PROGDIR}
+       python_domodule inc
 
        if use sudo ; then
                fowners -R ":${MY_GROUPNAME}" "${MY_PROGDIR}"
@@ -63,7 +69,8 @@ src_install() {
 
        dodoc CHANGELOG
        if use doc; then
-               dohtml -r doc/docfiles doc/index.htm
+               docinto html
+               dodoc -r doc/docfiles doc/index.htm
        fi
 }