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 +++++++++++++++++++++++++++++++++++ java/jna/bugfix-type-inference.patch | 13 ++++ java/jna/libre-without-clover.patch | 71 +++++++++++++++++++++ java/jna/webstart-test.keystore | Bin 0 -> 679 bytes 4 files changed, 201 insertions(+) create mode 100644 java/jna/PKGBUILD create mode 100644 java/jna/bugfix-type-inference.patch create mode 100644 java/jna/libre-without-clover.patch create mode 100644 java/jna/webstart-test.keystore (limited to 'java/jna') 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* klass = Class.forName(args[i]); ++ junit.textui.TestRunner.run((Class)klass); + } + catch(Throwable e) { + e.printStackTrace(); diff --git a/java/jna/libre-without-clover.patch b/java/jna/libre-without-clover.patch new file mode 100644 index 000000000..b4947e8b2 --- /dev/null +++ b/java/jna/libre-without-clover.patch @@ -0,0 +1,71 @@ +diff -ru jna-3.4.2.orig/build.xml jna-3.4.2/build.xml +--- jna-3.4.2.orig/build.xml 2012-09-06 06:55:52.000000000 -0400 ++++ jna-3.4.2/build.xml 2012-09-24 15:49:59.000000000 -0400 +@@ -230,7 +230,6 @@ + + + +- + + + +@@ -536,12 +535,11 @@ + + + +- + + + + +- ++ + + + +@@ -626,7 +624,7 @@ + + + View test report in file://${reports.junit}/index.html +- One or more tests failed ++ One or more tests failed + + + +@@ -640,27 +638,6 @@ + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- Reports generated in ${reports.clover} +- +- + + + +@@ -881,7 +858,7 @@ + + + +- ++ + + + diff --git a/java/jna/webstart-test.keystore b/java/jna/webstart-test.keystore new file mode 100644 index 000000000..1bbe8c829 Binary files /dev/null and b/java/jna/webstart-test.keystore differ -- cgit v1.2.3