Files
gentoo/dev-java/rxtx/files/rxtx-2.2_pre2-fix-for-java-10+.patch
Yuan Liao f8f2919fe3 dev-java/rxtx: Fix various build errors for Java 11+ and others, EAPI 8
- Fix compiler errors due to -Werror=format-security
- Fix Javadoc generation errors
- Replace 'javah' with 'javac -h' for JDK 10+
- Attempt to fix some random, nondeterministic build-time errors that
  were speculated to be caused by parallel 'make'.  Those errors are not
  always reproducible and may go away during a retry, which might have
  stopped some users (including the commit author himself) from
  reporting them.  Another random error popped up when the new ebuild
  revision was being tested, hence a fix that forces sequential build is
  attempted in the hope to prevent probable random errors.

Bug: https://bugs.gentoo.org/550534
Bug: https://bugs.gentoo.org/642030
Bug: https://bugs.gentoo.org/831394
Bug: https://bugs.gentoo.org/833396
Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/24289
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
2022-02-21 10:19:44 +01:00

51 lines
1.8 KiB
Diff

Debian patch for fixing build issues on JDK 10 and above.
In particular, 'javah' needs to replaced by 'javac -h' since 'javah'
has been removed due to JEP 313 (https://openjdk.java.net/jeps/313).
To support Javadoc generation with JDK 17 and above, the '-source 1.8'
option must be included in the arguments to 'javadoc'. Otherwise, the
following error would be raised:
src/gnu/io/LPRPort.java:373: error: invalid use of a restricted identifier 'yield'
yield();
^
(to invoke a method called yield, qualify the yield with a receiver or type name)
The original patch can be found at:
https://salsa.debian.org/java-team/rxtx/-/blob/6500bd55f265de7d2dfef68dc1df5d8b990f66c3/debian/patches/java10-compatibility.patch
Bug: https://bugs.gentoo.org/831394
---
Description: Fixes the build failure with Java 10
Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: no
--- a/Makefile.am
+++ b/Makefile.am
@@ -111,11 +111,6 @@
$(CLASSES): $(javafiles) $(TOP)/Makefile
$(JAVAH_FIX)
$(JAVAC) $(javafiles)
- $(JAVAH) `(for i in $(javahfiles);do \
- if grep > /dev/null native.*\( $(SPATH)/gnu/io/$$i.java; then \
- echo $(CLASSDIR).$$i; \
- fi; \
- done)`
$(JAR) cf $(JARTARGET) $(CLASSTOP)/*
# install librxtxSerial.so into the proper directory and copy $(JARTARGET) to its
--- a/configure.in
+++ b/configure.in
@@ -485,9 +485,9 @@
*)
find_java_native_include jni_md.h
JAVAH="\$(JPATH)/bin/javah -classpath \$(CLASSPATH) -d \$(DEST) -jni"
- JAVAC="\$(JPATH)/bin/javac -classpath \$(CLASSPATH) -d \$(TOP)/ -O -source 1.8 -target 1.8"
+ JAVAC="\$(JPATH)/bin/javac -classpath \$(CLASSPATH) -d \$(TOP)/ -O -source 1.8 -target 1.8 -h \$(DEST)"
JAR="\$(JPATH)/bin/jar"
- JAVADOC="\$(JPATH)/bin/javadoc"
+ JAVADOC="\$(JPATH)/bin/javadoc -source 1.8"
CFLAGS=$CFLAGS" -D_BSD_SOURCE"
;;
esac