diff options
author | Yuan Liao <liaoyuan@gmail.com> | 2022-04-06 10:21:00 -0700 |
---|---|---|
committer | Florian Schmaus <flow@gentoo.org> | 2022-05-12 09:02:17 +0200 |
commit | bad35473d260faac34b0531d04e947de1bed88aa (patch) | |
tree | ee02233427cc5376247548b7831d3a934e0f0038 /dev-java/jna | |
parent | dev-java/jna: Use JUnit 4 to run tests for 5.10.0 (diff) | |
download | gentoo-bad35473d260faac34b0531d04e947de1bed88aa.tar.gz gentoo-bad35473d260faac34b0531d04e947de1bed88aa.tar.bz2 gentoo-bad35473d260faac34b0531d04e947de1bed88aa.zip |
dev-java/jna: Add 5.11.0
Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/24935
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'dev-java/jna')
-rw-r--r-- | dev-java/jna/Manifest | 1 | ||||
-rw-r--r-- | dev-java/jna/jna-5.11.0.ebuild | 99 |
2 files changed, 100 insertions, 0 deletions
diff --git a/dev-java/jna/Manifest b/dev-java/jna/Manifest index ac70c75ad8e2..516edfa4d5b6 100644 --- a/dev-java/jna/Manifest +++ b/dev-java/jna/Manifest @@ -1,2 +1,3 @@ DIST jna-4.2.2.tar.gz 58638853 BLAKE2B 3941202ad7839f748c65f1abf53a335f6de7959def06de27a30520457147af3f70f6de54d640718b8314f6e61ab61ee9b26c39812d5cb1f918b8ff714d6b902e SHA512 11ab524f87f6dc7fe3ac8eb0620f9ba392445147770304be7b7fa5cd49de8efed983ad30c16077bfa6419eaf1ff50311a3ded811a78fdcd09bc686ef93ad7f9f DIST jna-5.10.0.tar.gz 106258319 BLAKE2B f5605fd91bacc1e900e835494c27b0fdb4ba91b0c04bad1757133bed5938603264ce9fba89c5ce7e4644456b752b934f6e205d0131659e77bf0c58c2b44c61cd SHA512 93e1ab659a60d711557eb93620bcbd05f3dbe9c739b256cfb647d8ac2a4038d0bc638c614b58339b2875017ac18b219a4ddeb0d92e5ca25fef2e326bc14ae256 +DIST jna-5.11.0.tar.gz 107424072 BLAKE2B 9f79a0b0e643c8213c159785814dffaeee2dc3b332647c5c887aa5a6e707be5241d392e75730b803b21362fcbdcee82d7049bcdfb7956039f1534e3cd8e170cf SHA512 0122b56c24125e5dea541bee71b43f127df50c8f90b2c240271c677a8d598d9640bb920bd3390856124e8b1bc89a9bd41d2b6c569ae7275f68a13c08fd07027d diff --git a/dev-java/jna/jna-5.11.0.ebuild b/dev-java/jna/jna-5.11.0.ebuild new file mode 100644 index 000000000000..be8f367f117d --- /dev/null +++ b/dev-java/jna/jna-5.11.0.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +JAVA_PKG_IUSE="doc source test" +MAVEN_ID="net.java.dev.jna:jna:5.11.0" + +inherit java-pkg-2 java-ant-2 toolchain-funcs + +DESCRIPTION="Java Native Access" +HOMEPAGE="https://github.com/java-native-access/jna" +SRC_URI="https://github.com/java-native-access/jna/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + +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:* + dev-java/animal-sniffer-annotations:0 + dev-java/ant-core:0 + dev-java/asm:9 + test? ( + dev-java/ant-junit4:0 + dev-java/junit:4 + dev-java/reflections:0 + ) + ${CDEPEND} + x11-libs/libXt +" + +RDEPEND=" + >=virtual/jre-1.8:* + ${CDEPEND} +" + +DOCS=( README.md CHANGES.md OTHERS TODO ) +PATCHES=( + "${FILESDIR}/5.10.0-build.xml.patch" + "${FILESDIR}/4.2.2-makefile-flags.patch" +) + +JAVA_ANT_REWRITE_CLASSPATH="true" +JAVA_PKG_BSFIX_NAME="build.xml build-ant-tools.xml" +EANT_BUILD_TARGET="jar contrib-jars" +EANT_EXTRA_ARGS="-Dbuild-native=true -Dcompatibility=1.8 -Ddynlink.native=true" +EANT_TEST_EXTRA_ARGS="-Djava.io.tmpdir=\"${T}\"" +EANT_TEST_GENTOO_CLASSPATH="animal-sniffer-annotations,reflections" + +pkg_setup() { + java-pkg-2_pkg_setup + + EANT_GENTOO_CLASSPATH_EXTRA="$(java-pkg_getjars --build-only \ + animal-sniffer-annotations,ant-core,asm-9)" + + # Any spaces in paths returned by toolchain-funcs and options like MAKEOPTS + # could cause trouble in EANT_EXTRA_ARGS when Java eclasses process the + # variable's value, so define them in ANT_OPTS instead + ANT_OPTS="-DCC='$(tc-getCC)'" + # Parallel build does not respect dependency relationships between objects + ANT_OPTS+=" -DEXTRA_MAKE_OPTS='${MAKEOPTS} -j1'" +} + +src_prepare() { + default + + # Eliminate build.xml's dependency on bundled native JARs + sed -i -e '/zipfileset src="${lib.native}/,+2d' build.xml || + die "Failed to delete lines referencing bundled JARs in build.xml" + + # Clean up bundled JARs and libffi + java-pkg_clean + rm -r native/libffi || die "Failed to remove bundled libffi" + + java-pkg-2_src_prepare +} + +src_test() { + java-pkg-2_src_test +} + +src_install() { + java-pkg_newjar "build/${PN}-min.jar" + java-pkg_dojar "contrib/platform/dist/${PN}-platform.jar" + java-pkg_doso build/native-*/libjnidispatch.so + einstalldocs + + use source && java-pkg_dosrc src/* + use doc && java-pkg_dojavadoc doc/javadoc +} |