[arch-commits] Commit in antlr/trunk (PKGBUILD antlr gcc4.4.patch runantlr.sh)
Andrea Scarpino
andrea at archlinux.org
Tue Aug 31 08:27:19 UTC 2010
Date: Tuesday, August 31, 2010 @ 04:27:19
Author: andrea
Revision: 89300
moved from [community]; new kdesdk-poxml dependence
Added:
antlr/trunk/gcc4.4.patch
antlr/trunk/runantlr.sh
Modified:
antlr/trunk/PKGBUILD
Deleted:
antlr/trunk/antlr
--------------+
PKGBUILD | 70 +++++++++++++++++++++++++++++++++++++--------------------
antlr | 4 ---
gcc4.4.patch | 21 +++++++++++++++++
runantlr.sh | 5 ++++
4 files changed, 72 insertions(+), 28 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2010-08-31 06:45:58 UTC (rev 89299)
+++ PKGBUILD 2010-08-31 08:27:19 UTC (rev 89300)
@@ -1,30 +1,52 @@
-# $Id$
+# $Id $
+# Maintainer: Andrea Scarpino <andrea at archlinux.org>
+# Contributor: George Giorgidze <giorgidze (at) gmail.com>
+# Contributor: Stefan Husmann <stefan-husmann at t-online.de>
-pkgname=antlr
+pkgbase=antlr
+pkgname=('antlr' 'python-antlr')
pkgver=2.7.7
-pkgrel=1
-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"
-arch=(i686 x86_64)
+pkgrel=7
+arch=('any')
url="http://www.antlr.org/"
-depends=('gcc-gcj')
-makedepends=('eclipse-ecj' 'fastjar' 'python')
-source=(http://www.antlr2.org/download/${pkgname}-${pkgver}.tar.gz
- antlr)
-md5sums=('01cc9a2a454dd33dcd8c856ec89af090' 'a8b60d69af679f0c55602ded8816d1cc')
+license=('custom')
+makedepends=('java-environment' 'python')
+source=("http://www.antlr2.org/download/${pkgbase}-${pkgver}.tar.gz"
+ 'runantlr.sh'
+ 'gcc4.4.patch')
+md5sums=('01cc9a2a454dd33dcd8c856ec89af090'
+ '5210a7d580014a043a2daaa402364588'
+ '8574c93f40e6477e83c29f9b07de49da')
build() {
- cd ${startdir}/src/${pkgname}-${pkgver}
- unset BOOTCLASSPATH
- JAVA=/usr/bin/gij JAVAC=/usr/bin/ecj ./configure --prefix=/usr --disable-csharp
- make || return 1
- pushd lib/cpp
- make prefix=${startdir}/pkg/usr install
- popd
- pushd lib/python
- python setup.py install --root=${startdir}/pkg
- popd
- mkdir -p ${startdir}/pkg/usr/share/java
- mkdir -p ${startdir}/pkg/usr/bin
- install -m644 antlr/antlr.jar ${startdir}/pkg/usr/share/java/
- install -m755 ${startdir}/src/antlr ${startdir}/pkg/usr/bin
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+
+ patch -Np0 -i ${srcdir}/gcc4.4.patch
+
+ ./configure --prefix=/usr \
+ --disable-examples \
+ --disable-csharp
+ make
}
+
+package_antlr() {
+ 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')
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/lib/cpp
+ make prefix="${pkgdir}/usr" install
+
+ install -Dm644 ${srcdir}/${pkgbase}-${pkgver}/antlr/antlr.jar \
+ "${pkgdir}/usr/share/java/antlr.jar"
+ install -Dm755 ${srcdir}/runantlr.sh ${pkgdir}/usr/bin/runantlr
+ install -Dm644 ${srcdir}/${pkgbase}-${pkgver}/LICENSE.txt \
+ "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+
+package_python-antlr() {
+ 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=('antlr')
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/lib/python
+ python setup.py install --root="${pkgdir}"
+}
Deleted: antlr
===================================================================
--- antlr 2010-08-31 06:45:58 UTC (rev 89299)
+++ antlr 2010-08-31 08:27:19 UTC (rev 89300)
@@ -1,4 +0,0 @@
-#!/bin/sh
-CLASS="`ls -1r /usr/share/java/libgcj-*.jar 2> /dev/null | grep -m 1 libgcj-[[:digit:]]`"
-CLASSPATH="${CLASS}:/usr/share/java/antlr.jar${CLASSPATH:+:}${CLASSPATH}" \
-gij antlr.Tool "$*"
Added: gcc4.4.patch
===================================================================
--- gcc4.4.patch (rev 0)
+++ gcc4.4.patch 2010-08-31 08:27:19 UTC (rev 89300)
@@ -0,0 +1,21 @@
+diff -Naur antlr-2.7.7.orig/lib/cpp/antlr/CharScanner.hpp antlr-2.7.7/lib/cpp/antlr/CharScanner.hpp
+--- lib/cpp/antlr/CharScanner.hpp 2006-11-01 22:37:17.000000000 +0100
++++ lib/cpp/antlr/CharScanner.hpp 2008-03-19 20:09:21.000000000 +0100
+@@ -10,6 +10,7 @@
+
+ #include <antlr/config.hpp>
+
++#include <cstring>
+ #include <map>
+
+ #ifdef HAS_NOT_CCTYPE_H
+--- lib/cpp/antlr/CharScanner.hpp~ 2008-11-11 21:24:02.000000000 +0000
++++ lib/cpp/antlr/CharScanner.hpp 2008-11-11 21:24:33.000000000 +0000
+@@ -10,6 +10,7 @@
+
+ #include <antlr/config.hpp>
+
++#include <cstdio>
+ #include <cstring>
+ #include <map>
+
Added: runantlr.sh
===================================================================
--- runantlr.sh (rev 0)
+++ runantlr.sh 2010-08-31 08:27:19 UTC (rev 89300)
@@ -0,0 +1,5 @@
+#!/bin/sh
+echo Running 'java antlr.Tool $*' with /usr/share/java/antlr.jar appended to the CLASSPATH variable
+export CLASSPATH
+CLASSPATH=$CLASSPATH:/usr/share/java/antlr.jar
+java antlr.Tool $*
More information about the arch-commits
mailing list