public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Miroslav Šulc" <fordfrog@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/jna/
Date: Wed, 30 Oct 2024 11:42:06 +0000 (UTC)	[thread overview]
Message-ID: <1730288519.55d8a20f7d4b1a13fbe68afc83a07f7b2cbde3d7.fordfrog@gentoo> (raw)

commit:     55d8a20f7d4b1a13fbe68afc83a07f7b2cbde3d7
Author:     Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net>
AuthorDate: Tue Oct 29 19:11:13 2024 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Wed Oct 30 11:41:59 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55d8a20f

dev-java/jna: add 5.15.0

Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net>
Closes: https://github.com/gentoo/gentoo/pull/38836/commits/4f0d9142885ae64f0a8b11e9dcd0ff59b57678c5
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 dev-java/jna/Manifest          |   1 +
 dev-java/jna/jna-5.15.0.ebuild | 198 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 199 insertions(+)

diff --git a/dev-java/jna/Manifest b/dev-java/jna/Manifest
index 667bee66b18f..4353b9b342f6 100644
--- a/dev-java/jna/Manifest
+++ b/dev-java/jna/Manifest
@@ -1,2 +1,3 @@
 DIST jna-5.13.0.tar.gz 116027625 BLAKE2B 1f2bc7ab28adefa0bbad122957ed2c6ef55ab88e79b30c05f0d2d88e0e05152f7bb5e28097906a7e24f78304dfa2b225587adb0ada205ca3c2ceac1cdbab3f04 SHA512 aefd0becc03bb7fd753e8c5cdcbcb20f6d590125a5fb03048bef0024e826ab0254b750e22a8bb26bea38cc89262ad45e5030b666cb2c857b01b15a6a55379a0f
 DIST jna-5.14.0.tar.gz 116167104 BLAKE2B 3ccb9e53e843690f9c90272c2e94fb2d903dd9bbcb7b6294a6ed3d973d3945c2b3fe5ac5e4c472830a7d07f4f32d84e781bb2ae3bd73cdd1894392331554e2cd SHA512 5758898052b3b099cd8b40046f764813377970a428e66370ba2a7125403661e25379d55fdb0ff75de32d66cbff20f0a05f438b2ca18804cc53f2edf4b1927ff0
+DIST jna-5.15.0.tar.gz 117272793 BLAKE2B e16f507df75715a73d2d9e35d6a31868723effdb14f86ddfdd5c49c2e925f73c6cba8375660d3b89ecd72ab54d58f14bc1347671ccf40dfe32288230629de49b SHA512 b3329138bbdb5040da7a6b305af37e46ffd02948551f5c9fc2815eb7a66946807c3b9152797808b5a171735d6a1a241f25dc0ef95ecacf897926135727d1d533

diff --git a/dev-java/jna/jna-5.15.0.ebuild b/dev-java/jna/jna-5.15.0.ebuild
new file mode 100644
index 000000000000..54ff9fa70c4c
--- /dev/null
+++ b/dev-java/jna/jna-5.15.0.ebuild
@@ -0,0 +1,198 @@
+# Copyright 1999-2024 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 ~arm64 ~ppc64"
+
+BDEPEND="
+	virtual/pkgconfig
+"
+
+CDEPEND="
+	>=dev-libs/libffi-3.4:=
+"
+
+DEPEND="
+	>=virtual/jdk-1.8:*
+	x11-base/xorg-proto:0
+	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 #780585
+	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
+}


             reply	other threads:[~2024-10-30 12:18 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-30 11:42 Miroslav Šulc [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-04-01 13:58 [gentoo-commits] repo/gentoo:master commit in: dev-java/jna/ Florian Schmaus
2025-03-08  7:39 Arthur Zamarin
2025-03-01  4:41 Sam James
2025-03-01  0:02 Jakov Smolić
2025-02-27 11:33 Sam James
2025-02-02 10:17 Miroslav Šulc
2024-11-29 14:30 Arthur Zamarin
2024-01-29  8:28 Miroslav Šulc
2024-01-19 10:47 Sam James
2024-01-19 10:07 Sam James
2024-01-19 10:07 Sam James
2023-12-20  9:19 Miroslav Šulc
2023-09-29  5:53 Miroslav Šulc
2023-09-29  5:53 Miroslav Šulc
2023-09-17 14:28 Arthur Zamarin
2023-07-18  9:53 Sam James
2023-06-19 14:18 Sam James
2023-06-19 14:18 Sam James
2023-05-20  9:39 Sam James
2023-05-08 17:36 Sam James
2022-07-22 21:31 Florian Schmaus
2022-07-07  4:03 Miroslav Šulc
2022-07-06 18:26 Arthur Zamarin
2022-07-02 12:23 Agostino Sarubbo
2022-07-02 12:20 Agostino Sarubbo
2022-07-02  7:18 Jakov Smolić
2022-06-15 16:15 Arthur Zamarin
2022-06-15 16:15 Arthur Zamarin
2022-06-15 14:30 Agostino Sarubbo
2022-06-15  7:36 Jakov Smolić
2022-05-12  7:09 Florian Schmaus
2022-04-19  7:43 Florian Schmaus
2022-01-14 15:07 Arthur Zamarin
2022-01-09  9:07 Miroslav Šulc
2022-01-08 13:08 Miroslav Šulc
2022-01-08 10:17 Arthur Zamarin
2022-01-08 10:17 Arthur Zamarin
2021-11-26  9:23 Sam James
2021-11-12  8:16 Agostino Sarubbo
2021-11-11 11:35 Agostino Sarubbo
2021-07-10 18:54 Sam James
2021-06-14  6:39 Sergei Trofimovich
2021-06-12 13:19 Miroslav Šulc
2021-06-12  9:59 Miroslav Šulc
2021-04-25 17:52 Miroslav Šulc
2020-11-16 22:53 Sergei Trofimovich
2018-11-04 15:16 Pacho Ramos
2018-03-17 13:37 Pacho Ramos
2018-03-17 13:37 Pacho Ramos
2016-11-06 11:19 James Le Cuirot
2016-11-06 11:19 James Le Cuirot
2016-06-28 12:29 Patrick Lauer
2016-05-11 21:07 James Le Cuirot
2015-09-30 23:07 Patrice Clement

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1730288519.55d8a20f7d4b1a13fbe68afc83a07f7b2cbde3d7.fordfrog@gentoo \
    --to=fordfrog@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox