diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-java/jna | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-java/jna')
-rw-r--r-- | dev-java/jna/Manifest | 1 | ||||
-rw-r--r-- | dev-java/jna/files/3.4.0-build.xml.patch | 31 | ||||
-rw-r--r-- | dev-java/jna/files/3.4.0-makefile-flags.patch | 53 | ||||
-rw-r--r-- | dev-java/jna/files/jna-3.4.0-makefile-flags.patch | 62 | ||||
-rw-r--r-- | dev-java/jna/jna-3.4.0-r1.ebuild | 92 | ||||
-rw-r--r-- | dev-java/jna/jna-3.4.0.ebuild | 88 | ||||
-rw-r--r-- | dev-java/jna/metadata.xml | 12 |
7 files changed, 339 insertions, 0 deletions
diff --git a/dev-java/jna/Manifest b/dev-java/jna/Manifest new file mode 100644 index 000000000000..f99a71650af0 --- /dev/null +++ b/dev-java/jna/Manifest @@ -0,0 +1 @@ +DIST jna-3.4.0.tar.gz 34547165 SHA256 bff8fb935044a1e5de611e576e30a08c263e6a26a9f4c631dbe3a0cac2d79f14 SHA512 30c4e6a3a5ac133095248d3eb7d4983a91e11a267a581268a91316927ac75c5a133a58625d321276ac0b229c42c502f85492672d99713c90de98a648bd008b35 WHIRLPOOL 0a5a9d35db0e0090375235048c985fd8bd9ccf319d03c1c3db33e81d3e1a1bec8718a48f6b8180c7531d3963ae91b5337f539eb69e3db73b3f87ea693706fe08 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/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..c6d40bd7bc97 --- /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 +# $Id$ + +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}.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 +} 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..8d90aa387892 --- /dev/null +++ b/dev-java/jna/jna-3.4.0.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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 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}.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 + 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() { + # delete bundled jars and copy of libffi + find -name "*.jar" -exec rm -v {} + || die + rm -r native/libffi || die + + # respect CFLAGS, don't inhibit warnings, honour CC + # fix build.xml file + epatch "${FILESDIR}/${PV}-makefile-flags.patch" "${FILESDIR}/${PV}-build.xml.patch" + + # 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/metadata.xml b/dev-java/jna/metadata.xml new file mode 100644 index 000000000000..ee633d5a6f4e --- /dev/null +++ b/dev-java/jna/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!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> + <upstream> + <remote-id type="github">twall/jna#readme</remote-id> + </upstream> +</pkgmetadata> |