diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-02-22 15:48:22 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-02-22 15:48:22 -0500 |
commit | 933408834ea04791a9b651d46589d7276c5b91a7 (patch) | |
tree | abd6ef01723eea97eb4d637cdf1005e970a08cfc /libre/antlr2/PKGBUILD | |
parent | b942fafe021b02d85580985988923db9cca4c7f1 (diff) |
update apache-ant, move it (and dependencies) from [java] to [libre]
Diffstat (limited to 'libre/antlr2/PKGBUILD')
-rw-r--r-- | libre/antlr2/PKGBUILD | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/libre/antlr2/PKGBUILD b/libre/antlr2/PKGBUILD new file mode 100644 index 000000000..a17f070ae --- /dev/null +++ b/libre/antlr2/PKGBUILD @@ -0,0 +1,100 @@ +# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net> +# Maintainer (Arch): Andrea Scarpino <andrea@archlinux.org> +# Contributor: George Giorgidze <giorgidze (at) gmail.com> +# Contributor: Stefan Husmann <stefan-husmann@t-online.de> + +pkgbase=antlr2 +pkgname=(antlr2 antlr2-{java,python2,cxx,sharp}) +pkgver=2.7.7 +pkgdesc="ANother Tool for Language Recognition" +url="http://www.antlr2.org/" +license=('custom:Public Domain') + +pkgrel=5.1 # newer than Arch's 2.7.7-5 +arch=('i686' 'x86_64') +options=('staticlibs') +makedepends=('java-environment' 'python2' 'sh' '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' + '158677e4c0f357afbb56656231a54815' + '0d1960d27ff81f2fea0dd35a8290216f') + +build() { + cd "${srcdir}/antlr-${pkgver}" + + patch -Np1 -i "${srcdir}"/gcc4.4.patch + patch -Np1 -i "${srcdir}"/mono.patch + + ./configure --prefix=/usr --disable-examples + make -j1 + + cd lib/csharp + nant release +} + +_install_license() { + install -Dm644 "$srcdir"/antlr-${pkgver}/LICENSE.txt \ + "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} + +package_antlr2() { + depends=('sh' 'antlr2-java') + + install -Dm755 "$srcdir"/runantlr2.sh "$pkgdir"/usr/bin/runantlr2 + _install_license +} + +package_antlr2-java() { + pkgdesc+=" (Java version)" + depends=('java-runtime') + + provides=("java-antlr2=$pkgver") + conflicts=("java-antlr2") + replaces=("java-antlr2") + + DESTDIR="$pkgdir" jh mvn-install antlr antlr $pkgver \ + "$srcdir"/antlr-${pkgver}.pom \ + "$srcdir"/antlr-${pkgver}/antlr/antlr.jar \ + antlr2.jar + + _install_license +} + +package_antlr2-python2() { + pkgdesc+=" (Python version)" + depends=('python2') + + provides=("python2-antlr2=$pkgver") + conflicts=("python2-antlr2") + replaces=("python2-antlr2") + + cd "$srcdir"/antlr-${pkgver}/lib/python + python2 setup.py install --root="${pkgdir}" --optimize=1 + + _install_license +} + +package_antlr2-cxx() { + pkgdesc+=" (C++ version)" + + cd "$srcdir"/antlr-${pkgver}/lib/cpp + make -j1 prefix="${pkgdir}/usr" install + + _install_license +} + +package_antlr2-sharp() { + pkgdesc+=" (C Sharp version)" + depends=('mono') + + cd "$srcdir"/antlr-${pkgver}/lib/csharp + install -d "$pkgdir"/usr/share + make -j1 prefix="${pkgdir}/usr" install + + _install_license +} |