Skip to content

Commit

Permalink
sys-power/phctool: python-single-r1, EAPI=6
Browse files Browse the repository at this point in the history
  • Loading branch information
mgorny committed Feb 19, 2017
1 parent d9ef359 commit b51a510
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 6 additions & 6 deletions sys-power/phctool/files/phctool-0.5.2.2_all_paths_tray.patch
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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()

Expand 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;

Expand Down
4 changes: 2 additions & 2 deletions sys-power/phctool/files/phctool-0.5.2.2_kernel_2.6.36.patch
Original file line number Diff line number Diff line change
@@ -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 @@


Expand Down
Original file line number Diff line number Diff line change
@@ -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/"
Expand All @@ -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() {
Expand All @@ -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() {
Expand All @@ -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}"
Expand All @@ -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
}

Expand Down

0 comments on commit b51a510

Please sign in to comment.