summaryrefslogtreecommitdiff
path: root/x11-misc/redshift
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-11-06 04:13:54 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-11-06 04:13:54 +0000
commit6471b382a951b256ffa1b8ea3e6e7d7f5b189281 (patch)
treebbf20ea2988714b3e374b9766666cc2082972074 /x11-misc/redshift
parent97975d199eba29b1b2f09f99dcd0566f2d1f581f (diff)
gentoo auto-resync : 06:11:2023 - 04:13:53
Diffstat (limited to 'x11-misc/redshift')
-rw-r--r--x11-misc/redshift/Manifest1
-rw-r--r--x11-misc/redshift/redshift-1.12-r11.ebuild102
2 files changed, 103 insertions, 0 deletions
diff --git a/x11-misc/redshift/Manifest b/x11-misc/redshift/Manifest
index 7b96736885fb..423e175803b9 100644
--- a/x11-misc/redshift/Manifest
+++ b/x11-misc/redshift/Manifest
@@ -2,4 +2,5 @@ AUX redshift-1.12-apparmor.patch 1195 BLAKE2B 1601e4c8ba980e6f54497e28b8e7d33d6c
AUX redshift-1.12-libayatana-appindicator.patch 1125 BLAKE2B 94eac1a5b7567788d1ba70e25b3104dbd0db309a16da1b071d7b0affca6244d1957f7201ee18d085d93c25592d7dce35e876c54807ef86c87e307b6729dc242d SHA512 5ba8bea77c28fa2c96cb6933fbb83e57b363f71e6269dc31b1a86c375e84b082a931aa95b132a906772a7112e97f96f8aac39d37f1a034a1a3a57e36178eb9ef
DIST redshift-1.12.tar.xz 486072 BLAKE2B b7ce74ae134a8f6954ff978e99670f24c447b23ab5e8d69a62109806bfe38c5e1b41e5f65cd6b182298aaf3e0b9187a2c70ea3148fd4ccba8b9c17697024944d SHA512 225e222e5f2c55be4571094ccaf02a92e162dfc35fd0fe504084e21e358b888a72f9992f9f9edaf1d496eb673af74a0d825ae5cf6ef7f0f1ab51d32419722c32
EBUILD redshift-1.12-r10.ebuild 2129 BLAKE2B 46d8d64d3b4d6b7b81dfa87d2891454da4c82940d7fa0c262ea03f914b39bb31dc2b68397232e4e6276c746f82d067758fdb177ff29f6209c4d56bd9970b250c SHA512 39b0cdb74ddcdb774e574d9ce39fa1a55d951f9745fb64826ac2ef4533d44c083c7d63dac6eea4cf5e9c67dc17c5e9ee0b2b25e7a93aa6dce84562e07cb54f78
+EBUILD redshift-1.12-r11.ebuild 2368 BLAKE2B da311fed98fe484cdd4ac418ae387b7b718ea04d5d1b3346d1acee901318b39f22270144b608eb9dd74f0e5aa734c2c7c2fc213f41f725b987b64235419ce20a SHA512 e64c9037b406de3e80bcfa061db9d071500a1b7b02041804f87f31dae285cfde7aaa9225ebcc98310a077a1a0808d7304473d913bba5d1b234f83d452b6c5331
MISC metadata.xml 403 BLAKE2B 10a0e5faa2716a1caa6882d1e9cb58e2a76c7ed7e75713347e89097b212753dc0a21e3562e5d09fafdd25177a385a9447fc0fb2a250368e22796072cc1b72158 SHA512 c7a329c809a328c06628b5062891cd444f95cbad62ccbb3c2c9ae70a0b4b477e5406c7d3729393f6342312025b854f5cc171a25d1564e2b4f05f7823f4719bfe
diff --git a/x11-misc/redshift/redshift-1.12-r11.ebuild b/x11-misc/redshift/redshift-1.12-r11.ebuild
new file mode 100644
index 000000000000..b2b5c880cfe7
--- /dev/null
+++ b/x11-misc/redshift/redshift-1.12-r11.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..12} )
+
+inherit autotools flag-o-matic systemd xdg-utils python-r1
+
+DESCRIPTION="A screen color temperature adjusting software"
+HOMEPAGE="http://jonls.dk/redshift/"
+SRC_URI="https://github.com/jonls/${PN}/releases/download/v${PV}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="appindicator geoclue gtk nls"
+
+COMMON_DEPEND=">=x11-libs/libX11-1.4
+ x11-libs/libXxf86vm
+ x11-libs/libxcb
+ x11-libs/libdrm
+ appindicator? ( dev-libs/libayatana-appindicator )
+ geoclue? ( app-misc/geoclue:2.0 dev-libs/glib:2 )
+ gtk? ( ${PYTHON_DEPS} )"
+RDEPEND="${COMMON_DEPEND}
+ gtk? ( dev-python/pygobject[${PYTHON_USEDEP}]
+ x11-libs/gtk+:3[introspection]
+ dev-python/pyxdg[${PYTHON_USEDEP}] )"
+DEPEND="${COMMON_DEPEND}
+ >=dev-util/intltool-0.50
+ nls? ( sys-devel/gettext )
+"
+REQUIRED_USE="gtk? ( ${PYTHON_REQUIRED_USE} )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-apparmor.patch
+ "${FILESDIR}"/${P}-libayatana-appindicator.patch
+)
+
+src_prepare() {
+ # we need to re-generate file py-compile with a version
+ # that supports Python >=3.12 to not fail with error:
+ # ModuleNotFoundError: No module named 'imp'
+ rm py-compile || die
+ eautoreconf
+
+ eapply_user
+}
+
+src_configure() {
+ use gtk && python_setup
+
+ # Fix compile for Clang (bug #732438)
+ append-cflags -fPIE
+
+ econf \
+ $(use_enable nls) \
+ --enable-drm \
+ --enable-randr \
+ --enable-vidmode \
+ --disable-wingdi \
+ \
+ --disable-corelocation \
+ $(use_enable geoclue geoclue2) \
+ \
+ $(use_enable gtk gui) \
+ --with-systemduserunitdir="$(systemd_get_userunitdir)" \
+ --enable-apparmor \
+ --disable-quartz \
+ --disable-ubuntu
+}
+
+_impl_specific_src_install() {
+ emake DESTDIR="${D}" \
+ PYTHON="${PYTHON}" \
+ pythondir="$(python_get_sitedir)" \
+ -C src/redshift-gtk install
+}
+
+src_install() {
+ emake DESTDIR="${D}" UPDATE_ICON_CACHE=/bin/true install
+
+ if use gtk; then
+ python_foreach_impl _impl_specific_src_install
+ python_replicate_script "${D}"/usr/bin/redshift-gtk
+ dosym redshift-gtk /usr/bin/gtk-redshift
+
+ python_foreach_impl python_optimize
+
+ # https://bugs.gentoo.org/784281
+ mv "${D}"/usr/share/{appdata,metainfo}/ || die
+ fi
+}
+
+pkg_postinst() {
+ use gtk && xdg_icon_cache_update
+}
+
+pkg_postrm() {
+ use gtk && xdg_icon_cache_update
+}