2010-11-29 02:42:15 +08:00
#
2013-09-28 18:32:16 +08:00
# Platform Packages for Chakra, part of www.chakra-project.org
2010-11-29 02:42:15 +08:00
#
2013-09-28 18:32:16 +08:00
# Maintainer: None
# Contributors: H W Tovetjärn (totte) <totte@tott.es>
# Phil Miller <philm@chakra-project.org>
# Manuel Tortosa <manutortosa@chakra-project.org>
2010-11-29 02:42:15 +08:00
pkgbase = antlr2
2013-09-28 18:32:16 +08:00
pkgname = ( 'antlr2' 'python2-antlr2' )
2010-11-29 02:42:15 +08:00
pkgver = 2.7.7
2013-09-28 18:32:16 +08:00
pkgrel = 4
arch = ( 'x86_64' )
2010-11-29 02:42:15 +08:00
url = "http://www.antlr2.org/"
license = ( 'custom' )
makedepends = ( 'java-environment' 'python2' 'sh' )
source = ( " http://www.antlr2.org/download/antlr- ${ pkgver } .tar.gz "
2013-09-28 18:32:16 +08:00
'runantlr2.sh'
'gcc4.4.patch' )
2010-11-29 02:42:15 +08:00
md5sums = ( '01cc9a2a454dd33dcd8c856ec89af090'
2013-09-28 18:32:16 +08:00
'e4aa827cf78f97c4e5fae086831192d6'
'8574c93f40e6477e83c29f9b07de49da' )
2010-11-29 02:42:15 +08:00
build( ) {
2013-09-28 18:32:16 +08:00
cd " ${ srcdir } /antlr- ${ pkgver } "
patch -Np0 -i ${ srcdir } /gcc4.4.patch
./configure \
--prefix= /usr \
--disable-examples \
--disable-csharp
make
2010-11-29 02:42:15 +08:00
}
package_antlr2( ) {
2013-09-28 18:32:16 +08:00
pkgdesc = "ANother Tool for Language Recognition, (formerly PCCTS) is a language tool that provides a framework for constructing recognizers, compilers, and translators from grammatical descriptions containing C++ or Java actions"
depends = ( 'java-runtime' 'sh' )
replaces = ( 'antlr' )
conflicts = ( 'antlr' )
provides = ( " antlr= ${ pkgver } " )
cd ${ srcdir } /antlr-${ pkgver } /lib/cpp
make prefix = " ${ pkgdir } /usr " install
install -Dm644 ${ srcdir } /antlr-${ pkgver } /antlr/antlr.jar \
" ${ pkgdir } /usr/share/java/antlr2.jar "
install -Dm755 ${ srcdir } /runantlr2.sh ${ pkgdir } /usr/bin/runantlr2
install -Dm644 ${ srcdir } /antlr-${ pkgver } /LICENSE.txt \
" ${ pkgdir } /usr/share/licenses/ ${ pkgname } /LICENSE "
2010-11-29 02:42:15 +08:00
}
2013-09-28 18:32:16 +08:00
package_python2-antlr2( ) {
pkgdesc = "ANother Tool for Language Recognition, (formerly PCCTS) is a language tool that provides a framework for constructing recognizers, compilers, and translators from grammatical descriptions containing C++ or Java actions (Python version)"
depends = ( 'antlr2' 'python2' )
replaces = ( 'python-antlr' 'python-antlr2' )
conflicts = ( 'python-antlr' 'python-antlr2' )
provides = ( " python-antlr= ${ pkgver } " )
cd ${ srcdir } /antlr-${ pkgver } /lib/python
python2 setup.py install --root= " ${ pkgdir } " --optimize= 1
2010-11-29 02:42:15 +08:00
2013-09-28 18:32:16 +08:00
install -d ${ pkgdir } /usr/share/licenses
ln -s /usr/share/licenses/antlr2 ${ pkgdir } /usr/share/licenses/${ pkgname }
2010-11-29 02:42:15 +08:00
}