diff --git a/.abf.yml b/.abf.yml
index 579b0a3..05cadb0 100644
--- a/.abf.yml
+++ b/.abf.yml
@@ -1,6 +1,5 @@
sources:
- "antlr3:" 4e02f3b099d80fd2630f599bb5b6a42381ec3913
- "antlr-3.2.tar.gz:" 4cd20a66a2ac19710d0617d9d69e321a9fa7152b
- "antlr-javascript-runtime-3.1.zip:" c7827e3f5315f7688fbbd04e22863213802ac627
- "antlr_python_runtime-3.1.2.tar.gz:" c57d4a03f80d157e9c0c1c8cd3038171900a364c
- "libantlr3c-3.2.tar.gz:" 89bfa4fbed8af7e089bff065a1ac8834a8deb493
+ antlr-3.4.tar.gz: 068a6bc929f9f0d6d643b31e7b56064f1bdb8442
+ antlr-javascript-runtime-3.1.zip: c7827e3f5315f7688fbbd04e22863213802ac627
+ antlr_python_runtime-3.1.3.tar.gz: dc095863a254cdf9606784dbd6efb43cf56a6804
+ libantlr3c-3.4.tar.gz: 6728a0f4b99c0a3bc73936218604e01550617ff1
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 1f899e4..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-antlr3
-antlr-3.2.tar.gz
-antlr-javascript-runtime-3.1.zip
-antlr_python_runtime-3.1.2.tar.gz
-libantlr3c-3.2.tar.gz
diff --git a/antlr-pom.patch b/antlr-pom.patch
deleted file mode 100644
index c9ba6d9..0000000
--- a/antlr-pom.patch
+++ /dev/null
@@ -1,149 +0,0 @@
-diff -up ./gunit-maven-plugin/pom.xml.pomfix ./gunit-maven-plugin/pom.xml
---- ./gunit-maven-plugin/pom.xml.pomfix 2010-10-12 17:09:19.304549001 -0400
-+++ ./gunit-maven-plugin/pom.xml 2010-10-12 17:09:52.489549017 -0400
-@@ -163,6 +163,12 @@
-
-
-
-+ org.apache.maven
-+ maven-artifact
-+ 2.2.1
-+
-+
-+
- org.codehaus.plexus
- plexus-compiler-api
- 1.5.3
-diff -up ./gunit/pom.xml.pomfix ./gunit/pom.xml
---- ./gunit/pom.xml.pomfix 2009-09-23 14:50:28.000000000 -0400
-+++ ./gunit/pom.xml 2010-10-12 17:05:12.000000000 -0400
-@@ -142,16 +142,6 @@
- maven-surefire-plugin
-
-
--
-- org.codehaus.mojo
-- findbugs-maven-plugin
--
-- true
-- true
-- true
--
--
--
-
-
-
-diff -up ./pom.xml.pomfix ./pom.xml
---- ./pom.xml.pomfix 2009-09-23 14:46:18.000000000 -0400
-+++ ./pom.xml 2010-10-12 17:05:12.770549001 -0400
-@@ -146,25 +146,6 @@
-
-
-
--
-- org.codehaus.mojo
-- buildnumber-maven-plugin
--
-- {0,date,MMM dd, yyyy} {0,time,kk:mm:ss}
--
-- - timestamp
--
--
--
--
-- validate
--
-- create
--
--
--
--
--
-
- maven-compiler-plugin
-
-@@ -179,16 +160,6 @@
-
-
-
-- org.codehaus.mojo
-- findbugs-maven-plugin
--
-- true
-- true
-- true
--
--
--
--
-
-
-+ <_nouses>true
-+ antlr.org
-+ org.antlr.runtime
-+ org.antlr.*;version=${project.version}
-+
-+
-+
-+
-+
-+ bundle-manifest
-+ process-classes
-+
-+ manifest
-+
-+
-+
-+
-
-
-
-diff -up ./tool/pom.xml.pomfix ./tool/pom.xml
---- ./tool/pom.xml.pomfix 2009-09-23 14:50:28.000000000 -0400
-+++ ./tool/pom.xml 2010-10-12 17:05:12.000000000 -0400
-@@ -59,7 +59,7 @@
-
- org.antlr
- antlr3-maven-plugin
-- 3.1.3-1
-+ 3.2
-
- target/generated-sources/antlr/org/antlr/grammar/v3
-
-@@ -77,6 +77,7 @@
-
- org.codehaus.mojo
- antlr-maven-plugin
-+ 2.1
-
- src/main/antlr2/org/antlr/grammar/v2
- antlr.g codegen.g, antlr.print.g, assign.types.g, buildnfa.g, define.g
diff --git a/antlr-python-3.1.2-version.patch b/antlr-python-3.1.2-version.patch
deleted file mode 100644
index ee9800c..0000000
--- a/antlr-python-3.1.2-version.patch
+++ /dev/null
@@ -1,37 +0,0 @@
---- antlr_python_runtime-3.1.2/antlr3/recognizers.py.orig 2010-05-01 13:30:01.000000000 +0200
-+++ antlr_python_runtime-3.1.2/antlr3/recognizers.py 2010-05-01 13:36:00.000000000 +0200
-@@ -164,24 +164,20 @@
- self._state = state
-
- if self.antlr_version > runtime_version:
-- raise RuntimeError(
-- "ANTLR version mismatch: "
-- "The recognizer has been generated by V%s, but this runtime "
-- "is V%s. Please use the V%s runtime or higher."
-- % (self.antlr_version_str,
-- runtime_version_str,
-- self.antlr_version_str))
-+ print >> sys.stderr, """
-+ WARNING: ANTLR version mismatch:
-+ The recognizer has been generated by V%s, but this runtime
-+ is V%s, this may not work correctly. Please use the V%s runtime or higher.""" % (
-+ self.antlr_version_str, runtime_version_str, self.antlr_version_str)
- elif (self.antlr_version < (3, 1, 0, 0) and
- self.antlr_version != runtime_version):
- # FIXME: make the runtime compatible with 3.0.1 codegen
- # and remove this block.
-- raise RuntimeError(
-- "ANTLR version mismatch: "
-- "The recognizer has been generated by V%s, but this runtime "
-- "is V%s. Please use the V%s runtime."
-- % (self.antlr_version_str,
-- runtime_version_str,
-- self.antlr_version_str))
-+ print >> sys.stderr, """
-+ WARNING ANTLR version mismatch:
-+ The recognizer has been generated by V%s, but this runtime
-+ is V%s, this may not work correctly. Please use the V%s runtime.""" % (
-+ self.antlr_version_str, runtime_version_str, self.antlr_version_str)
-
- # this one only exists to shut up pylint :(
- def setInput(self, input):
diff --git a/antlr-runtime-MANIFEST.MF b/antlr-runtime-MANIFEST.MF
new file mode 100644
index 0000000..e8a0e2d
--- /dev/null
+++ b/antlr-runtime-MANIFEST.MF
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.3
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.antlr.runtime
+Eclipse-SourceReferences: scm:cvs:pserver:dev.eclipse.org:/cvsroot/too
+ ls:org.eclipse.orbit/org.antlr.runtime;tag=v201101311130
+Export-Package: org.antlr.runtime;version="3.2.0",org.antlr.runtime.de
+ bug;version="3.2.0",org.antlr.runtime.misc;version="3.2.0",org.antlr.
+ runtime.tree;version="3.2.0"
+Bundle-Version: 3.2.0.v201101311130
+Bundle-ManifestVersion: 2
diff --git a/antlr3 b/antlr3
new file mode 100755
index 0000000..76145de
--- /dev/null
+++ b/antlr3
@@ -0,0 +1,25 @@
+#!/bin/sh
+#
+# antlr3 script, modified from antlr script from:
+# JPackage Project
+
+# Source functions library
+if [ -f /usr/share/java-utils/java-functions ] ; then
+ . /usr/share/java-utils/java-functions
+else
+ echo "Can't find functions library, aborting"
+ exit 1
+fi
+
+# Configuration
+MAIN_CLASS="org.antlr.Tool"
+BASE_FLAGS=""
+BASE_JARS="stringtemplate4.jar antlr3.jar antlr3-runtime.jar"
+
+# Set parameters
+set_jvm
+set_classpath $BASE_JARS
+set_flags $BASE_FLAGS
+
+# Let's start
+run "$@"
diff --git a/antlr3.spec b/antlr3.spec
index 2e9a907..c42aa56 100644
--- a/antlr3.spec
+++ b/antlr3.spec
@@ -1,159 +1,167 @@
-%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%{?_javapackages_macros:%_javapackages_macros}
+#%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%global with_bootstrap 0
-%global antlr_version 3.2
-%global python_runtime_version 3.1.2
+%global antlr_version 3.4
+#%global python_runtime_version 3.1.3
%global javascript_runtime_version 3.1
-Summary: ANother Tool for Language Recognition
-Name: antlr3
-Version: %{antlr_version}
-Release: 16
-URL: http://www.antlr.org/
-Source0: http://www.antlr.org/download/antlr-%{antlr_version}.tar.gz
-Source1: http://www.antlr.org/download/C/libantlr3c-%{antlr_version}.tar.gz
-Source2: http://www.antlr.org/download/Python/antlr_python_runtime-%{python_runtime_version}.tar.gz
-Source3: http://www.antlr.org/download/antlr-javascript-runtime-%{javascript_runtime_version}.zip
-Source5: antlr3
+Summary: ANother Tool for Language Recognition
+Name: antlr3
+Version: %{antlr_version}
+Release: 15.0%{?dist}
+URL: http://www.antlr.org/
+Source0: http://www.antlr.org/download/antlr-%{antlr_version}.tar.gz
+Source1: http://www.antlr.org/download/C/libantlr3c-%{antlr_version}.tar.gz
+Source2: http://www.antlr.org/download/Python/antlr_python_runtime-%{python_runtime_version}.tar.gz
+Source3: http://www.antlr.org/download/antlr-javascript-runtime-%{javascript_runtime_version}.zip
+Source5: antlr3
%if %{with_bootstrap}
-Source6: settings.xml
-Source7: http://www.antlr.org/download/antlr-%{antlr_version}.jar
-Source8: http://mirrors.ibiblio.org/pub/mirrors/maven2/org/antlr/antlr3-maven-plugin/%{antlr_version}/antlr3-maven-plugin-%{antlr_version}.jar
+Source6: settings.xml
+Source7: http://www.antlr.org/download/antlr-%{antlr_version}.jar
+Source8: http://mirrors.ibiblio.org/pub/mirrors/maven2/org/antlr/antlr3-maven-plugin/%{antlr_version}/antlr3-maven-plugin-%{antlr_version}.jar
%endif
-# No buildnumber and findbugs:
-Patch0: antlr-pom.patch
-# Python version mismatch patch, to be possibly upstreamed:
-Patch1: antlr-python-3.1.2-version.patch
-License: BSD
-Group: Development/Java
-BuildRoot: %{_tmppath}/%{name}-%{antlr_version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: java-devel >= 0:1.6.0
-BuildRequires: jpackage-utils
-BuildRequires: antlr-maven-plugin
-BuildRequires: maven-plugin-bundle
-BuildRequires: maven-assembly-plugin
-BuildRequires: maven-shared-reporting-impl
-BuildRequires: maven-surefire-provider-junit4
-BuildRequires: junit4
-BuildRequires: tomcat6-servlet-2.5-api
-BuildRequires: tomcat6
-BuildRequires: stringtemplate >= 3.2
-BuildRequires: felix-parent
+Source9: antlr-runtime-MANIFEST.MF
+License: BSD
+
+BuildRequires: java-devel >= 1:1.6.0
+BuildRequires: jpackage-utils
+BuildRequires: maven-local
+BuildRequires: maven-enforcer-plugin
+BuildRequires: maven-plugin-bundle
+BuildRequires: maven-assembly-plugin
+BuildRequires: maven-shared-reporting-impl
+BuildRequires: maven-surefire-provider-junit4
+BuildRequires: maven-install-plugin
+BuildRequires: buildnumber-maven-plugin
+BuildRequires: junit
+BuildRequires: tomcat-servlet-3.0-api
+BuildRequires: stringtemplate4
+BuildRequires: stringtemplate
+BuildRequires: felix-parent
+BuildRequires: zip
%if ! %{with_bootstrap}
-BuildRequires: antlr3-tool >= 3.2
+BuildRequires: antlr3-tool >= 3.2
%endif
+# we don't build it now
+Obsoletes: antlr3-gunit < 3.2-15
+
%description
ANother Tool for Language Recognition, is a language tool
that provides a framework for constructing recognizers,
interpreters, compilers, and translators from grammatical
descriptions containing actions in a variety of target languages.
-%package tool
-Group: Development/Java
-Summary: ANother Tool for Language Recognition
-BuildArch: noarch
-Requires: jpackage-utils
-Requires: java >= 0:1.6.0
-Provides: %{name} = %{antlr_version}-%{release}
-Obsoletes: %{name} < %{antlr_version}-%{release}
-Requires: %{name}-java = %{antlr_version}-%{release}
-Requires: antlr
-Requires: stringtemplate >= 3.2
+%package tool
-%description tool
+Summary: ANother Tool for Language Recognition
+BuildArch: noarch
+Requires: jpackage-utils
+Requires: java >= 1:1.6.0
+Provides: %{name} = %{antlr_version}-%{release}
+Obsoletes: %{name} < %{antlr_version}-%{release}
+Requires: %{name}-java = %{antlr_version}-%{release}
+Requires: stringtemplate4
+
+%description tool
ANother Tool for Language Recognition, is a language tool
that provides a framework for constructing recognizers,
interpreters, compilers, and translators from grammatical
descriptions containing actions in a variety of target languages.
-%package gunit
-Group: Development/Java
-Summary: Gunit is a unit testing framework for ANTLR grammars
-BuildArch: noarch
-Requires: jpackage-utils
-Requires: java >= 0:1.6.0
-Requires: %{name}-java = %{antlr_version}-%{release}
+%package java
-%description gunit
-This package provides support for Gunit, a unit testing framework
-for ANTLR grammars.
+Summary: Java run-time support for ANTLR-generated parsers
+BuildArch: noarch
+Requires: stringtemplate4
+Requires: stringtemplate
+Requires: jpackage-utils
+Requires: java >= 1:1.6.0
-%package java
-Group: Development/Java
-Summary: Java run-time support for ANTLR-generated parsers
-BuildArch: noarch
-Requires: stringtemplate
-Requires: jpackage-utils
-Requires: java >= 0:1.6.0
-
-%description java
+%description java
Java run-time support for ANTLR-generated parsers
-%package javascript
-Group: Development/Java
-Summary: Javascript run-time support for ANTLR-generated parsers
-Version: %{javascript_runtime_version}
-BuildArch: noarch
+%package javascript
-%description javascript
+Summary: Javascript run-time support for ANTLR-generated parsers
+Version: %{javascript_runtime_version}
+BuildArch: noarch
+
+%description javascript
Javascript run-time support for ANTLR-generated parsers
-%package C
-Group: Development/Java
-Summary: C run-time support for ANTLR-generated parsers
+%package C
-%description C
+Summary: C run-time support for ANTLR-generated parsers
+
+%description C
C run-time support for ANTLR-generated parsers
-%package C-devel
-Group: Development/Java
-Summary: Header files for the C bindings for ANTLR-generated parsers
-Requires: %{name}-C = %{antlr_version}-%{release}
+%package C-devel
-%description C-devel
+Summary: Header files for the C bindings for ANTLR-generated parsers
+Requires: %{name}-C = %{antlr_version}-%{release}
+
+%description C-devel
Header files for the C bindings for ANTLR-generated parsers
-%package C-docs
-Group: Development/Java
-Summary: API documentation for the C run-time support for ANTLR-generated parsers
-BuildArch: noarch
-BuildRequires: graphviz
-BuildRequires: doxygen
-Requires: %{name}-C = %{antlr_version}-%{release}
+%package C-docs
-%description C-docs
+Summary: API documentation for the C run-time support for ANTLR-generated parsers
+BuildArch: noarch
+BuildRequires: graphviz
+BuildRequires: doxygen
+Requires: %{name}-C = %{antlr_version}-%{release}
+
+%description C-docs
This package contains doxygen documentation with instruction
on how to use the C target in ANTLR and complete API description of the
C run-time support for ANTLR-generated parsers.
-%package python
-Group: Development/Java
-Summary: Python run-time support for ANTLR-generated parsers
-BuildRequires: python-devel
-BuildRequires: python-setuptools
-BuildArch: noarch
-Version: %{python_runtime_version}
+#%package python
-%description python
-Python run-time support for ANTLR-generated parsers
+#Summary: Python run-time support for ANTLR-generated parsers
+#BuildRequires: python-devel
+#BuildRequires: python-setuptools-devel
+#BuildArch: noarch
+#Version: %{python_runtime_version}
+#
+#%description python
+#Python run-time support for ANTLR-generated parsers
%prep
%setup -q -n antlr-%{antlr_version} -a 1 -a 2 -a 3
-%patch0 -p0 -b .pomfix
-%patch1 -p0 -b .orig
%if %{with_bootstrap}
cp %{SOURCE6} settings.xml
%endif
-
-%build
+%if 0%{?fedora}
sed -i "s,\${buildNumber},`cat %{_sysconfdir}/fedora-release` `date`," tool/src/main/resources/org/antlr/antlr.properties
+%else
+sed -i "s,\${buildNumber},`cat %{_sysconfdir}/distro-release` `date`," tool/src/main/resources/org/antlr/antlr.properties
+%endif
+
+sed -i 's:antlr3-maven-archetype::' pom.xml
+sed -i 's:gunit::' pom.xml
+sed -i 's:gunit-maven-plugin::' pom.xml
+
+# compile for target 1.6, see BZ#842572
+sed -i 's/jsr14/1.6/' antlr3-maven-archetype/src/main/resources/archetype-resources/pom.xml \
+ antlr3-maven-plugin/pom.xml \
+ gunit/pom.xml \
+ gunit-maven-plugin/pom.xml \
+ pom.xml \
+ runtime/Java/pom.xml \
+ tool/pom.xml
# remove corrupted files:
rm antlr3-maven-plugin/src/main/java/org/antlr/mojo/antlr3/._*
rm gunit-maven-plugin/src/main/java/org/antlr/mojo/antlr3/._GUnitExecuteMojo.java
+
+%build
+
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
mkdir -p $MAVEN_REPO_LOCAL
@@ -183,34 +191,29 @@ cp %{SOURCE8} $MAVEN_REPO_LOCAL/org.antlr/antlr3-maven-plugin.jar
# Build antlr
%if %{with_bootstrap}
-mvn-jpp -s $(pwd)/settings.xml -Dmaven.repo.local=$MAVEN_REPO_LOCAL -Dmaven.test.skip=true install
+mvn-rpmbuild -s $(pwd)/settings.xml -Dmaven.repo.local=$MAVEN_REPO_LOCAL -Dmaven.test.skip=true -Dmaven.compile.target=1.6 install
%else
-mvn-jpp -Dmaven.repo.local=$MAVEN_REPO_LOCAL -Dmaven.test.skip=true install
+mvn-rpmbuild -Dmaven.repo.local=$MAVEN_REPO_LOCAL -Dmaven.test.skip=true -Dmaven.compile.target=1.6 install
%endif
# Build the plugin
pushd antlr3-maven-plugin
-mvn-jpp \
--Dmaven.repo.local=$MAVEN_REPO_LOCAL \
-install javadoc:javadoc
+mvn-rpmbuild -Dmaven.repo.local=$MAVEN_REPO_LOCAL -Dmaven.compile.target=1.6 install javadoc:javadoc
popd
-# Build the python runtime
-pushd antlr_python_runtime-%{python_runtime_version}
-%{__python} setup.py build
-popd
+## Build the python runtime
+#pushd antlr_python_runtime-%{python_runtime_version}
+#%{__python} setup.py build
+#popd
# Build the C runtime
-pushd libantlr3c-%{antlr_version}
+pushd libantlr3c-%{antlr_version}-beta4
-mkdir m4
-autoreconf -fi
-
-%ifarch x86_64 ppc64
-%configure --disable-abiflags --enable-debuginfo --enable-64bit
-%endif
-%ifarch %{ix86} ppc
-%configure --disable-abiflags --enable-debuginfo
+%configure --disable-abiflags --enable-debuginfo \
+%ifarch x86_64 ppc64 s390x sparc64
+ --enable-64bit
+%else
+ %{nil}
%endif
sed -i "s/CFLAGS = .*/CFLAGS = $RPM_OPT_FLAGS/" Makefile
@@ -219,49 +222,64 @@ doxygen -u # update doxygen configuration file
doxygen # build doxygen documentation
popd
+# inject OSGi manifests
+mkdir -p META-INF
+cp -p %{SOURCE9} META-INF/MANIFEST.MF
+touch META-INF/MANIFEST.MF
+zip -u runtime/Java/target/antlr-runtime-%{antlr_version}.jar META-INF/MANIFEST.MF
+
%install
-rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT{%{_javadir},%{_mavenpomdir},%{_bindir},%{_datadir}/antlr,%{_mandir}}
# install maven POMs
install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-antlr3-master.pom
+%add_maven_depmap JPP-antlr3-master.pom
+
install -pm 644 runtime/Java/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-antlr3-runtime.pom
install -pm 644 tool/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-antlr3.pom
install -pm 644 antlr3-maven-plugin/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-antlr3-maven-plugin.pom
install -pm 644 gunit-maven-plugin/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-maven-gunit-plugin.pom
-%add_to_maven_depmap org.antlr antlr-master %{antlr_version} JPP antlr3-master
-%add_to_maven_depmap org.antlr antlr-runtime %{antlr_version} JPP antlr3-runtime
-%add_to_maven_depmap org.antlr antlr %{antlr_version} JPP antlr3
-%add_to_maven_depmap org.antlr antlr3-maven-plugin %{antlr_version} JPP antlr3-maven-plugin
-%add_to_maven_depmap org.antlr maven-gunit-plugin %{antlr_version} JPP maven-gunit-plugin
# install jars
-install -m 644 runtime/Java/target/antlr-runtime-%{antlr_version}.jar \
-tool/target/antlr-%{antlr_version}.jar antlr3-maven-plugin/target/antlr3-maven-plugin-%{antlr_version}.jar \
-gunit/target/gunit-%{antlr_version}.jar gunit-maven-plugin/target/maven-gunit-plugin-%{antlr_version}.jar \
-$RPM_BUILD_ROOT%{_datadir}/java/
-pushd $RPM_BUILD_ROOT%{_datadir}/java
-ln -s antlr-%{antlr_version}.jar antlr3.jar
-ln -s antlr3-maven-plugin-%{antlr_version}.jar antlr3-maven-plugin.jar
-ln -s antlr-runtime-%{antlr_version}.jar antlr3-runtime.jar
-popd
+install -m 644 runtime/Java/target/antlr-runtime-*.jar \
+ $RPM_BUILD_ROOT%{_datadir}/java/antlr3-runtime.jar
+%add_maven_depmap JPP-antlr3-runtime.pom antlr3-runtime.jar
+
+install -m 644 tool/target/antlr-*.jar \
+ $RPM_BUILD_ROOT%{_datadir}/java/antlr3.jar
+%add_maven_depmap JPP-antlr3.pom antlr3.jar
+
+install -m 644 antlr3-maven-plugin/target/%{name}-maven-plugin-%{antlr_version}.jar \
+ $RPM_BUILD_ROOT%{_datadir}/java/%{name}-maven-plugin.jar
+%add_maven_depmap JPP-%{name}-maven-plugin.pom %{name}-maven-plugin.jar
+
+# We disable gunit because it currently fails to build, maybe after upgrade?
+#install gunit/target/gunit-%{antlr_version}.jar \
+# $RPM_BUILD_ROOT%{_datadir}/java/gunit.jar
+
+#install -m 644 gunit-maven-plugin/target/maven-gunit-plugin-%{antlr_version}.jar \
+# $RPM_BUILD_ROOT%{_datadir}/java/maven-gunit-plugin.jar
+#%%add_maven_depmap JPP-maven-gunit-plugin.pom maven-gunit.plugin.jar
+
# install wrapper script
install -m 755 %{SOURCE5} $RPM_BUILD_ROOT%{_bindir}/antlr3
-# install python runtime
-pushd antlr_python_runtime-%{python_runtime_version}
-%{__python} setup.py install -O1 --skip-build --root %{buildroot}
-popd
+## install python runtime
+#pushd antlr_python_runtime-%{python_runtime_version}
+#%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+#chmod a+x $RPM_BUILD_ROOT%{python_sitelib}/antlr_python_runtime-*
+#popd
# install C runtime
-pushd libantlr3c-%{antlr_version}
+pushd libantlr3c-%{antlr_version}-beta4
make DESTDIR=$RPM_BUILD_ROOT install
rm $RPM_BUILD_ROOT%{_libdir}/libantlr3c.{a,la}
pushd api/man/man3
for file in `ls -1 * | grep -vi "^antlr3"`; do
- mv $file antlr3-$file
+ mv $file antlr3-$file
done
+sed -i -e 's,^\.so man3/pANTLR3,.so man3/antlr3-pANTLR3,' `grep -rl 'man3/pANTLR3' .`
gzip *
popd
mv api/man/man3 $RPM_BUILD_ROOT%{_mandir}/
@@ -273,56 +291,184 @@ pushd antlr-javascript-runtime-%{javascript_runtime_version}
install -pm 644 *.js $RPM_BUILD_ROOT%{_datadir}/antlr/
popd
-%post java
-%update_maven_depmap
-
-%postun java
-%update_maven_depmap
-
%post C -p /sbin/ldconfig
%postun C -p /sbin/ldconfig
-%clean
-rm -rf $RPM_BUILD_ROOT
-
%files tool
-%defattr(-,root,root,-)
%doc tool/{README.txt,LICENSE.txt,CHANGES.txt}
%{_javadir}/antlr3.jar
%{_javadir}/antlr3-maven*.jar
-%{_javadir}/antlr-%{antlr_version}.jar
%{_bindir}/antlr3
-%files python
-%defattr(0644,root,root,-)
-%{python_sitelib}/antlr3/*
-%{python_sitelib}/antlr_python_runtime-*
+#%files python
+#%doc tool/LICENSE.txt
+#%{python_sitelib}/antlr3/*
+#%{python_sitelib}/antlr_python_runtime-*
%files C
-%defattr(-,root,root,-)
+%doc tool/LICENSE.txt
%{_libdir}/libantlr3c.so
%files C-devel
-%defattr(-,root,root,-)
%{_includedir}/antlr3*
%{_mandir}/man3/*
%files C-docs
-%defattr(-,root,root,-)
-%doc libantlr3c-%{antlr_version}/api/
+%doc libantlr3c-%{antlr_version}-beta4/api/
%files java
-%defattr(-,root,root,-)
+%doc tool/LICENSE.txt
%{_javadir}/*runtime*.jar
%{_mavenpomdir}/*.pom
%config %{_mavendepmapfragdir}/antlr3
%files javascript
-%defattr(-,root,root,-)
+%doc tool/LICENSE.txt
%{_datadir}/antlr/
-%files gunit
-%defattr(-,root,root,-)
-%{_javadir}/*gunit*.jar
+%changelog
+* Sat Aug 03 2013 Fedora Release Engineering - 3.4-15
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
+* Wed Feb 13 2013 Fedora Release Engineering - 3.4-14
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
+
+* Wed Feb 06 2013 Java SIG - 3.4-13
+- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
+- Replace maven BuildRequires with maven-local
+
+* Sun Sep 09 2012 Miloš Jakubíček - 3.4-12
+- Fix wrong man page references (see BZ#855619)
+
+* Tue Aug 21 2012 Miloš Jakubíček - 3.4-11
+- Now really compile for Java 1.6 everything
+
+ *Sat Aug 18 2012 Miloš Jakubíček - 3.4-10
+- Explicitly compile for Java 1.5, to (maybe?) fix BZ#842572
+
+* Mon Aug 6 2012 Alexander Kurtakov 3.4-9
+- Inject org.antlr.runtime OSGi metadata.
+- Update BRs to newer versions.
+
+* Tue Jul 24 2012 Stanislav Ochotnicky - 3.4-8
+- Add back requires on stringtemplate for java subpackage
+
+* Wed Jul 18 2012 Fedora Release Engineering - 3.4-7
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
+* Tue Jun 26 2012 Miloš Jakubíček - 3.4-6
+- Fixed missing stringtemplate4 in antlr3 generator classpath
+- Cleanup of Requires and BuildRequires on antlr2
+
+* Thu Feb 23 2012 Miloš Jakubíček - 3.4-5
+- Disable python runtime (incompatible with current antlr version)
+
+* Wed Feb 22 2012 Miloš Jakubíček - 3.4-4
+- Fix permissions for egg-info dir (fixes BZ#790499)
+
+* Thu Feb 16 2012 Stanislav Ochotnicky - 3.4-3
+- Use wildcards for installing jars (different results on different releases)
+
+* Thu Feb 16 2012 Stanislav Ochotnicky - 3.4-2
+- Add builnumber plugin to buildrequires
+- Tab/space cleanup
+
+* Mon Jan 23 2012 Stanislav Ochotnicky - 3.4-1
+- Update antlr version to 3.4
+- Move to maven3 build, update macros etc
+- Remove gunit for now
+
+* Thu Jan 12 2012 Fedora Release Engineering - 3.2-16
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
+* Fri Sep 09 2011 Dan Horák - 3.2-15
+- fix build on other arches
+
+* Mon Feb 07 2011 Fedora Release Engineering - 3.2-14
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Tue Dec 14 2010 Stanislav Ochotnicky - 3.2-13
+- Add stringtemplate to Requires of java subpackage
+- Use tomcat6 for building
+- Use felix-parent and cleanup BRs on maven plugins
+
+* Thu Nov 25 2010 Stanislav Ochotnicky - 3.2-12
+- Move all pom files into java subpackage
+- Fix pom filenames (Resolves rhbz#655831)
+- Add java subpackage Requires for gunit subpackage
+
+* Wed Oct 13 2010 Tom "spot" Callaway - 3.2-11
+- non-bootstrap build
+
+* Wed Oct 13 2010 Tom "spot" Callaway - 3.2-10
+- fix pom patch
+- fix bootstrapping
+- fix dependencies
+
+* Wed Aug 11 2010 David Malcolm - 3.2-9
+- recompiling .py files against Python 2.7 (rhbz#623269)
+
+* Wed Jul 21 2010 David Malcolm - 3.2-8
+- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
+
+* Thu Jun 17 2010 Lubomir Rintel - 3.2-7
+- Add master and runtime poms (#605267)
+
+* Sat May 01 2010 Miloš Jakubíček - 3.2-6
+- Patch the Python runtime to print just a warning in case of version mismatch
+ instead of raising an exception (since there is a good change it will work).
+
+* Thu Apr 22 2010 Miloš Jakubíček - 3.2-5
+- Build the C runtime with --enable-64bit on x86_64 to avoid undeterministic
+ segfaults caused by possible invalid conversion of 64bit pointers to int32_t
+
+* Mon Mar 08 2010 Miloš Jakubíček - 3.2-4
+- Patch Java runtime build to include OSGi meta-information in the manifest
+ (thanks to Mat Booth)
+- Add "antlr3" prefix to all man pages to prevent namespace conflicts with
+ standard man pages included in the man-pages package
+- Split headers and man pages into a C-devel subpackage
+- Fix multiple file ownership of Java runtime and gunit by the tool package
+
+* Tue Mar 02 2010 Miloš Jakubíček - 3.2-3
+- Rebuilt in non-bootstrap mode.
+
+* Sun Jan 31 2010 Milos Jakubicek - 3.2-2
+- Build the doxygen documentation for the C target in a C-docs subpackage
+- BuildRequires/Requires cleanup across subpackages
+
+* Sat Jan 30 2010 Milos Jakubicek - 3.2-1
+- Update to 3.2, bootstrap build.
+- Build bindings for C and JavaScript as well as gunit and maven plugin.
+
+* Fri Jul 24 2009 Fedora Release Engineering - 3.1.1-8
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
+* Mon Mar 17 2009 Bart Vanbrabant - 3.1.1-7
+- Fix the name of the jar to antlr.jar
+
+* Mon Feb 23 2009 Fedora Release Engineering - 3.1.1-6
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Mon Jan 12 2009 Colin Walters - 3.1.1-5
+- Add bcel to build path
+
+* Mon Jan 12 2009 Colin Walters - 3.1.1-4
+- Add bcel build dep to version jar name
+
+* Mon Nov 10 2008 Colin Walters - 3.1.1-3
+- Add antlr3 script
+
+* Mon Nov 6 2008 Bart Vanbrabant - 3.1.1-2
+- Fix the install of the jar (remove the version)
+
+* Mon Nov 3 2008 Bart Vanbrabant - 3.1.1-1
+- Update to version 3.1.1
+- Add python runtime subpackage
+
+* Fri Jun 27 2008 Colin Walters - 3.0.1-2
+- Fix some BRs
+
+* Sun Apr 06 2008 Colin Walters - 3.0.1-1
+- First version