diff options
-rw-r--r-- | java/java-cup/PKGBUILD | 41 | ||||
-rw-r--r-- | java/java-cup/java-cup.sh | 2 | ||||
-rw-r--r-- | libre/antlr2/PKGBUILD | 8 | ||||
-rw-r--r-- | libre/antlr2/runantlr2.sh | 6 |
4 files changed, 49 insertions, 8 deletions
diff --git a/java/java-cup/PKGBUILD b/java/java-cup/PKGBUILD new file mode 100644 index 000000000..97b41e20b --- /dev/null +++ b/java/java-cup/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net> + +pkgname=java-cup +_pkgver=0.10k +pkgver=0.10.k +pkgdesc="LALR parser generator for Java" +url=http://www2.cs.tum.edu/projects/cup/ +license=('custom:MIT') + +pkgrel=1 +arch=('any') +depends=('java-environment') + +source=(http://www2.cs.tum.edu/projects/cup/java_cup_v${_pkgver#*.}.tar.gz java-cup.sh) +md5sums=('8b11edfec13c590ea443d0f0ae0da479' + '2ec9859574d479ee27c71e8b7f978eea') + +prepare() { + cd "$srcdir" + find . -name '*.class' -delete +} + +build() { + cd "$srcdir" + mkdir classes + find java_cup -name '*.java' -exec javac -d classes {} + + jar cfe java_cup.jar java_cup.Main -C classes . +} + +package() { + cd "$srcdir" + + install -Dm644 java_cup.jar "$pkgdir"/usr/share/java/java_cup-${_pkgver}.jar + ln -s java_cup-${_pkgver}.jar "$pkgdir"/usr/share/java/java_cup.jar + + install -Dm755 java-cup.sh "$pkgdir"/usr/bin/java-cup + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + + install -d "$pkgdir"/usr/share/doc/$pkgname + install -m644 manual.html cup_logo.gif -t "$pkgdir"/usr/share/doc/$pkgname +} diff --git a/java/java-cup/java-cup.sh b/java/java-cup/java-cup.sh new file mode 100644 index 000000000..b7bf91d14 --- /dev/null +++ b/java/java-cup/java-cup.sh @@ -0,0 +1,2 @@ +#!/bin/sh +java -jar /usr/share/java/java_cup.jar "$@" diff --git a/libre/antlr2/PKGBUILD b/libre/antlr2/PKGBUILD index 5d0fd6eb0..49dbd2226 100644 --- a/libre/antlr2/PKGBUILD +++ b/libre/antlr2/PKGBUILD @@ -10,17 +10,17 @@ pkgdesc="Another Tool for Language Recognition" url="http://www.antlr2.org/" license=('custom:Public Domain') -pkgrel=6 +pkgrel=6.1 # newer than Arch's 2.7.7-6 arch=('i686' 'x86_64') options=('staticlibs') -makedepends=('java-environment' 'python2' 'sh' 'nant' 'jh') +makedepends=('java-environment' 'python2' 'bash' 'nant' 'jh') source=("http://www.antlr2.org/download/antlr-${pkgver}.tar.gz" "http://repo.maven.apache.org/maven2/antlr/antlr/$pkgver/antlr-$pkgver.pom" 'runantlr2.sh' 'gcc4.4.patch' 'mono.patch') md5sums=('01cc9a2a454dd33dcd8c856ec89af090' '78af3de823003f6d8dded39c70bc30ae' - '78e9bf86bd44722f232f80bc7b04dcfe' + '05cb34ec96d85fca430dda91c3200ba4' '158677e4c0f357afbb56656231a54815' '0d1960d27ff81f2fea0dd35a8290216f') @@ -46,7 +46,7 @@ _install_license() { } package_antlr2() { - depends=('sh' 'antlr2-java') + depends=('bash' 'antlr2-java') install -Dm755 "$srcdir"/runantlr2.sh "$pkgdir"/usr/bin/runantlr2 _install_license diff --git a/libre/antlr2/runantlr2.sh b/libre/antlr2/runantlr2.sh index aebc9dfa7..d274e56a9 100644 --- a/libre/antlr2/runantlr2.sh +++ b/libre/antlr2/runantlr2.sh @@ -1,5 +1,3 @@ -#!/bin/sh -echo Running 'java antlr.Tool $*' with /usr/share/java/antlr2.jar appended to the CLASSPATH variable -export CLASSPATH -CLASSPATH=$CLASSPATH:/usr/share/java/antlr2.jar +#!/bin/bash +export CLASSPATH="/usr/share/java/antlr2.jar${CLASSPATH:+:$CLASSPATH}" java antlr.Tool "$@" |