From d03c3c10786b3b3bd175868ceb0a0b1b73dda9b3 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 20:26:49 +0100 Subject: [PATCH] update to 4.9.2 [release 4.9.2-1mamba;Sat Apr 10 2021] --- antlr-2.7.5-gcc4.patch | 18 -- antlr-2.7.7-build.xml | 71 ------- antlr-2.7.7-includestrings.patch | 10 - antlr-2.7.7-jedit.patch | 33 ---- antlr-2.7.7-newgcc.patch | 11 -- antlr-2.7.7.pom | 22 --- antlr-bin | 2 + antlr-bin-grun | 2 + antlr.spec | 309 ++----------------------------- java-component-info3.xml | 16 -- 10 files changed, 24 insertions(+), 470 deletions(-) delete mode 100644 antlr-2.7.5-gcc4.patch delete mode 100644 antlr-2.7.7-build.xml delete mode 100644 antlr-2.7.7-includestrings.patch delete mode 100644 antlr-2.7.7-jedit.patch delete mode 100644 antlr-2.7.7-newgcc.patch delete mode 100644 antlr-2.7.7.pom create mode 100644 antlr-bin create mode 100644 antlr-bin-grun delete mode 100644 java-component-info3.xml diff --git a/antlr-2.7.5-gcc4.patch b/antlr-2.7.5-gcc4.patch deleted file mode 100644 index cdc98af..0000000 --- a/antlr-2.7.5-gcc4.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -Nru antlr-2.7.5.orig/antlr/Makefile.in antlr-2.7.5/antlr/Makefile.in ---- antlr-2.7.5.orig/antlr/Makefile.in 2005-08-17 15:29:32.000000000 +0200 -+++ antlr-2.7.5/antlr/Makefile.in 2005-08-17 15:30:18.000000000 +0200 -@@ -269,13 +269,7 @@ - @abs_top_srcdir@/antlr/debug/misc/JTreeASTPanel.java \ - $(eol) - -- --## damned ugly hack .. --ifeq (gcj,@javac@) -- antlr_java_FILES = $(antlr_java1_FILES) --else -- antlr_java_FILES = $(antlr_java1_FILES) $(antlr_swing_FILES) --endif -+antlr_java_FILES = $(antlr_java1_FILES) $(antlr_swing_FILES) - - ## rule how to compile java files - @ANTLR_JAR@ :: $(antlr_java_FILES) diff --git a/antlr-2.7.7-build.xml b/antlr-2.7.7-build.xml deleted file mode 100644 index eadf11b..0000000 --- a/antlr-2.7.7-build.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/antlr-2.7.7-includestrings.patch b/antlr-2.7.7-includestrings.patch deleted file mode 100644 index 2640c07..0000000 --- a/antlr-2.7.7-includestrings.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- antlr-2.7.7/lib/cpp/antlr/CharScanner.hpp 2006-11-01 22:37:17.000000000 +0100 -+++ antlr-2.7.7/lib/cpp/antlr/CharScanner.hpp-gil 2009-02-21 00:03:22.000000000 +0100 -@@ -9,6 +9,7 @@ - */ - - #include -+#include - - #include - diff --git a/antlr-2.7.7-jedit.patch b/antlr-2.7.7-jedit.patch deleted file mode 100644 index 2b20f29..0000000 --- a/antlr-2.7.7-jedit.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- antlr-2.7.7/extras/antlr-jedit.xml 2006-11-01 22:37:17.000000000 +0100 -+++ antlr-2.7.7/extras/antlr-jedit.xml-gil 2009-02-21 00:08:41.000000000 +0100 -@@ -16,9 +16,6 @@ - - - -- -- -- - - - -@@ -97,9 +94,7 @@ - - - -- -- -- -+ - - /**/ - -@@ -149,9 +144,6 @@ - - - -- -- -- - - { - diff --git a/antlr-2.7.7-newgcc.patch b/antlr-2.7.7-newgcc.patch deleted file mode 100644 index ff58b9e..0000000 --- a/antlr-2.7.7-newgcc.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- antlr-2.7.7/lib/cpp/antlr/CharScanner.hpp 2006-11-01 22:37:17.000000000 +0100 -+++ antlr-2.7.7/lib/cpp/antlr/CharScanner.hpp-gil 2009-05-30 17:56:29.000000000 +0200 -@@ -11,6 +11,8 @@ - #include - - #include -+#include -+#include - - #ifdef HAS_NOT_CCTYPE_H - #include diff --git a/antlr-2.7.7.pom b/antlr-2.7.7.pom deleted file mode 100644 index 354e82d..0000000 --- a/antlr-2.7.7.pom +++ /dev/null @@ -1,22 +0,0 @@ - - 4.0.0 - antlr - antlr - jar - 2.7.7 - AntLR Parser Generator - - A framework for constructing recognizers, compilers, - and translators from grammatical descriptions containing - Java, C#, C++, or Python actions. - - http://www.antlr.org/ - - - BSD License - http://www.antlr.org/license.html - repo - - - - diff --git a/antlr-bin b/antlr-bin new file mode 100644 index 0000000..b14252e --- /dev/null +++ b/antlr-bin @@ -0,0 +1,2 @@ +#!/bin/sh +java -jar /usr/share/java/antlr-complete.jar "$@" diff --git a/antlr-bin-grun b/antlr-bin-grun new file mode 100644 index 0000000..8734518 --- /dev/null +++ b/antlr-bin-grun @@ -0,0 +1,2 @@ +#!/bin/sh +java -cp .:/usr/share/java/antlr-complete.jar org.antlr.v4.gui.TestRig "$@" diff --git a/antlr.spec b/antlr.spec index 0ad60a2..be05448 100644 --- a/antlr.spec +++ b/antlr.spec @@ -1,320 +1,51 @@ -%define repodir %{_javadir}/repository.jboss.com/antlr/2.7.6-brew -%define repodirlib %{repodir}/lib -%define repodirsrc %{repodir}/src Name: antlr -Version: 2.7.7 -Release: 9mamba -Summary: ANother Tool for Language Recognition +Version: 4.9.2 +Release: 1mamba +Summary: Parser generator for reading, processing, executing, or translating structured text or binary files Group: Development/Tools Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco -URL: http://antlr.org/ -Source0: http://www.antlr2.org/download/antlr-%{version}.tar.gz -Source1: antlr-2.7.7-build.xml -#http://www.antlr.org/share/1069557132934/makefile.gcj -#Source2: makefile.gcj -Source3: http://www.ibiblio.org/maven/antlr/poms/antlr-%{version}.pom -Source4: java-component-info3.xml -Patch0: antlr-2.7.5-gcc4.patch -Patch1: antlr-2.7.7-includestrings.patch -# requires jedit -Patch2: antlr-2.7.7-jedit.patch -Patch3: antlr-2.7.7-newgcc.patch +URL: https://www.antlr.org/ +Source0: https://www.antlr.org/download/antlr-%{version}-complete.jar +Source1: antlr-bin +Source2: antlr-bin-grun License: Public Domain ## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-END -BuildRequires: apache-ant -BuildRequires: doxygen -BuildRequires: graphviz -BuildRequires: jpackage-utils -BuildRequires: libpython-devel -BuildRequires: mono-core -BuildRequires: mono-winforms -#BuildRequires: java-gcj-compat -#BuildRequires: gcc-java -#BuildRequires: java-gcj-compat -#BuildRequires: libgcj4-devel -#BuildRequires: /usr/bin/javadoc -BuildRoot: %{_tmppath}/%{name}-%{version}-root +BuildRequires: javapackages %description 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 Java, C#, C++, or Python actions. ANTLR provides excellent support for tree construction, tree walking, and translation. -%package manual -Group: Development/Tools -Summary: Manual for %{name} - -%description manual -ANother Tool for Language Recognition. -This package contains documentation for %{name}. - -%package javadoc -Group: Documentation -Summary: Javadoc for %{name} - -%description javadoc -ANother Tool for Language Recognition. -This package contains javadoc for %{name}. - -%package C++ -Group: Development/Libraries -Summary: C++ run-time support for ANTLR-generated parsers - -%description C++ -ANother Tool for Language Recognition. -This package contains C++ run-time support for ANTLR-generated parsers - -%package C++-doc -Group: Documentation -Summary: Development documentation for the C++ bindings for ANTLR-generated parsers - -%description C++-doc -ANother Tool for Language Recognition. -This package contains development documentation for the C++ bindings for ANTLR-generated parsers - -%package -n python-antlr -Group: Development/Libraries/Python -Summary: Python run-time support for ANTLR-generated parsers - -%description -n python-antlr -ANother Tool for Language Recognition. -This package contains Python run-time support for ANTLR-generated parsers - -%package repolib -Group: Development/Libraries/Java -Summary: Artifacts to be uploaded to a repository library - -%description repolib -ANother Tool for Language Recognition. -This package contains artifacts to be uploaded to a repository library. -This package is not meant to be installed but so its contents can be extracted through rpm2cpio. - -%package sharp -Group: Development/Libraries -Summary: C# run-time support for ANTLR-generated parsers - -%description sharp -ANother Tool for Language Recognition. -This package contains C# run-time support for ANTLR-generated parsers - -%package gcj -Summary: GCJ %{name} support -Group: System/Libraries/Java -Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} -Requires: java-gcj-compat -Requires: jpackage-utils - -%description gcj -%{name} - ANother Tool for Language Recognition. -This package contains GCJ %{name} support. - %prep -%setup -q -#-D -T -#:<< ____EOF -#%patch0 -p1 -#%patch1 -p1 -#%patch2 -p1 -%patch3 -p1 - -find . -type f -name "*.class" -exec rm -f {} \; - -for j in $(find -name "*.jar"); do - mv $j $j.no -done - -cp -p %{S:1} build.xml -sed -i 's/\r//' LICENSE.txt -%{__perl} -pi -e 's|"doc/|"%{_docdir}/%{name}-manual-%{version}/|g' install.html - -for p in $(find . -name "*.py"); do - sed -i 's|#!/usr/bin/python|#!%{__python}|' $p - sed -i 's|#!/usr/bin/env python|#!%{__python}|' $p - sed -i 's|#!python|#!%{__python}|' $p - sed -i 's|#!/usr/local/bin/python2.1|#!%{__python}|' $p - sed -i 's|#!/usr/local/bin/python|#!%{__python}|' $p -done - -sed -i 's|#!/usr/bin/env python|#!%{__python}|' scripts/pyinst.sh.in - - -%patch2 -p1 +%setup -q -c -D -T %build -export JAVA_HOME=%{java_home} -ant -Dj2se.apidoc=%{_javadocdir}/java -cp work/lib/antlr.jar . -export CLASSPATH=. - %configure \ - --disable-examples \ - --with-bootclasspath=$JAVA_HOME/jre/lib/rt.jar \ - --with-java=$JAVA_HOME/bin/java \ - --with-javac=$JAVA_HOME/bin/javac \ - --with-jar=$JAVA_HOME/bin/jar \ - --with-python=%{__python} - -rm antlr.jar -make CXXFLAGS="${CXXFLAGS:-%optflags} -fPIC" - -%ifnarch arm -pushd lib/cpp - doxygen doxygen.cfg - find gen_doc -type f -exec chmod 0644 {} \; -popd -%endif - -#cd lib/python -# %{__python} setup.py build -#cd ../../ %install [ "%{buildroot}" != / ] && rm -rf %{buildroot} -%makeoldinstall +install -D -m0644 %{SOURCE0} \ + %{buildroot}%{_javadir}/%{name}-%{version}-complete.jar +ln -s %{name}-%{version}-complete.jar %{buildroot}%{_javadir}/antlr-complete.jar -mkdir -p %{buildroot}%{_javadir} -mkdir -p %{buildroot}%{_datadir}/maven2/poms - -install -pm 644 work/lib/antlr.jar \ - %{buildroot}%{_javadir}/antlr-%{version}.jar - - -#cd lib/python -# %{__python} setup.py install -O1 --skip-build --root %{buildroot} -#cd ../.. - -rm -rf %{buildroot}%{_libdir}/antlr.jar -ln -sf ../share/java/antlr-%{version}.jar %{buildroot}%{_libdir}/antlr.jar - -%{_bindir}/aot-compile-rpm - -( - cd %{buildroot}%{_javadir}/ - for jar in *-%{version}.jar; do - ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"` - done -) - -install -m 644 %{SOURCE3} %{buildroot}%{_datadir}/maven2/poms/JPP-antlr.pom -%add_to_maven_depmap antlr antlr %{version} JPP antlr - -mkdir -p %{buildroot}%{_javadocdir}/antlr-%{version} -cp -pr work/api/* %{buildroot}%{_javadocdir}/antlr-%{version} -ln -s antlr-%{version} %{buildroot}%{_javadocdir}/antlr - -rm -rf %{buildroot}%{_docdir}/ - -rm doc/{Makefile,Makefile.in} -chmod 0644 doc/* - -mkdir -p %{buildroot}%{_datadir}/jedit/modes -cp -p extras/antlr-jedit.xml %{buildroot}%{_datadir}/jedit/modes/antlr.xml - -mkdir -p %{buildroot}%{repodir} -mkdir -p %{buildroot}%{repodirlib} -install -p -m 644 %{SOURCE4} %{buildroot}%{repodir}/component-info.xml -tag=`echo %{name}-%{version}-%{release} | sed 's|\.|_|g'` -sed -i "s/@TAG@/$tag/g" %{buildroot}%{repodir}/component-info.xml -sed -i "s/@NAME@/antlr-component-info/g" %{buildroot}%{repodir}/component-info.xml -sed -i "s/@ID@/antlr/g" %{buildroot}%{repodir}/component-info.xml -sed -i "s/@VERSION@/%{version}%{rel}-brew/g" %{buildroot}%{repodir}/component-info.xml -sed -i "s/@LICENSE@/antlr/g" %{buildroot}%{repodir}/component-info.xml -sed -i "s|@PROJECTHOME@|%{url}|g" %{buildroot}%{repodir}/component-info.xml -sed -i "s/@DESCRIPTION@/ANother Tool for Language Recognition/g" %{buildroot}%{repodir}/component-info.xml -sed -i "s/@ARTIFACTID@/antlr.jar/g" %{buildroot}%{repodir}/component-info.xml -sed -i "s/@INCLUDEINPUT@/antlr.jar/g" %{buildroot}%{repodir}/component-info.xml -mkdir -p %{buildroot}%{repodirsrc} -install -pm 644 %{PATCH0} %{buildroot}%{repodirsrc} -install -pm 644 %{PATCH1} %{buildroot}%{repodirsrc} -install -pm 644 %{PATCH2} %{buildroot}%{repodirsrc} -install -pm 644 %{PATCH3} %{buildroot}%{repodirsrc} -cp %{SOURCE0} %{buildroot}%{repodirsrc} -cp %{SOURCE1} %{buildroot}%{repodirsrc} -cp -p %{buildroot}%{_javadir}/antlr-%{version}.jar %{buildroot}%{repodirlib}/antlr.jar +install -D -m0755 %{SOURCE1} %{buildroot}%{_bindir}/antlr +install -D -m0755 %{SOURCE2} %{buildroot}%{_bindir}/grun %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" -%post -%update_maven_depmap - -%postun -%update_maven_depmap - %files %defattr(-,root,root) %{_bindir}/antlr -%{_javadir}/antlr-%{version}.jar -%{_javadir}/antlr.jar -%{_libdir}/antlr.jar -%dir %{_datadir}/antlr-%{version}/ -%{_datadir}/antlr-%{version}/antlr-mode.el -%{_datadir}/antlr-%{version}/antlr.jar -%{_datadir}/antlr-%{version}/antlr-jedit.xml -%{_datadir}/jedit/modes/antlr.xml -%{_datadir}/maven2/poms -%{_mavendepmapfragdir} -%doc LICENSE.txt README.txt - -%post gcj -/sbin/ldconfig -if [ -x %{_bindir}/rebuild-gcj-db ]; then - %{_bindir}/rebuild-gcj-db -fi - -%postun gcj -/sbin/ldconfig -if [ -x %{_bindir}/rebuild-gcj-db ]; then - %{_bindir}/rebuild-gcj-db -fi - -%files gcj -%defattr(-,root,root) -%{_libdir}/gcj/antlr/antlr*.jar.db -%{_libdir}/gcj/antlr/antlr*.jar.so - -%files manual -%defattr(-,root,root) -%doc doc - -%files C++ -%defattr(-,root,root) -%{_bindir}/antlr-config -%dir %{_includedir}/antlr -%{_includedir}/antlr/*.hpp -%{_libdir}/libantlr.a - -%if "%{stage1}" != "1" -%files C++-doc -%defattr(-,root,root) -%doc lib/cpp/gen_doc/html/ -%endif - -%files -n python-antlr -%defattr(-,root,root) -%{_libdir}/antlr.py -%{_sbindir}/pyantlr.sh -%{_datadir}/antlr-%{version}/*.py -#%dir %{python_sitearch}/antlr -#%{python_sitearch}/antlr/*.py* -#%{python_sitearch}/antlr-*-py%{python_version}.egg-info - -%files sharp -%defattr(-,root,root) -%{_libdir}/antlr.astframe.dll -%{_libdir}/antlr.runtime.dll -%{_datadir}/antlr-%{version}/antlr.*.dll - -%files javadoc -%defattr(-,root,root) -%{_javadocdir}/antlr-%{version} -%{_javadocdir}/antlr - -%files repolib -%defattr(-,root,root) -%{repodir} +%{_bindir}/grun +%{_javadir}/antlr-%{version}-complete.jar +%{_javadir}/antlr-complete.jar %changelog +* Sat Apr 10 2021 Silvan Calarco 4.9.2-1mamba +- update to 4.9.2 + * Fri Feb 25 2011 gil 2.7.7-9mamba - rebuilt with java-gcj-compat 1.0.80-20mamba support diff --git a/java-component-info3.xml b/java-component-info3.xml deleted file mode 100644 index 0115b98..0000000 --- a/java-component-info3.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - -