summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Šulc <fordfrog@gentoo.org>2011-01-25 17:47:14 +0000
committerMiroslav Šulc <fordfrog@gentoo.org>2011-01-25 17:47:14 +0000
commit538f98cdbeb994399971eb70c2da1242f0de7697 (patch)
tree33f4e389ff0803b01448ad5e41ac8256b11823f6 /dev-java
parentVersion bump, remove old testing and 9999 version since it's not really maint... (diff)
downloadgentoo-2-538f98cdbeb994399971eb70c2da1242f0de7697.tar.gz
gentoo-2-538f98cdbeb994399971eb70c2da1242f0de7697.tar.bz2
gentoo-2-538f98cdbeb994399971eb70c2da1242f0de7697.zip
dev-java/jna: version bump
(Portage version: 2.1.9.35/cvs/Linux x86_64)
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/jna/ChangeLog13
-rw-r--r--dev-java/jna/files/3.2.7-build.xml.patch31
-rw-r--r--dev-java/jna/files/3.2.7-makefile-flags.patch60
-rw-r--r--dev-java/jna/jna-3.2.7.ebuild79
4 files changed, 181 insertions, 2 deletions
diff --git a/dev-java/jna/ChangeLog b/dev-java/jna/ChangeLog
index 3926d3cf2066..6a610b6d74a3 100644
--- a/dev-java/jna/ChangeLog
+++ b/dev-java/jna/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for dev-java/jna
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/jna/ChangeLog,v 1.6 2010/05/23 19:45:23 pacho Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jna/ChangeLog,v 1.7 2011/01/25 17:47:14 fordfrog Exp $
+
+*jna-3.2.7 (25 Jan 2011)
+
+ 25 Jan 2011; Miroslav Šulc <fordfrog@gentoo.org>
+ +files/3.2.7-build.xml.patch, +files/3.2.7-makefile-flags.patch,
+ +jna-3.2.7.ebuild:
+ Version bump. Switched to EAPI4, sources are now downloaded directly from
+ upstream, build.xml patches moved to patch file, also added building of
+ platform.jar.
23 May 2010; Pacho Ramos <pacho@gentoo.org> jna-3.2.4.ebuild:
stable amd64, bug 311105
diff --git a/dev-java/jna/files/3.2.7-build.xml.patch b/dev-java/jna/files/3.2.7-build.xml.patch
new file mode 100644
index 000000000000..c907b592b040
--- /dev/null
+++ b/dev-java/jna/files/3.2.7-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.2.7-makefile-flags.patch b/dev-java/jna/files/3.2.7-makefile-flags.patch
new file mode 100644
index 000000000000..80048828498a
--- /dev/null
+++ b/dev-java/jna/files/3.2.7-makefile-flags.patch
@@ -0,0 +1,60 @@
+--- native/Makefile.orig 2011-01-25 16:42:02.341745978 +0100
++++ native/Makefile 2011-01-25 16:45:57.500174283 +0100
+@@ -67,10 +66,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)
+@@ -109,7 +108,7 @@
+ ifneq ($(MINGW),)
+ 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
+@@ -129,14 +128,14 @@
+ ARCH=$(shell uname -m | sed 's/i.86/i386/g')
+ PCFLAGS+=-fPIC
+ CDEFINES+=-DHAVE_PROTECTION
+-LDFLAGS+=-Wl,-soname,$@
++LDFLAGS+= -Wl,-soname,$(shell basename $@)
+ endif
+
+ ifeq ($(OS),freebsd)
+ 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
+
+@@ -144,7 +143,7 @@
+ 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
+
+@@ -191,7 +190,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.2.7.ebuild b/dev-java/jna/jna-3.2.7.ebuild
new file mode 100644
index 000000000000..48b7b655a395
--- /dev/null
+++ b/dev-java/jna/jna-3.2.7.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.2.7.ebuild,v 1.1 2011/01/25 17:47:14 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://jna.dev.java.net/"
+SRC_URI="https://jna.dev.java.net/source/browse/*checkout*/jna/tags/${PV}/jnalib/dist/src.zip -> ${P}-src.zip
+ https://jna.dev.java.net/source/browse/*checkout*/jna/tags/${PV}/jnalib/contrib/platform/build.xml -> ${P}-platform-build.xml
+ https://jna.dev.java.net/source/browse/*checkout*/jna/tags/${PV}/jnalib/contrib/platform/nbproject/build-impl.xml -> ${P}-platform-build-impl.xml
+ https://jna.dev.java.net/source/browse/*checkout*/jna/tags/${PV}/jnalib/contrib/platform/nbproject/project.properties?rev=1138 -> ${P}-platform-project.properties"
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+S="${WORKDIR}"
+
+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"
+
+src_unpack() {
+ unpack ${P}-src.zip
+ mkdir -p contrib/platform/nbproject || die
+ cp "${DISTDIR}"/${P}-platform-build.xml contrib/platform/build.xml || die
+ cp "${DISTDIR}"/${P}-platform-build-impl.xml contrib/platform/nbproject/build-impl.xml || die
+ cp "${DISTDIR}"/${P}-platform-project.properties contrib/platform/nbproject/project.properties || die
+}
+
+java_prepare() {
+ # 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
+}
+
+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
+}