From f8b82bdca3f22849bd6903f0717bc1e5f56e63d5 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 16 2015 14:56:43 +0000 Subject: import devtoolset-4-antlr32-3.2-9.3.el7 --- diff --git a/.devtoolset-4-antlr32.metadata b/.devtoolset-4-antlr32.metadata new file mode 100644 index 0000000..45a791c --- /dev/null +++ b/.devtoolset-4-antlr32.metadata @@ -0,0 +1 @@ +4cd20a66a2ac19710d0617d9d69e321a9fa7152b SOURCES/antlr-3.2.tar.gz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..187286d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/antlr-3.2.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/antlr2-usage.patch b/SOURCES/antlr2-usage.patch new file mode 100644 index 0000000..15ba47f --- /dev/null +++ b/SOURCES/antlr2-usage.patch @@ -0,0 +1,61 @@ +--- tool/build.xml.orig 1970-01-01 01:00:00.000000000 +0100 ++++ tool/build.xml 2015-07-07 14:24:35.010405911 +0100 +@@ -0,0 +1,11 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +--- tool/pom.xml.orig 2009-09-23 19:50:28.000000000 +0100 ++++ tool/pom.xml 2015-07-07 14:49:09.811396333 +0100 +@@ -76,19 +76,40 @@ + + + org.codehaus.mojo +- antlr-maven-plugin ++ exec-maven-plugin ++ 1.4.0 + +- src/main/antlr2/org/antlr/grammar/v2 +- antlr.g codegen.g, antlr.print.g, assign.types.g, buildnfa.g, define.g ++ ant + + + ++ generate-sources + +- generate ++ exec + + + + ++ ++ ++ org.codehaus.mojo ++ build-helper-maven-plugin ++ 1.7 ++ ++ ++ add-source ++ generate-sources ++ ++ add-source ++ ++ ++ ++ ${project.build.directory}/generated-sources/antlr ++ ++ ++ ++ ++ + + + maven-compiler-plugin diff --git a/SOURCES/java8-compat.patch b/SOURCES/java8-compat.patch new file mode 100644 index 0000000..e8ed5b8 --- /dev/null +++ b/SOURCES/java8-compat.patch @@ -0,0 +1,11 @@ +--- tool/src/main/java/org/antlr/tool/CompositeGrammar.java.orig 2014-05-30 00:12:33.360503545 +0100 ++++ tool/src/main/java/org/antlr/tool/CompositeGrammar.java 2014-05-30 00:13:38.533423946 +0100 +@@ -219,7 +219,7 @@ + public List getIndirectDelegates(Grammar g) { + List direct = getDirectDelegates(g); + List delegates = getDelegates(g); +- delegates.removeAll(direct); ++ if ( direct!=null ) delegates.removeAll(direct); + return delegates; + } + diff --git a/SPECS/antlr32.spec b/SPECS/antlr32.spec new file mode 100644 index 0000000..b078461 --- /dev/null +++ b/SPECS/antlr32.spec @@ -0,0 +1,197 @@ +%{?scl:%scl_package antlr32} +%{!?scl:%global pkg_name %{name}} +%{?java_common_find_provides_and_requires} + +%global bootstrap 0 +%global bootstrap_version 3.1.3 + +Name: %{?scl_prefix}antlr32 +Version: 3.2 +Release: 9.3%{?dist} +Summary: ANother Tool for Language Recognition + +License: BSD +URL: http://www.antlr3.org/ +Source0: http://www.antlr3.org/download/antlr-%{version}.tar.gz + +# These artifacts are taken verbatim from maven central with the exception of the +# jar in source 2, which additionally has the java 8 compatibility patch given below +# These sources are only used for bootstrapping antlr32 into a new distro +%if %{bootstrap} +Source1: http://repo1.maven.org/maven2/org/antlr/antlr-master/%{bootstrap_version}/antlr-master-%{bootstrap_version}.pom +Source2: http://repo1.maven.org/maven2/org/antlr/antlr/%{bootstrap_version}/antlr-%{bootstrap_version}.jar +Source3: http://repo1.maven.org/maven2/org/antlr/antlr/%{bootstrap_version}/antlr-%{bootstrap_version}.pom +Source4: http://repo1.maven.org/maven2/org/antlr/antlr-runtime/%{bootstrap_version}/antlr-runtime-%{bootstrap_version}.jar +Source5: http://repo1.maven.org/maven2/org/antlr/antlr-runtime/%{bootstrap_version}/antlr-runtime-%{bootstrap_version}.pom +Source6: http://repo1.maven.org/maven2/org/antlr/antlr3-maven-plugin/%{bootstrap_version}-1/antlr3-maven-plugin-%{bootstrap_version}-1.jar +Source7: http://repo1.maven.org/maven2/org/antlr/antlr3-maven-plugin/%{bootstrap_version}-1/antlr3-maven-plugin-%{bootstrap_version}-1.pom +%endif + +# This is backported from upstream antlr 3.5.2 for java 8 compatibility +# See https://github.com/antlr/antlr3/commit/e88907c259c43d42fa5e9f5ad0e486a2c1e004bb +Patch0: java8-compat.patch +Patch1: antlr2-usage.patch + +BuildRequires: %{?scl_prefix_java_common}maven-local +BuildRequires: %{?scl_prefix_java_common}ant-antlr +BuildRequires: %{?scl_prefix_maven}exec-maven-plugin +BuildRequires: %{?scl_prefix}stringtemplate >= 3.2 + +# Cannot require ourself when bootstrapping +%if ! %{bootstrap} +BuildRequires: %{name}-maven-plugin = %{version} +%endif + +BuildArch: noarch + +%description +ANother Tool for Language Recognition, is a grammar parser generator. +This package is compatibility package containing an older version of +in order to support jython. No other packages should declare a +dependency on this one. + +%package maven-plugin +Summary: Maven plug-in for creating ANTLR-generated parsers +Requires: %{name}-tool = %{version}-%{release} + +%description maven-plugin +Maven plug-in for creating ANTLR-generated parsers. + +%package tool +Summary: Command line tool for creating ANTLR-generated parsers +Requires: %{name}-java = %{version}-%{release} + +%description tool +Command line tool for creating ANTLR-generated parsers. + +%package java +Summary: Java run-time support for ANTLR-generated parsers +Requires: %{?scl_prefix}stringtemplate >= 3.2 + +%description java +Java run-time support for ANTLR-generated parsers. + +%package javadoc +Summary: API documentation for ANTLR + +%description javadoc +%{summary}. + +%prep +%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"} +%setup -q -n antlr-%{version} + +%patch0 -b .orig +%patch1 -b .orig + +# remove pre-built artifacts +find -type f -a -name *.jar -delete +find -type f -a -name *.class -delete + +# remove corrupted files +find -name "._*" -delete + +# disable stuff we don't need +%pom_disable_module gunit +%pom_disable_module gunit-maven-plugin +%pom_remove_plugin org.codehaus.mojo:buildnumber-maven-plugin +%pom_xpath_remove pom:build/pom:extensions +%pom_xpath_remove pom:build/pom:extensions runtime/Java +%pom_xpath_remove pom:build/pom:extensions antlr3-maven-plugin + +# separate artifacts into sub-packages +%mvn_package :antlr tool +%mvn_package :antlr-master java +%mvn_package :antlr-runtime java +%mvn_package :antlr3-maven-plugin maven-plugin + +# use a valid build target +find -name "pom.xml" | xargs sed -i -e "s|>jsr14<|>1.5<|" + +# set a build number +sed -i -e "s|\${buildNumber}|%{release}|" tool/src/main/resources/org/antlr/antlr.properties + +%mvn_compat_version 'org.antlr:antlr3-maven-plugin' %{bootstrap_version}-1 %{version} +%mvn_compat_version 'org.antlr:antlr{,-master,-runtime}' %{bootstrap_version} %{version} +%{?scl:EOF} + + +%build +%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"} +mkdir -p .m2/org/antlr/antlr-master/%{version}/ +cp -p pom.xml .m2/org/antlr/antlr-master/%{version}/antlr-master-%{version}.pom + +%if %{bootstrap} +mkdir -p .m2/org/antlr/antlr-master/%{bootstrap_version}/ +cp -p %{SOURCE1} .m2/org/antlr/antlr-master/%{bootstrap_version}/. +mkdir -p .m2/org/antlr/antlr/%{bootstrap_version}/ +cp -p %{SOURCE2} %{SOURCE3} .m2/org/antlr/antlr/%{bootstrap_version}/. +mkdir -p .m2/org/antlr/antlr-runtime/%{bootstrap_version}/ +cp -p %{SOURCE4} %{SOURCE5} .m2/org/antlr/antlr-runtime/%{bootstrap_version}/. +mkdir -p .m2/org/antlr/antlr3-maven-plugin/%{bootstrap_version}-1/ +cp -p %{SOURCE6} %{SOURCE7} .m2/org/antlr/antlr3-maven-plugin/%{bootstrap_version}-1/. +%endif + +# a small number of tests always fail for reasons I don't fully understand +%mvn_build -f +%{?scl:EOF} + + +%install +%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"} +%mvn_install +%{?scl:EOF} + + +%files tool -f .mfiles-tool +%doc tool/LICENSE.txt + +%files maven-plugin -f .mfiles-maven-plugin +%doc tool/LICENSE.txt + +%files java -f .mfiles-java +%doc tool/LICENSE.txt +%dir %{_datadir}/java/%{pkg_name} +%dir %{_mavenpomdir}/%{pkg_name} + +%files javadoc -f .mfiles-javadoc +%doc tool/LICENSE.txt + +%changelog +* Fri Jul 10 2015 Mat Booth - 3.2-9.3 +- Fix unowned directories + +* Tue Jul 07 2015 Mat Booth - 3.2-9.2 +- Non-bootstrap build + +* Tue Jul 07 2015 Mat Booth - 3.2-9.1 +- Import latest from Fedora +- Enable bootstrap mode + +* Thu Jun 18 2015 Mat Booth - 3.2-9 +- Fix compat versions again (globs must be quoted) + +* Wed Jun 17 2015 Mat Booth - 3.2-8 +- Non-bootstrap build + +* Wed Jun 17 2015 Mat Booth - 3.2-7 +- Fix compat version of maven-plugin +- Rebootstrap + +* Tue Jun 16 2015 Fedora Release Engineering - 3.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Fri Jun 20 2014 Mat Booth - 3.2-5 +- Use mvn_compat_version macro + +* Sat Jun 07 2014 Fedora Release Engineering - 3.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Mon Jun 02 2014 Mat Booth - 3.2-3 +- Perform a non-bootstrap build + +* Mon Jun 02 2014 Mat Booth - 3.2-2 +- Add link to source of back-ported patch + +* Thu May 29 2014 Mat Booth - 3.2-1 +- Initial packaging of compatability version of antlr3