1 |
commit: 905d6d61b858289154539583df1fe6821a9ae1e6 |
2 |
Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Aug 29 11:37:27 2022 +0000 |
4 |
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Aug 29 11:45:55 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=905d6d61 |
7 |
|
8 |
app-misc/ddcutil: add 1.3.0 |
9 |
|
10 |
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org> |
11 |
|
12 |
app-misc/ddcutil/Manifest | 1 + |
13 |
app-misc/ddcutil/ddcutil-1.3.0.ebuild | 119 +++++++++++++++++++++ |
14 |
.../ddcutil/files/ddcutil-1.3.0-no-werror.patch | 73 +++++++++++++ |
15 |
3 files changed, 193 insertions(+) |
16 |
|
17 |
diff --git a/app-misc/ddcutil/Manifest b/app-misc/ddcutil/Manifest |
18 |
index 6237ee274ea6..b8e49ee087d8 100644 |
19 |
--- a/app-misc/ddcutil/Manifest |
20 |
+++ b/app-misc/ddcutil/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
DIST ddcutil-1.2.2.tar.gz 803943 BLAKE2B 65cc5dc0d1ee85d1e2b6670f7c24508ab817c6eebdb596b5f6f70c7ff7b9257f12f70abfea2d735e23755e508d4829d4be6574ac16564d4d828e0b1153cf8afe SHA512 0329711e536cbcaee2efe6cf981a17181ab318846e9c6a82f2ceacc42691ba49c06df44a52d1f079568e9ccec588cc85d4de4adf19b6db83bebe4bb90ae29207 |
23 |
+DIST ddcutil-1.3.0.tar.gz 816789 BLAKE2B 1cb3b64961503416b85b792e1002ec67788f8cf7d622be1c4930808f99e16974ff57ed582d1d02a67580e3f4d92bef54b3669fd7378462bf4c98a3643d6786be SHA512 93d69958b2e1dcb66ad700712742536179383c93f2ec1f746b6a6c78adfd6daa861275208850cc807e0c16a11ea84904cb13ceef512ca76e1daa910410303d41 |
24 |
|
25 |
diff --git a/app-misc/ddcutil/ddcutil-1.3.0.ebuild b/app-misc/ddcutil/ddcutil-1.3.0.ebuild |
26 |
new file mode 100644 |
27 |
index 000000000000..35f885477ff1 |
28 |
--- /dev/null |
29 |
+++ b/app-misc/ddcutil/ddcutil-1.3.0.ebuild |
30 |
@@ -0,0 +1,119 @@ |
31 |
+# Copyright 1999-2022 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=8 |
35 |
+ |
36 |
+# Check for bumps & cleanup with app-misc/ddcui |
37 |
+ |
38 |
+inherit autotools linux-info udev |
39 |
+ |
40 |
+DESCRIPTION="Program for querying and changing monitor settings" |
41 |
+HOMEPAGE="https://www.ddcutil.com/" |
42 |
+SRC_URI="https://github.com/rockowitz/ddcutil/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
43 |
+ |
44 |
+SLOT="0/4" |
45 |
+LICENSE="GPL-2" |
46 |
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" |
47 |
+IUSE="drm usb-monitor user-permissions video_cards_nvidia X" |
48 |
+REQUIRED_USE="drm? ( X )" |
49 |
+ |
50 |
+RDEPEND=" |
51 |
+ dev-libs/glib:2 |
52 |
+ sys-apps/i2c-tools |
53 |
+ virtual/udev |
54 |
+ drm? ( x11-libs/libdrm ) |
55 |
+ usb-monitor? ( |
56 |
+ dev-libs/hidapi |
57 |
+ virtual/libusb:1 |
58 |
+ sys-apps/usbutils |
59 |
+ ) |
60 |
+ user-permissions? ( |
61 |
+ acct-group/i2c |
62 |
+ usb-monitor? ( acct-group/video ) |
63 |
+ ) |
64 |
+ X? ( |
65 |
+ x11-libs/libXrandr |
66 |
+ x11-libs/libX11 |
67 |
+ ) |
68 |
+" |
69 |
+DEPEND="${RDEPEND}" |
70 |
+BDEPEND="virtual/pkgconfig" |
71 |
+# doc? ( app-doc/doxygen[dot] ) |
72 |
+ |
73 |
+PATCHES=( |
74 |
+ "${FILESDIR}"/${P}-no-werror.patch |
75 |
+) |
76 |
+ |
77 |
+pkg_pretend() { |
78 |
+ # This program needs /dev/ic2-* devices to communicate with the monitor. |
79 |
+ CONFIG_CHECK="~I2C_CHARDEV" |
80 |
+ ERROR_I2C_CHARDEV="You must enable I2C_CHARDEV in your kernel to continue" |
81 |
+ if use usb-monitor; then |
82 |
+ CONFIG_CHECK+=" ~HIDRAW ~USB_HIDDEV" |
83 |
+ ERROR_HIDRAW="HIDRAW is needed to support USB monitors" |
84 |
+ ERROR_I2C_CHARDEV="USB_HIDDEV is needed to support USB monitors" |
85 |
+ fi |
86 |
+ |
87 |
+ # Now do the actual checks setup above |
88 |
+ check_extra_config |
89 |
+} |
90 |
+ |
91 |
+src_prepare() { |
92 |
+ default |
93 |
+ eautoreconf |
94 |
+} |
95 |
+ |
96 |
+src_configure() { |
97 |
+ local myeconfargs=( |
98 |
+ # FAILS: doxyfile: No such file or directory |
99 |
+ # $(use_enable doc doxygen) |
100 |
+ $(use_enable drm) |
101 |
+ --enable-udev |
102 |
+ $(use_enable usb-monitor usb) |
103 |
+ --enable-lib |
104 |
+ $(use_enable X x11) |
105 |
+ ) |
106 |
+ |
107 |
+ econf "${myeconfargs[@]}" |
108 |
+} |
109 |
+ |
110 |
+src_install() { |
111 |
+ default |
112 |
+ if use user-permissions; then |
113 |
+ udev_dorules data/etc/udev/rules.d/45-ddcutil-i2c.rules |
114 |
+ if use usb-monitor; then |
115 |
+ udev_dorules data/etc/udev/rules.d/45-ddcutil-usb.rules |
116 |
+ fi |
117 |
+ fi |
118 |
+} |
119 |
+ |
120 |
+pkg_postinst() { |
121 |
+ if use user-permissions; then |
122 |
+ einfo "To allow non-root users access to the /dev/i2c-* devices, add those" |
123 |
+ einfo "users to the i2c group: usermod -aG i2c user" |
124 |
+ einfo "Restart the computer or reload the i2c-dev module to activate" |
125 |
+ einfo "the new udev rule." |
126 |
+ einfo "For more information read: http://www.ddcutil.com/i2c_permissions/" |
127 |
+ |
128 |
+ if use usb-monitor; then |
129 |
+ einfo "To allow non-root users access to USB monitors, add those users" |
130 |
+ einfo "to the video group: usermod -aG video user" |
131 |
+ einfo "Restart the computer, reload the hiddev and hidraw modules, or replug" |
132 |
+ einfo "the monitor to activate the new udev rule." |
133 |
+ einfo "For more information read: http://www.ddcutil.com/usb/" |
134 |
+ fi |
135 |
+ |
136 |
+ udev_reload |
137 |
+ fi |
138 |
+ |
139 |
+ if use video_cards_nvidia; then |
140 |
+ ewarn "Please read the following webpage on proper usage with the nVidia " |
141 |
+ ewarn "binary drivers, or it may not work: http://www.ddcutil.com/nvidia/" |
142 |
+ fi |
143 |
+} |
144 |
+ |
145 |
+pkg_postrm() { |
146 |
+ if use user-permissions; then |
147 |
+ udev_reload |
148 |
+ fi |
149 |
+} |
150 |
|
151 |
diff --git a/app-misc/ddcutil/files/ddcutil-1.3.0-no-werror.patch b/app-misc/ddcutil/files/ddcutil-1.3.0-no-werror.patch |
152 |
new file mode 100644 |
153 |
index 000000000000..4df9c892c12b |
154 |
--- /dev/null |
155 |
+++ b/app-misc/ddcutil/files/ddcutil-1.3.0-no-werror.patch |
156 |
@@ -0,0 +1,73 @@ |
157 |
+diff --git a/src/app_ddcutil/Makefile.am b/src/app_ddcutil/Makefile.am |
158 |
+index 068e419..f21e9fd 100644 |
159 |
+--- a/src/app_ddcutil/Makefile.am |
160 |
++++ b/src/app_ddcutil/Makefile.am |
161 |
+@@ -5,7 +5,6 @@ AM_CPPFLAGS = \ |
162 |
+ |
163 |
+ |
164 |
+ AM_CFLAGS = -Wall |
165 |
+-AM_CFLAGS += -Werror |
166 |
+ # AM_CFLAGS += -Wpedantic |
167 |
+ |
168 |
+ if ENABLE_CALLGRAPH_COND |
169 |
+diff --git a/src/app_sysenv/Makefile.am b/src/app_sysenv/Makefile.am |
170 |
+index a182ff9..753f187 100644 |
171 |
+--- a/src/app_sysenv/Makefile.am |
172 |
++++ b/src/app_sysenv/Makefile.am |
173 |
+@@ -12,7 +12,6 @@ endif |
174 |
+ |
175 |
+ |
176 |
+ AM_CFLAGS = -Wall |
177 |
+-AM_CFLAGS += -Werror |
178 |
+ # AM_CFLAGS += -Wpedantic |
179 |
+ |
180 |
+ if ENABLE_CALLGRAPH_COND |
181 |
+diff --git a/src/i2c/Makefile.am b/src/i2c/Makefile.am |
182 |
+index 52a4efa..5c671e1 100644 |
183 |
+--- a/src/i2c/Makefile.am |
184 |
++++ b/src/i2c/Makefile.am |
185 |
+@@ -5,7 +5,6 @@ AM_CPPFLAGS = \ |
186 |
+ -I$(top_srcdir)/src/public |
187 |
+ |
188 |
+ AM_CFLAGS = -Wall |
189 |
+-AM_CFLAGS += -Werror |
190 |
+ # AM_CFLAGS += -Wpedantic |
191 |
+ |
192 |
+ if ENABLE_CALLGRAPH_COND |
193 |
+diff --git a/src/libmain/Makefile.am b/src/libmain/Makefile.am |
194 |
+index ace200a..46cc9f4 100644 |
195 |
+--- a/src/libmain/Makefile.am |
196 |
++++ b/src/libmain/Makefile.am |
197 |
+@@ -5,7 +5,6 @@ AM_CPPFLAGS = \ |
198 |
+ |
199 |
+ |
200 |
+ AM_CFLAGS = -Wall |
201 |
+-AM_CFLAGS += -Werror |
202 |
+ # AM_CFLAGS += -Wpedantic |
203 |
+ |
204 |
+ if ENABLE_CALLGRAPH_COND |
205 |
+diff --git a/src/sample_clients/Makefile.am b/src/sample_clients/Makefile.am |
206 |
+index 1593521..63d2307 100644 |
207 |
+--- a/src/sample_clients/Makefile.am |
208 |
++++ b/src/sample_clients/Makefile.am |
209 |
+@@ -7,7 +7,6 @@ AM_CPPFLAGS= \ |
210 |
+ -I$(top_srcdir)/src |
211 |
+ |
212 |
+ AM_CFLAGS = -Wall -fPIC |
213 |
+-# AM_CFLAGS += -Werror |
214 |
+ |
215 |
+ check_PROGRAMS = |
216 |
+ if ENABLE_SHARED_LIB_COND |
217 |
+diff --git a/src/test/Makefile.am b/src/test/Makefile.am |
218 |
+index c12f15c..27d2124 100644 |
219 |
+--- a/src/test/Makefile.am |
220 |
++++ b/src/test/Makefile.am |
221 |
+@@ -4,7 +4,7 @@ $(GLIB_CFLAGS) \ |
222 |
+ -I$(top_srcdir)/src \ |
223 |
+ -I$(top_srcdir)/src/public |
224 |
+ |
225 |
+-AM_CFLAGS = -Wall -Werror |
226 |
++AM_CFLAGS = -Wall |
227 |
+ |
228 |
+ CLEANFILES = \ |
229 |
+ *expand |