1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python3_{6,7} )
7 inherit systemd autotools eutils gnome2-utils python-r1
9 DESCRIPTION="A screen color temperature adjusting software"
10 HOMEPAGE="http://jonls.dk/redshift/"
11 SRC_URI="https://github.com/jonls/redshift/archive/v${PV}.tar.gz -> ${P}.tar.gz"
15 KEYWORDS="amd64 arm64 x86"
16 IUSE="ayatana geoclue gtk nls"
18 COMMON_DEPEND=">=x11-libs/libX11-1.4
22 ayatana? ( dev-libs/libappindicator:3[introspection] )
23 geoclue? ( app-misc/geoclue:2.0 dev-libs/glib:2 )
24 gtk? ( ${PYTHON_DEPS} )"
25 RDEPEND="${COMMON_DEPEND}
26 gtk? ( dev-python/pygobject[${PYTHON_USEDEP}]
27 x11-libs/gtk+:3[introspection]
28 dev-python/pyxdg[${PYTHON_USEDEP}] )"
29 DEPEND="${COMMON_DEPEND}
30 >=dev-util/intltool-0.50
31 nls? ( sys-devel/gettext )
33 REQUIRED_USE="gtk? ( ${PYTHON_REQUIRED_USE} )"
41 use gtk && python_setup
44 --disable-silent-rules \
51 --disable-corelocation \
52 $(use_enable geoclue geoclue2) \
54 $(use_enable gtk gui) \
55 --with-systemduserunitdir="$(systemd_get_userunitdir)" \
61 _impl_specific_src_install() {
62 emake DESTDIR="${D}" pythondir="$(python_get_sitedir)" \
63 -C src/redshift-gtk install
67 emake DESTDIR="${D}" UPDATE_ICON_CACHE=/bin/true install
70 python_foreach_impl _impl_specific_src_install
71 python_replicate_script "${D}"/usr/bin/redshift-gtk
72 dosym redshift-gtk /usr/bin/gtk-redshift
74 python_foreach_impl python_optimize
79 use gtk && gnome2_icon_savelist
83 use gtk && gnome2_icon_cache_update
87 use gtk && gnome2_icon_cache_update