diff options
Diffstat (limited to 'dev-java/jna')
-rw-r--r-- | dev-java/jna/Manifest | 9 | ||||
-rw-r--r-- | dev-java/jna/files/4.2.2-build.xml.patch | 23 | ||||
-rw-r--r-- | dev-java/jna/files/4.2.2-makefile-flags.patch | 25 | ||||
-rw-r--r-- | dev-java/jna/jna-3.4.1.ebuild | 89 | ||||
-rw-r--r-- | dev-java/jna/jna-4.2.2-r1.ebuild | 86 | ||||
-rw-r--r-- | dev-java/jna/metadata.xml | 15 |
6 files changed, 247 insertions, 0 deletions
diff --git a/dev-java/jna/Manifest b/dev-java/jna/Manifest new file mode 100644 index 000000000000..98dc07ff9076 --- /dev/null +++ b/dev-java/jna/Manifest @@ -0,0 +1,9 @@ +AUX 4.2.2-build.xml.patch 819 SHA256 52329e01d05e16e2ff8baedd1ba0ed0594288dd320ca11333cd4bab3222e54a3 SHA512 8d2e0552690c9282ce93e39aa489c1fd829e5e63e39c6e6db935b6b5e2308a3ee3cbe1a274ebf2ba59d9819dd4f618d89e22194a9f88dec0763d2a36cd3ca44e WHIRLPOOL 5b1c32397f3238b13ea26a505ba0553b35abe33e5d6b04abdb677a1852ab07d6915f162b520867c794bfe049b13adf808537865b3e5fca87fe4587863c933660 +AUX 4.2.2-makefile-flags.patch 925 SHA256 8a281010a35367ae49dcf3ba649f2975b6c3fb60c563b2a4fb9b96ba78e2e8de SHA512 be29adfff3b92875b38cf9bb326d935a189555bbb10315412b2544b43698cf76132554df64f28a18d4910ef1c46daf8b0a2ef9db7a9bca1ab53c421504187e54 WHIRLPOOL d3ee51e547be96df1a5730dd8967d87261326c730418b64c2ce75a7c954e0fdca1ac68ebeb4f382f19f44ed52753cad2073e5bde52979f625cc0aff53a2ce2ce +DIST jna-3.4.1.tar.gz 35285043 SHA256 fb0ff552a11ddf18b82f1e3fbfe01985fb7a41e242124c63257bb685408ca16e SHA512 8164de9d213f670e6408627ec13fc128802351c2b906e1e1e95fd3280917ef1eba24d8b6b913a9df8034d20a5d46f6f823b5ee2d18b83248093a1855c89c5917 WHIRLPOOL 9c06862f76fbab7175f134a3f965d7d944ff536a03f03256307f8300b1fd1c9888c6e312bb74a80088128278efa9f8f7dfca668e4ebeacfff91bba3bc97951b0 +DIST jna-4.2.2.tar.gz 58638853 SHA256 46330123be97fa5c11b1747c74470a39f2b1a3396d66fd6ead4d034660eb094a SHA512 11ab524f87f6dc7fe3ac8eb0620f9ba392445147770304be7b7fa5cd49de8efed983ad30c16077bfa6419eaf1ff50311a3ded811a78fdcd09bc686ef93ad7f9f WHIRLPOOL a8cd562276c4e2955ad5aa178660810f6dd45d0bd51f1c267d1a8fd139f9fb6a45aaf794a03c9f333c51617240cbff0d79f57ce73e4fc341c431b3ab959055f1 +EBUILD jna-3.4.1.ebuild 2305 SHA256 0c0649d2e4b1224651cce4172d8f9e99919f30bab3a2441149433d2aaea943e9 SHA512 b1847d11f7e80f3d1e29c642ff95c571c77ee352699249bf8c4ae70ee3032c10fe292cbc77e851438184f0535b7bfde72940a465f69bcb8b8d8ce71c4b3399b1 WHIRLPOOL 31bd6e1ea8a21dcca00616d4bec17823486ca8e3ea88980035ab1f68edacd525b5cb4ab9f5b4942a2b4e586e4a205d01562761c72a976400f1aced39f61adbcd +EBUILD jna-4.2.2-r1.ebuild 2076 SHA256 ca1ef991a5ea5c665c7b5c53f7b4925e9ef631f48f432f16b772e2e1c3ca3892 SHA512 6b6485c517432b2e03c620dcab0fbec437dda6dfffe856b097d9bb71d9ba64a97609fd2f84afd152b14f2c3acc3c52ce67e701e2f026ceaff056c5185202c135 WHIRLPOOL 4220e5e9cc6f7d5d1813a13de046cfdd930b89ae9314af4feea0d302ef1e130080f5dee12da7a28b5c31b2614b0a14ca11f4dc7590cd9aa201074ff984b3a2bd +MISC ChangeLog 4210 SHA256 624f8459237a20bbf5d2bef83738a9e05119c5c5f1d4eb3945f6a8d494000360 SHA512 e3fa6a6cb013a4c5f62fc6bf4ed19dffd7f49f0c5c9de39cb83236660fa394243e8f3305e1642597efcc837efa5765bfe2b4d38b0a419f607ddc4da74843f6b4 WHIRLPOOL 85f872808f7f455275e6706bde8c1ef5d52c79009f4d1c2ca990c2d50febe8e908defffa94fb2c258f28ca93cc582bc13982ad7c5cc5e14be36572d5b60184af +MISC ChangeLog-2015 3948 SHA256 90c17fedcb24fc33f874a8178a8a5235acf23fea8341081a9ba477e790019cc9 SHA512 6674db251a789663014deff2b3390d367980239351e5b4841af6656ca44e2181fa2f8fc6657d072ed0981fa5355708e969de732b9c2f1e6723307b3c95bf828a WHIRLPOOL 705650e938a0f087183cfc22104bd5fd4ad50296b0bca763ba34a88f4174ca33fbb5a485c0dd47c1c46fe6490810d7bea419403e1bf0912a2851c142ae3d54b5 +MISC metadata.xml 462 SHA256 effac54ba56f7d3804d409d16a4d1691516925dd38745785afba8276fc9d2789 SHA512 88a027ef32c55e551625950ecb2efffc75a7611568f11a4abdcddd4fe24b894eb7d8fb805cba3fc0f79ddf6fae6116804790fc24b3d5b6097ade9ad92ed4c118 WHIRLPOOL 2e068fbd8b5f832cae34149b44474eb999f404a00c91da4eea1ad453b817cf788d379512417028468eaa4e631308759774fe4f9c2e9ff9a7419fc608db33cdaf 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..a3210becfbbc --- /dev/null +++ b/dev-java/jna/jna-3.4.1.ebuild @@ -0,0 +1,89 @@ +# Copyright 1999-2016 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-junit:0 + dev-java/ant-trax: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-nodeps ant-trax" +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> |