summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVlastimil Babka <caster@gentoo.org>2009-06-03 20:50:05 +0000
committerVlastimil Babka <caster@gentoo.org>2009-06-03 20:50:05 +0000
commit48e47fc2d0d78eba932f17ddc5e87b53110b84a4 (patch)
tree938a2311ee1e28df2da1fd6171a4d59de0e4e810 /dev-java/jna
parentstable amd64, bug 272336 (diff)
downloadgentoo-2-48e47fc2d0d78eba932f17ddc5e87b53110b84a4.tar.gz
gentoo-2-48e47fc2d0d78eba932f17ddc5e87b53110b84a4.tar.bz2
gentoo-2-48e47fc2d0d78eba932f17ddc5e87b53110b84a4.zip
Revbump to switch to virtual/libffi, bug #272054.
(Portage version: 2.2_rc33/cvs/Linux x86_64)
Diffstat (limited to 'dev-java/jna')
-rw-r--r--dev-java/jna/ChangeLog8
-rw-r--r--dev-java/jna/files/makefile-flags.patch21
-rw-r--r--dev-java/jna/jna-3.0.3-r1.ebuild64
3 files changed, 92 insertions, 1 deletions
diff --git a/dev-java/jna/ChangeLog b/dev-java/jna/ChangeLog
index 41ab5a3440fa..9a3f696ef9c7 100644
--- a/dev-java/jna/ChangeLog
+++ b/dev-java/jna/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-java/jna
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/jna/ChangeLog,v 1.1 2009/05/23 07:41:07 caster Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jna/ChangeLog,v 1.2 2009/06/03 20:50:04 caster Exp $
+
+*jna-3.0.3-r1 (03 Jun 2009)
+
+ 03 Jun 2009; Vlastimil Babka <caster@gentoo.org> +jna-3.0.3-r1.ebuild,
+ +files/makefile-flags.patch:
+ Revbump to switch to virtual/libffi, bug #272054.
*jna-3.0.3 (22 May 2009)
diff --git a/dev-java/jna/files/makefile-flags.patch b/dev-java/jna/files/makefile-flags.patch
new file mode 100644
index 000000000000..8ac141d57054
--- /dev/null
+++ b/dev-java/jna/files/makefile-flags.patch
@@ -0,0 +1,21 @@
+--- native/Makefile.orig 2009-06-03 22:09:02.000000000 +0200
++++ native/Makefile 2009-06-03 22:14:56.000000000 +0200
+@@ -49,7 +49,6 @@
+ LIBPFX=lib
+ LIBSFX=.so
+ JNISFX=$(LIBSFX)
+-CC=gcc
+ LD=gcc
+ # Default to Sun recommendations for JNI compilation
+ #COPT=-O2 -fomit-frame-pointer
+@@ -61,8 +60,8 @@
+ COUT=-o $@
+ CINCLUDES=$(JAVA_INCLUDES) -I"$(JAVAH)" -I$(FFI_BUILD)/include
+ CDEFINES=-D_REENTRANT
+-PCFLAGS=-W -Wall -Wno-unused -Wno-parentheses
+-CFLAGS=$(PCFLAGS) $(COPT) $(CDEBUG) $(CDEFINES) $(CINCLUDES) \
++PCFLAGS=-Wall -Wno-unused -Wno-parentheses
++CFLAGS+=$(PCFLAGS) $(COPT) $(CDEBUG) $(CDEFINES) $(CINCLUDES) \
+ -DVERSION='"$(VERSION)"' -DCHECKSUM='"$(CHECKSUM)"'
+ # -static-libgcc avoids gcc library incompatibilities across linux systems
+ LDFLAGS=-o $@ -shared -static-libgcc
diff --git a/dev-java/jna/jna-3.0.3-r1.ebuild b/dev-java/jna/jna-3.0.3-r1.ebuild
new file mode 100644
index 000000000000..d8078d26a365
--- /dev/null
+++ b/dev-java/jna/jna-3.0.3-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jna/jna-3.0.3-r1.ebuild,v 1.1 2009/06/03 20:50:04 caster Exp $
+
+EAPI=2
+
+JAVA_PKG_IUSE="test doc source"
+WANT_ANT_TASKS="ant-nodeps"
+
+inherit java-pkg-2 java-ant-2 toolchain-funcs flag-o-matic
+
+DESCRIPTION="Java Native Access (JNA)"
+HOMEPAGE="https://jna.dev.java.net/"
+# repack and mirror
+#SRC_URI="http://jna.dev.java.net/source/browse/*checkout*/jna/tags/${PV}/jnalib/dist/src.zip"
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="virtual/libffi
+ >=virtual/jre-1.4"
+
+DEPEND="virtual/libffi
+ !test? ( >=virtual/jdk-1.4 )
+ test? (
+ dev-java/ant-junit
+ dev-java/ant-trax
+ >=virtual/jdk-1.5
+ )"
+
+JAVA_ANT_REWRITE_CLASSPATH="true"
+
+java_prepare() {
+ # remove bundled libffi
+ rm -rf native/libffi || die
+
+ # respect CFLAGS, don't inhibit warnings, honour CC
+ epatch "${FILESDIR}/makefile-flags.patch"
+
+ # bug #272054
+ append-cflags $(pkg-config --cflags-only-I libffi)
+
+ # Fetch our own prebuilt libffi.
+ mkdir -p build/native/libffi/.libs || die
+ ln -snf "/usr/$(get_libdir)/libffi.so" \
+ build/native/libffi/.libs/libffi_convenience.a || die
+
+ # Build to same directory on 64-bit archs.
+ ln -snf build build-d64 || die
+}
+
+src_install() {
+ java-pkg_dojar build/${PN}.jar
+ java-pkg_doso build/native/libjnidispatch.so
+ use source && java-pkg_dosrc src/com
+ use doc && java-pkg_dojavadoc doc/javadoc
+}
+
+src_test() {
+ unset DISPLAY
+ ANT_TASKS="ant-junit ant-nodeps ant-trax" ANT_OPTS="-Djava.awt.headless=true" eant test
+}