diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2016-05-18 14:13:03 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2016-05-18 14:13:03 +0000 |
commit | 5011eae6e2bee887bdd3db8d6ef876142aafd73b (patch) | |
tree | 8f1ac536823bf2411822b83f370e0843af27fe0e /community/java-jna | |
parent | d36045ec2d54bba93140a56c2382256dcfa44e16 (diff) | |
download | aports-5011eae6e2bee887bdd3db8d6ef876142aafd73b.tar.bz2 aports-5011eae6e2bee887bdd3db8d6ef876142aafd73b.tar.xz |
community/java-jna: move from testing
needed by elasticsearch
Diffstat (limited to 'community/java-jna')
-rw-r--r-- | community/java-jna/0001-jar-without-natives.patch | 149 | ||||
-rw-r--r-- | community/java-jna/APKBUILD | 71 |
2 files changed, 220 insertions, 0 deletions
diff --git a/community/java-jna/0001-jar-without-natives.patch b/community/java-jna/0001-jar-without-natives.patch new file mode 100644 index 0000000000..de1d8339c6 --- /dev/null +++ b/community/java-jna/0001-jar-without-natives.patch @@ -0,0 +1,149 @@ +From: Jakub Jirutka <jakub@jirutka.cz> +Date: Wed, 13 Apr 2016 20:58:00 +0200 +Subject: [PATCH] Exclude native libs from jna.jar + +diff --git a/build.xml b/build.xml +index c74927b..aa461e0 100644 +--- a/build.xml ++++ b/build.xml +@@ -376,140 +376,10 @@ + <attribute name="Bundle-Vendor" value="${vendor}"/> + <attribute name="Bundle-ActivationPolicy" value="lazy"/> + <attribute name="Export-Package" value="com.sun.jna,com.sun.jna.ptr,com.sun.jna.win32"/> +- <!-- Note that no terminal "*" is included in this list, +- which will force failure on unsupported platforms. +- --> +- <attribute name="Bundle-NativeCode" +- value=" +-com/sun/jna/win32-x86/jnidispatch.dll; +-processor=x86;osname=win32, +-com/sun/jna/win32-x86-64/jnidispatch.dll; +-processor=x86-64;osname=win32, +-com/sun/jna/win32-x86/jnidispatch.dll; +-processor=x86;osname=win, +-com/sun/jna/win32-x86-64/jnidispatch.dll; +-processor=x86-64;osname=win, +-com/sun/jna/w32ce-arm/jnidispatch.dll; +-processor=arm;osname=wince, +- +-com/sun/jna/sunos-x86/libjnidispatch.so; +-processor=x86;osname=sunos, +-com/sun/jna/sunos-x86-64/libjnidispatch.so; +-processor=x86-64;osname=sunos, +-com/sun/jna/sunos-sparc/libjnidispatch.so; +-processor=sparc;osname=sunos, +-com/sun/jna/sunos-sparcv9/libjnidispatch.so; +-processor=sparcv9;osname=sunos, +- +-com/sun/jna/aix-ppc/libjnidispatch.a; +-processor=ppc;osname=aix, +-com/sun/jna/aix-ppc64/libjnidispatch.a; +-processor=ppc64;osname=aix, +- +-com/sun/jna/linux-ppc/libjnidispatch.so; +-processor=ppc;osname=linux, +-com/sun/jna/linux-ppc64/libjnidispatch.so; +-processor=ppc64;osname=linux, +-com/sun/jna/linux-ppc64le/libjnidispatch.so; +-processor=ppc64le;osname=linux, +-com/sun/jna/linux-x86/libjnidispatch.so; +-processor=x86;osname=linux, +-com/sun/jna/linux-x86-64/libjnidispatch.so; +-processor=x86-64;osname=linux, +-com/sun/jna/linux-arm/libjnidispatch.so; +-processor=arm;osname=linux, +-com/sun/jna/linux-aarch64/libjnidispatch.so; +-processor=aarch64;osname=linux, +-com/sun/jna/linux-ia64/libjnidispatch.so; +-processor=ia64;osname=linux, +-com/sun/jna/linux-sparcv9/libjnidispatch.so; +-processor=sparcv9;osname=linux, +- +-com/sun/jna/freebsd-x86/libjnidispatch.so; +-processor=x86;osname=freebsd, +-com/sun/jna/freebsd-x86-64/libjnidispatch.so; +-processor=x86-64;osname=freebsd, +-com/sun/jna/openbsd-x86/libjnidispatch.so; +-processor=x86;osname=openbsd, +-com/sun/jna/openbsd-x86-64/libjnidispatch.so; +-processor=x86-64;osname=openbsd, +- +-com/sun/jna/darwin/libjnidispatch.jnilib; +-osname=macosx;processor=x86;processor=x86-64;processor=ppc +-"/> + </manifest> + <fileset dir="${classes}" excludes="${jar.omitted}"> + <patternset refid="jar-compiled"/> + </fileset> +- <zipfileset src="${lib.native}/win32-x86.jar" +- includes="*jnidispatch*" +- prefix="com/sun/jna/win32-x86"/> +- <zipfileset src="${lib.native}/aix-ppc.jar" +- includes="*jnidispatch*" +- prefix="com/sun/jna/aix-ppc"/> +- <zipfileset src="${lib.native}/aix-ppc64.jar" +- includes="*jnidispatch*" +- prefix="com/sun/jna/aix-ppc64"/> +- <zipfileset src="${lib.native}/darwin.jar" +- includes="*jnidispatch*" +- prefix="com/sun/jna/darwin"/> +- <zipfileset src="${lib.native}/linux-x86.jar" +- includes="*jnidispatch*" +- prefix="com/sun/jna/linux-x86"/> +- <zipfileset src="${lib.native}/linux-x86-64.jar" +- includes="*jnidispatch*" +- prefix="com/sun/jna/linux-x86-64"/> +- <zipfileset src="${lib.native}/linux-arm.jar" +- includes="*jnidispatch*" +- prefix="com/sun/jna/linux-arm"/> +- <zipfileset src="${lib.native}/linux-aarch64.jar" +- includes="*jnidispatch*" +- prefix="com/sun/jna/linux-aarch64"/> +- <zipfileset src="${lib.native}/linux-ia64.jar" +- includes="*jnidispatch*" +- prefix="com/sun/jna/linux-ia64"/> +- <zipfileset src="${lib.native}/linux-ppc.jar" +- includes="*jnidispatch*" +- prefix="com/sun/jna/linux-ppc"/> +- <zipfileset src="${lib.native}/linux-ppc64.jar" +- includes="*jnidispatch*" +- prefix="com/sun/jna/linux-ppc64"/> +- <zipfileset src="${lib.native}/linux-ppc64le.jar" +- includes="*jnidispatch*" +- prefix="com/sun/jna/linux-ppc64le"/> +- <zipfileset src="${lib.native}/linux-sparcv9.jar" +- includes="*jnidispatch*" +- prefix="com/sun/jna/linux-sparcv9"/> +- <zipfileset src="${lib.native}/sunos-x86.jar" +- includes="*jnidispatch*" +- prefix="com/sun/jna/sunos-x86"/> +- <zipfileset src="${lib.native}/sunos-x86-64.jar" +- includes="*jnidispatch*" +- prefix="com/sun/jna/sunos-x86-64"/> +- <zipfileset src="${lib.native}/sunos-sparc.jar" +- includes="*jnidispatch*" +- prefix="com/sun/jna/sunos-sparc"/> +- <zipfileset src="${lib.native}/sunos-sparcv9.jar" +- includes="*jnidispatch*" +- prefix="com/sun/jna/sunos-sparcv9"/> +- <zipfileset src="${lib.native}/freebsd-x86.jar" +- includes="*jnidispatch*" +- prefix="com/sun/jna/freebsd-x86"/> +- <zipfileset src="${lib.native}/freebsd-x86-64.jar" +- includes="*jnidispatch*" +- prefix="com/sun/jna/freebsd-x86-64"/> +- <zipfileset src="${lib.native}/openbsd-x86.jar" +- includes="*jnidispatch*" +- prefix="com/sun/jna/openbsd-x86"/> +- <zipfileset src="${lib.native}/openbsd-x86-64.jar" +- includes="*jnidispatch*" +- prefix="com/sun/jna/openbsd-x86-64"/> +- <zipfileset src="${lib.native}/win32-x86-64.jar" +- includes="*jnidispatch*" +- prefix="com/sun/jna/win32-x86-64"/> +- <zipfileset src="${lib.native}/w32ce-arm.jar" +- includes="*jnidispatch*" +- prefix="com/sun/jna/w32ce-arm"/> + </jar> + <zip zipfile="${build}/${minjar}"> + <zipfileset src="${build}/${jar}" excludes="**/*jnidispatch*"/> diff --git a/community/java-jna/APKBUILD b/community/java-jna/APKBUILD new file mode 100644 index 0000000000..cd2d10b952 --- /dev/null +++ b/community/java-jna/APKBUILD @@ -0,0 +1,71 @@ +# Contributor: Jakub Jirutka <jakub@jirutka.cz> +# Maintainer: Jakub Jirutka <jakub@jirutka.cz> +pkgname=java-jna +_pkgname=${pkgname#java-} +pkgver=4.2.2 +pkgrel=1 +pkgdesc="JNA provides Java programs easy access to native shared libraries." +url="https://github.com/java-native-access/jna" +arch="x86 x86_64" +license="ASL-2.0 LGPL-2.1" +depends="openjdk8-jre-base" +makedepends="apache-ant autoconf automake build-base libffi-dev>=3.2 libtool openjdk8" +subpackages="$pkgname-native" +source="$pkgname-$pkgver.tar.gz::https://github.com/java-native-access/$_pkgname/archive/$pkgver.tar.gz + 0001-jar-without-natives.patch + " +builddir="$srcdir/$_pkgname-$pkgver" + +prepare() { + cd "$builddir" + + # Disable Java AWT support (requires some X libs). + sed -i -E "s/^(CDEFINES=.*)$/\1 -DNO_JAWT/g" native/Makefile || return 1 + + # Remove bundled libffi sources, we're gonna use headers form libffi-dev. + rm -r native/libffi || return 1 + + find -name "*.jar" -exec rm {} + || return 1 + + default_prepare # apply patches +} + +build() { + cd "$builddir" + + ant clean + + # Parallel build doesn't work here! + MAKEFLAGS="-j1" \ + ant native -Drelease=true -Ddynlink.native=true \ + && ant jar -Domit-jnilib=true +} + +package() { + depends="$pkgname" + + install -m644 -D "$builddir"/build/jna.jar \ + "$pkgdir"/usr/share/java/$_pkgname-$pkgver.jar || return 1 + ln -sf $_pkgname-$pkgver.jar "$pkgdir"/usr/share/java/$_pkgname.jar +} + +native() { + arch="all" + local soname="libjnidispatch.so" + + cd "$builddir" + + local sover="$(sed -En 's/^JNA_JNI_VERSION=([^ ]+).*/\1/p' native/Makefile)" + [ -n "$sover" ] || return 1 + + install -m755 -D build/native-linux-*/$soname \ + "$subpkgdir"/usr/lib/$soname.$sover || return 1 + ln -sf $soname.$sover "$subpkgdir"/usr/lib/$soname +} + +md5sums="51d0359bcdb999ec0a655c68d399f304 java-jna-4.2.2.tar.gz +2eceb51b9eafbe0a7f162fe6b3297c03 0001-jar-without-natives.patch" +sha256sums="46330123be97fa5c11b1747c74470a39f2b1a3396d66fd6ead4d034660eb094a java-jna-4.2.2.tar.gz +bad5487a1c8aa4e227b1a27fbac787e9d84a6bf748325708cdf045b625bd1f82 0001-jar-without-natives.patch" +sha512sums="11ab524f87f6dc7fe3ac8eb0620f9ba392445147770304be7b7fa5cd49de8efed983ad30c16077bfa6419eaf1ff50311a3ded811a78fdcd09bc686ef93ad7f9f java-jna-4.2.2.tar.gz +67110a14ef0879c590427c919ec0057aab5902ba1fb3a3a1aa9f9c395aefb31f4b2244d0a2a59fde1a2fae418ee45d666f3fd780784c6194abe533f4f5cbebbc 0001-jar-without-natives.patch" |