From 4cbcc855382a06088e2f016f62cafdbcb7e40665 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 20 Mar 2022 00:40:44 +0000 Subject: gentoo resync : 20.03.2022 --- dev-java/rxtx/Manifest | 5 +- .../files/rxtx-2.2_pre2-fix-for-java-10+.patch | 50 +++++ .../files/rxtx-2.2_pre2-fix-invalid-javadoc.patch | 229 +++++++++++++++++++++ .../rxtx/files/rxtx-2.2_pre2-format-security.patch | 118 +++++++++++ dev-java/rxtx/rxtx-2.2_pre2-r1.ebuild | 101 --------- dev-java/rxtx/rxtx-2.2_pre2-r2.ebuild | 109 ++++++++++ 6 files changed, 510 insertions(+), 102 deletions(-) create mode 100644 dev-java/rxtx/files/rxtx-2.2_pre2-fix-for-java-10+.patch create mode 100644 dev-java/rxtx/files/rxtx-2.2_pre2-fix-invalid-javadoc.patch create mode 100644 dev-java/rxtx/files/rxtx-2.2_pre2-format-security.patch delete mode 100644 dev-java/rxtx/rxtx-2.2_pre2-r1.ebuild create mode 100644 dev-java/rxtx/rxtx-2.2_pre2-r2.ebuild (limited to 'dev-java/rxtx') diff --git a/dev-java/rxtx/Manifest b/dev-java/rxtx/Manifest index 6cb68ac9febc..a7a70333c158 100644 --- a/dev-java/rxtx/Manifest +++ b/dev-java/rxtx/Manifest @@ -2,7 +2,10 @@ AUX lockfiled.xinetd 202 BLAKE2B 38ecf8d5faadf521d5253e60183d13c3040a88035d5e039 AUX rxtx-2.1-7r2-lfd.diff 497 BLAKE2B 1e74708071d4645e0444d4ac2bffb8b952f17723d1ce98a784a75c5e1f1d22f2472ebbe0aa16c40b830be0255bd04b8d3a13ffe8d54b4d787e3a03e4d07f4be9 SHA512 fd06c021ad496036556f979e783864d6d88d1a0c039396eefacc569d66e6942b08b246970be640c73c0c2d209aa0c3247db61bdc19a99066789d4f4d0e4d390e AUX rxtx-2.1-7r2-nouts.diff 3583 BLAKE2B a92f5459ec2309f941ca7f8c3437a1c392da06972d4511905c73e1676fab4ad772a9d22aa3d639095798def629cba794f93add6e67878fff8441f628063ce421 SHA512 c7c6c11785089d321ee9680f4b67c590fe0c3cc0f031196eb71831ef7f319867fb156912c0c934a751d5d9e97774d6c26cab5c710055e919e97bcf39a789787d AUX rxtx-2.2_pre2-add-ttyACM.patch 328 BLAKE2B 93e5ddca58bf3886c1ed7d34ef6e718d844eb067b55d9ff4fde7faa083735b135a853ebad7f9baf9ce1877fbc5cc3ce9bbd88b342aac4f040a2c0b6045629b99 SHA512 c81ae4e3f6fe09722709b6a9ae09fd3a300c9ef94641a3aa9f821b6fd4e4c28f15e9f672d2bfe6b51715f9e6b2caa5f637be20a76027cb31098062f60a0b0d0f +AUX rxtx-2.2_pre2-fix-for-java-10+.patch 1825 BLAKE2B 5ae56268cf4e98ec78f91c4e65d17c0bccefcc297b7f34354d4de972038f894f4aa14493c8f40f4ba0ef89c93865e4384494195e93b2c2083d4612b13f54ac65 SHA512 61a1d5ced0f25cd5cd7eea7e4da57eeb933f59919c3b1137a27cf69195d08c9ad0f2d7d0a52748df2daf280c9abd5bdd4f610783b8ccaccd480b02ef1d0a8555 +AUX rxtx-2.2_pre2-fix-invalid-javadoc.patch 8268 BLAKE2B f5b40ce1dbdfa2a1ec98ad6c886a932ddfea7157ff5a2e21f7c56c32e50dfe9b220e033ced0e41f94b0432669d042eebb37dc23e0b1084127f5376fb8f1faaa1 SHA512 a86dbc331e6c3a697f09a517abdebbf450ecffdd0a90dd0b539a4ea7ccda366655e1efd626d8fd503d58a9e221be9a01ad44ac37327316149d8d0e2fb6923802 +AUX rxtx-2.2_pre2-format-security.patch 2480 BLAKE2B 5e19b8ae5d49c094a8faa84c2cd5eca513bb309836fc8f1544e142ccab5b9a53f05771f2412b2953cae3f13e1c96d8d84e1f4a1f4dfdcc3719947d5ec182cec8 SHA512 c0ed0d34c04cfe87b134c55c819af65017c30e38cce00eedd146d70bb7e3a304b92b8fa8c11f3ab9076701f71f7370b28a902c7e3fee18f46f5a6a2aea3ed66a AUX rxtx-2.2_pre2-limits.patch 272 BLAKE2B 8f49c4a9dbf852f444a742ab3b2b5c846d3d0035307415dd3b4ba34bf3a37179e82d63e04eeb3b553e678fcfc5d0cc3ab0651fdcbf6be20228e35d13db3bf1b0 SHA512 0e4d5b8e622515c75613aeb8c5e4fc1786f1c05ef2619b65c4b1060776933172479957b9f9a15195c79f10c90a1802956eac32cd60939b9b0a15540901e62180 DIST rxtx-2.2pre2.zip 1491209 BLAKE2B fe115833ee89cfe9a3ae58117ac4a4326e8f79e6fdc0528cb8dd2824e231c862e4b421c94784059e4cf03f6cc93a32636444916a5c8cebe002da470b460bf23b SHA512 cd94bd08bc8b5689fc9a0e539f17645f530a3a280998e9838a2e4c8b3386f2b00a592ab41c07bd720eadf26fddb324bf80d8f7b9ecb35ea8507120c16048f514 -EBUILD rxtx-2.2_pre2-r1.ebuild 2222 BLAKE2B f94fffc150c4ec4fec5788ac72156208bfedad321ebf40b220b1abc98e31be3df6ad22705b6491df61028e0fd79e9cca453f5a989322006ebf153b53b6da34b9 SHA512 92a9461b5789013746a149a11d3d52e2476933200b127975c64c6969751193919fe70ff7b871ae0e1b6c59f7ac4d3292d66ad9fdf3a189766e428254db7ede12 +EBUILD rxtx-2.2_pre2-r2.ebuild 2650 BLAKE2B 2095d6555f375b9d1ee75538abb734c719785516047727b5d929de1c00a2fa8b03fe57522560c38074212a7ba7742f607c22f621269da38b3d00de910217f778 SHA512 323bb50e9c3a636fdbd4018391c4feea544e9d3f4f6458ec4a9b6868c882ce4e9ca79bf8685395bd03be111be8a7689d649a5a561ca4f8c6864ebfb61ce70bec MISC metadata.xml 334 BLAKE2B b86a021232d18fba74442a66f689351c6440a1cca9be38d526ec2c9e65fa634f1cb265177d974bdf6b6f764c1df9531f75346f69ac071de6ed3f880eb09a3f44 SHA512 cb51df875f3ab1e39a5141ffe2cf79fed88339a9bf2bcb747be78b5986035dd5925fccd120cdb54ab8ab4e0371eda1cb9412f141bcc7583cb55f7bcf85a3683a 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 new file mode 100644 index 000000000000..366bb78c2cba --- /dev/null +++ b/dev-java/rxtx/files/rxtx-2.2_pre2-fix-for-java-10+.patch @@ -0,0 +1,50 @@ +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 +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 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 new file mode 100644 index 000000000000..a00ed96f7e5a --- /dev/null +++ b/dev-java/rxtx/files/rxtx-2.2_pre2-fix-invalid-javadoc.patch @@ -0,0 +1,229 @@ +From 4c47d6d133f727a9615987d582fa143e4a17cd01 Mon Sep 17 00:00:00 2001 +From: Yuan Liao +Date: Sun, 20 Feb 2022 08:17:59 -0800 +Subject: [PATCH] Fix invalid Javadoc syntax that leads to errors + +Bug: https://bugs.gentoo.org/642030 +Signed-off-by: Yuan Liao +--- + src/gnu/io/RXTXPort.java | 50 ++++++++++++++++++++++------------------ + 1 file changed, 27 insertions(+), 23 deletions(-) + +diff --git a/src/gnu/io/RXTXPort.java b/src/gnu/io/RXTXPort.java +index 622a6a8..77a23ea 100644 +--- a/src/gnu/io/RXTXPort.java ++++ b/src/gnu/io/RXTXPort.java +@@ -1732,7 +1732,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS + * + * @param port the name of the port thats been preopened + * @return BaudRate on success +- * @throws UnsupportedCommOperationException; ++ * @throws UnsupportedCommOperationException + * This will not behave as expected with custom speeds + * + */ +@@ -1751,7 +1751,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS + * + * @param port the name of the port thats been preopened + * @return DataBits on success +- * @throws UnsupportedCommOperationException; ++ * @throws UnsupportedCommOperationException + * + */ + public static int staticGetDataBits( String port ) +@@ -1770,7 +1770,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS + * + * @param port the name of the port thats been preopened + * @return Parity on success +- * @throws UnsupportedCommOperationException; ++ * @throws UnsupportedCommOperationException + * + */ + public static int staticGetParity( String port ) +@@ -1789,7 +1789,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS + * + * @param port the name of the port thats been preopened + * @return StopBits on success +- * @throws UnsupportedCommOperationException; ++ * @throws UnsupportedCommOperationException + * + */ + public static int staticGetStopBits( String port ) +@@ -1839,7 +1839,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS + * the port a second time later on. + * + * @return true on success +- * @throws UnsupportedCommOperationException; ++ * @throws UnsupportedCommOperationException + * + */ + +@@ -1862,7 +1862,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS + * the port a second time later on. + * + * @return true on success +- * @throws UnsupportedCommOperationException; ++ * @throws UnsupportedCommOperationException + * + */ + +@@ -1885,7 +1885,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS + * the port a second time later on. + * + * @return none +- * @throws UnsupportedCommOperationException; ++ * @throws UnsupportedCommOperationException + * + */ + +@@ -1907,7 +1907,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS + * + * @param port + * @return true if asserted +- * @throws UnsupportedCommOperationException; ++ * @throws UnsupportedCommOperationException + * + */ + +@@ -1927,7 +1927,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS + * + * @param port + * @return true if asserted +- * @throws UnsupportedCommOperationException; ++ * @throws UnsupportedCommOperationException + * + */ + +@@ -1947,7 +1947,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS + * + * @param port + * @return true if asserted +- * @throws UnsupportedCommOperationException; ++ * @throws UnsupportedCommOperationException + * + */ + +@@ -1967,7 +1967,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS + * + * @param port + * @return true if asserted +- * @throws UnsupportedCommOperationException; ++ * @throws UnsupportedCommOperationException + * + */ + +@@ -1987,7 +1987,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS + * + * @param port + * @return true if asserted +- * @throws UnsupportedCommOperationException; ++ * @throws UnsupportedCommOperationException + * + */ + +@@ -2007,7 +2007,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS + * + * @param port + * @return true if asserted +- * @throws UnsupportedCommOperationException; ++ * @throws UnsupportedCommOperationException + * + */ + +@@ -2025,7 +2025,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS + * This is an extension to CommAPI. It may not be supported on + * all operating systems. + * @return int the Parity Error Character +- * @throws UnsupportedCommOperationException; ++ * @throws UnsupportedCommOperationException + * + * Anyone know how to do this in Unix? + */ +@@ -2049,7 +2049,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS + * all operating systems. + * @param b Parity Error Character + * @return boolean true on success +- * @throws UnsupportedCommOperationException; ++ * @throws UnsupportedCommOperationException + * + * Anyone know how to do this in Unix? + */ +@@ -2067,7 +2067,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS + * This is an extension to CommAPI. It may not be supported on + * all operating systems. + * @return int the End of Input Character +- * @throws UnsupportedCommOperationException; ++ * @throws UnsupportedCommOperationException + * + * Anyone know how to do this in Unix? + */ +@@ -2091,7 +2091,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS + * all operating systems. + * @param b End Of Input Character + * @return boolean true on success +- * @throws UnsupportedCommOperationException; ++ * @throws UnsupportedCommOperationException + */ + + public boolean setEndOfInputChar( byte b ) +@@ -2111,7 +2111,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS + * or "16750". + * @param test boolean flag to determin if the UART should be tested. + * @return boolean true on success +- * @throws UnsupportedCommOperationException; ++ * @throws UnsupportedCommOperationException + */ + public boolean setUARTType(String type, boolean test) + throws UnsupportedCommOperationException +@@ -2127,7 +2127,7 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS + * @return type String representation of the UART type which mayb + * be "none", "8250", "16450", "16550", "16550A", "16650", "16550V2" + * or "16750". +- * @throws UnsupportedCommOperationException; ++ * @throws UnsupportedCommOperationException + */ + public String getUARTType() throws UnsupportedCommOperationException + { +@@ -2140,7 +2140,8 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS + * @param BaudBase The clock frequency divided by 16. Default + * BaudBase is 115200. + * @return true on success +- * @throws UnsupportedCommOperationException, IOException ++ * @throws UnsupportedCommOperationException ++ * @throws IOException + */ + + public boolean setBaudBase(int BaudBase) +@@ -2155,7 +2156,8 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS + /** + * Extension to CommAPI + * @return BaudBase +- * @throws UnsupportedCommOperationException, IOException ++ * @throws UnsupportedCommOperationException ++ * @throws IOException + */ + + public int getBaudBase() throws UnsupportedCommOperationException, +@@ -2170,7 +2172,8 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS + * Extension to CommAPI. Set Baud Base to 38600 on Linux and W32 + * before using. + * @param Divisor +- * @throws UnsupportedCommOperationException, IOException ++ * @throws UnsupportedCommOperationException ++ * @throws IOException + */ + + public boolean setDivisor(int Divisor) +@@ -2184,7 +2187,8 @@ Documentation is at http://java.sun.com/products/jdk/1.2/docs/api/java/io/InputS + /** + * Extension to CommAPI + * @return Divisor; +- * @throws UnsupportedCommOperationException, IOException ++ * @throws UnsupportedCommOperationException ++ * @throws IOException + */ + + public int getDivisor() throws UnsupportedCommOperationException, +-- +2.34.1 + 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 new file mode 100644 index 000000000000..1337cce3c546 --- /dev/null +++ b/dev-java/rxtx/files/rxtx-2.2_pre2-format-security.patch @@ -0,0 +1,118 @@ +Debian patch for fixing errors emitted due to -Werror=format-security. +The patch can be found at: +https://salsa.debian.org/java-team/rxtx/-/blob/6500bd55f265de7d2dfef68dc1df5d8b990f66c3/debian/patches/format_security.patch + +Bug: https://bugs.gentoo.org/550534 + +--- +From: tony mancill +Forwarded: no +Description: use format specifiers in fprintf statements for hardening flags + +--- a/src/SerialImp.c ++++ b/src/SerialImp.c +@@ -5108,7 +5108,7 @@ + void report_warning(const char *msg) + { + #ifndef DEBUG_MW +- fprintf(stderr, msg); ++ fprintf(stderr, "%s", msg); + #else + mexWarnMsgTxt( (const char *) msg ); + #endif /* DEBUG_MW */ +@@ -5129,7 +5129,7 @@ + #ifdef DEBUG_MW + mexErrMsgTxt( msg ); + #else +- fprintf(stderr, msg); ++ fprintf(stderr, "%s", msg); + #endif /* DEBUG_MW */ + #endif /* DEBUG_VERBOSE */ + } +@@ -5145,7 +5145,7 @@ + void report_error(const char *msg) + { + #ifndef DEBUG_MW +- fprintf(stderr, msg); ++ fprintf(stderr, "%s", msg); + #else + mexWarnMsgTxt( msg ); + #endif /* DEBUG_MW */ +@@ -5164,7 +5164,7 @@ + { + #ifdef DEBUG + # ifndef DEBUG_MW +- fprintf(stderr, msg); ++ fprintf(stderr, "%s", msg); + # else + mexPrintf( msg ); + # endif /* DEBUG_MW */ +--- a/src/ParallelImp.c ++++ b/src/ParallelImp.c +@@ -920,7 +920,7 @@ + void report_error(char *msg) + { + #ifndef DEBUG_MW +- fprintf(stderr, msg); ++ fprintf(stderr, "%s", msg); + #else + mexWarnMsgTxt( msg ); + #endif /* DEBUG_MW */ +@@ -938,7 +938,7 @@ + void report(char *msg) + { + #ifdef DEBUG +- fprintf(stderr, msg); ++ fprintf(stderr, "%s", msg); + #endif /* DEBUG */ + } + +--- a/src/SerialImp.cpp ++++ b/src/SerialImp.cpp +@@ -1844,7 +1844,7 @@ + + + #ifdef DEBUG +- fprintf(stderr, msg); ++ fprintf(stderr, "%s", msg); + #endif + } + +--- a/CNI/SerialImp.c ++++ b/CNI/SerialImp.c +@@ -4549,7 +4549,7 @@ + void report_warning(char *msg) + { + #ifndef DEBUG_MW +- fprintf(stderr, msg); ++ fprintf(stderr, "%s", msg); + #else + mexWarnMsgTxt( (const char *) msg ); + #endif /* DEBUG_MW */ +@@ -4570,7 +4570,7 @@ + #ifdef DEBUG_MW + mexErrMsgTxt( msg ); + #else +- fprintf(stderr, msg); ++ fprintf(stderr, "%s", msg); + #endif /* DEBUG_MW */ + #endif /* DEBUG_VERBOSE */ + } +@@ -4586,7 +4586,7 @@ + void report_error(char *msg) + { + #ifndef DEBUG_MW +- fprintf(stderr, msg); ++ fprintf(stderr, "%s", msg); + #else + mexWarnMsgTxt( msg ); + #endif /* DEBUG_MW */ +@@ -4605,7 +4605,7 @@ + { + #ifdef DEBUG + # ifndef DEBUG_MW +- fprintf(stderr, msg); ++ fprintf(stderr, "%s", msg); + # else + mexPrintf( msg ); + # endif /* DEBUG_MW */ diff --git a/dev-java/rxtx/rxtx-2.2_pre2-r1.ebuild b/dev-java/rxtx/rxtx-2.2_pre2-r1.ebuild deleted file mode 100644 index 250fe5e92412..000000000000 --- a/dev-java/rxtx/rxtx-2.2_pre2-r1.ebuild +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -JAVA_PKG_IUSE="doc source" - -inherit toolchain-funcs versionator autotools java-pkg-2 - -MY_PV="$(delete_version_separator 2)" -MY_P="${PN}-${MY_PV}" - -DESCRIPTION="Native lib providing serial and parallel communication for Java" -HOMEPAGE="http://rxtx.qbang.org/" -SRC_URI="ftp://ftp.qbang.org/pub/rxtx/${MY_P}.zip" -LICENSE="LGPL-2.1+" -SLOT="2" -KEYWORDS="amd64 x86" -IUSE="lfd" - -RDEPEND=">=virtual/jre-1.6 - lfd? ( sys-apps/xinetd )" - -DEPEND=">=virtual/jdk-1.6 - app-arch/unzip" - -S="${WORKDIR}/${MY_P}" - -src_prepare() { - sed -i -e "s:\(\$(JAVADOC)\):\1 -d api:g" Makefile.am || die - sed -i \ - -e "s:UTS_RELEASE::g" \ - -e "s:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:g" \ - -e "s:-source ... -target ...:$(java-pkg_javac-args):g" \ - configure.in || die - - epatch \ - "${FILESDIR}/${PN}-2.1-7r2-lfd.diff" \ - "${FILESDIR}/${PN}-2.1-7r2-nouts.diff" \ - "${FILESDIR}/${P}-add-ttyACM.patch" \ - "${FILESDIR}/${P}-limits.patch" - - rm acinclude.m4 || die - eautoreconf -} - -src_configure() { - econf \ - $(use_enable lfd lockfile_server) -} - -src_compile() { - emake - - if use lfd ; then - # see INSTALL in src/ldf - $(tc-getCC) ${LDFLAGS} ${CFLAGS} src/lfd/lockdaemon.c -o src/lfd/in.lfd || die - fi - - if use doc ; then - emake docs - fi - - # Fix for src zip creation - if use source ; then - mkdir -p src_with_pkg/gnu || die - ln -s ../../src src_with_pkg/gnu/io || die - fi -} - -src_install() { - java-pkg_dojar RXTXcomm.jar - java-pkg_doso ${CHOST}/.libs/*.so - - dodoc AUTHORS ChangeLog INSTALL PORTING TODO SerialPortInstructions.txt - docinto html - dodoc RMISecurityManager.html - - if use lfd ; then - insinto /etc/xinetd.d - newins "${FILESDIR}/lockfiled.xinetd" lfd - dosbin src/lfd/in.lfd - dodoc src/lfd/LockFileServer.rfc - fi - - use doc && java-pkg_dojavadoc api - use source && java-pkg_dosrc src_with_pkg/gnu -} - -pkg_postinst() { - if use lfd ; then - elog "Don't forget to enable the LockFileServer" - elog "daemon (lfd) in /etc/xinetd.d/lfd" - else - elog "RXTX uses UUCP style device-locks. You should" - elog "add every user who needs to access serial ports" - elog "to the 'uucp' group:" - elog - elog " usermod -aG uucp " - fi -} diff --git a/dev-java/rxtx/rxtx-2.2_pre2-r2.ebuild b/dev-java/rxtx/rxtx-2.2_pre2-r2.ebuild new file mode 100644 index 000000000000..16874cfaeefa --- /dev/null +++ b/dev-java/rxtx/rxtx-2.2_pre2-r2.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +JAVA_PKG_IUSE="doc source" + +inherit toolchain-funcs autotools java-pkg-2 + +MY_PV="$(ver_rs 2 '')" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="Native library providing serial and parallel communication for Java" +# SSL protocol versions supported by the HTTPS website are too old for +# the latest web browsers, so please keep the HTTP URL for HOMEPAGE +HOMEPAGE="http://rxtx.qbang.org/" +SRC_URI="ftp://ftp.qbang.org/pub/rxtx/${MY_P}.zip" +LICENSE="LGPL-2.1+" +SLOT="2" +KEYWORDS="amd64 x86" +IUSE="lfd" + +RDEPEND=">=virtual/jre-1.8:* + lfd? ( sys-apps/xinetd )" + +DEPEND=">=virtual/jdk-1.8:*" + +BDEPEND="app-arch/unzip" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + sed -i -e "s:\(\$(JAVADOC)\):\1 -d api:g" Makefile.am || die + sed -i \ + -e "s:UTS_RELEASE::g" \ + -e "s:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:g" \ + -e "s:-source ... -target ...:$(java-pkg_javac-args):g" \ + configure.in || die + + eapply -p0 "${FILESDIR}/${PN}-2.1-7r2-lfd.diff" + eapply -p0 "${FILESDIR}/${PN}-2.1-7r2-nouts.diff" + eapply -p0 "${FILESDIR}/${P}-limits.patch" + eapply "${FILESDIR}/${P}-add-ttyACM.patch" + eapply "${FILESDIR}/${P}-format-security.patch" + eapply "${FILESDIR}/${P}-fix-invalid-javadoc.patch" + eapply "${FILESDIR}/${P}-fix-for-java-10+.patch" + eapply_user + + rm acinclude.m4 || die + eautoreconf +} + +src_configure() { + econf \ + $(use_enable lfd lockfile_server) +} + +src_compile() { + # Parallel build on this package may cause random + # build-time errors sometimes due to race conditions + emake -j1 + + if use lfd ; then + # see INSTALL in src/ldf + $(tc-getCC) ${LDFLAGS} ${CFLAGS} src/lfd/lockdaemon.c -o src/lfd/in.lfd || die + fi + + if use doc ; then + emake -j1 docs + fi + + # Fix for src zip creation + if use source ; then + mkdir -p src_with_pkg/gnu || die + ln -s ../../src src_with_pkg/gnu/io || die + fi +} + +src_install() { + java-pkg_dojar RXTXcomm.jar + java-pkg_doso ${CHOST}/.libs/*.so + + dodoc AUTHORS ChangeLog INSTALL PORTING TODO SerialPortInstructions.txt + docinto html + dodoc RMISecurityManager.html + + if use lfd ; then + insinto /etc/xinetd.d + newins "${FILESDIR}/lockfiled.xinetd" lfd + dosbin src/lfd/in.lfd + dodoc src/lfd/LockFileServer.rfc + fi + + use doc && java-pkg_dojavadoc api + use source && java-pkg_dosrc src_with_pkg/gnu +} + +pkg_postinst() { + if use lfd ; then + elog "Don't forget to enable the LockFileServer" + elog "daemon (lfd) in /etc/xinetd.d/lfd" + else + elog "RXTX uses UUCP style device-locks. You should" + elog "add every user who needs to access serial ports" + elog "to the 'uucp' group:" + elog + elog " usermod -aG uucp " + fi +} -- cgit v1.2.3