From 706009a7dba502eb03d133afe818c03a43d45108 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 26 Sep 2012 16:51:39 -0400 Subject: add java/jna, a dependency of arduino --- java/jna/PKGBUILD | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 java/jna/PKGBUILD (limited to 'java/jna/PKGBUILD') diff --git a/java/jna/PKGBUILD b/java/jna/PKGBUILD new file mode 100644 index 000000000..db5f552cb --- /dev/null +++ b/java/jna/PKGBUILD @@ -0,0 +1,117 @@ +# Maintainer: Luke Shumaker + +pkgname=jna +pkgver=3.4.2 + +pkgdesc="Provides Java programs easy access to native shared libraries" +url="https://github.com/twall/jna" +license=('LGPL') +source=("git://github.com/twall/jna.git#tag=${pkgver}" + 'libre-without-clover.patch' + 'bugfix-type-inference.patch' + 'webstart-test.keystore') + +#### + +pkgrel=1 +arch=('i686' 'x86_64') +depends=('java-environment' 'libffi') +makedepends=('apache-ant' 'zip') +checkdepends=('junit' 'icedtea-web-java7') +options=('!makeflags') + +unset _JAVA_OPTIONS +_M2_LOCALREPO='/usr/share/maven/repository' +. /etc/profile.d/jdk.sh + +_ant_options=( + '-Ddynlink.native=true' # use the system install of libffi +) + +#### + +mksource() { + cd "$srcdir/jna" + find . -name '*.jar' -delete + rm -rf dist + rm -rf native/libffi # make sure it doesn't cheat + rm lib/clover.license + rm w32ce-test.lnk + + ln -s /usr/share/java/junit.jar lib/ + + # Create an emtpy zip (jar) file + cd "$srcdir" + touch file + zip empty.zip file + zip -d empty.zip file + rm file +} + +#### + +build() { + mksource + cd "$srcdir/jna" + + # Because JNA's release process is ridiculous, it wants a jar file for every + # architecture to be present. So let's just dump in an empty jar file! + sed -n 's|\s*