diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-12-20 13:50:54 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-12-20 13:50:54 +0000 |
commit | aec6329fe6b56821fd643ccaacb4d5d61f4eaad6 (patch) | |
tree | 8c6e7db4b9a4a624121681a167e21bda8e3cfeec /dev-java/jna | |
parent | 0c8ede87a5d0aa1ec25364a435296ec7aa8b9634 (diff) |
gentoo auto-resync : 20:12:2023 - 13:50:54
Diffstat (limited to 'dev-java/jna')
-rw-r--r-- | dev-java/jna/Manifest | 2 | ||||
-rw-r--r-- | dev-java/jna/jna-5.14.0.ebuild | 197 |
2 files changed, 199 insertions, 0 deletions
diff --git a/dev-java/jna/Manifest b/dev-java/jna/Manifest index 51c7b5c2561c..09c1bf097183 100644 --- a/dev-java/jna/Manifest +++ b/dev-java/jna/Manifest @@ -3,5 +3,7 @@ AUX jna-5.11.0-no-Werror.patch 723 BLAKE2B a5fabcb532861432f9cd76d429c6ac5c0ce54 AUX jna-5.13.0-LibCTest.patch 456 BLAKE2B 51dc724df52af7dbc8700dd7adae2d9db32c159e1ef2f54333c1defb639088c5feeb0b2f3ec24da1cb296dcd1926bcafc5c06d9b68bae49eb482b85deedf094f SHA512 a1a6f4e36bc487efefb376d9747f770523666d3c0f6e4e23ae2129616da25f6732c9fe9c4d7e5ca1928292e56ef2924a5155dedc2751d86eadcd670a97c05ebc AUX jna-5.13.0-testpath.patch 5567 BLAKE2B 0c76e603af9ae2a1f3cacde220ec4451d5973f9dab805e20fc5e9bf852928a0489ca742df8277a9c5a47d10064897ea50860d587b21288d605c476d3e7d122ae SHA512 c8c40a6f5ec049641eb3cca2a9b74fd851ebf6264d5a5cc1db10190d645e4bf219f45d5bb68094ce843b32f7079a8ae0ccb1a804f2cc0d066052acf841c96145 DIST jna-5.13.0.tar.gz 116027625 BLAKE2B 1f2bc7ab28adefa0bbad122957ed2c6ef55ab88e79b30c05f0d2d88e0e05152f7bb5e28097906a7e24f78304dfa2b225587adb0ada205ca3c2ceac1cdbab3f04 SHA512 aefd0becc03bb7fd753e8c5cdcbcb20f6d590125a5fb03048bef0024e826ab0254b750e22a8bb26bea38cc89262ad45e5030b666cb2c857b01b15a6a55379a0f +DIST jna-5.14.0.tar.gz 116167104 BLAKE2B 3ccb9e53e843690f9c90272c2e94fb2d903dd9bbcb7b6294a6ed3d973d3945c2b3fe5ac5e4c472830a7d07f4f32d84e781bb2ae3bd73cdd1894392331554e2cd SHA512 5758898052b3b099cd8b40046f764813377970a428e66370ba2a7125403661e25379d55fdb0ff75de32d66cbff20f0a05f438b2ca18804cc53f2edf4b1927ff0 EBUILD jna-5.13.0-r1.ebuild 5371 BLAKE2B e602540182d854b542666e8cc2dcf396203487542a82a405e7f06699bcad5d7273b3a77d8f4e10cc971a85d9e51f1995e0f50eec76d5d1b17be715d852a9afdc SHA512 9514edf58980dd4c2d237020f50c86d55686e987fed5721f35bc19976a48470a05737587770038b4100e8f0a1a6081902319bbc6b801865bfc1da83c8d24f2e0 +EBUILD jna-5.14.0.ebuild 5375 BLAKE2B c85bb8999093aef9e5033a727d7ea6c220b457c13f4601a7136cfbd40dfeef1c1c7bd1fb69bece51c8b689863851ca993f143ecf34c41e153b69e339cdf8e299 SHA512 97f01bcba1e02e679b726e9ab397ced555f543c6e71c76fd0c9f5db0966f8fe82d4e4d5b6e066757593989ce4bb66a14d007713532345218cc89a187e0cb9acb MISC metadata.xml 334 BLAKE2B 9e55710ddf27995f7f0ea6480a4b2ff6ed38424e5a8de87614715defa4ae9f788932d270df48e78fdadb27851f06f2651d94c0b043816151aea55c08f083c4ee SHA512 b8b0cc53cc447f2811b3e94638de0799efaf99a05f29a0341d3a261b1f0f996ca308a007221f165031e56e60339d8d616ca366f25eda7f7f5d55acfc60a9d695 diff --git a/dev-java/jna/jna-5.14.0.ebuild b/dev-java/jna/jna-5.14.0.ebuild new file mode 100644 index 000000000000..5a2384e5a276 --- /dev/null +++ b/dev-java/jna/jna-5.14.0.ebuild @@ -0,0 +1,197 @@ +# 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" + "${FILESDIR}/jna-5.13.0-LibCTest.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)" + STRIP=true + 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 \ + -C test com/sun/jna/data || 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.NativeTest # Needs to run separately + com.sun.jna.TypeMapperTest # 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 + + JAVA_TEST_RUN_ONLY=( com.sun.jna.TypeMapperTest ) + 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 +} |