1 |
commit: 3685fe4926d0ec005925e8a4d20f8f5e237687cf |
2 |
Author: Sebastian Pipping <sping <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Nov 30 13:48:00 2016 +0000 |
4 |
Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 30 13:50:33 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3685fe49 |
7 |
|
8 |
x11-misc/redshift: Python 3.5, REQUIRED_USE (bug #601234) |
9 |
|
10 |
Thanks to Ben Kohler! |
11 |
|
12 |
Package-Manager: portage-2.3.2 |
13 |
|
14 |
x11-misc/redshift/redshift-1.11-r1.ebuild | 87 +++++++++++++++++++++++++++++++ |
15 |
1 file changed, 87 insertions(+) |
16 |
|
17 |
diff --git a/x11-misc/redshift/redshift-1.11-r1.ebuild b/x11-misc/redshift/redshift-1.11-r1.ebuild |
18 |
new file mode 100644 |
19 |
index 00000000..61977e0 |
20 |
--- /dev/null |
21 |
+++ b/x11-misc/redshift/redshift-1.11-r1.ebuild |
22 |
@@ -0,0 +1,87 @@ |
23 |
+# Copyright 1999-2016 Gentoo Foundation |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+# $Id$ |
26 |
+ |
27 |
+EAPI=5 |
28 |
+PYTHON_COMPAT=( python3_4 python3_5 ) |
29 |
+ |
30 |
+inherit systemd autotools eutils gnome2-utils python-r1 |
31 |
+ |
32 |
+DESCRIPTION="A screen color temperature adjusting software" |
33 |
+HOMEPAGE="http://jonls.dk/redshift/" |
34 |
+SRC_URI="https://github.com/jonls/redshift/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
35 |
+ |
36 |
+LICENSE="GPL-3" |
37 |
+SLOT="0" |
38 |
+KEYWORDS="~amd64 ~x86" |
39 |
+IUSE="appindicator geoclue gtk nls" |
40 |
+ |
41 |
+COMMON_DEPEND=">=x11-libs/libX11-1.4 |
42 |
+ x11-libs/libXxf86vm |
43 |
+ x11-libs/libxcb |
44 |
+ x11-libs/libdrm |
45 |
+ geoclue? ( app-misc/geoclue:2.0 dev-libs/glib:2 ) |
46 |
+ gtk? ( ${PYTHON_DEPS} )" |
47 |
+RDEPEND="${COMMON_DEPEND} |
48 |
+ gtk? ( dev-python/pygobject[${PYTHON_USEDEP}] |
49 |
+ x11-libs/gtk+:3[introspection] |
50 |
+ dev-python/pyxdg[${PYTHON_USEDEP}] )" |
51 |
+DEPEND="${COMMON_DEPEND} |
52 |
+ >=dev-util/intltool-0.50 |
53 |
+ nls? ( sys-devel/gettext ) |
54 |
+ appindicator? ( dev-libs/libappindicator ) |
55 |
+" |
56 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
57 |
+ |
58 |
+src_prepare() { |
59 |
+ epatch_user |
60 |
+ eautoreconf |
61 |
+} |
62 |
+ |
63 |
+src_configure() { |
64 |
+ python_export_best |
65 |
+ |
66 |
+ econf \ |
67 |
+ --disable-silent-rules \ |
68 |
+ $(use_enable nls) \ |
69 |
+ --enable-drm \ |
70 |
+ --enable-randr \ |
71 |
+ --enable-vidmode \ |
72 |
+ --disable-wingdi \ |
73 |
+ \ |
74 |
+ --disable-corelocation \ |
75 |
+ --disable-geoclue \ |
76 |
+ $(use_enable geoclue geoclue2) \ |
77 |
+ \ |
78 |
+ $(use_enable gtk gui) \ |
79 |
+ --with-systemduserunitdir="$(systemd_get_userunitdir)" \ |
80 |
+ --disable-quartz \ |
81 |
+ --disable-ubuntu |
82 |
+} |
83 |
+ |
84 |
+_impl_specific_src_install() { |
85 |
+ emake DESTDIR="${D}" pythondir="$(python_get_sitedir)" \ |
86 |
+ -C src/redshift-gtk install |
87 |
+} |
88 |
+ |
89 |
+src_install() { |
90 |
+ emake DESTDIR="${D}" UPDATE_ICON_CACHE=/bin/true install |
91 |
+ |
92 |
+ if use gtk; then |
93 |
+ python_foreach_impl _impl_specific_src_install |
94 |
+ python_replicate_script "${D}"/usr/bin/redshift-gtk |
95 |
+ dosym redshift-gtk /usr/bin/gtk-redshift |
96 |
+ fi |
97 |
+} |
98 |
+ |
99 |
+pkg_preinst() { |
100 |
+ use gtk && gnome2_icon_savelist |
101 |
+} |
102 |
+ |
103 |
+pkg_postinst() { |
104 |
+ use gtk && gnome2_icon_cache_update |
105 |
+} |
106 |
+ |
107 |
+pkg_postrm() { |
108 |
+ use gtk && gnome2_icon_cache_update |
109 |
+} |