[antlr3/f14/master] get this pile built, bootstrap pass
Tom Callaway
spot at fedoraproject.org
Wed Oct 13 19:01:27 UTC 2010
commit 0b583a44ee220c85560774d741f7c473e1a3f662
Author: Tom "spot" Callaway <tcallawa at redhat.com>
Date: Wed Oct 13 15:01:08 2010 -0400
get this pile built, bootstrap pass
antlr-pom.patch | 71 ++++++++++++++++++++++++++++++++++++++-----------------
antlr3.spec | 30 +++++++++++++++++-----
2 files changed, 72 insertions(+), 29 deletions(-)
---
diff --git a/antlr-pom.patch b/antlr-pom.patch
index 2ab1629..c9ba6d9 100644
--- a/antlr-pom.patch
+++ b/antlr-pom.patch
@@ -1,5 +1,22 @@
---- gunit/pom.xml.orig 2010-01-29 02:12:43.000000000 +0100
-+++ gunit/pom.xml 2010-01-29 02:12:54.000000000 +0100
+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 @@
+ </dependency>
+
+ <dependency>
++ <groupId>org.apache.maven</groupId>
++ <artifactId>maven-artifact</artifactId>
++ <version>2.2.1</version>
++ </dependency>
++
++ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-compiler-api</artifactId>
+ <version>1.5.3</version>
+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 @@
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
@@ -17,21 +34,10 @@
</plugins>
<extensions>
---- tool/pom.xml.orig 2009-09-23 20:50:28.000000000 +0200
-+++ tool/pom.xml 2010-02-01 13:01:08.000000000 +0100
-@@ -75,8 +82,7 @@
- </plugin>
-
- <plugin>
-- <groupId>org.codehaus.mojo</groupId>
-- <artifactId>antlr-maven-plugin</artifactId>
-+ <artifactId>maven-antlr-plugin</artifactId>
- <configuration>
- <sourceDirectory>src/main/antlr2/org/antlr/grammar/v2</sourceDirectory>
- <grammars>antlr.g codegen.g, antlr.print.g, assign.types.g, buildnfa.g, define.g</grammars>
---- pom.xml.orig 2009-09-23 20:46:18.000000000 +0200
-+++ pom.xml 2010-02-01 13:45:20.000000000 +0100
-@@ -146,25 +154,6 @@
+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 @@
<plugins>
@@ -57,7 +63,7 @@
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
-@@ -179,16 +168,6 @@
+@@ -179,16 +160,6 @@
</plugin>
<plugin>
@@ -74,8 +80,9 @@
<!--
---- runtime/Java/pom.xml.orig 2009-09-23 20:50:28.000000000 +0200
-+++ runtime/Java/pom.xml 2010-03-08 01:05:05.000000000 +0100
+diff -up ./runtime/Java/pom.xml.pomfix ./runtime/Java/pom.xml
+--- ./runtime/Java/pom.xml.pomfix 2009-09-23 14:50:28.000000000 -0400
++++ ./runtime/Java/pom.xml 2010-10-12 17:05:12.000000000 -0400
@@ -105,14 +105,38 @@
</plugin>
@@ -88,7 +95,7 @@
- <findbugsXmlWithMessages>true</findbugsXmlWithMessages>
- <xmlOutput>true</xmlOutput>
+ <archive>
-+ <manifestFile>target/osgi/MANIFEST.MF</manifestFile>
++ <manifestFile>target/osgi/MANIFEST.MF</manifestFile>
+ </archive>
</configuration>
</plugin>
@@ -98,7 +105,7 @@
+ <configuration>
+ <excludeDependencies>true</excludeDependencies>
+ <manifestLocation>target/osgi</manifestLocation>
-+ <instructions>
++ <instructions>
+ <!-- stops the "uses" clauses being added to "Export-Package" manifest entry -->
+ <_nouses>true</_nouses>
+ <Bundle-Vendor>antlr.org</Bundle-Vendor>
@@ -120,3 +127,23 @@
</plugins>
</build>
+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 @@
+
+ <groupId>org.antlr</groupId>
+ <artifactId>antlr3-maven-plugin</artifactId>
+- <version>3.1.3-1</version>
++ <version>3.2</version>
+ <configuration>
+ <libDirectory>target/generated-sources/antlr/org/antlr/grammar/v3</libDirectory>
+ </configuration>
+@@ -77,6 +77,7 @@
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>antlr-maven-plugin</artifactId>
++ <version>2.1</version>
+ <configuration>
+ <sourceDirectory>src/main/antlr2/org/antlr/grammar/v2</sourceDirectory>
+ <grammars>antlr.g codegen.g, antlr.print.g, assign.types.g, buildnfa.g, define.g</grammars>
diff --git a/antlr3.spec b/antlr3.spec
index 0f0fcab..cbd8faa 100644
--- a/antlr3.spec
+++ b/antlr3.spec
@@ -1,6 +1,6 @@
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
-%global with_bootstrap 0
+%global with_bootstrap 1
%global antlr_version 3.2
%global python_runtime_version 3.1.2
@@ -9,7 +9,7 @@
Summary: ANother Tool for Language Recognition
Name: antlr3
Version: %{antlr_version}
-Release: 9%{?dist}
+Release: 10%{?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
@@ -30,14 +30,15 @@ Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{antlr_version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: jpackage-utils
+BuildRequires: antlr-maven-plugin
BuildRequires: maven2
+BuildRequires: maven-javadoc-plugin
BuildRequires: maven-plugin-bundle
BuildRequires: maven2-plugin-resources
BuildRequires: maven2-plugin-compiler
BuildRequires: maven2-plugin-jar
BuildRequires: maven2-plugin-install
BuildRequires: maven2-plugin-assembly
-BuildRequires: maven2-plugin-antlr
BuildRequires: maven2-plugin-plugin
BuildRequires: maven2-plugin-site
BuildRequires: maven2-plugin-project-info-reports
@@ -49,7 +50,7 @@ BuildRequires: tomcat5-servlet-2.4-api
BuildRequires: tomcat5
BuildRequires: stringtemplate >= 3.2
%if ! %{with_bootstrap}
-BuildRequires: antlr3 >= 3.2
+BuildRequires: antlr3-tool >= 3.2
%endif
%description
@@ -147,20 +148,22 @@ Python run-time support for ANTLR-generated parsers
%prep
%setup -q -n antlr-%{antlr_version} -a 1 -a 2 -a 3
-%patch0 -b .orig
+%patch0 -b .pomfix
%patch1 -b .orig
%if %{with_bootstrap}
cp %{SOURCE6} settings.xml
%endif
%build
-export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
sed -i "s,\${buildNumber},`cat %{_sysconfdir}/fedora-release` `date`," tool/src/main/resources/org/antlr/antlr.properties
# 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
+export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
+mkdir -p $MAVEN_REPO_LOCAL
+
%if %{with_bootstrap}
# we need antlr3-maven-plugin in place
sed -i -e \
@@ -178,8 +181,9 @@ sed -i -e \
mkdir -p $MAVEN_REPO_LOCAL/JPP/maven2/default_poms/
mkdir -p $MAVEN_REPO_LOCAL/org.antlr/
-cp antlr3-maven-plugin/pom.xml $MAVEN_REPO_LOCAL/JPP/maven2/default_poms/org.antlr-antlr3-maven-plugin.pom
+cp antlr3-maven-plugin/pom.xml $MAVEN_REPO_LOCAL/JPP/maven2/default_poms/JPP-antlr3-maven-plugin.pom
# install prebuilt antlr and antlr3-maven-plugin into repository
+# Man, this is hackish. Hold your nose.
cp %{SOURCE7} $MAVEN_REPO_LOCAL/org.antlr/antlr.jar
cp %{SOURCE8} $MAVEN_REPO_LOCAL/org.antlr/antlr3-maven-plugin.jar
%endif
@@ -191,6 +195,13 @@ mvn-jpp -s $(pwd)/settings.xml -Dmaven.repo.local=$MAVEN_REPO_LOCAL -Dmaven.test
mvn-jpp -Dmaven.repo.local=$MAVEN_REPO_LOCAL -Dmaven.test.skip=true install
%endif
+# Build the plugin
+pushd antlr3-maven-plugin
+mvn-jpp \
+-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
+install javadoc:javadoc
+popd
+
# Build the python runtime
pushd antlr_python_runtime-%{python_runtime_version}
%{__python} setup.py build
@@ -330,6 +341,11 @@ rm -rf $RPM_BUILD_ROOT
%{_mavenpomdir}/JPP-maven-gunit-plugin.pom
%changelog
+* Wed Oct 13 2010 Tom "spot" Callaway <tcallawa at redhat.com> - 3.2-10
+- fix pom patch
+- fix bootstrapping
+- fix dependencies
+
* Wed Aug 11 2010 David Malcolm <dmalcolm at redhat.com> - 3.2-9
- recompiling .py files against Python 2.7 (rhbz#623269)
More information about the scm-commits
mailing list