summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Šulc <fordfrog@gentoo.org>2011-12-25 14:23:57 +0000
committerMiroslav Šulc <fordfrog@gentoo.org>2011-12-25 14:23:57 +0000
commit7c2cc92547fab9b937cdd73f50c0ca53e2776f9e (patch)
tree4a37e613cf9c22d69963361453083c09ecb37946 /dev-java/jna
parentBump for #393591 (diff)
downloadgentoo-2-7c2cc92547fab9b937cdd73f50c0ca53e2776f9e.tar.gz
gentoo-2-7c2cc92547fab9b937cdd73f50c0ca53e2776f9e.tar.bz2
gentoo-2-7c2cc92547fab9b937cdd73f50c0ca53e2776f9e.zip
dev-java/jna: version bump
(Portage version: 2.1.10.43/cvs/Linux x86_64)
Diffstat (limited to 'dev-java/jna')
-rw-r--r--dev-java/jna/ChangeLog11
-rw-r--r--dev-java/jna/files/3.4.0-build.xml.patch31
-rw-r--r--dev-java/jna/files/3.4.0-makefile-flags.patch53
-rw-r--r--dev-java/jna/jna-3.4.0.ebuild79
-rw-r--r--dev-java/jna/metadata.xml4
5 files changed, 177 insertions, 1 deletions
diff --git a/dev-java/jna/ChangeLog b/dev-java/jna/ChangeLog
index 29b92d08a244..907320a5dfce 100644
--- a/dev-java/jna/ChangeLog
+++ b/dev-java/jna/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for dev-java/jna
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/jna/ChangeLog,v 1.9 2011/12/13 17:05:49 fordfrog Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jna/ChangeLog,v 1.10 2011/12/25 14:23:57 fordfrog Exp $
+
+*jna-3.4.0 (25 Dec 2011)
+
+ 25 Dec 2011; Miroslav Šulc <fordfrog@gentoo.org>
+ +files/3.4.0-build.xml.patch, +jna-3.4.0.ebuild,
+ +files/3.4.0-makefile-flags.patch, metadata.xml:
+ Version bump. Added new USE flags, awt and nio-buffers. awt USE flag should
+ require X USE flag on used JDK/JRE but we do not have this flag on virtuals
+ yet.
*jna-3.3.0 (13 Dec 2011)
diff --git a/dev-java/jna/files/3.4.0-build.xml.patch b/dev-java/jna/files/3.4.0-build.xml.patch
new file mode 100644
index 000000000000..c907b592b040
--- /dev/null
+++ b/dev-java/jna/files/3.4.0-build.xml.patch
@@ -0,0 +1,31 @@
+--- build.xml.orig 2011-01-25 17:33:24.750473340 +0100
++++ build.xml 2011-01-25 17:07:14.657410373 +0100
+@@ -176,7 +176,9 @@
+ <path id="test.runpath">
+ <pathelement path="${build}/${jar}"/>
+ <pathelement path="${test.classes}"/>
++ <!--
+ <pathelement path="lib/clover.jar"/>
++ -->
+ <path refid="test.libs"/>
+ </path>
+ </target>
+@@ -433,13 +435,17 @@
+ <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>
++ <!--
+ <signjar alias="jna" keystore="jna.keystore" storepass="jnadev" lazy="true">
+- <fileset dir="${build}/jws" includes="jna.jar,jna-test.jar,junit.jar,jnidispatch.jar,clover.jar"/>
++ <fileset dir="${build}/jws" includes="jna.jar,jna-test.jar,junit.jar,jnidispatch.jar"/>
+ </signjar>
++ -->
+ </target>
+
+ <!-- When running tests from an IDE, be sure to set jna.library.path -->
diff --git a/dev-java/jna/files/3.4.0-makefile-flags.patch b/dev-java/jna/files/3.4.0-makefile-flags.patch
new file mode 100644
index 000000000000..90d96e00f1ce
--- /dev/null
+++ b/dev-java/jna/files/3.4.0-makefile-flags.patch
@@ -0,0 +1,53 @@
+diff --git a/native/Makefile b/native/Makefile
+index 75246a8..7bdcf04 100644
+--- a/native/Makefile
++++ b/native/Makefile
+@@ -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.ebuild b/dev-java/jna/jna-3.4.0.ebuild
new file mode 100644
index 000000000000..d6c6818bf9d3
--- /dev/null
+++ b/dev-java/jna/jna-3.4.0.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2011 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.ebuild,v 1.1 2011/12/25 14:23:57 fordfrog Exp $
+
+EAPI="4"
+
+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://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"
+S="${WORKDIR}/twall-jna-3e5b84f"
+
+RDEPEND="virtual/libffi
+ >=virtual/jre-1.6"
+
+DEPEND="virtual/libffi
+ >=virtual/jdk-1.6
+ 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() {
+ # delete bundled jars
+ find -name "*.jar" | xargs rm -v
+
+ # respect CFLAGS, don't inhibit warnings, honour CC
+ # fix build.xml file
+ epatch "${FILESDIR}/${PV}-makefile-flags.patch" "${FILESDIR}/${PV}-build.xml.patch"
+
+ # 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
+
+ if ! use awt ; then
+ sed -i -E "s/^(CDEFINES=.*)/\1 -DNO_JAWT/g" "${S}"/native/Makefile || die
+ fi
+
+ if ! use nio-buffers ; then
+ sed -i -E "s/^(CDEFINES=.*)/\1 -DNO_NIO_BUFFERS/g" "${S}"/native/Makefile || die
+ fi
+}
+
+EANT_EXTRA_ARGS="-Ddynlink.native=true"
+
+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
+}
+
+src_test() {
+ unset DISPLAY
+
+ mkdir -p lib
+ java-pkg_jar-from --into lib --build-only junit
+
+ ANT_TASKS="ant-junit ant-nodeps ant-trax" \
+ ANT_OPTS="-Djava.awt.headless=true" eant \
+ ${EANT_EXTRA_ARGS} test
+}
diff --git a/dev-java/jna/metadata.xml b/dev-java/jna/metadata.xml
index 604e0a4238bb..bbc35db34a3f 100644
--- a/dev-java/jna/metadata.xml
+++ b/dev-java/jna/metadata.xml
@@ -2,5 +2,9 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>java</herd>
+ <use>
+ <flag name='awt'>Enables support for Java AWT</flag>
+ <flag name='nio-buffers'>Enables support for NIO buffers</flag>
+ </use>
</pkgmetadata>