Gentoo Archives: gentoo-commits

From: Sebastian Pipping <sping@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/redshift/
Date: Sun, 24 Nov 2019 23:24:02
Message-Id: 1574637800.a8afc8263b9ee22ecf1fd1494cc7b7388a612739.sping@gentoo
1 commit: a8afc8263b9ee22ecf1fd1494cc7b7388a612739
2 Author: Sebastian Pipping <sping <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 24 23:22:19 2019 +0000
4 Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 24 23:23:20 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a8afc826
7
8 x11-misc/redshift: AppArmor + python_optimize
9
10 Closes: https://bugs.gentoo.org/698732
11 Signed-off-by: Sebastian Pipping <sping <AT> gentoo.org>
12 Package-Manager: Portage-2.3.78, Repoman-2.3.16
13
14 x11-misc/redshift/redshift-1.12-r3.ebuild | 88 +++++++++++++++++++++++++++++++
15 1 file changed, 88 insertions(+)
16
17 diff --git a/x11-misc/redshift/redshift-1.12-r3.ebuild b/x11-misc/redshift/redshift-1.12-r3.ebuild
18 new file mode 100644
19 index 00000000000..a7399ed031e
20 --- /dev/null
21 +++ b/x11-misc/redshift/redshift-1.12-r3.ebuild
22 @@ -0,0 +1,88 @@
23 +# Copyright 1999-2019 Gentoo Authors
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI=6
27 +PYTHON_COMPAT=( python3_{5,6,7} )
28 +
29 +inherit systemd autotools eutils gnome2-utils python-r1
30 +
31 +DESCRIPTION="A screen color temperature adjusting software"
32 +HOMEPAGE="http://jonls.dk/redshift/"
33 +SRC_URI="https://github.com/jonls/redshift/archive/v${PV}.tar.gz -> ${P}.tar.gz"
34 +
35 +LICENSE="GPL-3"
36 +SLOT="0"
37 +KEYWORDS="~amd64 ~arm64 ~x86"
38 +IUSE="ayatana geoclue gtk nls"
39 +
40 +COMMON_DEPEND=">=x11-libs/libX11-1.4
41 + x11-libs/libXxf86vm
42 + x11-libs/libxcb
43 + x11-libs/libdrm
44 + ayatana? ( dev-libs/libappindicator:3[introspection] )
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 +"
55 +REQUIRED_USE="gtk? ( ${PYTHON_REQUIRED_USE} )"
56 +
57 +src_prepare() {
58 + default
59 + eautoreconf
60 +}
61 +
62 +src_configure() {
63 + use gtk && python_setup
64 +
65 + econf \
66 + --disable-silent-rules \
67 + $(use_enable nls) \
68 + --enable-drm \
69 + --enable-randr \
70 + --enable-vidmode \
71 + --disable-wingdi \
72 + \
73 + --disable-corelocation \
74 + $(use_enable geoclue geoclue2) \
75 + \
76 + $(use_enable gtk gui) \
77 + --with-systemduserunitdir="$(systemd_get_userunitdir)" \
78 + --enable-apparmor \
79 + --disable-quartz \
80 + --disable-ubuntu
81 +}
82 +
83 +_impl_specific_src_install() {
84 + emake DESTDIR="${D}" pythondir="$(python_get_sitedir)" \
85 + -C src/redshift-gtk install
86 +}
87 +
88 +src_install() {
89 + emake DESTDIR="${D}" UPDATE_ICON_CACHE=/bin/true install
90 +
91 + if use gtk; then
92 + python_foreach_impl _impl_specific_src_install
93 + python_replicate_script "${D}"/usr/bin/redshift-gtk
94 + dosym redshift-gtk /usr/bin/gtk-redshift
95 + fi
96 +
97 + python_foreach_impl python_optimize
98 +}
99 +
100 +pkg_preinst() {
101 + use gtk && gnome2_icon_savelist
102 +}
103 +
104 +pkg_postinst() {
105 + use gtk && gnome2_icon_cache_update
106 +}
107 +
108 +pkg_postrm() {
109 + use gtk && gnome2_icon_cache_update
110 +}