1 |
commit: f8f2919fe3bbe0063e50b32c7346dde31bd0e174 |
2 |
Author: Yuan Liao <liaoyuan <AT> gmail <DOT> com> |
3 |
AuthorDate: Sun Feb 20 14:54:56 2022 +0000 |
4 |
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 21 09:19:44 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8f2919f |
7 |
|
8 |
dev-java/rxtx: Fix various build errors for Java 11+ and others, EAPI 8 |
9 |
|
10 |
- Fix compiler errors due to -Werror=format-security |
11 |
- Fix Javadoc generation errors |
12 |
- Replace 'javah' with 'javac -h' for JDK 10+ |
13 |
- Attempt to fix some random, nondeterministic build-time errors that |
14 |
were speculated to be caused by parallel 'make'. Those errors are not |
15 |
always reproducible and may go away during a retry, which might have |
16 |
stopped some users (including the commit author himself) from |
17 |
reporting them. Another random error popped up when the new ebuild |
18 |
revision was being tested, hence a fix that forces sequential build is |
19 |
attempted in the hope to prevent probable random errors. |
20 |
|
21 |
Bug: https://bugs.gentoo.org/550534 |
22 |
Bug: https://bugs.gentoo.org/642030 |
23 |
Bug: https://bugs.gentoo.org/831394 |
24 |
Bug: https://bugs.gentoo.org/833396 |
25 |
Signed-off-by: Yuan Liao <liaoyuan <AT> gmail.com> |
26 |
Closes: https://github.com/gentoo/gentoo/pull/24289 |
27 |
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org> |
28 |
|
29 |
.../files/rxtx-2.2_pre2-fix-for-java-10+.patch | 50 +++++ |
30 |
.../files/rxtx-2.2_pre2-fix-invalid-javadoc.patch | 229 +++++++++++++++++++++ |
31 |
.../rxtx/files/rxtx-2.2_pre2-format-security.patch | 118 +++++++++++ |
32 |
dev-java/rxtx/rxtx-2.2_pre2-r2.ebuild | 109 ++++++++++ |
33 |
4 files changed, 506 insertions(+) |
34 |
|
35 |
diff --git a/dev-java/rxtx/files/rxtx-2.2_pre2-fix-for-java-10+.patch b/dev-java/rxtx/files/rxtx-2.2_pre2-fix-for-java-10+.patch |
36 |
new file mode 100644 |
37 |
index 000000000000..366bb78c2cba |
38 |
--- /dev/null |
39 |
+++ b/dev-java/rxtx/files/rxtx-2.2_pre2-fix-for-java-10+.patch |
40 |
@@ -0,0 +1,50 @@ |
41 |
+Debian patch for fixing build issues on JDK 10 and above. |
42 |
+In particular, 'javah' needs to replaced by 'javac -h' since 'javah' |
43 |
+has been removed due to JEP 313 (https://openjdk.java.net/jeps/313). |
44 |
+ |
45 |
+To support Javadoc generation with JDK 17 and above, the '-source 1.8' |
46 |
+option must be included in the arguments to 'javadoc'. Otherwise, the |
47 |
+following error would be raised: |
48 |
+ |
49 |
+ src/gnu/io/LPRPort.java:373: error: invalid use of a restricted identifier 'yield' |
50 |
+ yield(); |
51 |
+ ^ |
52 |
+ (to invoke a method called yield, qualify the yield with a receiver or type name) |
53 |
+ |
54 |
+The original patch can be found at: |
55 |
+https://salsa.debian.org/java-team/rxtx/-/blob/6500bd55f265de7d2dfef68dc1df5d8b990f66c3/debian/patches/java10-compatibility.patch |
56 |
+ |
57 |
+Bug: https://bugs.gentoo.org/831394 |
58 |
+ |
59 |
+--- |
60 |
+Description: Fixes the build failure with Java 10 |
61 |
+Author: Emmanuel Bourg <ebourg@××××××.org> |
62 |
+Forwarded: no |
63 |
+--- a/Makefile.am |
64 |
++++ b/Makefile.am |
65 |
+@@ -111,11 +111,6 @@ |
66 |
+ $(CLASSES): $(javafiles) $(TOP)/Makefile |
67 |
+ $(JAVAH_FIX) |
68 |
+ $(JAVAC) $(javafiles) |
69 |
+- $(JAVAH) `(for i in $(javahfiles);do \ |
70 |
+- if grep > /dev/null native.*\( $(SPATH)/gnu/io/$$i.java; then \ |
71 |
+- echo $(CLASSDIR).$$i; \ |
72 |
+- fi; \ |
73 |
+- done)` |
74 |
+ $(JAR) cf $(JARTARGET) $(CLASSTOP)/* |
75 |
+ |
76 |
+ # install librxtxSerial.so into the proper directory and copy $(JARTARGET) to its |
77 |
+--- a/configure.in |
78 |
++++ b/configure.in |
79 |
+@@ -485,9 +485,9 @@ |
80 |
+ *) |
81 |
+ find_java_native_include jni_md.h |
82 |
+ JAVAH="\$(JPATH)/bin/javah -classpath \$(CLASSPATH) -d \$(DEST) -jni" |
83 |
+- JAVAC="\$(JPATH)/bin/javac -classpath \$(CLASSPATH) -d \$(TOP)/ -O -source 1.8 -target 1.8" |
84 |
++ JAVAC="\$(JPATH)/bin/javac -classpath \$(CLASSPATH) -d \$(TOP)/ -O -source 1.8 -target 1.8 -h \$(DEST)" |
85 |
+ JAR="\$(JPATH)/bin/jar" |
86 |
+- JAVADOC="\$(JPATH)/bin/javadoc" |
87 |
++ JAVADOC="\$(JPATH)/bin/javadoc -source 1.8" |
88 |
+ CFLAGS=$CFLAGS" -D_BSD_SOURCE" |
89 |
+ ;; |
90 |
+ esac |
91 |
|
92 |
diff --git a/dev-java/rxtx/files/rxtx-2.2_pre2-fix-invalid-javadoc.patch b/dev-java/rxtx/files/rxtx-2.2_pre2-fix-invalid-javadoc.patch |
93 |
new file mode 100644 |
94 |
index 000000000000..a00ed96f7e5a |
95 |
--- /dev/null |
96 |
+++ b/dev-java/rxtx/files/rxtx-2.2_pre2-fix-invalid-javadoc.patch |
97 |
@@ -0,0 +1,229 @@ |
98 |
+From 4c47d6d133f727a9615987d582fa143e4a17cd01 Mon Sep 17 00:00:00 2001 |
99 |
+From: Yuan Liao <liaoyuan@×××××.com> |
100 |
+Date: Sun, 20 Feb 2022 08:17:59 -0800 |
101 |
+Subject: [PATCH] Fix invalid Javadoc syntax that leads to errors |
102 |
+ |
103 |
+Bug: https://bugs.gentoo.org/642030 |
104 |
+Signed-off-by: Yuan Liao <liaoyuan@×××××.com> |
105 |
+--- |
106 |
+ src/gnu/io/RXTXPort.java | 50 ++++++++++++++++++++++------------------ |
107 |
+ 1 file changed, 27 insertions(+), 23 deletions(-) |
108 |
+ |
109 |
+diff --git a/src/gnu/io/RXTXPort.java b/src/gnu/io/RXTXPort.java |
110 |
+index 622a6a8..77a23ea 100644 |
111 |
+--- a/src/gnu/io/RXTXPort.java |
112 |
++++ b/src/gnu/io/RXTXPort.java |
113 |
+@@ -1732,7 +1732,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS |
114 |
+ * |
115 |
+ * @param port the name of the port thats been preopened |
116 |
+ * @return BaudRate on success |
117 |
+- * @throws UnsupportedCommOperationException; |
118 |
++ * @throws UnsupportedCommOperationException |
119 |
+ * This will not behave as expected with custom speeds |
120 |
+ * |
121 |
+ */ |
122 |
+@@ -1751,7 +1751,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS |
123 |
+ * |
124 |
+ * @param port the name of the port thats been preopened |
125 |
+ * @return DataBits on success |
126 |
+- * @throws UnsupportedCommOperationException; |
127 |
++ * @throws UnsupportedCommOperationException |
128 |
+ * |
129 |
+ */ |
130 |
+ public static int staticGetDataBits( String port ) |
131 |
+@@ -1770,7 +1770,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS |
132 |
+ * |
133 |
+ * @param port the name of the port thats been preopened |
134 |
+ * @return Parity on success |
135 |
+- * @throws UnsupportedCommOperationException; |
136 |
++ * @throws UnsupportedCommOperationException |
137 |
+ * |
138 |
+ */ |
139 |
+ public static int staticGetParity( String port ) |
140 |
+@@ -1789,7 +1789,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS |
141 |
+ * |
142 |
+ * @param port the name of the port thats been preopened |
143 |
+ * @return StopBits on success |
144 |
+- * @throws UnsupportedCommOperationException; |
145 |
++ * @throws UnsupportedCommOperationException |
146 |
+ * |
147 |
+ */ |
148 |
+ public static int staticGetStopBits( String port ) |
149 |
+@@ -1839,7 +1839,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS |
150 |
+ * the port a second time later on. |
151 |
+ * |
152 |
+ * @return true on success |
153 |
+- * @throws UnsupportedCommOperationException; |
154 |
++ * @throws UnsupportedCommOperationException |
155 |
+ * |
156 |
+ */ |
157 |
+ |
158 |
+@@ -1862,7 +1862,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS |
159 |
+ * the port a second time later on. |
160 |
+ * |
161 |
+ * @return true on success |
162 |
+- * @throws UnsupportedCommOperationException; |
163 |
++ * @throws UnsupportedCommOperationException |
164 |
+ * |
165 |
+ */ |
166 |
+ |
167 |
+@@ -1885,7 +1885,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS |
168 |
+ * the port a second time later on. |
169 |
+ * |
170 |
+ * @return none |
171 |
+- * @throws UnsupportedCommOperationException; |
172 |
++ * @throws UnsupportedCommOperationException |
173 |
+ * |
174 |
+ */ |
175 |
+ |
176 |
+@@ -1907,7 +1907,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS |
177 |
+ * |
178 |
+ * @param port |
179 |
+ * @return true if asserted |
180 |
+- * @throws UnsupportedCommOperationException; |
181 |
++ * @throws UnsupportedCommOperationException |
182 |
+ * |
183 |
+ */ |
184 |
+ |
185 |
+@@ -1927,7 +1927,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS |
186 |
+ * |
187 |
+ * @param port |
188 |
+ * @return true if asserted |
189 |
+- * @throws UnsupportedCommOperationException; |
190 |
++ * @throws UnsupportedCommOperationException |
191 |
+ * |
192 |
+ */ |
193 |
+ |
194 |
+@@ -1947,7 +1947,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS |
195 |
+ * |
196 |
+ * @param port |
197 |
+ * @return true if asserted |
198 |
+- * @throws UnsupportedCommOperationException; |
199 |
++ * @throws UnsupportedCommOperationException |
200 |
+ * |
201 |
+ */ |
202 |
+ |
203 |
+@@ -1967,7 +1967,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS |
204 |
+ * |
205 |
+ * @param port |
206 |
+ * @return true if asserted |
207 |
+- * @throws UnsupportedCommOperationException; |
208 |
++ * @throws UnsupportedCommOperationException |
209 |
+ * |
210 |
+ */ |
211 |
+ |
212 |
+@@ -1987,7 +1987,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS |
213 |
+ * |
214 |
+ * @param port |
215 |
+ * @return true if asserted |
216 |
+- * @throws UnsupportedCommOperationException; |
217 |
++ * @throws UnsupportedCommOperationException |
218 |
+ * |
219 |
+ */ |
220 |
+ |
221 |
+@@ -2007,7 +2007,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS |
222 |
+ * |
223 |
+ * @param port |
224 |
+ * @return true if asserted |
225 |
+- * @throws UnsupportedCommOperationException; |
226 |
++ * @throws UnsupportedCommOperationException |
227 |
+ * |
228 |
+ */ |
229 |
+ |
230 |
+@@ -2025,7 +2025,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS |
231 |
+ * This is an extension to CommAPI. It may not be supported on |
232 |
+ * all operating systems. |
233 |
+ * @return int the Parity Error Character |
234 |
+- * @throws UnsupportedCommOperationException; |
235 |
++ * @throws UnsupportedCommOperationException |
236 |
+ * |
237 |
+ * Anyone know how to do this in Unix? |
238 |
+ */ |
239 |
+@@ -2049,7 +2049,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS |
240 |
+ * all operating systems. |
241 |
+ * @param b Parity Error Character |
242 |
+ * @return boolean true on success |
243 |
+- * @throws UnsupportedCommOperationException; |
244 |
++ * @throws UnsupportedCommOperationException |
245 |
+ * |
246 |
+ * Anyone know how to do this in Unix? |
247 |
+ */ |
248 |
+@@ -2067,7 +2067,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS |
249 |
+ * This is an extension to CommAPI. It may not be supported on |
250 |
+ * all operating systems. |
251 |
+ * @return int the End of Input Character |
252 |
+- * @throws UnsupportedCommOperationException; |
253 |
++ * @throws UnsupportedCommOperationException |
254 |
+ * |
255 |
+ * Anyone know how to do this in Unix? |
256 |
+ */ |
257 |
+@@ -2091,7 +2091,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS |
258 |
+ * all operating systems. |
259 |
+ * @param b End Of Input Character |
260 |
+ * @return boolean true on success |
261 |
+- * @throws UnsupportedCommOperationException; |
262 |
++ * @throws UnsupportedCommOperationException |
263 |
+ */ |
264 |
+ |
265 |
+ public boolean setEndOfInputChar( byte b ) |
266 |
+@@ -2111,7 +2111,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS |
267 |
+ * or "16750". |
268 |
+ * @param test boolean flag to determin if the UART should be tested. |
269 |
+ * @return boolean true on success |
270 |
+- * @throws UnsupportedCommOperationException; |
271 |
++ * @throws UnsupportedCommOperationException |
272 |
+ */ |
273 |
+ public boolean setUARTType(String type, boolean test) |
274 |
+ throws UnsupportedCommOperationException |
275 |
+@@ -2127,7 +2127,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS |
276 |
+ * @return type String representation of the UART type which mayb |
277 |
+ * be "none", "8250", "16450", "16550", "16550A", "16650", "16550V2" |
278 |
+ * or "16750". |
279 |
+- * @throws UnsupportedCommOperationException; |
280 |
++ * @throws UnsupportedCommOperationException |
281 |
+ */ |
282 |
+ public String getUARTType() throws UnsupportedCommOperationException |
283 |
+ { |
284 |
+@@ -2140,7 +2140,8 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS |
285 |
+ * @param BaudBase The clock frequency divided by 16. Default |
286 |
+ * BaudBase is 115200. |
287 |
+ * @return true on success |
288 |
+- * @throws UnsupportedCommOperationException, IOException |
289 |
++ * @throws UnsupportedCommOperationException |
290 |
++ * @throws IOException |
291 |
+ */ |
292 |
+ |
293 |
+ public boolean setBaudBase(int BaudBase) |
294 |
+@@ -2155,7 +2156,8 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS |
295 |
+ /** |
296 |
+ * Extension to CommAPI |
297 |
+ * @return BaudBase |
298 |
+- * @throws UnsupportedCommOperationException, IOException |
299 |
++ * @throws UnsupportedCommOperationException |
300 |
++ * @throws IOException |
301 |
+ */ |
302 |
+ |
303 |
+ public int getBaudBase() throws UnsupportedCommOperationException, |
304 |
+@@ -2170,7 +2172,8 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS |
305 |
+ * Extension to CommAPI. Set Baud Base to 38600 on Linux and W32 |
306 |
+ * before using. |
307 |
+ * @param Divisor |
308 |
+- * @throws UnsupportedCommOperationException, IOException |
309 |
++ * @throws UnsupportedCommOperationException |
310 |
++ * @throws IOException |
311 |
+ */ |
312 |
+ |
313 |
+ public boolean setDivisor(int Divisor) |
314 |
+@@ -2184,7 +2187,8 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS |
315 |
+ /** |
316 |
+ * Extension to CommAPI |
317 |
+ * @return Divisor; |
318 |
+- * @throws UnsupportedCommOperationException, IOException |
319 |
++ * @throws UnsupportedCommOperationException |
320 |
++ * @throws IOException |
321 |
+ */ |
322 |
+ |
323 |
+ public int getDivisor() throws UnsupportedCommOperationException, |
324 |
+-- |
325 |
+2.34.1 |
326 |
+ |
327 |
|
328 |
diff --git a/dev-java/rxtx/files/rxtx-2.2_pre2-format-security.patch b/dev-java/rxtx/files/rxtx-2.2_pre2-format-security.patch |
329 |
new file mode 100644 |
330 |
index 000000000000..1337cce3c546 |
331 |
--- /dev/null |
332 |
+++ b/dev-java/rxtx/files/rxtx-2.2_pre2-format-security.patch |
333 |
@@ -0,0 +1,118 @@ |
334 |
+Debian patch for fixing errors emitted due to -Werror=format-security. |
335 |
+The patch can be found at: |
336 |
+https://salsa.debian.org/java-team/rxtx/-/blob/6500bd55f265de7d2dfef68dc1df5d8b990f66c3/debian/patches/format_security.patch |
337 |
+ |
338 |
+Bug: https://bugs.gentoo.org/550534 |
339 |
+ |
340 |
+--- |
341 |
+From: tony mancill <tmancill@××××××.org> |
342 |
+Forwarded: no |
343 |
+Description: use format specifiers in fprintf statements for hardening flags |
344 |
+ |
345 |
+--- a/src/SerialImp.c |
346 |
++++ b/src/SerialImp.c |
347 |
+@@ -5108,7 +5108,7 @@ |
348 |
+ void report_warning(const char *msg) |
349 |
+ { |
350 |
+ #ifndef DEBUG_MW |
351 |
+- fprintf(stderr, msg); |
352 |
++ fprintf(stderr, "%s", msg); |
353 |
+ #else |
354 |
+ mexWarnMsgTxt( (const char *) msg ); |
355 |
+ #endif /* DEBUG_MW */ |
356 |
+@@ -5129,7 +5129,7 @@ |
357 |
+ #ifdef DEBUG_MW |
358 |
+ mexErrMsgTxt( msg ); |
359 |
+ #else |
360 |
+- fprintf(stderr, msg); |
361 |
++ fprintf(stderr, "%s", msg); |
362 |
+ #endif /* DEBUG_MW */ |
363 |
+ #endif /* DEBUG_VERBOSE */ |
364 |
+ } |
365 |
+@@ -5145,7 +5145,7 @@ |
366 |
+ void report_error(const char *msg) |
367 |
+ { |
368 |
+ #ifndef DEBUG_MW |
369 |
+- fprintf(stderr, msg); |
370 |
++ fprintf(stderr, "%s", msg); |
371 |
+ #else |
372 |
+ mexWarnMsgTxt( msg ); |
373 |
+ #endif /* DEBUG_MW */ |
374 |
+@@ -5164,7 +5164,7 @@ |
375 |
+ { |
376 |
+ #ifdef DEBUG |
377 |
+ # ifndef DEBUG_MW |
378 |
+- fprintf(stderr, msg); |
379 |
++ fprintf(stderr, "%s", msg); |
380 |
+ # else |
381 |
+ mexPrintf( msg ); |
382 |
+ # endif /* DEBUG_MW */ |
383 |
+--- a/src/ParallelImp.c |
384 |
++++ b/src/ParallelImp.c |
385 |
+@@ -920,7 +920,7 @@ |
386 |
+ void report_error(char *msg) |
387 |
+ { |
388 |
+ #ifndef DEBUG_MW |
389 |
+- fprintf(stderr, msg); |
390 |
++ fprintf(stderr, "%s", msg); |
391 |
+ #else |
392 |
+ mexWarnMsgTxt( msg ); |
393 |
+ #endif /* DEBUG_MW */ |
394 |
+@@ -938,7 +938,7 @@ |
395 |
+ void report(char *msg) |
396 |
+ { |
397 |
+ #ifdef DEBUG |
398 |
+- fprintf(stderr, msg); |
399 |
++ fprintf(stderr, "%s", msg); |
400 |
+ #endif /* DEBUG */ |
401 |
+ } |
402 |
+ |
403 |
+--- a/src/SerialImp.cpp |
404 |
++++ b/src/SerialImp.cpp |
405 |
+@@ -1844,7 +1844,7 @@ |
406 |
+ |
407 |
+ |
408 |
+ #ifdef DEBUG |
409 |
+- fprintf(stderr, msg); |
410 |
++ fprintf(stderr, "%s", msg); |
411 |
+ #endif |
412 |
+ } |
413 |
+ |
414 |
+--- a/CNI/SerialImp.c |
415 |
++++ b/CNI/SerialImp.c |
416 |
+@@ -4549,7 +4549,7 @@ |
417 |
+ void report_warning(char *msg) |
418 |
+ { |
419 |
+ #ifndef DEBUG_MW |
420 |
+- fprintf(stderr, msg); |
421 |
++ fprintf(stderr, "%s", msg); |
422 |
+ #else |
423 |
+ mexWarnMsgTxt( (const char *) msg ); |
424 |
+ #endif /* DEBUG_MW */ |
425 |
+@@ -4570,7 +4570,7 @@ |
426 |
+ #ifdef DEBUG_MW |
427 |
+ mexErrMsgTxt( msg ); |
428 |
+ #else |
429 |
+- fprintf(stderr, msg); |
430 |
++ fprintf(stderr, "%s", msg); |
431 |
+ #endif /* DEBUG_MW */ |
432 |
+ #endif /* DEBUG_VERBOSE */ |
433 |
+ } |
434 |
+@@ -4586,7 +4586,7 @@ |
435 |
+ void report_error(char *msg) |
436 |
+ { |
437 |
+ #ifndef DEBUG_MW |
438 |
+- fprintf(stderr, msg); |
439 |
++ fprintf(stderr, "%s", msg); |
440 |
+ #else |
441 |
+ mexWarnMsgTxt( msg ); |
442 |
+ #endif /* DEBUG_MW */ |
443 |
+@@ -4605,7 +4605,7 @@ |
444 |
+ { |
445 |
+ #ifdef DEBUG |
446 |
+ # ifndef DEBUG_MW |
447 |
+- fprintf(stderr, msg); |
448 |
++ fprintf(stderr, "%s", msg); |
449 |
+ # else |
450 |
+ mexPrintf( msg ); |
451 |
+ # endif /* DEBUG_MW */ |
452 |
|
453 |
diff --git a/dev-java/rxtx/rxtx-2.2_pre2-r2.ebuild b/dev-java/rxtx/rxtx-2.2_pre2-r2.ebuild |
454 |
new file mode 100644 |
455 |
index 000000000000..aa62594117f2 |
456 |
--- /dev/null |
457 |
+++ b/dev-java/rxtx/rxtx-2.2_pre2-r2.ebuild |
458 |
@@ -0,0 +1,109 @@ |
459 |
+# Copyright 1999-2022 Gentoo Authors |
460 |
+# Distributed under the terms of the GNU General Public License v2 |
461 |
+ |
462 |
+EAPI=8 |
463 |
+ |
464 |
+JAVA_PKG_IUSE="doc source" |
465 |
+ |
466 |
+inherit toolchain-funcs autotools java-pkg-2 |
467 |
+ |
468 |
+MY_PV="$(ver_rs 2 '')" |
469 |
+MY_P="${PN}-${MY_PV}" |
470 |
+ |
471 |
+DESCRIPTION="Native library providing serial and parallel communication for Java" |
472 |
+# SSL protocol versions supported by the HTTPS website are too old for |
473 |
+# the latest web browsers, so please keep the HTTP URL for HOMEPAGE |
474 |
+HOMEPAGE="http://rxtx.qbang.org/" |
475 |
+SRC_URI="ftp://ftp.qbang.org/pub/rxtx/${MY_P}.zip" |
476 |
+LICENSE="LGPL-2.1+" |
477 |
+SLOT="2" |
478 |
+KEYWORDS="~amd64 ~x86" |
479 |
+IUSE="lfd" |
480 |
+ |
481 |
+RDEPEND=">=virtual/jre-1.8:* |
482 |
+ lfd? ( sys-apps/xinetd )" |
483 |
+ |
484 |
+DEPEND=">=virtual/jdk-1.8:*" |
485 |
+ |
486 |
+BDEPEND="app-arch/unzip" |
487 |
+ |
488 |
+S="${WORKDIR}/${MY_P}" |
489 |
+ |
490 |
+src_prepare() { |
491 |
+ sed -i -e "s:\(\$(JAVADOC)\):\1 -d api:g" Makefile.am || die |
492 |
+ sed -i \ |
493 |
+ -e "s:UTS_RELEASE::g" \ |
494 |
+ -e "s:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:g" \ |
495 |
+ -e "s:-source ... -target ...:$(java-pkg_javac-args):g" \ |
496 |
+ configure.in || die |
497 |
+ |
498 |
+ eapply -p0 "${FILESDIR}/${PN}-2.1-7r2-lfd.diff" |
499 |
+ eapply -p0 "${FILESDIR}/${PN}-2.1-7r2-nouts.diff" |
500 |
+ eapply -p0 "${FILESDIR}/${P}-limits.patch" |
501 |
+ eapply "${FILESDIR}/${P}-add-ttyACM.patch" |
502 |
+ eapply "${FILESDIR}/${P}-format-security.patch" |
503 |
+ eapply "${FILESDIR}/${P}-fix-invalid-javadoc.patch" |
504 |
+ eapply "${FILESDIR}/${P}-fix-for-java-10+.patch" |
505 |
+ eapply_user |
506 |
+ |
507 |
+ rm acinclude.m4 || die |
508 |
+ eautoreconf |
509 |
+} |
510 |
+ |
511 |
+src_configure() { |
512 |
+ econf \ |
513 |
+ $(use_enable lfd lockfile_server) |
514 |
+} |
515 |
+ |
516 |
+src_compile() { |
517 |
+ # Parallel build on this package may cause random |
518 |
+ # build-time errors sometimes due to race conditions |
519 |
+ emake -j1 |
520 |
+ |
521 |
+ if use lfd ; then |
522 |
+ # see INSTALL in src/ldf |
523 |
+ $(tc-getCC) ${LDFLAGS} ${CFLAGS} src/lfd/lockdaemon.c -o src/lfd/in.lfd || die |
524 |
+ fi |
525 |
+ |
526 |
+ if use doc ; then |
527 |
+ emake -j1 docs |
528 |
+ fi |
529 |
+ |
530 |
+ # Fix for src zip creation |
531 |
+ if use source ; then |
532 |
+ mkdir -p src_with_pkg/gnu || die |
533 |
+ ln -s ../../src src_with_pkg/gnu/io || die |
534 |
+ fi |
535 |
+} |
536 |
+ |
537 |
+src_install() { |
538 |
+ java-pkg_dojar RXTXcomm.jar |
539 |
+ java-pkg_doso ${CHOST}/.libs/*.so |
540 |
+ |
541 |
+ dodoc AUTHORS ChangeLog INSTALL PORTING TODO SerialPortInstructions.txt |
542 |
+ docinto html |
543 |
+ dodoc RMISecurityManager.html |
544 |
+ |
545 |
+ if use lfd ; then |
546 |
+ insinto /etc/xinetd.d |
547 |
+ newins "${FILESDIR}/lockfiled.xinetd" lfd |
548 |
+ dosbin src/lfd/in.lfd |
549 |
+ dodoc src/lfd/LockFileServer.rfc |
550 |
+ fi |
551 |
+ |
552 |
+ use doc && java-pkg_dojavadoc api |
553 |
+ use source && java-pkg_dosrc src_with_pkg/gnu |
554 |
+} |
555 |
+ |
556 |
+pkg_postinst() { |
557 |
+ if use lfd ; then |
558 |
+ elog "Don't forget to enable the LockFileServer" |
559 |
+ elog "daemon (lfd) in /etc/xinetd.d/lfd" |
560 |
+ else |
561 |
+ elog "RXTX uses UUCP style device-locks. You should" |
562 |
+ elog "add every user who needs to access serial ports" |
563 |
+ elog "to the 'uucp' group:" |
564 |
+ elog |
565 |
+ elog " usermod -aG uucp <user>" |
566 |
+ fi |
567 |
+} |