summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Sennhauser <sera@gentoo.org>2012-05-13 09:41:50 +0000
committerRalph Sennhauser <sera@gentoo.org>2012-05-13 09:41:50 +0000
commit44e77115c6d968f9b6a8828a238798f0f5fb80af (patch)
tree647807dc67151f0ede32e3d8bd16062f188c1b4e /dev-java/jna
parentVersion bump (diff)
downloadhistorical-44e77115c6d968f9b6a8828a238798f0f5fb80af.tar.gz
historical-44e77115c6d968f9b6a8828a238798f0f5fb80af.tar.bz2
historical-44e77115c6d968f9b6a8828a238798f0f5fb80af.zip
Respect CC. #413277
Register optional dependency emul-linux-x86-jna for use with 32bit JVMs. #313209 Cleanup. Package-Manager: portage-2.1.10.58/cvs/Linux x86_64
Diffstat (limited to 'dev-java/jna')
-rw-r--r--dev-java/jna/ChangeLog11
-rw-r--r--dev-java/jna/Manifest16
-rw-r--r--dev-java/jna/files/jna-3.4.0-makefile-flags.patch62
-rw-r--r--dev-java/jna/jna-3.4.0-r1.ebuild92
4 files changed, 175 insertions, 6 deletions
diff --git a/dev-java/jna/ChangeLog b/dev-java/jna/ChangeLog
index 55773b4491ac..3b608df9bfb5 100644
--- a/dev-java/jna/ChangeLog
+++ b/dev-java/jna/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for dev-java/jna
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/jna/ChangeLog,v 1.17 2012/05/07 06:26:01 phajdan.jr Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jna/ChangeLog,v 1.18 2012/05/13 09:41:50 sera Exp $
+
+*jna-3.4.0-r1 (13 May 2012)
+
+ 13 May 2012; Ralph Sennhauser <sera@gentoo.org> +jna-3.4.0-r1.ebuild,
+ +files/jna-3.4.0-makefile-flags.patch:
+ Respect CC. #413277
+ Register optional dependency emul-linux-x86-jna for use with 32bit JVMs.
+ #313209
+ Cleanup.
07 May 2012; Pawel Hajdan jr <phajdan.jr@gentoo.org> jna-3.4.0.ebuild:
x86 stable wrt bug #413157
diff --git a/dev-java/jna/Manifest b/dev-java/jna/Manifest
index de55d68c9ed6..6242cb5d73ab 100644
--- a/dev-java/jna/Manifest
+++ b/dev-java/jna/Manifest
@@ -1,22 +1,28 @@
-----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA512
+Hash: SHA1
AUX 3.2.4-makefile-flags.patch 2151 RMD160 430a2e47e7a67283ac7c06c5b9496007d5c5d180 SHA1 278adedeec60b4a78f80f61e1f419eb086211534 SHA256 ba5701ddb20474dec27d39b0d0509f36edda4f6edcc3899e6426726b8d4e2377
AUX 3.4.0-build.xml.patch 1180 RMD160 cb1f424f57b5889d2b8f10c6323539ceba1c67f1 SHA1 5ab392163bc0aba15a28c9e04c6422bb3198d7a9 SHA256 4b56d9bcc80d032dde9f66458e0cade95e5f961d04cc8b7efa49ebb714b393dd
AUX 3.4.0-makefile-flags.patch 1900 RMD160 d85e956afe76d99cd9c34fdf347580298a2076e6 SHA1 f3f81407590ec160014f29ac98e48145534f57c9 SHA256 b54b196749ae9589e315ce12a8c93fd9bbf42581211ff6b5f5cea2a089dbf124
+AUX jna-3.4.0-makefile-flags.patch 2057 RMD160 c420d4358ea314763e9e82e6a57e87986d9b4ae6 SHA1 f3e6821b50ea3380941a93dab8c940db72ba914e SHA256 7b6d0c5f2eecfab07c223050349d246740d234c38831c87744c0fd68139ebc33
AUX makefile-flags.patch 790 RMD160 cb0f285a09fd0f1feebde3ded9086880dd200656 SHA1 61ab8ec9270cf6af212222ef8bb47872dd32f986 SHA256 060c7d8475c879d94d2d173a4e9a033cbdd26a2db5bc8d724446f8bbab53055c
DIST jna-3.0.3.tar.bz2 647451 RMD160 3122e06fe47ca053828c4e5a4c02f3d61bab8800 SHA1 a144936d0f5e29279d2091d4d2ad0a8e38e20334 SHA256 c214d0ced142972e64421bdd22a2bb4f841df27cf38519602845f7410d11bc7f
DIST jna-3.2.4.tar.bz2 191082 RMD160 235304a6c65a6963fcdc9707d8aca4870898309c SHA1 38ee77025c35e0fe0901821a88227fb1acb43c22 SHA256 b6f842e6dcc13b64d26f3ad9e4989aa51276b964fe211a51a2408c3c33c2beb0
DIST jna-3.4.0-src.tar.gz 34547165 RMD160 789f7198fb70fae6aaea87bedec087017cc6e296 SHA1 60ae10b3831e7ea628c0eda111f9165cbce5a805 SHA256 bff8fb935044a1e5de611e576e30a08c263e6a26a9f4c631dbe3a0cac2d79f14
EBUILD jna-3.0.3-r1.ebuild 1655 RMD160 ba4626b1cbad8c8ae558407c594be28d4aca2f6e SHA1 376f1b23cd9a0b958c4aa719946855b4c6ed2a0a SHA256 b256ef440b5b54cc1ccf5dffc8584a8d1c4100a1998cdf0971b5d8fc939bae6e
EBUILD jna-3.2.4.ebuild 1933 RMD160 ed6329b736be8c37ab45d4996b9abe2493111ff4 SHA1 a633debbb60985680924352cebc902eb24a21c8a SHA256 c14f28c56e8deb593823898ab2732a8cb22a7a8bdd873e0a1edaf9d65a6841e0
+EBUILD jna-3.4.0-r1.ebuild 2481 RMD160 3c2afeda9fd3755d2b27f5b009afe6711b459cc1 SHA1 1bed0eeda321712830c27b4ff81608eae5259c7b SHA256 b77e3bd233f8aa0ff4e5ad22e3bb76511d28fa12874792c2929a303e852b214c
EBUILD jna-3.4.0.ebuild 2450 RMD160 be2aa4377d7873313edd3a1730d4286be55b434d SHA1 4159fd463d6f485664168cec9fda652e811146ef SHA256 53f4710c5140986845845b2358148b6e61289af79d8a5df7329ecfcdfe7afc80
-MISC ChangeLog 3116 RMD160 b7c5720481cc74ccced82057323537064602bb87 SHA1 2a1bc0b2d8aff833ff3d6d3f5a66c023c50f3ae2 SHA256 bd89051a41802132e1e52ec76eea1555a1cda674ceab7e0e9338db57d8035143
+MISC ChangeLog 3371 RMD160 40fdfafec33e976ef9b17d09a27589e3b8c8a9ba SHA1 d93bd94c24c91e716628c84876af39e2ec53e859 SHA256 d09aac6e9f3aee3e602d508b1803e012f81b23d56397d1b7a277886a38360e47
MISC metadata.xml 295 RMD160 d7fc5e14f5b91d3271a001c1219c101b385253e0 SHA1 1882aa6897108b0bcb4ef1810ee6bf0c7ca42054 SHA256 7aeccd89219646978f39ce1d46b40051eb950e1452bd225e7dd8e2fe5267c8a2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
-iEYEAREKAAYFAk+nawAACgkQuUQtlDBCeQILTACghVnjyhRcUwqKI94KXEfpaIwT
-WoQAn1zUvZUSGvEtsb0EUWJDxIe39LRW
-=gUq6
+iQEcBAEBAgAGBQJPr4HuAAoJEIUJ+svaV163+7oH/i0k4VRc6+QWB7OYa4zbIlCX
+0Q3KKP6z+Qi2GzUlLKhn7/awyZzUyA8LjBWm9y/9lEK2aGnVLF/JwJn238aakv0n
+9N9Mu5ILwx2P4mr7ER9uivqcvoz3WlJUI8FcuSEXREnMyh6JTXZ7ujlwcZ2mCwDs
+5AFX89+wjtajQJtp1jFbPAjhDDXjk6TJooOWMh1Wxv4Tcg0rSKx5Z2cFAjmfnJg3
+PtkN8JipE7aih7KiIaeazqlC+Dm/hcsQGmkwOUl6mdHuwIbzv+H4s6MD0M/kDy4C
+w30djR4bDr6wQKf/qejFALoyRCxCUJw5DM4eCtrTdQZEW2sVDBed9Wo2pSjdZS0=
+=h+5g
-----END PGP SIGNATURE-----
diff --git a/dev-java/jna/files/jna-3.4.0-makefile-flags.patch b/dev-java/jna/files/jna-3.4.0-makefile-flags.patch
new file mode 100644
index 000000000000..e4ff00bf69da
--- /dev/null
+++ b/dev-java/jna/files/jna-3.4.0-makefile-flags.patch
@@ -0,0 +1,62 @@
+diff --git a/native/Makefile b/native/Makefile
+index 75246a8..a1c3e66 100644
+--- a/native/Makefile
++++ b/native/Makefile
+@@ -70,7 +70,7 @@ LIBPFX=lib
+ LIBSFX=.so
+ ARSFX=.a
+ JNISFX=$(LIBSFX)
+-CC=gcc
++CC?=gcc
+ LD=$(CC)
+ LIBS=
+ # Default to Sun recommendations for JNI compilation
+@@ -83,10 +83,10 @@ CFLAGS_EXTRA=
+ 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)
+@@ -149,7 +149,7 @@ ifneq ($(MINGW),)
+ CDEFINES=-DPSAPI_VERSION=1
+ CC = $(MINGW) -m64 -mno-cygwin
+ LD = $(CC)
+-LDFLAGS=-o $@ -shared
++LDFLAGS+=-o $@ -shared
+ LIBS= -lmingwex -lpsapi -lkernel32 -lmsvcrt
+ FFI_CONFIG += --host=x86_64-pc-mingw32
+ else
+@@ -169,14 +169,14 @@ ifeq ($(OS),linux)
+ ARCH=$(shell uname -m | sed 's/i.86/i386/g')
+ PCFLAGS+=-fPIC
+ CDEFINES+=-DHAVE_PROTECTION
+-LDFLAGS+=-Wl,-soname,$@
++LDFLAGS+= -Wl,-soname,$(shell basename $@)
+ endif
+
+ ifneq (,$(findstring bsd,$(OS)))
+ ARCH=$(shell uname -m | sed 's/i.86/i386/g')
+ PCFLAGS+=-fPIC
+ CINCLUDES+=-I/usr/X11R6/include
+-LDFLAGS=-o $@ -shared
++LDFLAGS+= -o $@ -shared
+ CDEFINES+=-DHAVE_PROTECTION -DFFI_MMAP_EXEC_WRIT
+ endif
+
+@@ -239,7 +239,7 @@ endif
+
+ PCFLAGS+=$(ISYSROOT) -x objective-c
+ CDEFINES+=-DTARGET_RT_MAC_CFM=0 -DFFI_MMAP_EXEC_WRIT
+-LDFLAGS=$(ARCHFLAGS) -dynamiclib -o $@ -framework JavaVM \
++LDFLAGS+=$(ARCHFLAGS) -dynamiclib -o $@ -framework JavaVM \
+ -compatibility_version $(shell echo ${JNA_JNI_VERSION}|sed 's/^\([0-9][0-9]*\).*/\1/g') \
+ -current_version $(JNA_JNI_VERSION) \
+ -mmacosx-version-min=10.3 \
diff --git a/dev-java/jna/jna-3.4.0-r1.ebuild b/dev-java/jna/jna-3.4.0-r1.ebuild
new file mode 100644
index 000000000000..961da179e4a6
--- /dev/null
+++ b/dev-java/jna/jna-3.4.0-r1.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jna/jna-3.4.0-r1.ebuild,v 1.1 2012/05/13 09:41:50 sera Exp $
+
+EAPI="4"
+
+JAVA_PKG_IUSE="doc source test"
+
+inherit eutils java-pkg-2 java-ant-2 toolchain-funcs vcs-snapshot
+
+DESCRIPTION="Java Native Access (JNA)"
+HOMEPAGE="https://github.com/twall/jna#readme"
+SRC_URI="https://github.com/twall/jna/tarball/3.4.0 -> ${P}-src.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+IUSE="+awt +nio-buffers"
+REQUIRED_USE="test? ( awt nio-buffers )"
+
+COMMON_DEP="
+ virtual/libffi"
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.6"
+DEPEND="${COMMON_DEP}
+ >=virtual/jdk-1.6
+ dev-java/ant-nodeps:0
+ virtual/pkgconfig
+ test? (
+ dev-java/ant-junit:0
+ dev-java/ant-trax:0
+ )"
+
+java_prepare() {
+ # delete bundled jars and copy of libffi
+ find -name "*.jar" -exec rm -v {} + || die
+ rm -r native/libffi || die
+
+ epatch "${FILESDIR}/${PV}-build.xml.patch"
+ # respect CFLAGS, don't inhibit warnings, honour CC
+ epatch "${FILESDIR}/${P}-makefile-flags.patch"
+ tc-export CC
+
+ # 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_BUILD_TARGET="jar contrib-jars"
+EANT_ANT_TASKS="ant-nodeps"
+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
+
+ java-pkg_register-optional-dependency emul-linux-x86-jna #313209
+
+ use source && java-pkg_dosrc src/com
+ use doc && java-pkg_dojavadoc doc/javadoc
+}