summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Schmaus <flow@gentoo.org>2022-10-19 11:15:26 +0200
committerFlorian Schmaus <flow@gentoo.org>2022-10-19 11:15:50 +0200
commit10640cfc65f7f7b0041f02a9f49ffedd52f9d4ca (patch)
treef9559f37743dccd4bb7565eb49aebc466e9628f7 /x11-misc/autorandr
parentapp-emulation/xen: add 4.16.3_pre (diff)
downloadgentoo-10640cfc65f7f7b0041f02a9f49ffedd52f9d4ca.tar.gz
gentoo-10640cfc65f7f7b0041f02a9f49ffedd52f9d4ca.tar.bz2
gentoo-10640cfc65f7f7b0041f02a9f49ffedd52f9d4ca.zip
x11-misc/autorandr: add systemd use flag
Closes: https://bugs.gentoo.org/803545 Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'x11-misc/autorandr')
-rw-r--r--x11-misc/autorandr/autorandr-1.12.1-r1.ebuild65
-rw-r--r--x11-misc/autorandr/autorandr-9999.ebuild4
2 files changed, 67 insertions, 2 deletions
diff --git a/x11-misc/autorandr/autorandr-1.12.1-r1.ebuild b/x11-misc/autorandr/autorandr-1.12.1-r1.ebuild
new file mode 100644
index 000000000000..0badb8f708aa
--- /dev/null
+++ b/x11-misc/autorandr/autorandr-1.12.1-r1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..11} )
+
+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 ~x86"
+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}"
+BDEPEND="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="$(systemd_get_systemunitdir)" \
+ UDEV_RULES_DIR="$(get_udevdir)"/rules.d \
+ $(printf "install_%s " "${targets[@]}")
+}
+
+pkg_postinst() {
+ if use udev; then
+ udev_reload
+ fi
+}
diff --git a/x11-misc/autorandr/autorandr-9999.ebuild b/x11-misc/autorandr/autorandr-9999.ebuild
index 4433c9b58d70..0badb8f708aa 100644
--- a/x11-misc/autorandr/autorandr-9999.ebuild
+++ b/x11-misc/autorandr/autorandr-9999.ebuild
@@ -20,7 +20,7 @@ HOMEPAGE="https://github.com/phillipberndt/autorandr"
LICENSE="GPL-3"
SLOT="0"
-IUSE="launcher udev"
+IUSE="launcher systemd udev"
RDEPEND="
x11-apps/xrandr
@@ -46,8 +46,8 @@ src_install() {
local targets=(
autostart_config
bash_completion
- systemd
$(usev launcher)
+ $(usev systemd)
$(usev udev)
)