diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-12-03 23:26:44 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-12-03 23:26:44 -0500 |
commit | 889356fb096ccf92488629067f8642969c91762f (patch) | |
tree | 71db623a53cf93c2402f0d0246eb3182eee6a95c /java/arduino/PKGBUILD | |
parent | 0fe755e60cece6ee398a9399bc69d517cb81bae3 (diff) |
update java/arduino 1.0.1 -> 1.0.2
Diffstat (limited to 'java/arduino/PKGBUILD')
-rw-r--r-- | java/arduino/PKGBUILD | 91 |
1 files changed, 48 insertions, 43 deletions
diff --git a/java/arduino/PKGBUILD b/java/arduino/PKGBUILD index 426664a37..aeb46feee 100644 --- a/java/arduino/PKGBUILD +++ b/java/arduino/PKGBUILD @@ -1,8 +1,9 @@ -# Maintainer: PyroPeter <googlemail.com@abi1789> +# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net> +# Maintainer (AUR): PyroPeter <googlemail.com@abi1789> pkgname=arduino -pkgver=1.0.1 -pkgrel=2 +pkgver=1.0.2 +pkgrel=1 pkgdesc="Arduino SDK and IDE" arch=('i686' 'x86_64') url="http://arduino.cc/en/Main/Software" @@ -11,91 +12,95 @@ license=('GPL') depends=('avr-gcc' 'avr-libc' 'libusb-compat' 'java-runtime' 'avrdude' 'java-rxtx' 'antlr2' 'eclipse-ecj' 'jna') -makedepends=(java-environment apache-ant jh) +makedepends=(java-environment apache-ant makepkg-git) install="arduino.install" source=("http://arduino.googlecode.com/files/arduino-$pkgver-src.tar.gz" - 'sig-patch.diff' + 'avrlibc-signals.patch' + 'external-avrtools.patch' 'arduino.png' 'arduino.desktop') unset _JAVA_OPTIONS . /etc/profile.d/jdk.sh -mksource() { +prepare() { cd "$srcdir/arduino-$pkgver" + find . -name '*.hex' -delete find . -name '*.jar' -delete + find . -name '*.so' -delete find . -name '*.swp' -delete - find . -name '*.so' -delete - rm -rf build/linux/dist/*/* + rm -f build/linux/dist/tools/avrdude* + rm -rf hardware/arduino/firmwares/wifishield } -build() { - cd "$srcdir/arduino-$pkgver" - eval `jh mksource build/shared/reference.zip` - - cd "$srcdir" - mkdir empty.d - cd empty.d - bsdtar cjf ../empty.tar.bz2 . - cd .. - rmdir empty.d +_link_jars() { + for jar in RXTXcomm.jar antlr2.jar ecj.jar jna.jar; do + ln -sf /usr/share/java/$jar . + done +} +_patch() { cd "$srcdir/arduino-$pkgver" # Fix issue 955 to be compatible with newer versions of avr-libc # https://code.google.com/p/arduino/issues/detail?id=955 # Note: this patch is not the patch given in the comments - patch -Np1 -i "$srcdir/sig-patch.diff" + patch -Np1 -i "$srcdir/avrlibc-signals.patch" + grep -rl 'SIGNAL\s*(' . | xargs sed -ri 's/SIGNAL\s*\(([^)]*_vect)\)/ISR(\1)/g' + + # Don't look for pre-compiled avr-tools + patch -Np1 -i "$srcdir/external-avrtools.patch" - #ln -s /.../RXTXcomm.jar app/lib # already on the classpath - ln -s /usr/share/java/antlr2.jar app/lib/antlr.jar - #ln -s /.../apple.jar app/lib # only used on Mac OS - ln -s /usr/share/java/ecj.jar app/lib - ln -s /usr/share/java/jna.jar app/lib - ln -s /usr/bin/avrdude build/linux/dist/tools + rm -rf app/src/processing/app/macosx - ln -s "$srcdir/empty.tar.bz2" build/linux/avr_tools_linux32.tar.bz2 - ln -s "$srcdir/empty.tar.bz2" build/linux/avr_tools_linux64.tar.bz2 + cd app/lib + _link_jars +} + +build() { + _patch - for d in methods preproc; do - cd "$srcdir/arduino-$pkgver/core/$d" - ant + # build submodules + for submodule in core/methods core/preproc; do + cd "$srcdir/arduino-$pkgver/$submodule" + ant done + # build the main package cd "$srcdir/arduino-$pkgver/build" - log=`mktemp` ant 2>&1|tee "$log" if egrep -q 'Error|FAILED' "$log"; then - rm "$log" - false + rm "$log" + false else - rm "$log" + rm "$log" fi + + # symlink jar files to the system locations + cd "linux/work/lib" + _link_jars } package() { cd "$srcdir/arduino-$pkgver/build/linux/work" - # arduino excutable should accept arguments - sed -i 's|^java .* processing.app.Base$|\0 "$@"|' arduino - sed -i 's|^APPDIR=.*|APPDIR=/usr/share/arduino|' arduino - - mkdir -p "$pkgdir"/usr/{bin,share/{doc,applications,pixmaps}} + install -d "$pkgdir"/usr/{bin,share/{doc,applications,pixmaps}} # copy the whole SDK to /usr/share/arduino/ cp -r . "$pkgdir/usr/share/arduino" # at least support the FHS a little bit: - install -m755 "arduino" "$pkgdir/usr/bin/arduino" - ln -s /usr/share/arduino/reference "$pkgdir/usr/share/doc/arduino" + ln -s ../share/arduino/arduino "$pkgdir/usr/bin/arduino" + ln -s ../arduino/reference "$pkgdir/usr/share/doc/arduino" # desktop icon install -m644 "$srcdir/arduino.desktop" "$pkgdir/usr/share/applications/" install -m644 "$srcdir/arduino.png" "$pkgdir/usr/share/pixmaps/" } -md5sums=('03263613f4be4f865989244420be04fa' - 'acadc724cbe08c09711825f4bd5c04f6' +md5sums=('dfb64e2a7de4a4a8b872732fe90e3249' + 'e44975d31aa1770e4f5ac6e6867b0864' + '9c696c2361d57027be41ae64436182aa' '9e36d33891d5e68d38ec55d1494499a5' 'eebc4d6495864bea99ad057af801afb9') |