www-apache/mod_tls: new package, add 0.14.0
[gentoo/gentoo.git] / x11-misc / gammastep / gammastep-2.0.9-r1.ebuild
blob92f8e6965471a7b00b0a3ad60da8427321d5ab89
1 # Copyright 1999-2023 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 PYTHON_COMPAT=( python3_{9..11} )
8 inherit autotools systemd xdg-utils python-r1
10 DESCRIPTION="A screen color temperature adjusting software"
11 HOMEPAGE="https://gitlab.com/chinstrap/gammastep"
12 SRC_URI="https://gitlab.com/chinstrap/gammastep/-/archive/v${PV}/gammastep-v${PV}.tar.bz2"
14 LICENSE="GPL-3"
15 SLOT="0"
16 KEYWORDS="amd64 ~x86"
17 IUSE="appindicator geoclue gtk nls wayland"
19 COMMON_DEPEND=">=x11-libs/libX11-1.4
20         x11-libs/libXxf86vm
21         x11-libs/libxcb
22         x11-libs/libdrm
23         appindicator? ( dev-libs/libayatana-appindicator )
24         geoclue? ( app-misc/geoclue:2.0 dev-libs/glib:2 )
25         gtk? ( ${PYTHON_DEPS} )"
26 RDEPEND="${COMMON_DEPEND}
27         gtk? ( dev-python/pygobject[${PYTHON_USEDEP}]
28                 x11-libs/gtk+:3[introspection]
29                 dev-python/pyxdg[${PYTHON_USEDEP}] )"
30 DEPEND="${COMMON_DEPEND}
31         >=dev-util/intltool-0.50
32         nls? ( sys-devel/gettext )
34 REQUIRED_USE="gtk? ( ${PYTHON_REQUIRED_USE} )"
36 S="${WORKDIR}"/${PN}-v${PV}
38 src_prepare() {
39         default
40         eautoreconf
43 src_configure() {
44         use gtk && python_setup
46         econf \
47                 $(use_enable nls) \
48                 --enable-drm \
49                 $(use_enable wayland) \
50                 --enable-randr \
51                 --enable-vidmode \
52                 $(use_enable geoclue geoclue2) \
53                 $(use_enable gtk gui) \
54                 --enable-apparmor \
55                 --with-systemduserunitdir="$(systemd_get_userunitdir)"
58 _impl_specific_src_install() {
59         emake DESTDIR="${D}" \
60                 PYTHON="${PYTHON}" \
61                 pythondir="$(python_get_sitedir)" \
62                 -C src/gammastep_indicator install
65 src_install() {
66         emake DESTDIR="${D}" UPDATE_ICON_CACHE=/bin/true install
68         if use gtk; then
69                 python_foreach_impl _impl_specific_src_install
70                 python_replicate_script "${D}"/usr/bin/gammastep-indicator
72                 python_foreach_impl python_optimize
73         fi
75         insinto /etc/gammastep/
76         newins gammastep.conf.sample config.ini.example
79 pkg_postinst() {
80         use gtk && xdg_icon_cache_update
83 pkg_postrm() {
84         use gtk && xdg_icon_cache_update