summaryrefslogtreecommitdiff
path: root/dev-java/jna
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-java/jna
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-java/jna')
-rw-r--r--dev-java/jna/Manifest7
-rw-r--r--dev-java/jna/files/4.2.2-build.xml.patch23
-rw-r--r--dev-java/jna/files/4.2.2-makefile-flags.patch25
-rw-r--r--dev-java/jna/jna-3.4.1.ebuild89
-rw-r--r--dev-java/jna/jna-4.2.2-r1.ebuild86
-rw-r--r--dev-java/jna/metadata.xml15
6 files changed, 245 insertions, 0 deletions
diff --git a/dev-java/jna/Manifest b/dev-java/jna/Manifest
new file mode 100644
index 000000000000..d15ec586e86d
--- /dev/null
+++ b/dev-java/jna/Manifest
@@ -0,0 +1,7 @@
+AUX 4.2.2-build.xml.patch 819 BLAKE2B 5f411361cd566360206c996ff5c2c508e829e41bb56868dce428da1347ab91f7fc8e1230b6aca3e82806c80b23a038966f690a16f99b43b5b2594bca543cb606 SHA512 8d2e0552690c9282ce93e39aa489c1fd829e5e63e39c6e6db935b6b5e2308a3ee3cbe1a274ebf2ba59d9819dd4f618d89e22194a9f88dec0763d2a36cd3ca44e
+AUX 4.2.2-makefile-flags.patch 925 BLAKE2B 642982867b5c187345123725f5e19bccb363915aefc5ea6e69f02e9ca86efee1e5f466c7cb9abf1b2871a735c45f8b7adaf999e42a351e01e515ecdc6648387e SHA512 be29adfff3b92875b38cf9bb326d935a189555bbb10315412b2544b43698cf76132554df64f28a18d4910ef1c46daf8b0a2ef9db7a9bca1ab53c421504187e54
+DIST jna-3.4.1.tar.gz 35285043 BLAKE2B 192f893f25c692a80d8b3ea0b469e951ef45ea561a02f1ec2ac8292f37ac32df468c7bb04211f1009314da4d7acba8ab9220114980b3f30b56af5f2310d5a18a SHA512 8164de9d213f670e6408627ec13fc128802351c2b906e1e1e95fd3280917ef1eba24d8b6b913a9df8034d20a5d46f6f823b5ee2d18b83248093a1855c89c5917
+DIST jna-4.2.2.tar.gz 58638853 BLAKE2B 3941202ad7839f748c65f1abf53a335f6de7959def06de27a30520457147af3f70f6de54d640718b8314f6e61ab61ee9b26c39812d5cb1f918b8ff714d6b902e SHA512 11ab524f87f6dc7fe3ac8eb0620f9ba392445147770304be7b7fa5cd49de8efed983ad30c16077bfa6419eaf1ff50311a3ded811a78fdcd09bc686ef93ad7f9f
+EBUILD jna-3.4.1.ebuild 2294 BLAKE2B 9f9fe1c1498fe1e9d61d18a060d4110edb2c20f2f2ef87b3d0ea659f2c2205df2b02744eae9bf550f4868a8a1a8075d95caada773b6f42faa813475d36da08c3 SHA512 c81cbf7dfb8d3a54833a41f94fd763e7d6945c526a1651900c709514fbc3b32008f71de229e73188bf483f491dffd7b5778d9e6e4a6832defa89ae03f5961320
+EBUILD jna-4.2.2-r1.ebuild 2076 BLAKE2B b85f776feb0e705df3ca22af489d9095c30bd5085f08619de393edc8401ff4f1494d33988607b8c7cd815fd2ca0a03888723d87e93dee1a1d2a4aa85fb02fa8a SHA512 6b6485c517432b2e03c620dcab0fbec437dda6dfffe856b097d9bb71d9ba64a97609fd2f84afd152b14f2c3acc3c52ce67e701e2f026ceaff056c5185202c135
+MISC metadata.xml 462 BLAKE2B 7ad9e0cb48ce7fdfae4bdc10bf3cb6d6c25a7f86d62dbb9041d0ad2fe04409477eb27754b5f53218fba657f7ed77b423b34bea92bffb61c37ee2eefdcccc3a3b SHA512 88a027ef32c55e551625950ecb2efffc75a7611568f11a4abdcddd4fe24b894eb7d8fb805cba3fc0f79ddf6fae6116804790fc24b3d5b6097ade9ad92ed4c118
diff --git a/dev-java/jna/files/4.2.2-build.xml.patch b/dev-java/jna/files/4.2.2-build.xml.patch
new file mode 100644
index 000000000000..de49c24b1912
--- /dev/null
+++ b/dev-java/jna/files/4.2.2-build.xml.patch
@@ -0,0 +1,23 @@
+--- a/build.xml 2016-03-16 14:37:28.000000000 +0000
++++ b/build.xml 2016-04-16 22:22:27.692967205 +0100
+@@ -320,7 +320,9 @@
+ <pathelement path="${build}/${jar}"/>
+ <pathelement path="${test.classes}"/>
+ <pathelement path="${build}/${testjar}"/>
++ <!--
+ <pathelement path="lib/clover.jar"/>
++ -->
+ <path refid="test.libs"/>
+ </path>
+ </target>
+@@ -909,8 +911,10 @@
+ <mkdir dir="${build}/jws"/>
+ <copy todir="${build}/jws" file="${build}/${jar}"/>
+ <copy todir="${build}/jws" file="${build}/${testjar}"/>
++ <!--
+ <copy todir="${build}/jws" file="lib/junit.jar"/>
+ <copy todir="${build}/jws" file="lib/clover.jar"/>
++ -->
+ <jar jarfile="${build}/jws/jnidispatch.jar">
+ <fileset dir="${build.native}" includes="*jnidispatch.*"/>
+ </jar>
diff --git a/dev-java/jna/files/4.2.2-makefile-flags.patch b/dev-java/jna/files/4.2.2-makefile-flags.patch
new file mode 100644
index 000000000000..3e290ece4e78
--- /dev/null
+++ b/dev-java/jna/files/4.2.2-makefile-flags.patch
@@ -0,0 +1,25 @@
+--- a/native/Makefile 2016-03-16 14:37:28.000000000 +0000
++++ b/native/Makefile 2016-04-16 22:27:06.426345376 +0100
+@@ -81,7 +81,7 @@
+ LIBSFX=.so
+ ARSFX=.a
+ JNISFX=$(LIBSFX)
+-CC=gcc
++CC?=gcc
+ LD=$(CC)
+ LIBS=
+ # Default to Sun recommendations for JNI compilation
+@@ -94,10 +94,10 @@
+ COUT=-o $@
+ CINCLUDES=$(JAVA_INCLUDES) -I"$(JAVAH)" -I$(FFI_BUILD)/include
+ CDEFINES=-D_REENTRANT
+-PCFLAGS=-W -Wall -Wno-unused -Wno-parentheses
+-CFLAGS=$(PCFLAGS) $(CFLAGS_EXTRA) $(COPT) $(CDEBUG) $(CDEFINES) $(CINCLUDES) \
++PCFLAGS=-Wall -Wno-unused -Wno-parentheses
++CFLAGS+= $(PCFLAGS) $(CFLAGS_EXTRA) $(COPT) $(CDEBUG) $(CDEFINES) $(CINCLUDES) \
+ -DJNA_JNI_VERSION='"$(JNA_JNI_VERSION)"' -DCHECKSUM='"$(CHECKSUM)"'
+-LDFLAGS=-o $@ -shared
++LDFLAGS+= -o $@ -shared
+ ifeq ($(DYNAMIC_LIBFFI),true)
+ CFLAGS += $(shell pkg-config --cflags libffi 2>/dev/null || echo)
+ LIBS += $(shell pkg-config --libs libffi 2>/dev/null || echo -lffi)
diff --git a/dev-java/jna/jna-3.4.1.ebuild b/dev-java/jna/jna-3.4.1.ebuild
new file mode 100644
index 000000000000..0a2dbc3a57ed
--- /dev/null
+++ b/dev-java/jna/jna-3.4.1.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+JAVA_PKG_IUSE="test doc source"
+WANT_ANT_TASKS="ant-nodeps"
+
+inherit java-pkg-2 java-ant-2 toolchain-funcs flag-o-matic vcs-snapshot
+
+DESCRIPTION="Java Native Access (JNA)"
+HOMEPAGE="https://github.com/twall/jna#readme"
+SRC_URI="https://github.com/twall/jna/tarball/${PV} -> ${P}.tar.gz"
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="+awt +nio-buffers"
+REQUIRED_USE="test? ( awt nio-buffers )"
+
+CDEPEND="
+ virtual/libffi"
+RDEPEND="${CDEPEND}
+ >=virtual/jre-1.6"
+DEPEND="${CDEPEND}
+ >=virtual/jdk-1.6
+ virtual/pkgconfig
+ test? (
+ dev-java/junit:0
+ dev-java/ant-core:0
+ dev-java/ant-junit:0
+ )"
+
+JAVA_ANT_REWRITE_CLASSPATH="true"
+EANT_BUILD_TARGET="jar contrib-jars"
+
+java_prepare() {
+ # This jar is needed for some tests.
+ # So let's make a copy of it.
+ cp lib/clover.jar "${T}" || die
+
+ find -name "*.jar" -exec rm -v {} + || die
+ rm -r native/libffi || die
+ mkdir -p doc/javadoc || die
+
+ # and restore it.
+ cp "${T}"/clover.jar lib || die
+
+ # Build to same directory on 64-bit archs.
+ mkdir build || die
+ ln -snf build build-d64 || die
+
+ if ! use awt ; then
+ sed -i -E "s/^(CDEFINES=.*)/\1 -DNO_JAWT/g" native/Makefile || die
+ fi
+
+ if ! use nio-buffers ; then
+ sed -i -E "s/^(CDEFINES=.*)/\1 -DNO_NIO_BUFFERS/g" native/Makefile || die
+ fi
+}
+
+EANT_EXTRA_ARGS="-Ddynlink.native=true"
+
+EANT_TEST_ANT_TASKS="ant-junit ant-core"
+src_test() {
+ local sysprops=""
+
+ # crashes vm (segfault)
+ sed -i -e 's|testRegisterMethods|no&|' test/com/sun/jna/DirectTest.java || die
+
+ # crashes vm, java 7 only (icedtea-7, oracle-jdk-bin-1.7)
+ sed -i -e 's|testGCCallbackOnFinalize|no&|' test/com/sun/jna/CallbacksTest.java || die
+
+ sysprops+=" -Djava.awt.headless=true"
+ sysprops+=" -Djava.io.tmpdir=${T}" #to ensure exec mount
+
+ mkdir -p lib || die
+ java-pkg_jar-from --into lib --build-only junit
+
+ # need to use _JAVA_OPTIONS or add them to the build.xml. ANT_OPTS won't
+ # survive the junit task.
+ _JAVA_OPTIONS="${sysprops}" java-pkg-2_src_test
+}
+
+src_install() {
+ java-pkg_dojar build/${PN}.jar
+ java-pkg_dojar contrib/platform/dist/platform.jar
+ java-pkg_doso build/native/libjnidispatch.so
+ use source && java-pkg_dosrc src/com
+ use doc && java-pkg_dojavadoc doc/javadoc
+}
diff --git a/dev-java/jna/jna-4.2.2-r1.ebuild b/dev-java/jna/jna-4.2.2-r1.ebuild
new file mode 100644
index 000000000000..4e55ccbbcd70
--- /dev/null
+++ b/dev-java/jna/jna-4.2.2-r1.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+JAVA_PKG_IUSE="doc source"
+
+inherit eutils java-pkg-2 java-ant-2 toolchain-funcs
+
+DESCRIPTION="Java Native Access (JNA)"
+HOMEPAGE="https://github.com/twall/jna"
+SRC_URI="https://github.com/twall/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="LGPL-2.1"
+SLOT="4"
+KEYWORDS="~amd64 ~x86"
+IUSE="+awt +nio-buffers test"
+REQUIRED_USE="test? ( awt nio-buffers )"
+
+# The tests stall immediately on some systems (not current stable?) when
+# the sandbox is active but pass successfully otherwise. Chewi has not
+# been able to determine why. This began in 4.2.0 as 4.1.0 worked
+# fine. Someone bisect it please. :)
+RESTRICT="test"
+
+CDEPEND="virtual/libffi"
+
+RDEPEND="${CDEPEND}
+ >=virtual/jre-1.7"
+
+DEPEND="${CDEPEND}
+ >=virtual/jdk-1.7
+ x11-libs/libXt
+ virtual/pkgconfig
+ test? (
+ dev-java/ant-junit:0
+ dev-java/guava:20
+ dev-java/javassist:3
+ dev-java/reflections:0
+ )"
+
+PATCHES=(
+ "${FILESDIR}"/${PV}-build.xml.patch
+ "${FILESDIR}"/${PV}-makefile-flags.patch
+)
+
+JAVA_ANT_REWRITE_CLASSPATH="true"
+EANT_BUILD_TARGET="native jar contrib-jars"
+EANT_EXTRA_ARGS="-Ddynlink.native=true"
+EANT_TEST_EXTRA_ARGS="-Dheadless=true -Djava.io.tmpdir=${T}"
+EANT_TEST_GENTOO_CLASSPATH="guava-20,javassist-3,reflections"
+
+src_prepare() {
+ default
+
+ # delete bundled jars and copy of libffi
+ # except native jars because build.xml needs them all
+ find ! -path "./lib/native/*" -name "*.jar" -delete || die
+ rm -r native/libffi || die
+
+ if ! use awt ; then
+ sed -i -E "s/^(CDEFINES=.*)/\1 -DNO_JAWT/g" native/Makefile || die
+ fi
+
+ if ! use nio-buffers ; then
+ sed -i -E "s/^(CDEFINES=.*)/\1 -DNO_NIO_BUFFERS/g" native/Makefile || die
+ fi
+
+ java-pkg-2_src_prepare
+}
+
+src_configure() {
+ tc-export CC
+}
+
+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
+
+ use source && java-pkg_dosrc src/*
+ use doc && java-pkg_dojavadoc doc/javadoc
+}
+
+src_test() {
+ java-pkg-2_src_test
+}
diff --git a/dev-java/jna/metadata.xml b/dev-java/jna/metadata.xml
new file mode 100644
index 000000000000..ceb3d23251bb
--- /dev/null
+++ b/dev-java/jna/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>java@gentoo.org</email>
+ <name>Java</name>
+ </maintainer>
+ <use>
+ <flag name="awt">Enables support for Java AWT</flag>
+ <flag name="nio-buffers">Enables support for NIO buffers</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">twall/jna</remote-id>
+ </upstream>
+</pkgmetadata>