summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sping@gentoo.org>2013-02-17 22:38:57 +0000
committerSebastian Pipping <sping@gentoo.org>2013-02-17 22:38:57 +0000
commitb2e180bdd833d52b47e12ea077a0d822c70bdc80 (patch)
treefa1fb2753f68ea52f243e72ee251dc75dc53901d /x11-misc/redshift
parentRemove doc USE flag, bug 455586. (diff)
downloadgentoo-2-b2e180bdd833d52b47e12ea077a0d822c70bdc80.tar.gz
gentoo-2-b2e180bdd833d52b47e12ea077a0d822c70bdc80.tar.bz2
gentoo-2-b2e180bdd833d52b47e12ea077a0d822c70bdc80.zip
x11-misc/redshift: Migrate to python-r1 (bug #440180)
(Portage version: 2.1.11.52/cvs/Linux x86_64, signed Manifest commit with key 0x401A1600)
Diffstat (limited to 'x11-misc/redshift')
-rw-r--r--x11-misc/redshift/ChangeLog8
-rw-r--r--x11-misc/redshift/redshift-1.7-r1.ebuild47
2 files changed, 28 insertions, 27 deletions
diff --git a/x11-misc/redshift/ChangeLog b/x11-misc/redshift/ChangeLog
index 4828d6bed30b..291c9e1d1dc7 100644
--- a/x11-misc/redshift/ChangeLog
+++ b/x11-misc/redshift/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for x11-misc/redshift
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-misc/redshift/ChangeLog,v 1.18 2012/08/16 20:40:38 hasufell Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/redshift/ChangeLog,v 1.19 2013/02/17 22:38:57 sping Exp $
+
+ 17 Feb 2013; Sebastian Pipping <sping@gentoo.org> redshift-1.7-r1.ebuild:
+ Migrate to python-r1 (bug #440180). Thanks for the initial patch to Michał
+ Górny
16 Aug 2012; Julian Ospald <hasufell@gentoo.org> redshift-1.7-r1.ebuild:
fix build for -gtk wrt #431646
diff --git a/x11-misc/redshift/redshift-1.7-r1.ebuild b/x11-misc/redshift/redshift-1.7-r1.ebuild
index f3bd2103af66..832d6c8edd41 100644
--- a/x11-misc/redshift/redshift-1.7-r1.ebuild
+++ b/x11-misc/redshift/redshift-1.7-r1.ebuild
@@ -1,14 +1,11 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-misc/redshift/redshift-1.7-r1.ebuild,v 1.5 2012/08/16 20:40:38 hasufell Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/redshift/redshift-1.7-r1.ebuild,v 1.6 2013/02/17 22:38:57 sping Exp $
-EAPI=4
+EAPI=5
+PYTHON_COMPAT=( python{2_6,2_7} )
-PYTHON_DEPEND="gtk? 2:2.6"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="2.[45] 3.*"
-
-inherit autotools eutils gnome2-utils python
+inherit autotools eutils gnome2-utils python-r1
DESCRIPTION="A screen color temperature adjusting software"
HOMEPAGE="http://jonls.dk/redshift/"
@@ -24,20 +21,23 @@ COMMON_DEPEND=">=x11-libs/libX11-1.4
x11-libs/libxcb
geoclue? ( app-misc/geoclue )
gnome? ( dev-libs/glib:2
- >=gnome-base/gconf-2 )"
+ >=gnome-base/gconf-2 )
+ gtk? ( ${PYTHON_DEPS} )"
RDEPEND="${COMMON_DEPEND}
- gtk? ( >=dev-python/pygtk-2
- dev-python/pyxdg )"
+ gtk? ( >=dev-python/pygtk-2[${PYTHON_USEDEP}]
+ dev-python/pyxdg[${PYTHON_USEDEP}] )"
DEPEND="${COMMON_DEPEND}
nls? ( sys-devel/gettext )"
src_prepare() {
- >py-compile
epatch "${FILESDIR}"/${P}-make-conditionals.patch
+ epatch_user
eautoreconf
}
src_configure() {
+ python_export_best
+
econf \
--disable-silent-rules \
$(use_enable nls) \
@@ -50,20 +50,17 @@ src_configure() {
--disable-ubuntu
}
+_impl_specific_src_install() {
+ emake DESTDIR="${D}" pythondir="$(python_get_sitedir)" \
+ -C src/gtk-redshift install
+}
+
src_install() {
default
- # handle multiple python abi support
- per_abi_install() {
- cp "${D}"/usr/bin/gtk-redshift "${D}"/usr/bin/gtk-redshift-${PYTHON_ABI} || die
- python_convert_shebangs ${PYTHON_ABI} "${D}"/usr/bin/gtk-redshift-${PYTHON_ABI}
- emake DESTDIR="${D}" pythondir="$(python_get_sitedir)" -C src/gtk-redshift install
- }
-
- if use gtk ; then
- rm -R "${D}"/usr/$(get_libdir)/python* || die
- python_execute_function per_abi_install
- python_generate_wrapper_scripts -f "${D}"/usr/bin/gtk-redshift
+ if use gtk; then
+ python_foreach_impl _impl_specific_src_install
+ python_replicate_script "${D}"/usr/bin/gtk-redshift
fi
}
@@ -72,9 +69,9 @@ pkg_preinst() {
}
pkg_postinst() {
- use gtk && { gnome2_icon_cache_update; python_mod_optimize gtk_${PN}; }
+ use gtk && gnome2_icon_cache_update
}
pkg_postrm() {
- use gtk && { gnome2_icon_cache_update; python_mod_cleanup gtk_${PN}; }
+ use gtk && gnome2_icon_cache_update
}