summaryrefslogtreecommitdiff
path: root/dev-java
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-05-10 11:43:22 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-05-10 11:43:22 +0100
commit1d412f04b6e137f20cbe616b3203d2cbc8dfd5ad (patch)
tree37690cdf0c1532996a40987cf1d65e80d21886c4 /dev-java
parent100b0ae24e9b0d0fb3071efea2078a3bdabe4e38 (diff)
gentoo auto-resync : 10:05:2023 - 11:43:22
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/Manifest.gzbin56992 -> 57000 bytes
-rw-r--r--dev-java/fop/Manifest1
-rw-r--r--dev-java/fop/fop-2.8.ebuild166
-rw-r--r--dev-java/jakartaee-migration/Manifest2
-rw-r--r--dev-java/jakartaee-migration/jakartaee-migration-1.0.7.ebuild89
-rw-r--r--dev-java/jna/Manifest3
-rw-r--r--dev-java/jna/files/jna-5.13.0-testpath.patch103
-rw-r--r--dev-java/jna/jna-5.13.0.ebuild191
8 files changed, 388 insertions, 167 deletions
diff --git a/dev-java/Manifest.gz b/dev-java/Manifest.gz
index 27ae0c78e900..1568b73e3e73 100644
--- a/dev-java/Manifest.gz
+++ b/dev-java/Manifest.gz
Binary files differ
diff --git a/dev-java/fop/Manifest b/dev-java/fop/Manifest
index e7349f896780..6c16895b0e5a 100644
--- a/dev-java/fop/Manifest
+++ b/dev-java/fop/Manifest
@@ -4,5 +4,4 @@ DIST fop-2.8-src.tar.gz 22855369 BLAKE2B 183649f531068b8f7513613c89f9f66a48894ab
DIST fop-2.8-src.tar.gz.asc 833 BLAKE2B f761b427bac89249ab4ab5f2194468e44f997e28ed77392a785764fb60dd2fbbc716ef881e2009a3dbad416ef195fc8ae4d2ebdbd63c3fb3f47d355acab8389b SHA512 c25e94ac4a72c9ff9bfa487369ee1510ab5b19a6178f14f5076b9cf0548044e79eca707025e962c63d268d0f48661cc7110f604036957e447f8413cdb582d3de
DIST fop-hyph-2.0.jar 6655933 BLAKE2B bfbefcc2ebd9a9a467c23a70d7cef256f83cf2335f6e17db6bbefceaf8a3cee78de0302f269d096eb3238b3f4883429e09cc640bed11a42da4ef67ab9f0cb164 SHA512 3d5f27623008c7beba5332387bd42c501b7ae1dddfc98014b3fb35273394ca5f0a4ce69e7726090ec468c9b4f7983fb8b1a5759f49e81ea342c81c61311d87b3
EBUILD fop-2.8-r1.ebuild 5403 BLAKE2B 943f54ecf29f2e15f9aae6ce833d03abc2be03ecd4b6a5507fc6e68306772043878abe6570ba9daa249041719ce820506635528d8f06c2c7958fe5402c911a3b SHA512 a90e0f53bd70f92776b148b2f0493dd212db0d3652ead61b1e87c3faab2145a8a3cf77762abafb25b4f8639121407889d3b57ff437a351e36217e9e99d1880be
-EBUILD fop-2.8.ebuild 4393 BLAKE2B 7c5aa2c102b5300d830f5d6e35441050eeffbf2f1e5d3532c765c56cad3d5015a4b50b643cb55dd60bd02572b6e21ae68d7d26713bf3a05b5213cc392cb3f9cf SHA512 1f0778c3411a729120de6d56cfe73f701a28c8849588c606fb5e091949f1d7a87330369bb7bf1336abef9a01c3e054139fec62c989687079da6b82aae44733fa
MISC metadata.xml 449 BLAKE2B 91dd2fd3b50581a408755aade7aa37406c527e9298bd0156cb18d363fef88cf60eb85f259ba443022fbd6c5377be0e0fc990cb2826d418347dc92bf7b6ff5ca9 SHA512 cf49f03d1ed992a7df7deebb7c00721895be45ff144da8c4b1777aecba5e17d86a7353a83ad8df8b356f70afda5fadcdc53350b2c5732a0f0469b18f501959d4
diff --git a/dev-java/fop/fop-2.8.ebuild b/dev-java/fop/fop-2.8.ebuild
deleted file mode 100644
index e78205ca474e..000000000000
--- a/dev-java/fop/fop-2.8.ebuild
+++ /dev/null
@@ -1,166 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-JAVA_PKG_IUSE="doc source test"
-MAVEN_ID="org.apache.xmlgraphics:fop:${PV}"
-JAVA_TESTING_FRAMEWORKS="junit-4"
-
-inherit java-pkg-2 java-pkg-simple
-
-DESCRIPTION="XML Graphics Format Object Processor All-In-One"
-HOMEPAGE="https://xmlgraphics.apache.org/fop/"
-SRC_URI="
- mirror://apache/xmlgraphics/fop/source/${P}-src.tar.gz
- https://dev.gentoo.org/~flow/distfiles/fop/fop-2.7-jars.tar.xz
-"
-S="${WORKDIR}/fop-${PV}"
-
-LICENSE="Apache-2.0"
-SLOT="2.8"
-KEYWORDS="amd64 ~arm64 ppc64 x86"
-
-CP_DEPEND="
- dev-java/batik:1.16
- dev-java/commons-io:1
- dev-java/commons-logging:0
- dev-java/fontbox:0
- dev-java/qdox:1.12
- dev-java/xmlgraphics-commons:2
-"
-
-DEPEND="${CP_DEPEND}
- >=virtual/jdk-1.8:*
- dev-java/ant-core:0
- dev-java/javax-servlet-api:2.2
- dev-java/sun-jai-bin:0
- test? (
- dev-java/mockito:4
- dev-java/pdfbox:0
- dev-java/xmlunit:1
- )
-"
-
-RDEPEND="${CP_DEPEND}
- >=virtual/jre-1.8:*"
-
-BDEPEND="dev-java/xalan:0"
-
-DOCS=( NOTICE README )
-
-JAVA_CLASSPATH_EXTRA="
- ant-core
- javax-servlet-api-2.2
- sun-jai-bin
-"
-
-src_prepare() {
- java-pkg_clean
- java-pkg-2_src_prepare
-}
-
-src_compile() {
- JAVA_SRC_DIR="fop-util/src/main/java"
- JAVA_JAR_FILENAME="fop-util.jar"
- java-pkg-simple_src_compile
- JAVA_GENTOO_CLASSPATH_EXTRA+=":fop-util.jar"
- rm -r target || die
-
- JAVA_SRC_DIR="fop-events/src/main/java"
- JAVA_RESOURCE_DIRS="fop-events/src/main/resources"
- JAVA_JAR_FILENAME="fop-events.jar"
- java-pkg-simple_src_compile
- JAVA_GENTOO_CLASSPATH_EXTRA+=":fop-events.jar"
- rm -r target || die
-
- JAVA_SRC_DIR="fop-core/src/main/java"
- JAVA_RESOURCE_DIRS="fop-core/src/main/resources"
- JAVA_MAIN_CLASS=$( sed -n 's:.*<mainClass>\(.*\)</mainClass>:\1:p' fop-core/pom.xml )
- JAVA_JAR_FILENAME="fop-core.jar"
- # Code generation according to
- # https://github.com/apache/xmlgraphics-fop/blob/fop-2_8/fop-core/pom.xml#L156-L225
- pushd fop-core/src/main/codegen/fonts > /dev/null || die
- local fonts=$(find . -name "Courier*.xml" \
- -o -name "Helvetica*.xml" \
- -o -name "Times*.xml" \
- -o -name "Symbol.xml" \
- -o -name "ZapfDingbats.xml"
- )
- for font in ${fonts}; do \
- xalan -XSLTC \
- -IN $font \
- -XSL font-file.xsl \
- -OUT ../../java/org/apache/fop/fonts/base14/${font//.xml}.java || die
- done
- xalan -XSLTC \
- -IN encodings.xml \
- -XSL code-point-mapping.xsl \
- -OUT ../../java/org/apache/fop/fonts/base14/CodePointMapping.java || die
- popd > /dev/null || die
- java-pkg-simple_src_compile
- rm -r target || die
-
- JAVA_GENTOO_CLASSPATH_EXTRA+=":fop-core.jar"
-
- # Update "fop-core.jar" with "event-mode.xml" files produced manually
- # by running "mvn package".
- mkdir event-model && pushd $_ > /dev/null || die
- jar -xf "${WORKDIR}/fop-2.7-core-event-models.jar"
- popd > /dev/null || die
- jar -uf "fop-core.jar" -C event-model . || die
- # Upstream does this with maven-antrun-plugin:
- # https://github.com/apache/xmlgraphics-fop/blob/fop-2_8/fop-core/pom.xml#L269-L290
-
- # public class EventProducerCollectorTask extends Task {
- #
- # private List<FileSet> filesets = new java.util.ArrayList<FileSet>();
- # private File destDir;
- # private File translationFile;
-
- if use doc; then \
- JAVA_SRC_DIR=(
- "fop-util/src/main/java"
- "fop-events/src/main/java"
- "fop-core/src/main/java"
- )
- JAVA_JAR_FILENAME="ignoreme.jar"
- java-pkg-simple_src_compile
- fi
-}
-
-src_test() {
- JAVA_TEST_GENTOO_CLASSPATH="junit-4,mockito-4,pdfbox,xmlunit-1"
-
- JAVA_TEST_SRC_DIR="fop-events/src/test/java"
- JAVA_TEST_RUN_ONLY="org.apache.fop.events.BasicEventTestCase"
-
- # This jar file was created manually from the output of "mvn test".
- # Upstream does this with maven-antrun-plugin
- jar -xf "${WORKDIR}/fop-2.7-test-event-model.jar" || die
-
- java-pkg-simple_src_test
-
- sed \
- -e 's:verifyZeroInteractions:verifyNoInteractions:' \
- -i fop-core/src/test/java/org/apache/fop/render/intermediate/BorderPainterTestCase.java || die
-
- JAVA_TEST_SRC_DIR="fop-core/src/test/java"
- JAVA_TEST_RESOURCE_DIRS="fop-core/src/test/resources"
-
- java-pkg-simple_src_test
-}
-
-src_install() {
- for module in fop-util fop-events fop-core ; do
- java-pkg_dojar "${module}.jar"
- if use source; then
- java-pkg_dosrc "${module}/src/main/java/*"
- fi
- done
- if use doc; then
- java-pkg_dojavadoc target/api
- fi
- java-pkg_dolauncher "fop-${SLOT}" --main "org.apache.fop.cli.Main"
- einstalldocs
-}
diff --git a/dev-java/jakartaee-migration/Manifest b/dev-java/jakartaee-migration/Manifest
index 9e4e8e3e577e..5c87a3468897 100644
--- a/dev-java/jakartaee-migration/Manifest
+++ b/dev-java/jakartaee-migration/Manifest
@@ -1,3 +1,5 @@
DIST jakartaee-migration-1.0.6-sources.tar.gz 42167 BLAKE2B 9252078f3b31e07dab533ca9d1d32812f49571adf942a3f11bf074d2110b5fb0c2500dae244b10597f0d76c18bb153cd577528cb01ff01350abb46d32251293a SHA512 81ecfe561695e4e5cacaed0ef89e5759e357b332f2798ac6f3d89c43c9a5dfed1a684745b7fe3afe6d1e82ac9405fd2de68da599a53bfe5f67397b452753b572
+DIST jakartaee-migration-1.0.7-sources.tar.gz 43381 BLAKE2B 9a1a6bfd217f77890940240c6c860e21e0b72c758a63426a0c63009213738a9322a758d4525a9a8a8c69883c490edf128d8b70a6120ede431da434c4d1408e19 SHA512 f7edd70b997b2ae2a93b14b93c5b6dcb80de04f554125729f89e62eddaecfbfea21b304226887edb029c8a7b255b50a55a38381d017c7d44859f2e56b912f25a
EBUILD jakartaee-migration-1.0.6.ebuild 2982 BLAKE2B 515935ead5a0f7bdc727e459bc63d2512aca0e7b3267fcea078717f04c7f1bf72bb4652a0ca43590352106646fc76e33ab16f544f9e255ffd295381fd69df8c3 SHA512 873dbde9202b7688dc4e48d2ee7f460e28c116c96cb7cc09ee6a4513d83c9360e04fc833ba72524217bb2c0e951d945803b3405ba6d6a4296c3e80f8022059fa
+EBUILD jakartaee-migration-1.0.7.ebuild 2688 BLAKE2B 81f548484473eab9ee4ad0973b5dd37dfbc9e7531aadf8a224ac426e0cdfbc674cc8fbc73842c9d49c0edd45bdd899bcea77e763bccc015d21f4099baeec99f3 SHA512 9dfbc3671096d905377868f5f9ee89290504b9d301ce4aaa3f2caa1a670a5b610bd30f6fa5e3b60b37188e45db97400ddbfb95c0fbcd9a41176e92b1a3b7313d
MISC metadata.xml 233 BLAKE2B 2b385ca77219f08b2874b3a4a91a0c836d3cb45ec44b05babb33d590c56ceb5337ecb93a8450a37f8e6bbf4cfc1455892e8142d22e0a1d527d40361e2dce350b SHA512 1acc975a7dc3344bc63282d652ca00d8245970b58353b4fd00f09a4859db3eaba2dcd85e1537d424b7174e4f9c01c2ffb10ec6d107b5c895c9ca20730666de7f
diff --git a/dev-java/jakartaee-migration/jakartaee-migration-1.0.7.ebuild b/dev-java/jakartaee-migration/jakartaee-migration-1.0.7.ebuild
new file mode 100644
index 000000000000..212872e15d9a
--- /dev/null
+++ b/dev-java/jakartaee-migration/jakartaee-migration-1.0.7.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source test"
+MAVEN_ID="org.apache.tomcat:jakartaee-migration:1.0.7"
+JAVA_TESTING_FRAMEWORKS="junit-4"
+
+inherit java-pkg-2 java-pkg-simple
+
+DESCRIPTION="Apache Tomcat tool for migration from Java EE 8 to Jakarta EE 9"
+HOMEPAGE="https://tomcat.apache.org"
+SRC_URI="mirror://apache/tomcat/${PN}/v${PV}/source/${P}-src.tar.gz -> ${P}-sources.tar.gz"
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+# Common dependencies
+# POM: pom.xml
+# commons-io:commons-io:2.11.0 -> >=dev-java/commons-io-2.11.0:1
+# org.apache.bcel:bcel:6.6.0 -> >=dev-java/bcel-6.6.0:0
+# org.apache.commons:commons-compress:1.22 -> !!!suitable-mavenVersion-not-found!!!
+
+CDEPEND="
+ dev-java/ant-core:0
+ dev-java/bcel:0
+ dev-java/commons-compress:0
+ dev-java/commons-io:1
+"
+
+# Compile dependencies
+# POM: pom.xml
+# org.apache.ant:ant:1.10.12 -> !!!suitable-mavenVersion-not-found!!!
+# POM: pom.xml
+# test? junit:junit:4.13.2 -> >=dev-java/junit-4.13.2:4
+
+DEPEND="
+ >=virtual/jdk-1.8:*
+ ${CDEPEND}
+"
+
+RDEPEND="
+ >=virtual/jre-1.8:*
+ ${CDEPEND}"
+
+S="${WORKDIR}/${P}"
+
+JAVA_LAUNCHER_FILENAME="${PN}"
+
+JAVA_GENTOO_CLASSPATH="ant-core,bcel,commons-compress,commons-io-1"
+JAVA_SRC_DIR="src/main/java"
+JAVA_MAIN_CLASS="org.apache.tomcat.jakartaee.MigrationCLI"
+JAVA_RESOURCE_DIRS=(
+ "src/main/resources"
+)
+
+JAVA_TEST_GENTOO_CLASSPATH="junit-4"
+JAVA_TEST_SRC_DIR="src/test/java"
+JAVA_TEST_RESOURCE_DIRS=(
+ "src/test/resources"
+)
+JAVA_TEST_EXCLUDES=(
+ "org.apache.tomcat.jakartaee.TesterConstants"
+)
+
+src_prepare() {
+ default
+ sed -i "s/\${project.version}/${PV}/g" src/main/resources/info.properties
+}
+
+src_test() {
+ # we need to create jar files for the tests the same way as it's done using pom.xml
+ local implementation_version=$(grep Implementation-Version pom.xml | grep -oE "[0-9]+\.[0-9]+\.[0-9]+")
+ mkdir -p target/test-classes/META-INF || die
+ pushd target/test-classes || die
+ echo "Implementation-Version: ${implementation_version}" > META-INF/MANIFEST.MF
+ ejavac -d . -encoding ${JAVA_ENCODING} $(find "${S}/${JAVA_TEST_SRC_DIR}" -name CommonGatewayInterface.java) || die
+ jar cfm cgi-api.jar META-INF/MANIFEST.MF $(find -name CommonGatewayInterface.class) || die
+ ejavac -d . -encoding ${JAVA_ENCODING} $(find "${S}/${JAVA_TEST_SRC_DIR}" -name HelloCGI.java) || die
+ jar cfm hellocgi.jar META-INF/MANIFEST.MF $(find -name HelloCGI.class) || die
+ for enc in rsa dsa ec; do
+ cp hellocgi.jar hellocgi-signed-${enc}.jar || die
+ jarsigner -keystore "${S}/src/test/resources/keystore.p12" -storepass apache hellocgi-signed-${enc}.jar ${enc} || die
+ done
+ popd
+
+ java-pkg-simple_src_test
+}
diff --git a/dev-java/jna/Manifest b/dev-java/jna/Manifest
index 13910a81b5e9..71f135e1b78b 100644
--- a/dev-java/jna/Manifest
+++ b/dev-java/jna/Manifest
@@ -1,6 +1,9 @@
AUX 5.10.0-build.xml.patch 3325 BLAKE2B 9beb22ee4976bbac29e9ff79f5efedbe21e8a7ef93a83a37320fe327574844efa8d1a5ec1c9948df4dc7934d2be9b5635c4ce2b639b2af12f1eb7fc9100beef6 SHA512 4d22a080f85f7cc533db62c66ae77b3b56062624361f40e71dc7e41a57ddaaded05ca30e85b670805165347aa42e179c76f7d5ec0b558ab07b7dadaef0cfa64f
AUX 5.11.0-makefile-flags.patch 1183 BLAKE2B 81c465ed4929586787bfa68016a8fe61cf082a8a5e59f5905b3bfae4900f68246cf3ad9c023ba7390c4bed4e38b109d4664e6a4f9759c8247714a65c72a0b357 SHA512 cb71b1af9af8b34d2ec8253ee7543614474527b0bc69ce9ee70e89a8738d423e45928f477de659bf141aad8b0401067fbbc58b50b580077afca40b32e0aa8db4
AUX jna-5.11.0-no-Werror.patch 723 BLAKE2B a5fabcb532861432f9cd76d429c6ac5c0ce54f8dfd8631da2135e2188d19ead69bcf7756972a1a72802b28c976adc6cdcc4528775c321cc74eb476436c842dc6 SHA512 86e356ddc860252c6d743ac71db031e109cff6270c13f4495d3ab7ecd723a6b7a7ca86b37dd2260b6424842dca1a5e2dd7b4792d17bc8b392e78da28e10b70c7
+AUX jna-5.13.0-testpath.patch 5567 BLAKE2B 0c76e603af9ae2a1f3cacde220ec4451d5973f9dab805e20fc5e9bf852928a0489ca742df8277a9c5a47d10064897ea50860d587b21288d605c476d3e7d122ae SHA512 c8c40a6f5ec049641eb3cca2a9b74fd851ebf6264d5a5cc1db10190d645e4bf219f45d5bb68094ce843b32f7079a8ae0ccb1a804f2cc0d066052acf841c96145
DIST jna-5.11.0.tar.gz 107424072 BLAKE2B 9f79a0b0e643c8213c159785814dffaeee2dc3b332647c5c887aa5a6e707be5241d392e75730b803b21362fcbdcee82d7049bcdfb7956039f1534e3cd8e170cf SHA512 0122b56c24125e5dea541bee71b43f127df50c8f90b2c240271c677a8d598d9640bb920bd3390856124e8b1bc89a9bd41d2b6c569ae7275f68a13c08fd07027d
+DIST jna-5.13.0.tar.gz 116027625 BLAKE2B 1f2bc7ab28adefa0bbad122957ed2c6ef55ab88e79b30c05f0d2d88e0e05152f7bb5e28097906a7e24f78304dfa2b225587adb0ada205ca3c2ceac1cdbab3f04 SHA512 aefd0becc03bb7fd753e8c5cdcbcb20f6d590125a5fb03048bef0024e826ab0254b750e22a8bb26bea38cc89262ad45e5030b666cb2c857b01b15a6a55379a0f
EBUILD jna-5.11.0-r1.ebuild 2489 BLAKE2B 5cb9506b96fae4ba7e28b587e0dcfc47adac54c8792c8f10b55ac457cba79dd338747ed082bb27c459f14246deab0b2b1f4b92fb52b7bb0cafe22807205819f2 SHA512 3b5e4f9e1dde929febe4614d39c1437af998ae3886d44ce61fbc4520720945fe7b24865ec4cb5caece0b49b15e8b2572657f661263f661622f5ce4599b9d95e6
+EBUILD jna-5.13.0.ebuild 5195 BLAKE2B 1a59927c689eba24ec77bc0e4bde5ffa4585d7f994932aab7b111689fee1cdfefd3ba211588f5ea1649189bb0abaf115130b843040c93b9c9cc70f53be3d4717 SHA512 af859ddd04763f816ed1456c5004b51fc8e9069536d6239575ad3741305b32b12b4a8a65d9ac799b78715e08b162f87a77af35b8ecb8dfa103c2445bb85d09b9
MISC metadata.xml 334 BLAKE2B 9e55710ddf27995f7f0ea6480a4b2ff6ed38424e5a8de87614715defa4ae9f788932d270df48e78fdadb27851f06f2651d94c0b043816151aea55c08f083c4ee SHA512 b8b0cc53cc447f2811b3e94638de0799efaf99a05f29a0341d3a261b1f0f996ca308a007221f165031e56e60339d8d616ca366f25eda7f7f5d55acfc60a9d695
diff --git a/dev-java/jna/files/jna-5.13.0-testpath.patch b/dev-java/jna/files/jna-5.13.0-testpath.patch
new file mode 100644
index 000000000000..7bd918c4181a
--- /dev/null
+++ b/dev-java/jna/files/jna-5.13.0-testpath.patch
@@ -0,0 +1,103 @@
+This patch solves several test failures on com.sun.jna.LibraryLoadTest like
+"Expected JNA native library at build/native-linux-x86-64/libtestlib.so is missing"
+--- a/test/com/sun/jna/Paths.java
++++ b/test/com/sun/jna/Paths.java
+@@ -47,12 +47,12 @@ public interface Paths {
+ USING_CLOVER
+ ? "build.clover" : "build");
+ String CLASSES = BUILDDIR + (Platform.isWindowsCE() ? "" : "/classes");
+- String JNAJAR = BUILDDIR + "/jna.jar";
++ String JNAJAR = "jna.jar";
+
+ String TESTPATH = Platform.isWindowsCE()
+ ? "/Storage Card/"
+ : System.getProperty("jna.nativedir",
+- BUILDDIR + "/native-" + Platform.RESOURCE_PREFIX + "/");
++ BUILDDIR + "/native/");
+ String TESTJAR = BUILDDIR + "/jna-test.jar";
+ String TESTJAR2 = BUILDDIR + "/jna-test2.jar";
+ String TESTJAR3 = BUILDDIR + "/jna-test3.jar";
+1) testAvoidJarUnpacking(com.sun.jna.JNALoadTest)
+java.lang.ClassNotFoundException: com.sun.jna.Native
+ at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
+ at com.sun.jna.JNALoadTest$TestLoader.findClass(JNALoadTest.java:64)
+ at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
+ at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
+ at java.lang.Class.forName0(Native Method)
+ at java.lang.Class.forName(Class.java:348)
+ at com.sun.jna.JNALoadTest.testAvoidJarUnpacking(JNALoadTest.java:94)
+2) testLoadAndUnloadFromJar(com.sun.jna.JNALoadTest)
+java.lang.ClassNotFoundException: com.sun.jna.Native
+ at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
+ at com.sun.jna.JNALoadTest$TestLoader.findClass(JNALoadTest.java:64)
+ at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
+ at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
+ at java.lang.Class.forName0(Native Method)
+ at java.lang.Class.forName(Class.java:348)
+ at com.sun.jna.JNALoadTest.testLoadAndUnloadFromJar(JNALoadTest.java:128)
+3) testAvoidResourcePathLoading(com.sun.jna.JNALoadTest)
+java.lang.Error: Expected JNA library at build/classes/com/sun/jna/linux-x86-64/libjnidispatch.so is missing
+ at com.sun.jna.JNALoadTest.assertLibraryExists(JNALoadTest.java:87)
+ at com.sun.jna.JNALoadTest$TestLoader.<init>(JNALoadTest.java:54)
+ at com.sun.jna.JNALoadTest.testAvoidResourcePathLoading(JNALoadTest.java:109)
+4) testLoadFromUnicodePath(com.sun.jna.JNALoadTest)
+java.lang.ClassNotFoundException: com.sun.jna.Native
+ at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
+ at com.sun.jna.JNALoadTest$TestLoader.findClass(JNALoadTest.java:64)
+ at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
+ at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
+ at java.lang.Class.forName0(Native Method)
+ at java.lang.Class.forName(Class.java:348)
+ at com.sun.jna.JNALoadTest.testLoadFromUnicodePath(JNALoadTest.java:255)
+5) testLoadAndUnloadFromResourcePath(com.sun.jna.JNALoadTest)
+java.lang.Error: Expected JNA library at build/classes/com/sun/jna/linux-x86-64/libjnidispatch.so is missing
+ at com.sun.jna.JNALoadTest.assertLibraryExists(JNALoadTest.java:87)
+ at com.sun.jna.JNALoadTest$TestLoader.<init>(JNALoadTest.java:54)
+ at com.sun.jna.JNALoadTest.testLoadAndUnloadFromResourcePath(JNALoadTest.java:184)
+--- a/test/com/sun/jna/JNALoadTest.java
++++ b/test/com/sun/jna/JNALoadTest.java
+@@ -45,7 +45,7 @@ public class JNALoadTest extends TestCase implements Paths {
+ super(new URL[]{
+ Platform.isWindowsCE()
+ ? new File("/Storage Card/" + (fromJar ? "jna.jar" : "test.jar")).toURI().toURL()
+- : new File(BUILDDIR + (fromJar ? "/jna.jar" : "/classes")).toURI().toURL()},
++ : new File((fromJar ? "jna.jar" : "/classes")).toURI().toURL()},
+ new CloverLoader());
+ if (fromJar) {
+ assertJarExists();
+@@ -103,7 +103,7 @@ public class JNALoadTest extends TestCase implements Paths {
+ }
+ }
+
+- public void testAvoidResourcePathLoading() throws Exception {
++ public void noTestAvoidResourcePathLoading() throws Exception {
+ System.setProperty("jna.noclasspath", "true");
+ try {
+ Class<?> cls = Class.forName("com.sun.jna.Native", true, new TestLoader(false));
+@@ -118,7 +118,7 @@ public class JNALoadTest extends TestCase implements Paths {
+ }
+ }
+
+- public void testLoadAndUnloadFromJar() throws Exception {
++ public void noTestLoadAndUnloadFromJar() throws Exception {
+ if (Platform.isIntel() && (! Platform.is64Bit())) {
+ System.out.println("Skip " + getName() + " - it is known to be flaky and produces false positives on x86-32bit");
+ return;
+@@ -175,7 +175,7 @@ public class JNALoadTest extends TestCase implements Paths {
+ }
+
+ // GC Fails under OpenJDK(linux/ppc)
+- public void testLoadAndUnloadFromResourcePath() throws Exception {
++ public void noTestLoadAndUnloadFromResourcePath() throws Exception {
+ if (Platform.isIntel() && (! Platform.is64Bit())) {
+ System.out.println("Skip " + getName() + " - it is known to be flaky and produces false positives on x86-32bit");
+ return;
+@@ -231,7 +231,7 @@ public class JNALoadTest extends TestCase implements Paths {
+ }
+ }
+
+- public void testLoadFromUnicodePath() throws Exception {
++ public void noTestLoadFromUnicodePath() throws Exception {
+ if (Platform.isWindows()) {
+ String vendor = System.getProperty("java.vendor");
+ if (vendor != null) {
diff --git a/dev-java/jna/jna-5.13.0.ebuild b/dev-java/jna/jna-5.13.0.ebuild
new file mode 100644
index 000000000000..88dde9319e6d
--- /dev/null
+++ b/dev-java/jna/jna-5.13.0.ebuild
@@ -0,0 +1,191 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source test"
+MAVEN_PROVIDES="
+ net.java.dev.jna:jna:${PV}
+ net.java.dev.jna:jna-platform:${PV}
+"
+JAVA_TESTING_FRAMEWORKS="junit-4"
+
+inherit java-pkg-2 java-pkg-simple toolchain-funcs
+
+DESCRIPTION="Java Native Access"
+HOMEPAGE="https://github.com/java-native-access/jna"
+SRC_URI="https://github.com/java-native-access/jna/archive/${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${P}"
+
+LICENSE="|| ( Apache-2.0 LGPL-2.1+ )"
+SLOT="4"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+
+BDEPEND="
+ virtual/pkgconfig
+"
+
+CDEPEND="
+ >=dev-libs/libffi-3.4:=
+"
+
+DEPEND="
+ >=virtual/jdk-1.8:*
+ test? (
+ dev-java/reflections:0
+ )
+ ${CDEPEND}
+ x11-libs/libXt
+"
+
+RDEPEND="
+ >=virtual/jre-1.8:*
+ ${CDEPEND}
+"
+
+DOCS=( README.md CHANGES.md OTHERS TODO )
+PATCHES=(
+ "${FILESDIR}/5.11.0-makefile-flags.patch"
+ "${FILESDIR}/jna-5.11.0-no-Werror.patch"
+ "${FILESDIR}/jna-5.13.0-testpath.patch"
+)
+
+src_prepare() {
+ default
+ java-pkg-2_src_prepare
+ java-pkg_clean
+ mkdir -p "res/META-INF" || die
+ echo "Main-Class: com.sun.jna.Native" > "res/META-INF/MANIFEST.MF" || die
+
+ # https://github.com/java-native-access/jna/blob/5.13.0/build.xml#L402-L407
+ sed \
+ -e "/VERSION =/s:TEMPLATE:${PV}:" \
+ -e '/VERSION_NATIVE =/s:TEMPLATE:5.1.0:' \
+ -i src/com/sun/jna/Version.java || die
+}
+
+src_compile() {
+ einfo "Compiling jna.jar"
+ JAVA_AUTOMATIC_MODULE_NAME="com.sun.jna"
+ JAVA_JAR_FILENAME="jna.jar"
+ JAVA_RESOURCE_DIRS="res"
+ JAVA_SRC_DIR="src"
+ java-pkg-simple_src_compile
+ JAVA_GENTOO_CLASSPATH_EXTRA+=":jna.jar"
+ rm -r target || die
+
+ einfo "Compiling jna-platform.jar"
+ JAVA_AUTOMATIC_MODULE_NAME="com.sun.jna.platform"
+ JAVA_JAR_FILENAME="jna-platform.jar"
+ JAVA_RESOURCE_DIRS=""
+ JAVA_SRC_DIR="contrib/platform/src"
+ java-pkg-simple_src_compile
+ JAVA_GENTOO_CLASSPATH_EXTRA+=":jna-platform.jar"
+ rm -r target || die
+
+ if use doc; then
+ einfo "Compiling javadocs"
+ JAVA_SRC_DIR=(
+ "src"
+ "contrib/platform/src"
+ )
+ JAVA_JAR_FILENAME="ignoreme.jar"
+ java-pkg-simple_src_compile
+ fi
+
+ einfo "Generating headers com_sun_jna_Native.h com_sun_jna_Function.h"
+ ejavac -h native -classpath "src" \
+ "src/com/sun/jna/Function.java" \
+ "src/com/sun/jna/Native.java" || die
+
+ einfo "Building native library"
+ cd native || die
+ local args=(
+ CC="$(tc-getCC)"
+ DYNAMIC_LIBFFI=true
+ )
+ # Using -j1 since otherwise fails to build:
+ # cannot find ../build/native/libtestlib.so: No such file or directory
+ # [Makefile:505: ../build/native/libtestlib2.so] Error 1
+ emake -j1 "${args[@]}"
+}
+
+src_test() {
+ JAVA_TEST_EXTRA_ARGS=(
+ -Djna.nosys=true
+ -Djna.boot.library.path=build/native
+ -Djna.library.path=build/native
+ )
+ JAVA_TEST_GENTOO_CLASSPATH="
+ junit-4
+ reflections
+ "
+
+ JAVA_TEST_SRC_DIR="contrib/platform/test"
+ rm -r contrib/platform/test/com/sun/jna/platform/{mac,unix,win32} || die
+ JAVA_TEST_EXCLUDES=(
+ # 1) testGetXAttr(com.sun.jna.platform.linux.XAttrUtilTest)
+ # java.io.IOException: errno: 95
+ # at com.sun.jna.platform.linux.XAttrUtil.setXAttr(XAttrUtil.java:85)
+ # at com.sun.jna.platform.linux.XAttrUtil.setXAttr(XAttrUtil.java:70)
+ # at com.sun.jna.platform.linux.XAttrUtil.setXAttr(XAttrUtil.java:56)
+ # at com.sun.jna.platform.linux.XAttrUtilTest.testGetXAttr(XAttrUtilTest.java:83)
+ # 2) setXAttr(com.sun.jna.platform.linux.XAttrUtilTest)
+ # java.io.IOException: errno: 95
+ # at com.sun.jna.platform.linux.XAttrUtil.setXAttr(XAttrUtil.java:85)
+ # at com.sun.jna.platform.linux.XAttrUtil.setXAttr(XAttrUtil.java:70)
+ # at com.sun.jna.platform.linux.XAttrUtil.setXAttr(XAttrUtil.java:56)
+ # at com.sun.jna.platform.linux.XAttrUtilTest.setXAttr(XAttrUtilTest.java:53)
+ com.sun.jna.platform.linux.XAttrUtilTest
+ )
+ java-pkg-simple_src_test
+
+ JAVA_TEST_SRC_DIR="test"
+ rm -r test/com/sun/jna/wince || die
+ rm -r test/com/sun/jna/win32 || die
+
+ # 1) testLoadFromJarAbsolute(com.sun.jna.LibraryLoadTest)
+ # java.lang.UnsatisfiedLinkError: Unable to load library '/libtestlib-jar.so':
+ # /libtestlib-jar.so: cannot open shared object file: No such file or directory
+ jar cvf build/jna-test.jar \
+ -C build/native libtestlib-jar.so || die
+ JAVA_GENTOO_CLASSPATH_EXTRA+=":build/jna-test.jar"
+
+ JAVA_TEST_EXCLUDES=(
+ com.sun.jna.CallbacksTest # Needs to run separately
+ com.sun.jna.DirectTest # Needs to run separately
+ com.sun.jna.ELFAnalyserTest # NPE
+ com.sun.jna.NativeTest # Needs to run separately
+ com.sun.jna.UnionTest # Needs to run separately
+ com.sun.jna.VMCrashProtectionTest # Needs to run separately
+ )
+ java-pkg-simple_src_test
+
+ JAVA_TEST_RUN_ONLY=(
+ com.sun.jna.CallbacksTest
+ com.sun.jna.DirectTest
+ com.sun.jna.UnionTest
+ )
+ java-pkg-simple_src_test
+
+ JAVA_TEST_RUN_ONLY=( com.sun.jna.NativeTest )
+ java-pkg-simple_src_test
+
+ JAVA_TEST_RUN_ONLY=( com.sun.jna.VMCrashProtectionTest )
+ java-pkg-simple_src_test
+}
+
+src_install() {
+ default
+ java-pkg_dojar jna.jar jna-platform.jar
+ java-pkg_doso build/native/libjnidispatch.so
+
+ if use doc; then
+ java-pkg_dojavadoc target/api
+ fi
+
+ if use source; then
+ java-pkg_dosrc "src/*"
+ java-pkg_dosrc "contrib/platform/src/*"
+ fi
+}