Gentoo Archives: gentoo-commits

From: Florian Schmaus <flow@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/autorandr/
Date: Mon, 28 Jun 2021 09:29:37
Message-Id: 1624872550.18018454bd6a64cac7aeee5d959734796a6596d5.flow@gentoo
1 commit: 18018454bd6a64cac7aeee5d959734796a6596d5
2 Author: Florian Schmaus <flow <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jun 28 09:13:33 2021 +0000
4 Commit: Florian Schmaus <flow <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 28 09:29:10 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=18018454
7
8 x11-misc/autorandr: initial import
9
10 Closes: https://bugs.gentoo.org/602516
11 Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>
12
13 x11-misc/autorandr/Manifest | 1 +
14 x11-misc/autorandr/autorandr-1.11.ebuild | 66 ++++++++++++++++++++++++++++++++
15 x11-misc/autorandr/autorandr-9999.ebuild | 66 ++++++++++++++++++++++++++++++++
16 x11-misc/autorandr/metadata.xml | 11 ++++++
17 4 files changed, 144 insertions(+)
18
19 diff --git a/x11-misc/autorandr/Manifest b/x11-misc/autorandr/Manifest
20 new file mode 100644
21 index 00000000000..6523b0b03b9
22 --- /dev/null
23 +++ b/x11-misc/autorandr/Manifest
24 @@ -0,0 +1 @@
25 +DIST autorandr-1.11.tar.gz 48791 BLAKE2B 57203b15eebdecab943c706745701e8569eb0a66dab69ae4429abfa863da736a5ed8b5333f6d948bcf8cae30f48c68eb1b35f2e84080526c1507ab78dba02efb SHA512 93de0461653aa5145956a8aafdc9fb257491495ca335e4213e7b6f1f313ebfd2332c38615ac648204494026439d77861a7eefd97e80cd49a5fe3d9b75db54ec1
26
27 diff --git a/x11-misc/autorandr/autorandr-1.11.ebuild b/x11-misc/autorandr/autorandr-1.11.ebuild
28 new file mode 100644
29 index 00000000000..ed486299720
30 --- /dev/null
31 +++ b/x11-misc/autorandr/autorandr-1.11.ebuild
32 @@ -0,0 +1,66 @@
33 +# Copyright 1999-2021 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +PYTHON_COMPAT=( python3_{7..10} )
39 +
40 +inherit bash-completion-r1 distutils-r1 systemd udev
41 +
42 +if [[ "${PV}" = "9999" ]] ; then
43 + inherit git-r3
44 + EGIT_REPO_URI="https://github.com/phillipberndt/${PN}.git"
45 +else
46 + SRC_URI="https://github.com/phillipberndt/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
47 + KEYWORDS="~amd64 ~x86"
48 +fi
49 +
50 +DESCRIPTION="Automatically select a display configuration based on connected devices"
51 +HOMEPAGE="https://github.com/phillipberndt/autorandr"
52 +
53 +LICENSE="GPL-3"
54 +SLOT="0"
55 +IUSE="launcher udev"
56 +
57 +RDEPEND="
58 + launcher? ( x11-libs/libxcb )
59 + udev? ( virtual/udev )
60 +"
61 +DEPEND="
62 + virtual/pkgconfig
63 + ${RDEPEND}
64 +"
65 +
66 +src_compile() {
67 + distutils-r1_src_compile
68 +
69 + if use launcher; then
70 + emake contrib/autorandr_launcher/autorandr-launcher
71 + fi
72 +}
73 +
74 +src_install() {
75 + distutils-r1_src_install
76 +
77 + doman autorandr.1
78 +
79 + local targets=(
80 + autostart_config
81 + bash_completion
82 + systemd
83 + $(usev launcher)
84 + $(usev udev)
85 + )
86 +
87 + emake DESTDIR="${D}" \
88 + BASH_COMPLETIONS_DIR="$(get_bashcompdir)" \
89 + SYSTEMD_UNIT_DIR="$(systemd_get_systemunitdir)" \
90 + UDEV_RULES_DIR="$(get_udevdir)"/rules.d \
91 + $(printf "install_%s " "${targets[@]}")
92 +}
93 +
94 +pkg_postinst() {
95 + if use udev; then
96 + udev_reload
97 + fi
98 +}
99
100 diff --git a/x11-misc/autorandr/autorandr-9999.ebuild b/x11-misc/autorandr/autorandr-9999.ebuild
101 new file mode 100644
102 index 00000000000..ed486299720
103 --- /dev/null
104 +++ b/x11-misc/autorandr/autorandr-9999.ebuild
105 @@ -0,0 +1,66 @@
106 +# Copyright 1999-2021 Gentoo Authors
107 +# Distributed under the terms of the GNU General Public License v2
108 +
109 +EAPI=7
110 +
111 +PYTHON_COMPAT=( python3_{7..10} )
112 +
113 +inherit bash-completion-r1 distutils-r1 systemd udev
114 +
115 +if [[ "${PV}" = "9999" ]] ; then
116 + inherit git-r3
117 + EGIT_REPO_URI="https://github.com/phillipberndt/${PN}.git"
118 +else
119 + SRC_URI="https://github.com/phillipberndt/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
120 + KEYWORDS="~amd64 ~x86"
121 +fi
122 +
123 +DESCRIPTION="Automatically select a display configuration based on connected devices"
124 +HOMEPAGE="https://github.com/phillipberndt/autorandr"
125 +
126 +LICENSE="GPL-3"
127 +SLOT="0"
128 +IUSE="launcher udev"
129 +
130 +RDEPEND="
131 + launcher? ( x11-libs/libxcb )
132 + udev? ( virtual/udev )
133 +"
134 +DEPEND="
135 + virtual/pkgconfig
136 + ${RDEPEND}
137 +"
138 +
139 +src_compile() {
140 + distutils-r1_src_compile
141 +
142 + if use launcher; then
143 + emake contrib/autorandr_launcher/autorandr-launcher
144 + fi
145 +}
146 +
147 +src_install() {
148 + distutils-r1_src_install
149 +
150 + doman autorandr.1
151 +
152 + local targets=(
153 + autostart_config
154 + bash_completion
155 + systemd
156 + $(usev launcher)
157 + $(usev udev)
158 + )
159 +
160 + emake DESTDIR="${D}" \
161 + BASH_COMPLETIONS_DIR="$(get_bashcompdir)" \
162 + SYSTEMD_UNIT_DIR="$(systemd_get_systemunitdir)" \
163 + UDEV_RULES_DIR="$(get_udevdir)"/rules.d \
164 + $(printf "install_%s " "${targets[@]}")
165 +}
166 +
167 +pkg_postinst() {
168 + if use udev; then
169 + udev_reload
170 + fi
171 +}
172
173 diff --git a/x11-misc/autorandr/metadata.xml b/x11-misc/autorandr/metadata.xml
174 new file mode 100644
175 index 00000000000..bc2b0d6910c
176 --- /dev/null
177 +++ b/x11-misc/autorandr/metadata.xml
178 @@ -0,0 +1,11 @@
179 +<?xml version="1.0" encoding="UTF-8"?>
180 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
181 +<pkgmetadata>
182 +<maintainer type="person">
183 + <email>flow@g.o</email>
184 + <name>Florian Schmaus</name>
185 +</maintainer>
186 +<use>
187 + <flag name="launcher">Install the launcher</flag>
188 +</use>
189 +</pkgmetadata>