diff options
Diffstat (limited to 'x11-misc/redshift')
-rw-r--r-- | x11-misc/redshift/Manifest | 2 | ||||
-rw-r--r-- | x11-misc/redshift/files/redshift-1.12-libayatana-appindicator.patch | 33 | ||||
-rw-r--r-- | x11-misc/redshift/redshift-1.12-r10.ebuild | 92 |
3 files changed, 127 insertions, 0 deletions
diff --git a/x11-misc/redshift/Manifest b/x11-misc/redshift/Manifest index b60d80033a45..473a163eecb0 100644 --- a/x11-misc/redshift/Manifest +++ b/x11-misc/redshift/Manifest @@ -1,6 +1,8 @@ AUX redshift-1.12-apparmor.patch 1195 BLAKE2B 1601e4c8ba980e6f54497e28b8e7d33d6c592487a5bf951821b8236e035cd4840315398c77d1c6873060b123f49d8bb1ff42b5a5b026091332f28961d4c5b076 SHA512 12e3deee53ee2804527f95b888a09c324959b1f11ccc76bf52a04b36626e6fea508ccda3ab16add636a30245b90f1de5c4df1c0524a7ca6350bfa0bdb61264e0 +AUX redshift-1.12-libayatana-appindicator.patch 1125 BLAKE2B 94eac1a5b7567788d1ba70e25b3104dbd0db309a16da1b071d7b0affca6244d1957f7201ee18d085d93c25592d7dce35e876c54807ef86c87e307b6729dc242d SHA512 5ba8bea77c28fa2c96cb6933fbb83e57b363f71e6269dc31b1a86c375e84b082a931aa95b132a906772a7112e97f96f8aac39d37f1a034a1a3a57e36178eb9ef DIST redshift-1.12.tar.gz 659019 BLAKE2B 09339a57fee192e3428ba4387cbea498f2f9f97eb75a418588cdda3289cfa7b7fada4cb299e983e9e6d2ffe3822c8235082e67bdfa542716b6dee9fc853a8dc1 SHA512 6763f6964b577fc146191af1c67a283a60df5bbdd3a74bfc94f66d5f9f3bef8835a479c6ec8a648b650b83a0e245928884a0f628606ace8c3f58d8319d35036f DIST redshift-1.12.tar.xz 486072 BLAKE2B b7ce74ae134a8f6954ff978e99670f24c447b23ab5e8d69a62109806bfe38c5e1b41e5f65cd6b182298aaf3e0b9187a2c70ea3148fd4ccba8b9c17697024944d SHA512 225e222e5f2c55be4571094ccaf02a92e162dfc35fd0fe504084e21e358b888a72f9992f9f9edaf1d496eb673af74a0d825ae5cf6ef7f0f1ab51d32419722c32 +EBUILD redshift-1.12-r10.ebuild 2132 BLAKE2B a9e57a39dbf37c8b4c5de6893ef710e2ee6a56ac945e089a22f822054ecea5fa6b06c9130067d9316a23248eee547675b1bd1b8b31f85948bc0243797b89e3b1 SHA512 b0d0c3a4480ccc3c661f371beeaf33598bd0cafc2fc237e229de1ec8b61a85d33f0ccb710d1fe9e9d24ae1cef20d5752007dd389f619d48d0ba8cf14ffd2c2c6 EBUILD redshift-1.12-r6.ebuild 2068 BLAKE2B fd344ecb14d93d2c4117417eef887227cb0f0baa9d9b3bc04e9e90b9d5b462d4637c98e068f6452fe49530e517c801ecd4bd149a8e093b94f2cd8ebf7a8843e8 SHA512 6710a6668b4893267e4496c65332b2b5e7d158758e560b1759f1626f72cd01db322eaa91d14b0bf59fa9cd90d324165fef1599644e9ba5baea27983809f65026 EBUILD redshift-1.12-r7.ebuild 2014 BLAKE2B 1b0208e6405bc335029d8b1fc0e74e3dfae248d6f175e2db519864db08e3b4a7a0b78467bd27ad34563d1646b86ce0738fd05b8eb1b00cb1c068defa779a11a7 SHA512 349c4a80a3ec45c858a7bf6499be8d0d9ee256565a1c1119b790df6b8ba1b1c2f4bc2240d6fbd1d86ddd6ff4abb36c1cc2604b1c6999c53b4fe50c86c1458c86 EBUILD redshift-1.12-r8.ebuild 2043 BLAKE2B d84d6385e818f7b331bd4e44a69f6fb5bb51451f4a42a3e364aa9f262e65b2d312a94c7d4995217f0b06558984762fe417349be6bada800de3474c097c66b9cc SHA512 b7c89e73a803dd607905c56bf11132f4e1fab52d92a12ab40f5b29b5d114ebfbd9ff35bed192209e9edd823cb05a2cd12426e0de1a03942c1f4a3bc67fce4025 diff --git a/x11-misc/redshift/files/redshift-1.12-libayatana-appindicator.patch b/x11-misc/redshift/files/redshift-1.12-libayatana-appindicator.patch new file mode 100644 index 000000000000..e2ff7a7c100d --- /dev/null +++ b/x11-misc/redshift/files/redshift-1.12-libayatana-appindicator.patch @@ -0,0 +1,33 @@ +From f2df94b6ad23eceea8c163f9c910e1f6ea122428 Mon Sep 17 00:00:00 2001 +From: Kentaro Hayashi <kenhys@gmail.com> +Date: Mon, 27 Apr 2020 11:56:02 +0900 +Subject: [PATCH] redshift-gtk: use Ayatana AppIndicator3 instead of App + Indicator3 + +libappindicator was deprecated and it will be removed in the +future Debian release. + + https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895037 + +There is a successor API compatible library - Ayatana Indicator. + + https://ayatanaindicators.github.io/code/ +--- + src/redshift-gtk/statusicon.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/redshift-gtk/statusicon.py b/src/redshift-gtk/statusicon.py +index b4adfb00..68752ed6 100644 +--- a/src/redshift-gtk/statusicon.py ++++ b/src/redshift-gtk/statusicon.py +@@ -33,8 +33,8 @@ + from gi.repository import Gtk, GLib + + try: +- gi.require_version('AppIndicator3', '0.1') +- from gi.repository import AppIndicator3 as appindicator ++ gi.require_version('AyatanaAppIndicator3', '0.1') ++ from gi.repository import AyatanaAppIndicator3 as appindicator + except (ImportError, ValueError): + appindicator = None + diff --git a/x11-misc/redshift/redshift-1.12-r10.ebuild b/x11-misc/redshift/redshift-1.12-r10.ebuild new file mode 100644 index 000000000000..a63b6864529c --- /dev/null +++ b/x11-misc/redshift/redshift-1.12-r10.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..11} ) + +inherit 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_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 +} |