summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2017-02-18 20:58:52 +0100
committerDavid Seifert <soap@gentoo.org>2017-02-18 21:37:34 +0100
commit07be6b57a0a8a4aa5da0318158baf9ea8c87dad8 (patch)
treeaa898d1edfa0456175d67cc3232a84e5e96d8c87 /x11-plugins
parentx11-apps/python-whiteboard: Remove old (diff)
downloadgentoo-07be6b57a0a8a4aa5da0318158baf9ea8c87dad8.tar.gz
gentoo-07be6b57a0a8a4aa5da0318158baf9ea8c87dad8.tar.bz2
gentoo-07be6b57a0a8a4aa5da0318158baf9ea8c87dad8.zip
x11-plugins/thinkhdaps: Port to python-single-r1
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'x11-plugins')
-rw-r--r--x11-plugins/thinkhdaps/files/thinkhdaps-0.2.1-fix-desktop-qa.patch12
-rw-r--r--x11-plugins/thinkhdaps/files/thinkhdaps-0.2.1-fix-python-shebang.patch11
-rw-r--r--x11-plugins/thinkhdaps/thinkhdaps-0.2.1-r1.ebuild33
-rw-r--r--x11-plugins/thinkhdaps/thinkhdaps-0.2.1.ebuild33
4 files changed, 56 insertions, 33 deletions
diff --git a/x11-plugins/thinkhdaps/files/thinkhdaps-0.2.1-fix-desktop-qa.patch b/x11-plugins/thinkhdaps/files/thinkhdaps-0.2.1-fix-desktop-qa.patch
new file mode 100644
index 000000000000..7bcfafe32234
--- /dev/null
+++ b/x11-plugins/thinkhdaps/files/thinkhdaps-0.2.1-fix-desktop-qa.patch
@@ -0,0 +1,12 @@
+Fix .desktop file to adhere to modern FDO standards.
+
+--- a/thinkhdaps.desktop
++++ b/thinkhdaps.desktop
+@@ -2,6 +2,6 @@
+ Name=ThinkHDAPS
+ Comment=Monitor your HDAPS-enabled harddisk
+ Exec=thinkhdaps
+-Icon=thinkhdaps-logo.svg
++Icon=thinkhdaps-logo
+ Type=Application
+ Categories=System
diff --git a/x11-plugins/thinkhdaps/files/thinkhdaps-0.2.1-fix-python-shebang.patch b/x11-plugins/thinkhdaps/files/thinkhdaps-0.2.1-fix-python-shebang.patch
new file mode 100644
index 000000000000..314ef789c3b6
--- /dev/null
+++ b/x11-plugins/thinkhdaps/files/thinkhdaps-0.2.1-fix-python-shebang.patch
@@ -0,0 +1,11 @@
+Make shebangs Gentoo Prefix friendly
+See also: https://blogs.gentoo.org/mgorny/2016/02/08/a-quick-note-on-portable-shebangs/
+
+--- a/thinkhdaps.py
++++ b/thinkhdaps.py
+@@ -1,4 +1,4 @@
+-#!@PYTHON@
++#!/usr/bin/env python2
+ # Copyright (c) 2008-2009 Thomas Pani <thomas.pani@gmail.com>
+ # based on an awn applet Copyright (c) 2008 onox <denkpadje@gmail.com>
+ #
diff --git a/x11-plugins/thinkhdaps/thinkhdaps-0.2.1-r1.ebuild b/x11-plugins/thinkhdaps/thinkhdaps-0.2.1-r1.ebuild
new file mode 100644
index 000000000000..11e68aa5a890
--- /dev/null
+++ b/x11-plugins/thinkhdaps/thinkhdaps-0.2.1-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-single-r1
+
+DESCRIPTION="A PyGTK based HDAPS monitor"
+HOMEPAGE="http://thpani.at/projects/thinkhdaps/"
+SRC_URI="http://thpani.at/media/downloads/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ dev-python/libgnome-python:2[${PYTHON_USEDEP}]
+ dev-python/pygobject:2[${PYTHON_USEDEP}]
+ dev-python/pygtk:2[${PYTHON_USEDEP}]"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.2.1-fix-desktop-qa.patch
+ "${FILESDIR}"/${PN}-0.2.1-fix-python-shebang.patch
+)
+
+src_configure() {
+ econf --enable-desktop PYTHON="${EPYTHON}"
+}
diff --git a/x11-plugins/thinkhdaps/thinkhdaps-0.2.1.ebuild b/x11-plugins/thinkhdaps/thinkhdaps-0.2.1.ebuild
deleted file mode 100644
index 2efdcf51b98c..000000000000
--- a/x11-plugins/thinkhdaps/thinkhdaps-0.2.1.ebuild
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=2
-
-PYTHON_DEPEND=2
-
-inherit base python
-
-DESCRIPTION="A PyGTK based HDAPS monitor"
-HOMEPAGE="http://thpani.at/projects/thinkhdaps/"
-SRC_URI="http://thpani.at/media/downloads/${PN}/${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="amd64 x86"
-IUSE=""
-
-RDEPEND="dev-python/libgnome-python:2
- dev-python/pygobject:2
- dev-python/pygtk:2"
-
-DOCS=( AUTHORS NEWS )
-
-pkg_setup() {
- python_set_active_version 2
- python_pkg_setup
-}
-
-src_configure() {
- econf --enable-desktop PYTHON=$(PYTHON -2 --absolute-path)
-}