diff options
author | Florian Schmaus <flow@gentoo.org> | 2024-09-23 08:42:56 +0200 |
---|---|---|
committer | Florian Schmaus <flow@gentoo.org> | 2024-09-23 08:47:26 +0200 |
commit | 0acccf502267e74b578035511adaf2d53e1eaf67 (patch) | |
tree | 9c8b228812a1227154628c579551c5971b38ac01 /x11-misc | |
parent | media-libs/libaom: Stabilize 3.9.1 arm64, #940078 (diff) | |
download | gentoo-0acccf502267e74b578035511adaf2d53e1eaf67.tar.gz gentoo-0acccf502267e74b578035511adaf2d53e1eaf67.tar.bz2 gentoo-0acccf502267e74b578035511adaf2d53e1eaf67.zip |
x11-misc/autorandr: fix non-systemd udev rule, enable python 3.13
Thanks to wolfwood for digging into the root cause and suggesting the
used fix.
Closes: https://bugs.gentoo.org/912692
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'x11-misc')
-rw-r--r-- | x11-misc/autorandr/autorandr-1.15-r1.ebuild | 76 | ||||
-rw-r--r-- | x11-misc/autorandr/autorandr-9999.ebuild | 4 |
2 files changed, 78 insertions, 2 deletions
diff --git a/x11-misc/autorandr/autorandr-1.15-r1.ebuild b/x11-misc/autorandr/autorandr-1.15-r1.ebuild new file mode 100644 index 000000000000..73aa409173d5 --- /dev/null +++ b/x11-misc/autorandr/autorandr-1.15-r1.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..13} ) + +inherit bash-completion-r1 distutils-r1 systemd udev + +if [[ "${PV}" = "9999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/phillipberndt/${PN}.git" +else + SRC_URI="https://github.com/phillipberndt/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +DESCRIPTION="Automatically select a display configuration based on connected devices" +HOMEPAGE="https://github.com/phillipberndt/autorandr" + +LICENSE="GPL-3" +SLOT="0" +IUSE="launcher systemd udev" + +RDEPEND=" + x11-apps/xrandr + launcher? ( x11-libs/libxcb ) + udev? ( virtual/udev ) +" +DEPEND="${RDEPEND}" +# desktop-file-util: uses desktop-file-edit in Makefile +BDEPEND=" + dev-util/desktop-file-utils + virtual/pkgconfig +" + +src_compile() { + distutils-r1_src_compile + + if use launcher; then + emake contrib/autorandr_launcher/autorandr-launcher + fi +} + +src_install() { + distutils-r1_src_install + + doman autorandr.1 + + local targets=( + autostart_config + bash_completion + $(usev launcher) + $(usev systemd) + $(usev udev) + ) + + emake DESTDIR="${D}" \ + BASH_COMPLETIONS_DIR="$(get_bashcompdir)" \ + SYSTEMD_UNIT_DIR=$(usex systemd "$(systemd_get_systemunitdir)" "") \ + UDEV_RULES_DIR="$(get_udevdir)"/rules.d \ + $(printf "install_%s " "${targets[@]}") +} + +pkg_postinst() { + if use udev; then + udev_reload + fi +} + +pkg_postrm() { + if use udev; then + udev_reload + fi +} diff --git a/x11-misc/autorandr/autorandr-9999.ebuild b/x11-misc/autorandr/autorandr-9999.ebuild index 0011c189d5ca..73aa409173d5 100644 --- a/x11-misc/autorandr/autorandr-9999.ebuild +++ b/x11-misc/autorandr/autorandr-9999.ebuild @@ -4,7 +4,7 @@ EAPI=8 DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_COMPAT=( python3_{10..13} ) inherit bash-completion-r1 distutils-r1 systemd udev @@ -58,7 +58,7 @@ src_install() { emake DESTDIR="${D}" \ BASH_COMPLETIONS_DIR="$(get_bashcompdir)" \ - SYSTEMD_UNIT_DIR="$(systemd_get_systemunitdir)" \ + SYSTEMD_UNIT_DIR=$(usex systemd "$(systemd_get_systemunitdir)" "") \ UDEV_RULES_DIR="$(get_udevdir)"/rules.d \ $(printf "install_%s " "${targets[@]}") } |