diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-07-07 17:38:19 -0600 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-07-07 17:38:19 -0600 |
commit | 725e52b2d5905231b38c320cda96752b549533ad (patch) | |
tree | bd86be03561af2105b1d68d05e2d00121544e926 /java | |
parent | 556aa85ce6326285a2d60abfc1af59dbe64863a4 (diff) | |
download | abslibre-725e52b2d5905231b38c320cda96752b549533ad.tar.gz abslibre-725e52b2d5905231b38c320cda96752b549533ad.tar.bz2 abslibre-725e52b2d5905231b38c320cda96752b549533ad.zip |
mv java/not-working/closure-compiler java
It still has bundled pre-compiled dependencies. However their licenses all
check out. The problematic one was json.jar ('java-json'), which we now
provide with 'java-json-android'.
Diffstat (limited to 'java')
-rw-r--r-- | java/closure-compiler/PKGBUILD | 67 | ||||
-rw-r--r-- | java/closure-compiler/closure-compiler.sh | 2 | ||||
-rw-r--r-- | java/not-working/closure-compiler/PKGBUILD | 73 | ||||
-rw-r--r-- | java/not-working/closure-compiler/TODO | 2 |
4 files changed, 69 insertions, 75 deletions
diff --git a/java/closure-compiler/PKGBUILD b/java/closure-compiler/PKGBUILD new file mode 100644 index 000000000..25d5d60ad --- /dev/null +++ b/java/closure-compiler/PKGBUILD @@ -0,0 +1,67 @@ +# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net> + +pkgname=closure-compiler +pkgver=20130603 +pkgdesc="A JavaScript optimizing compiler." +url="https://code.google.com/closure/compiler/" +license=('Apache2') + +pkgrel=1 +arch=('any') +depends=('java-runtime' 'sh') +makedepends=( + 'apache-ant' + #'java-args4j' # does not exist + #'google-caja' # does not exist + #'java-guava' # does not build + 'java-jarjar' + 'java-json' + #'java-jsr305' # does not exist + 'junit' + #'java-protobuf' # does not build + # maven-ant-tasks + 'jh') + +source=("libre://$pkgname-$pkgver.tar.gz" 'closure-compiler.sh') + +mksource=("$pkgname-$pkgver::git+https://code.google.com/p/closure-compiler/#tag=v${pkgver}") +mkmd5sums=('SKIP') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + ln -sf /opt/apache-ant/lib/ant.jar lib/ant.jar + ln -sf /opt/apache-ant/lib/ant-launcher.jar lib/ant-launcher.jar + #ln -sf /usr/share/java/args4.jar lib/args4j.jar + #ln -sf /usr/share/java/caja-r4314.jar lib/caja-r4314.jar + #ln -sf /usr/share/java/guava.jar lib/guava.jar + ln -sf /usr/share/java/jarjar.jar lib/jarjar.jar + ln -sf /usr/share/java/json.jar lib/json.jar + #ln -sf /usr/share/java/jsr305.jar lib/jsr305.jar + ln -sf /usr/share/java/junit.jar lib/junit.jar + #ln -sf /usr/share/java/protobuf.jar lib/protobuf-java.jar + #ln -sf /... tools/maven-ant-tasks-2.1.3.jar + + sed -i " +/<target name=\"relversion\">/,/<\/target>/ { + s/executable=\"git\"/executable=\"echo\"/ + /<arg/d + /<\/exec>/i<arg value=\"v${pkgver}\" /> +}" build.xml + + ant jar pom +} + +package() { + cd "$srcdir" + install -Dm755 closure-compiler.sh "$pkgdir"/usr/bin/closure-compiler + + cd "$srcdir/$pkgname-$pkgver" + DESTDIR="$pkgdir" jh mvn-install \ + com.google.javascript closure-compiler v${pkgver} \ + build/pom.xml build/compiler.jar \ + closure-compiler.jar +} + +md5sums=('00b89084401b9550166a1f1294f9ba39' + 'd4ead4585fcc7039d3c32eb5c4491bb9') diff --git a/java/closure-compiler/closure-compiler.sh b/java/closure-compiler/closure-compiler.sh new file mode 100644 index 000000000..e06590db2 --- /dev/null +++ b/java/closure-compiler/closure-compiler.sh @@ -0,0 +1,2 @@ +#!/bin/sh +java -jar /usr/share/java/closure-compiler.jar "$@" diff --git a/java/not-working/closure-compiler/PKGBUILD b/java/not-working/closure-compiler/PKGBUILD deleted file mode 100644 index 8318379a2..000000000 --- a/java/not-working/closure-compiler/PKGBUILD +++ /dev/null @@ -1,73 +0,0 @@ -# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net> - -pkgname=closure-compiler -pkgver=20120917 -_pkgrev=2180 -pkgdesc="A JavaScript optimizing compiler." -url="https://code.google.com/closure/compiler/" -license=('Apache') - -pkgrel=1 -arch=('any') -depends=('java-runtime') -makedepends=( - 'apache-ant' - 'java-args4j' # does not exist - 'google-caja' # does not exist - 'java-guava' # does not build - 'java-jarjar' - 'java-json' # does not exist - 'java-jsr305' # does not exist - 'junit' - 'java-protobuf' # does not build - # maven-ant-tasks - 'jh') -source=("compiler-$pkgver::svn+http://closure-compiler.googlecode.com/svn/trunk/#revision=$_pkgrev") - -# For some reason, `file` detects this as a Fortran binary -_funny_js=( - lib/rhino/testsrc/benchmarks/sunspider-0.9.1/bitops-3bit-bits-in-byte.js -) - -mksource() { - cd "$srcdir/compiler-$pkgver" - rm lib/ant.jar - rm lib/ant-launcher.jar - rm lib/args4j.jar - rm lib/caja-r4314.jar - rm lib/guava.jar - rm lib/jarjar.jar - rm lib/json.jar - rm lib/jsr305.jar - rm lib/junit.jar - rm lib/protobuf-java.jar - rm lib/rhino/testsrc/org/mozilla/javascript/tests/commonjs/module/modules.jar - rm tools/maven-ant-tasks-2.1.3.jar -} - -build() { - cd "$srcdir/compiler-$pkgver" - eval `jh mksource ${_funny_js[@]}` - - ln -s /opt/apache-ant/lib/ant.jar lib/ant.jar - ln -s /opt/apache-ant/lib/ant-launcher.jar lib/ant-launcher.jar - ln -s /usr/share/java/... lib/args4j.jar - ln -s /usr/share/java/... lib/caja-r4314.jar - ln -s /usr/share/java/... lib/guava.jar - ln -s /usr/share/java/jarjar.jar lib/jarjar.jar - ln -s /usr/share/java/... lib/json.jar - ln -s /usr/share/java/... lib/jsr305.jar - ln -s /usr/share/java/junit.jar lib/junit.jar - ln -s /usr/share/java/protobuf.jar lib/protobuf-java.jar - # I think lib/rhino/.../module.jar autogenerates - ln -s /... tools/maven-ant-tasks-2.1.3.jar - - ant jar -} - -package() { - cd "$srcdir/$pkgname" - : -} - -md5sums=('SKIP') diff --git a/java/not-working/closure-compiler/TODO b/java/not-working/closure-compiler/TODO deleted file mode 100644 index 8527a4898..000000000 --- a/java/not-working/closure-compiler/TODO +++ /dev/null @@ -1,2 +0,0 @@ -* Has plenty of missing dependencies (most of the 'not-working' folder) -* package() has not been written |