diff --git a/.gitignore b/.gitignore index ecf0026..9db6ce1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ -/*.zip -/*.tar.gz -/*.src.rpm +antlr-3.2.tar.gz +libantlr3c-3.2.tar.gz +antlr-javascript-runtime-3.1.zip +antlr_python_runtime-3.1.2.tar.gz +antlr3-maven-plugin-3.2.jar +antlr-3.2.jar diff --git a/0001-java8-fix.patch b/0001-java8-fix.patch deleted file mode 100644 index a05238d..0000000 --- a/0001-java8-fix.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 33f662c60e6e7b703e197854d2478a8747f044f0 Mon Sep 17 00:00:00 2001 -From: Michael Simacek -Date: Tue, 17 Jun 2014 19:36:24 +0200 -Subject: [PATCH] java8 fix - -Signed-off-by: Michael Simacek ---- - tool/src/main/java/org/antlr/codegen/CodeGenerator.java | 2 +- - tool/src/main/java/org/antlr/tool/Grammar.java | 4 ++-- - tool/src/main/java/org/antlr/tool/Strip.java | 2 +- - 3 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/tool/src/main/java/org/antlr/codegen/CodeGenerator.java b/tool/src/main/java/org/antlr/codegen/CodeGenerator.java -index b279bd5..566e33c 100644 ---- a/tool/src/main/java/org/antlr/codegen/CodeGenerator.java -+++ b/tool/src/main/java/org/antlr/codegen/CodeGenerator.java -@@ -1087,7 +1087,7 @@ public class CodeGenerator { - catch (Exception tse) { - ErrorManager.internalError("can't parse template action",tse); - } -- GrammarAST rewriteTree = parseResult.getTree(); -+ GrammarAST rewriteTree = (GrammarAST)parseResult.getTree(); - - // then translate via codegen.g - CodeGenTreeWalker gen = new CodeGenTreeWalker(new CommonTreeNodeStream(rewriteTree)); -diff --git a/tool/src/main/java/org/antlr/tool/Grammar.java b/tool/src/main/java/org/antlr/tool/Grammar.java -index 667ebb2..4ca4328 100644 ---- a/tool/src/main/java/org/antlr/tool/Grammar.java -+++ b/tool/src/main/java/org/antlr/tool/Grammar.java -@@ -706,7 +706,7 @@ public class Grammar { - } - } - -- setGrammarTree(result.getTree()); -+ setGrammarTree((GrammarAST)result.getTree()); - - //if ( grammarTree!=null ) System.out.println("grammar tree: "+grammarTree.toStringTree()); - -@@ -927,7 +927,7 @@ public class Grammar { - parser.setGrammarType(this.type); - try { - ANTLRParser.rule_return result = parser.rule(); -- return result.getTree(); -+ return (GrammarAST)result.getTree(); - } - catch (Exception e) { - ErrorManager.error(ErrorManager.MSG_ERROR_CREATING_ARTIFICIAL_RULE, -diff --git a/tool/src/main/java/org/antlr/tool/Strip.java b/tool/src/main/java/org/antlr/tool/Strip.java -index f411090..ddda4ed 100644 ---- a/tool/src/main/java/org/antlr/tool/Strip.java -+++ b/tool/src/main/java/org/antlr/tool/Strip.java -@@ -64,7 +64,7 @@ public class Strip { - tokens = new TokenRewriteStream(lex); - ANTLRv3Parser g = new ANTLRv3Parser(tokens); - ANTLRv3Parser.grammarDef_return r = g.grammarDef(); -- CommonTree t = r.getTree(); -+ CommonTree t = (CommonTree)r.getTree(); - if (tree_option) System.out.println(t.toStringTree()); - rewrite(g.getTreeAdaptor(),t,g.getTokenNames()); - } --- -2.7.4 - diff --git a/0002-conversion-timeout.patch b/0002-conversion-timeout.patch deleted file mode 100644 index 8bd8536..0000000 --- a/0002-conversion-timeout.patch +++ /dev/null @@ -1,14 +0,0 @@ -Description: Increase the default conversion timeout to avoid build failures when complex grammars are processed on slow architectures. -Author: Emmanuel Bourg -Forwarded: no ---- a/tool/src/main/java/org/antlr/analysis/DFA.java -+++ b/tool/src/main/java/org/antlr/analysis/DFA.java -@@ -57,7 +57,7 @@ - */ - - /** Set to 0 to not terminate early (time in ms) */ -- public static int MAX_TIME_PER_DFA_CREATION = 1*1000; -+ public static int MAX_TIME_PER_DFA_CREATION = 30*1000; - - /** How many edges can each DFA state have before a "special" state - * is created that uses IF expressions instead of a table? diff --git a/0003-fix-c-template.patch b/0003-fix-c-template.patch deleted file mode 100644 index 6eabc08..0000000 --- a/0003-fix-c-template.patch +++ /dev/null @@ -1,35 +0,0 @@ -Description: Fix various issues with the C template (backports of patchs proposed upstream) -Origin: backport, https://github.com/stephengaito/antlr3/commit/adc5e54 - https://github.com/stephengaito/antlr3/commit/71df80c ---- a/tool/src/main/resources/org/antlr/codegen/templates/C/C.stg -+++ b/tool/src/main/resources/org/antlr/codegen/templates/C/C.stg -@@ -2132,7 +2132,9 @@ - - LRECOVER(); - -+); -+!> - - goto ruleEx; - }<\n> -@@ -2143,7 +2145,10 @@ - EXCEPTION->type = ANTLR3_MISMATCHED_SET_EXCEPTION; - EXCEPTION->name = (void *)ANTLR3_MISMATCHED_SET_NAME; - -+EXCEPTION->expectingSet = NULL; -+expectingSet = &FOLLOW_set_in_; -+!> - - >> - -@@ -2510,7 +2515,7 @@ - */ - static const ANTLR3_INT32 * const dfa_transitions[] = - { -- _T}; separator=", ", wrap="\n", null="_empty"> -+ _T}; separator=", ", wrap="\n", null="NULL"> - }; - - diff --git a/0004-eof-token.patch b/0004-eof-token.patch deleted file mode 100644 index 2602ca6..0000000 --- a/0004-eof-token.patch +++ /dev/null @@ -1,13 +0,0 @@ -Description: Keep the Token.EOF_TOKEN field to preserve the backward compatibility -Author: Emmanuel Bourg -Forwarded: no ---- a/runtime/Java/src/main/java/org/antlr/runtime/Token.java -+++ b/runtime/Java/src/main/java/org/antlr/runtime/Token.java -@@ -38,6 +38,7 @@ - public static final int MIN_TOKEN_TYPE = UP+1; - - public static final int EOF = CharStream.EOF; -+ public static final Token EOF_TOKEN = new CommonToken(EOF); - - public static final int INVALID_TOKEN_TYPE = 0; - public static final Token INVALID_TOKEN = new CommonToken(INVALID_TOKEN_TYPE); diff --git a/0005-reproducible-parsers.patch b/0005-reproducible-parsers.patch deleted file mode 100644 index a06bcaf..0000000 --- a/0005-reproducible-parsers.patch +++ /dev/null @@ -1,42 +0,0 @@ -Description: Replace the HashSets with LinkedHashSets to make the generated parsers reproducible -Author: Emmanuel Bourg -Forwarded: no ---- a/tool/src/main/antlr3/org/antlr/grammar/v3/DefineGrammarItemsWalker.g -+++ b/tool/src/main/antlr3/org/antlr/grammar/v3/DefineGrammarItemsWalker.g -@@ -45,6 +45,7 @@ - package org.antlr.grammar.v3; - import org.antlr.tool.*; - import java.util.HashSet; -+import java.util.LinkedHashSet; - import java.util.Set; - } - -@@ -279,7 +280,7 @@ - throwsSpec returns [HashSet exceptions] - @init - { -- $exceptions = new HashSet(); -+ $exceptions = new LinkedHashSet(); - } - : ^('throws' (ID {$exceptions.add($ID.text);})+ ) - ; -@@ -556,7 +557,7 @@ - if ( state.backtracking == 0 ) - { - if ( grammar.buildAST() ) -- currentRewriteRule.rewriteRefsDeep = new HashSet(); -+ currentRewriteRule.rewriteRefsDeep = new LinkedHashSet(); - } - } - : ^( REWRITES -@@ -582,8 +583,8 @@ - { - // don't do if guessing - currentRewriteBlock=$start; // pts to BLOCK node -- currentRewriteBlock.rewriteRefsShallow = new HashSet(); -- currentRewriteBlock.rewriteRefsDeep = new HashSet(); -+ currentRewriteBlock.rewriteRefsShallow = new LinkedHashSet(); -+ currentRewriteBlock.rewriteRefsDeep = new LinkedHashSet(); - } - } - : ^( BLOCK rewrite_alternative EOB ) diff --git a/0006-antlr3memory.hpp-fix-for-C-20-mode.patch b/0006-antlr3memory.hpp-fix-for-C-20-mode.patch deleted file mode 100644 index fd0870c..0000000 --- a/0006-antlr3memory.hpp-fix-for-C-20-mode.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 478902a7e57e2283c57410f5aa14939e743b5102 Mon Sep 17 00:00:00 2001 -From: Avi Kivity -Date: Tue, 12 May 2020 14:51:18 +0300 -Subject: [PATCH] antlr3memory.hpp: fix for C++20 mode - -gcc 10 in C++20 mode requires that the allocator type match -the type used to allocate, so do that by adding "const" to the -key type. ---- - runtime/Cpp/include/antlr3memory.hpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/runtime/Cpp/include/antlr3memory.hpp b/runtime/Cpp/include/antlr3memory.hpp -index 7713613..4667a00 100755 ---- a/runtime/Cpp/include/antlr3memory.hpp -+++ b/runtime/Cpp/include/antlr3memory.hpp -@@ -98,17 +98,17 @@ public: - { - }; - - template - class UnOrderedMapType : public std::map< KeyType, ValueType, std::less, -- AllocatorType > > -+ AllocatorType > > - { - }; - - template - class OrderedMapType : public std::map< KeyType, ValueType, std::less, -- AllocatorType > > -+ AllocatorType > > - { - }; - - ANTLR_INLINE static void* operator new (std::size_t bytes) - { --- -2.26.2 - diff --git a/0007-update-java-target.patch b/0007-update-java-target.patch deleted file mode 100644 index b2a8b56..0000000 --- a/0007-update-java-target.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/antlr3-maven-archetype/src/main/resources/archetype-resources/pom.xml -+++ b/antlr3-maven-archetype/src/main/resources/archetype-resources/pom.xml -@@ -106,8 +106,8 @@ - maven-compiler-plugin - 2.0.2 - -- 1.6 -- jsr14 -+ 1.8 -+ 1.8 - src - - diff --git a/0008-unconst-cyclicdfa-gcc-14.patch b/0008-unconst-cyclicdfa-gcc-14.patch deleted file mode 100644 index 1a78820..0000000 --- a/0008-unconst-cyclicdfa-gcc-14.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- a/runtime/Cpp/include/antlr3cyclicdfa.hpp.orig 2024-02-01 14:13:33.243312124 +0200 -+++ b/runtime/Cpp/include/antlr3cyclicdfa.hpp 2024-02-01 14:12:28.493542243 +0200 -@@ -61,18 +61,18 @@ - /// Decision number that a particular static structure - /// represents. - /// -+ ANTLR_INT32 m_decisionNumber; -- const ANTLR_INT32 m_decisionNumber; - - /// What this decision represents - /// - const ANTLR_UCHAR* m_description; -+ const ANTLR_INT32* m_eot; -+ const ANTLR_INT32* m_eof; -+ const ANTLR_INT32* m_min; -+ const ANTLR_INT32* m_max; -+ const ANTLR_INT32* m_accept; -+ const ANTLR_INT32* m_special; -+ const ANTLR_INT32* const * m_transition; -- const ANTLR_INT32* const m_eot; -- const ANTLR_INT32* const m_eof; -- const ANTLR_INT32* const m_min; -- const ANTLR_INT32* const m_max; -- const ANTLR_INT32* const m_accept; -- const ANTLR_INT32* const m_special; -- const ANTLR_INT32* const *const m_transition; - - public: - CyclicDFA( ANTLR_INT32 decisionNumber diff --git a/README.md b/README.md deleted file mode 100644 index d572416..0000000 --- a/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# antlr3 - -[ANTLR version 3](https://www.antlr3.org/), 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. diff --git a/antlr-pom.patch b/antlr-pom.patch new file mode 100644 index 0000000..c9ba6d9 --- /dev/null +++ b/antlr-pom.patch @@ -0,0 +1,149 @@ +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 new file mode 100644 index 0000000..ee9800c --- /dev/null +++ b/antlr-python-3.1.2-version.patch @@ -0,0 +1,37 @@ +--- 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/antlr3 b/antlr3 new file mode 100644 index 0000000..07890d8 --- /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="antlr.jar stringtemplate.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 6837262..6e7d634 100644 --- a/antlr3.spec +++ b/antlr3.spec @@ -1,312 +1,265 @@ -%global antlr_version 3.5.3 -%global c_runtime_version 3.4 +%{!?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 javascript_runtime_version 3.1 -%global baserelease 16 -# This package needs itself to build. Use this to bootstrap on a new system. -%bcond bootstrap 0 - -# Component versions to use when bootstrapping -%global antlr2_version 2.7.7 -%global bootstrap_version 3.5 -%global ST4ver1 4.0.7 -%global ST4ver2 4.0.8 -%global stringtemplatever 3.2.1 - -%global giturl https://github.com/antlr/antlr3 - -Summary: ANother Tool for Language Recognition -Name: antlr3 -Epoch: 1 -Version: %{antlr_version} -Release: %{baserelease}%{?dist} -License: BSD-3-Clause -URL: https://www.antlr3.org/ -VCS: git:%{giturl}.git - -Source0: %{giturl}/archive/%{antlr_version}/%{name}-%{antlr_version}.tar.gz -Source1: http://www.antlr3.org/download/antlr-javascript-runtime-%{javascript_runtime_version}.zip -%if %{with bootstrap} -# Get prebuilt versions to bootstrap -Source2: https://repo1.maven.org/maven2/org/antlr/ST4/%{ST4ver1}/ST4-%{ST4ver1}.jar -Source3: https://repo1.maven.org/maven2/org/antlr/ST4/%{ST4ver1}/ST4-%{ST4ver1}.pom -Source4: https://repo1.maven.org/maven2/org/antlr/ST4/%{ST4ver2}/ST4-%{ST4ver2}.jar -Source5: https://repo1.maven.org/maven2/org/antlr/ST4/%{ST4ver2}/ST4-%{ST4ver2}.pom -Source6: https://repo1.maven.org/maven2/org/antlr/antlr/%{bootstrap_version}/antlr-%{bootstrap_version}.jar -Source7: https://repo1.maven.org/maven2/org/antlr/antlr/%{bootstrap_version}/antlr-%{bootstrap_version}.pom -Source8: https://repo1.maven.org/maven2/org/antlr/antlr-master/%{bootstrap_version}/antlr-master-%{bootstrap_version}.pom -Source9: https://repo1.maven.org/maven2/org/antlr/antlr-runtime/%{bootstrap_version}/antlr-runtime-%{bootstrap_version}.jar -Source10: https://repo1.maven.org/maven2/org/antlr/antlr-runtime/%{bootstrap_version}/antlr-runtime-%{bootstrap_version}.pom -Source11: https://repo1.maven.org/maven2/org/antlr/antlr3-maven-plugin/%{bootstrap_version}/antlr3-maven-plugin-%{bootstrap_version}.jar -Source12: https://repo1.maven.org/maven2/org/antlr/antlr3-maven-plugin/%{bootstrap_version}/antlr3-maven-plugin-%{bootstrap_version}.pom -Source13: https://repo1.maven.org/maven2/org/antlr/stringtemplate/%{stringtemplatever}/stringtemplate-%{stringtemplatever}.jar -Source14: https://repo1.maven.org/maven2/org/antlr/stringtemplate/%{stringtemplatever}/stringtemplate-%{stringtemplatever}.pom -Source15: https://repo1.maven.org/maven2/antlr/antlr/%{antlr2_version}/antlr-%{antlr2_version}.jar -Source16: https://repo1.maven.org/maven2/antlr/antlr/%{antlr2_version}/antlr-%{antlr2_version}.pom +Summary: ANother Tool for Language Recognition +Name: antlr3 +Version: %{antlr_version} +Release: 18%{?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 %endif - -Patch: 0001-java8-fix.patch -# Generate OSGi metadata -Patch: osgi-manifest.patch -# Increase the default conversion timeout to avoid build failures when complex -# grammars are processed on slow architectures. Patch from Debian. -Patch: 0002-conversion-timeout.patch -# Fix problems with the C template. Patch from Debian. -Patch: 0003-fix-c-template.patch -# Keep Token.EOF_TOKEN for backwards compatibility. Patch from Debian. -Patch: 0004-eof-token.patch -# Make parsers reproducible. Patch from Debian. -Patch: 0005-reproducible-parsers.patch -# Fix for C++20 -Patch: 0006-antlr3memory.hpp-fix-for-C-20-mode.patch -# Compile for target 1.8 to fix build with JDK 11 -Patch: 0007-update-java-target.patch -# Fix source for tighter gcc template checks -Patch: 0008-unconst-cyclicdfa-gcc-14.patch - -BuildRequires: ant-openjdk25 -BuildRequires: make -BuildRequires: maven-local-openjdk25 -%if %{without bootstrap} -BuildRequires: mvn(org.antlr:antlr) -BuildRequires: mvn(org.antlr:antlr3-maven-plugin) -BuildRequires: mvn(org.antlr:ST4) -BuildRequires: mvn(org.antlr:stringtemplate) +# 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/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: 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 +BuildRequires: maven2 +%if ! %{with_bootstrap} +BuildRequires: antlr3-tool >= 3.2 %endif -BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) -BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin) -BuildRequires: mvn(org.apache.maven:maven-plugin-api) -BuildRequires: mvn(org.codehaus.plexus:plexus-compiler-api) - -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: libtool - -# https://fedoraproject.org/wiki/Changes/Drop_i686_JDKs -ExclusiveArch: %{java_arches} %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. +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 -Summary: ANother Tool for Language Recognition -License: BSD-3-Clause AND Apache-2.0 -BuildArch: noarch -Provides: %{name} = %{epoch}:%{antlr_version}-%{release} -Obsoletes: %{name} < %{epoch}:%{antlr_version}-%{release} -Requires: %{name}-java = %{epoch}:%{antlr_version}-%{release} -# Explicit requires for javapackages-tools since antlr3-script -# uses /usr/share/java-utils/java-functions -Requires: javapackages-tools +%package tool +Group: Development/Libraries +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: antlr +Requires: stringtemplate >= 3.2 -%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. +%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 java -Summary: Java run-time support for ANTLR-generated parsers -BuildArch: noarch +%package gunit +Group: Development/Libraries +Summary: Gunit is a unit testing framework for ANTLR grammars +BuildArch: noarch +Requires: jpackage-utils +Requires: java >= 1:1.6.0 +Requires: %{name}-java = %{antlr_version}-%{release} -%description java +%description gunit +This package provides support for Gunit, a unit testing framework +for ANTLR grammars. + +%package java +Group: Development/Libraries +Summary: Java run-time support for ANTLR-generated parsers +BuildArch: noarch +Requires: stringtemplate +Requires: jpackage-utils +Requires: java >= 1:1.6.0 + +%description java Java run-time support for ANTLR-generated parsers -%package javadoc -Summary: API documentation for %{name} -BuildArch: noarch +%package javascript +Group: Development/Libraries +Summary: Javascript run-time support for ANTLR-generated parsers +Version: %{javascript_runtime_version} +BuildArch: noarch -%description javadoc -%{summary}. - -%package javascript -Summary: Javascript run-time support for ANTLR-generated parsers -Version: %{javascript_runtime_version} -Release: %{antlr_version}.%{baserelease}%{?dist} -BuildArch: noarch - -%description javascript +%description javascript Javascript run-time support for ANTLR-generated parsers -%package C -Summary: C run-time support for ANTLR-generated parsers -Version: %{c_runtime_version} -Release: %{antlr_version}.%{baserelease}%{?dist} +%package C +Group: Development/Libraries +Summary: C run-time support for ANTLR-generated parsers -%description C +%description C C run-time support for ANTLR-generated parsers -%package C-devel -Summary: Header files for the C bindings for ANTLR-generated parsers -Requires: %{name}-C = %{epoch}:%{c_runtime_version}-%{release} -Version: %{c_runtime_version} -Release: %{antlr_version}.%{baserelease}%{?dist} +%package C-devel +Group: Development/Libraries +Summary: Header files for the C bindings for ANTLR-generated parsers +Requires: %{name}-C = %{antlr_version}-%{release} - -%description C-devel +%description C-devel Header files for the C bindings for ANTLR-generated parsers -%package C-docs -# The content is BSD-3-Clause. Other licenses are due to files installed by -# doxygen. -# api/bc_s.png: GPL-1.0-or-later -# api/bdwn.png: GPL-1.0-or-later -# api/closed.png: GPL-1.0-or-later -# api/doc.png: GPL-1.0-or-later -# api/doxygen.css: GPL-1.0-or-later -# api/doxygen.svg: GPL-1.0-or-later -# api/dynsections.js: MIT -# api/folderclosed.png: GPL-1.0-or-later -# api/folderopen.png: GPL-1.0-or-later -# api/jquery.js: MIT -# api/menu.js: MIT -# api/menudata.js: MIT -# api/nav_f.png: GPL-1.0-or-later -# api/nav_g.png: GPL-1.0-or-later -# api/nav_h.png: GPL-1.0-or-later -# api/navtree.css: GPL-1.0-or-later -# api/navtree.js: MIT -# api/open.png: GPL-1.0-or-later -# api/resize.js: MIT -# api/splitbar.png: GPL-1.0-or-later -# api/sync_off.png: GPL-1.0-or-later -# api/sync_on.png: GPL-1.0-or-later -# api/tab_a.png: GPL-1.0-or-later -# api/tab_b.png: GPL-1.0-or-later -# api/tab_h.png: GPL-1.0-or-later -# api/tab_s.png: GPL-1.0-or-later -# api/tabs.css: GPL-1.0-or-later -License: BSD-3-Clause AND GPL-1.0-or-later AND MIT -Summary: API documentation for the C run-time support for ANTLR-generated parsers -BuildArch: noarch -BuildRequires: graphviz -BuildRequires: doxygen -Requires: %{name}-C = %{epoch}:%{c_runtime_version}-%{release} -Version: %{c_runtime_version} -Release: %{antlr_version}.%{baserelease}%{?dist} +%package C-docs +Group: Documentation +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. +%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 C++-devel -Summary: C++ runtime support for ANTLR-generated parsers +%package python +Group: Development/Libraries +Summary: Python run-time support for ANTLR-generated parsers +BuildRequires: python-devel +BuildRequires: python-setuptools-devel +BuildArch: noarch +Version: %{python_runtime_version} -%description C++-devel -C++ runtime support for ANTLR-generated parsers. +%description python +Python run-time support for ANTLR-generated parsers %prep -%autosetup -p1 -n antlr3-%{antlr_version} -a 1 - -%conf -sed -i "s,\${buildNumber},`cat %{_sysconfdir}/fedora-release` `date`," tool/src/main/resources/org/antlr/antlr.properties - -# remove pre-built artifacts -find -type f -a -name *.jar -delete -find -type f -a -name *.class -delete - -%pom_remove_parent - -%pom_disable_module antlr3-maven-archetype -%pom_disable_module gunit -%pom_disable_module gunit-maven-plugin -%pom_disable_module antlr-complete - -%pom_remove_plugin :maven-source-plugin -%pom_remove_plugin :maven-enforcer-plugin -%pom_remove_plugin -r :maven-javadoc-plugin - -# workarounds bug in filtering (Mark invalid) -%pom_xpath_remove pom:resource/pom:filtering - -%mvn_package :antlr-runtime java -%mvn_package : tool - -%mvn_file :antlr antlr3 -%mvn_file :antlr-runtime antlr3-runtime -%mvn_file :antlr-maven-plugin antlr3-maven-plugin - -%if %{with bootstrap} -# Make the bootstrap JARs and POMs available -mkdir -p .m2/org/antlr/ST4/%{ST4ver1} -cp -p %{SOURCE2} %{SOURCE3} .m2/org/antlr/ST4/%{ST4ver1} -mkdir -p .m2/org/antlr/ST4/%{ST4ver2} -cp -p %{SOURCE4} %{SOURCE5} .m2/org/antlr/ST4/%{ST4ver2} -mkdir -p .m2/org/antlr/antlr/%{bootstrap_version} -cp -p %{SOURCE6} %{SOURCE7} .m2/org/antlr/antlr/%{bootstrap_version} -mkdir -p .m2/org/antlr/antlr-master/%{bootstrap_version} -cp -p %{SOURCE8} .m2/org/antlr/antlr-master/%{bootstrap_version} -mkdir -p .m2/org/antlr/antlr-runtime/%{bootstrap_version} -cp -p %{SOURCE9} %{SOURCE10} .m2/org/antlr/antlr-runtime/%{bootstrap_version} -mkdir -p .m2/org/antlr/antlr3-maven-plugin/%{bootstrap_version} -cp -p %{SOURCE11} %{SOURCE12} .m2/org/antlr/antlr3-maven-plugin/%{bootstrap_version} -mkdir -p .m2/org/antlr/stringtemplate/%{stringtemplatever} -cp -p %{SOURCE13} %{SOURCE14} .m2/org/antlr/stringtemplate/%{stringtemplatever} -mkdir -p .m2/antlr/antlr/%{antlr2_version} -cp -p %{SOURCE15} %{SOURCE16} .m2/antlr/antlr/%{antlr2_version} - -# We don't need the parent POM -%pom_remove_parent .m2/org/antlr/ST4/%{ST4ver1}/ST4-%{ST4ver1}.pom -%pom_remove_parent .m2/org/antlr/ST4/%{ST4ver2}/ST4-%{ST4ver2}.pom -%pom_remove_parent .m2/org/antlr/antlr-master/%{bootstrap_version}/antlr-master-%{bootstrap_version}.pom +%setup -q -n antlr-%{antlr_version} -a 1 -a 2 -a 3 +%patch0 -b .pomfix +%patch1 -b .orig +%if %{with_bootstrap} +cp %{SOURCE6} settings.xml %endif %build -%mvn_build -f +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 \ +"s|__JPP_URL_PLACEHOLDER__|file://`pwd`/.m2/repository|g" \ + settings.xml + sed -i -e \ + "s|__JAVADIR_PLACEHOLDER__|file://`pwd`/external_repo|g" \ + settings.xml + sed -i -e \ + "s|__MAVENREPO_DIR_PLACEHOLDER__|file://`pwd`/.m2/repository|g" \ + settings.xml + sed -i -e \ + "s|__MAVENDIR_PLUGIN_PLACEHOLDER__|file:///usr/share/maven2/plugins|g" \ + settings.xml + +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/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 + +# Build antlr +%if %{with_bootstrap} +mvn-jpp -s $(pwd)/settings.xml -Dmaven.repo.local=$MAVEN_REPO_LOCAL -Dmaven.test.skip=true install +%else +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 +popd # Build the C runtime -pushd runtime/C -autoreconf -i +pushd libantlr3c-%{antlr_version} + %configure --disable-abiflags --enable-debuginfo \ -%if 0%{?__isa_bits} == 64 +%ifarch x86_64 ppc64 s390x sparc64 --enable-64bit %else %{nil} %endif -sed -i 's#CFLAGS = .*#CFLAGS = %{build_cflags}#' Makefile -%make_build +sed -i "s/CFLAGS = .*/CFLAGS = $RPM_OPT_FLAGS/" Makefile +make %{?_smp_mflags} doxygen -u # update doxygen configuration file doxygen # build doxygen documentation popd -# build ant task -pushd antlr-ant/main/antlr3-task/ -export CLASSPATH=$(build-classpath ant) -javac -encoding ISO-8859-1 -source 1.8 -target 1.8 \ - antlr3-src/org/apache/tools/ant/antlr/ANTLR3.java -jar cvf ant-antlr3.jar \ - -C antlr3-src org/apache/tools/ant/antlr/antlib.xml \ - -C antlr3-src org/apache/tools/ant/antlr/ANTLR3.class +%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 +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 -mkdir -p $RPM_BUILD_ROOT/%{_mandir} -mkdir -p $RPM_BUILD_ROOT/%{_datadir}/antlr - -%mvn_install - -# install ant task -install -m 644 antlr-ant/main/antlr3-task/ant-antlr3.jar -D $RPM_BUILD_ROOT%{_javadir}/ant/ant-antlr3.jar -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ant.d -cat > $RPM_BUILD_ROOT%{_sysconfdir}/ant.d/ant-antlr3 << EOF -ant/ant-antlr3 antlr3 -EOF - # install wrapper script -%jpackage_script org.antlr.Tool '' '' 'stringtemplate4/ST4.jar:antlr3.jar:antlr3-runtime.jar' antlr3 true +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 $RPM_BUILD_ROOT +chmod a+x $RPM_BUILD_ROOT%{python_sitelib}/antlr_python_runtime-* +popd # install C runtime -pushd runtime/C -%make_install +pushd libantlr3c-%{antlr_version} +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 * @@ -320,283 +273,69 @@ pushd antlr-javascript-runtime-%{javascript_runtime_version} install -pm 644 *.js $RPM_BUILD_ROOT%{_datadir}/antlr/ popd -# install C++ runtime (header only) -mkdir -p $RPM_BUILD_ROOT/%{_includedir}/%{name} -install -pm 644 runtime/Cpp/include/* $RPM_BUILD_ROOT/%{_includedir}/ +%post java +%update_maven_depmap -%files tool -f .mfiles-tool -%doc README.txt tool/{LICENSE.txt,CHANGES.txt} +%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 -%{_javadir}/ant/ant-antlr3.jar -%config(noreplace) %{_sysconfdir}/ant.d/ant-antlr3 + +%files python +%defattr(0644,root,root,-) +%{python_sitelib}/antlr3/* +%{python_sitelib}/antlr_python_runtime-* %files C -%doc tool/LICENSE.txt +%defattr(-,root,root,-) %{_libdir}/libantlr3c.so %files C-devel -%{_mandir}/man3/ANTLR3* -%{_mandir}/man3/antlr3* -%{_includedir}/antlr3*.h +%defattr(-,root,root,-) +%{_includedir}/antlr3* +%{_mandir}/man3/* %files C-docs -%doc runtime/C/api +%defattr(-,root,root,-) +%doc libantlr3c-%{antlr_version}/api/ -%files C++-devel -%doc tool/LICENSE.txt -%{_includedir}/antlr3*.hpp -%{_includedir}/antlr3*.inl - -%files java -f .mfiles-java -%doc tool/LICENSE.txt +%files java +%defattr(-,root,root,-) +%{_javadir}/*runtime*.jar +%{_mavenpomdir}/*.pom +%config %{_mavendepmapfragdir}/antlr3 %files javascript -%doc tool/LICENSE.txt +%defattr(-,root,root,-) %{_datadir}/antlr/ -%files javadoc -f .mfiles-javadoc -%doc tool/LICENSE.txt +%files gunit +%defattr(-,root,root,-) +%{_javadir}/*gunit*.jar %changelog -* Fri Jan 16 2026 Fedora Release Engineering - 1:3.5.3-16 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild - -* Tue Sep 23 2025 Jerry James - 1:3.5.3-15 -- Remove build dependency on maven-enforcer-plugin - -* Tue Jul 29 2025 jiri vanek - 1:3.5.3-14 -- Rebuilt for java-25-openjdk as preffered jdk - -* Wed Jul 23 2025 Fedora Release Engineering - 1:3.5.3-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Thu Jan 16 2025 Fedora Release Engineering - 1:3.5.3-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Mon Jan 13 2025 Jerry James - 1:3.5.3-11 -- Clarify license of the tool subpackage -- Move configuration actions to %%conf - -* Wed Jul 17 2024 Fedora Release Engineering - 1:3.5.3-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Tue Feb 27 2024 Jiri Vanek - 1:3.5.3-10 -- Rebuilt for java-21-openjdk as system jdk - -* Thu Feb 1 2024 Avi Kivity - 1:3.5.3-9 -- Remove const specifiers in templates that are now flagged by gcc 14. - -* Mon Jan 22 2024 Fedora Release Engineering - 1:3.5.3-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jan 19 2024 Fedora Release Engineering - 1:3.5.3-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Wed Jul 19 2023 Fedora Release Engineering - 1:3.5.3-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Sun Jun 11 2023 Jerry James - 1:3.5.3-5 -- Remove unneeded maven 2 dependency - -* Wed Jan 18 2023 Fedora Release Engineering - 1:3.5.3-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Thu Aug 11 2022 Jerry James - 1:3.5.3-3 -- Convert License tag to SPDX - -* Wed Jul 20 2022 Fedora Release Engineering - 1:3.5.3-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Tue Jul 19 2022 Jerry James - 1:3.5.3-2 -- Remove i686 support (https://fedoraproject.org/wiki/Changes/Drop_i686_JDKs) - -* Sun Apr 10 2022 Jerry James - 1:3.5.3-1 -- Version 3.5.3 -- Drop ancient obsoletes -- Minor spec file cleanups - -* Sat Feb 05 2022 Jiri Vanek - 1:3.5.2-35 -- Rebuilt for java-17-openjdk as system jdk - -* Wed Jan 19 2022 Fedora Release Engineering - 1:3.5.2-34 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Wed Jul 21 2021 Fedora Release Engineering - 1:3.5.2-33 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Fri Mar 12 2021 Jerry James - 1:3.5.2-32 -- Add bootstrap conditional (bz 1847093) - -* Tue Jan 26 2021 Fedora Release Engineering - 1:3.5.2-31 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Mon Jul 27 2020 Fedora Release Engineering - 1:3.5.2-30 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Fri Jul 10 2020 Jiri Vanek - 1:3.5.2-29 -- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11 - -* Wed Jun 03 2020 Fabio Valentini - 1:3.5.2-28 -- Actually apply Patch7. - -* Tue May 12 2020 Jerry James - 1:3.5.2-27 -- Add 0007-update-java-target.patch to fix JDK 11 build - -* Tue May 12 2020 Avi Kivity - 1:3.5.2-27 -- Fix for C++20 mode (#1834782) - -* Sat Apr 25 2020 Fabio Valentini - 1:3.5.2-26 -- Remove unnecessary dependency on deprecated parent pom. - -* Tue Jan 28 2020 Fedora Release Engineering - 1:3.5.2-25 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Thu Aug 1 2019 Jerry James - 1:3.5.2-24 -- BR ant to fix FTBFS. Thanks to Fabio Valentini for the hint. - -* Wed Jul 24 2019 Fedora Release Engineering - 1:3.5.2-23 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Sat Apr 27 2019 Jerry James - 1:3.5.2-22 -- Add Debian patches - -* Thu Jan 31 2019 Fedora Release Engineering - 1:3.5.2-21 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Thu Aug 30 2018 Severin Gehwolf - 1:3.5.2-20 -- Explicit requires for javapackages-tools since antlr3 script uses - java-functions. See RHBZ#1600426. - -* Thu Jul 12 2018 Fedora Release Engineering - 1:3.5.2-19 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Thu Jun 28 2018 Michael Simacek - 1:3.5.2-18 -- Remove ldconfig scriptlets - -* Wed Feb 07 2018 Fedora Release Engineering - 1:3.5.2-17 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Wed Aug 02 2017 Fedora Release Engineering - 1:3.5.2-16 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 1:3.5.2-15 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Fri Feb 10 2017 Fedora Release Engineering - 1:3.5.2-14 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Tue Oct 04 2016 David Geiger - 1:3.5.2-13 -- Fix stringtemplate4 jar classpath in shell script (stringtemplate4/ST4.jar) - -* Tue Sep 27 2016 Michael Simacek - 1:3.5.2-12 -- Fix Java 8 patch - -* Wed Jun 15 2016 Mikolaj Izdebski - 1:3.5.2-11 -- Regenerate build-requires - -* Wed Feb 03 2016 Fedora Release Engineering - 1:3.5.2-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Tue Nov 24 2015 Mat Booth - 1:3.5.2-10 -- Fix OSGi metadata -- Delete some commented out sections - -* Wed Jun 17 2015 Mat Booth - 1:3.5.2-9 -- Build and ship the antlr3 ant task -- Add provides/obsoletes for separate ant-antlr3 package - -* Tue Jun 16 2015 Fedora Release Engineering - 1:3.5.2-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Wed Apr 29 2015 Michal Srb - 1:3.5.2-7 -- Fix FTBFS (Resolves: rhbz#1204672) - -* Mon Mar 30 2015 Michael Simacek - 1:3.5.2-6 -- Fix FTBFS - -* Mon Mar 23 2015 Dan Horák - 1:3.5.2-5 -- update BR - whole autotools chain is required explicitly - -* Fri Oct 31 2014 Yaakov Selkowitz - 1:3.5.2-4 -- Avoid timestamp conflicts when updating jar manifest - -* Sun Aug 31 2014 Till Maas - 1:3.5.2-3 -- Add missing dist tags for subpackages - -* Fri Aug 15 2014 Fedora Release Engineering - 1:3.5.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Wed Jun 18 2014 Michael Simacek - 3.5.2-1 -- Update to upstream version 3.5.2 -- Build the C runtime from main tarball -- Make C++-devel subpackage - -* Tue Jun 17 2014 Michael Simacek - 3.5-1 -- Update to upstream version 3.5 - -* Tue Jun 17 2014 Michael Simacek - 3.4-18 -- Specfile cleanup - -* Sat Jun 07 2014 Fedora Release Engineering - 3.4-17 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Tue Mar 04 2014 Stanislav Ochotnicky - 3.4-16 -- Use Requires: java-headless rebuild (#1067528) - -* 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 +* Sun Sep 09 2012 Miloš Jakubíček - 3.2-18 - 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 +* Wed Feb 22 2012 Miloš Jakubíček - 3.2-17 +- added BR: maven2 - *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 +* Wed Feb 22 2012 Miloš Jakubíček - 3.2-16 - 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 @@ -660,7 +399,7 @@ install -pm 644 runtime/Cpp/include/* $RPM_BUILD_ROOT/%{_includedir}/ * Fri Jul 24 2009 Fedora Release Engineering - 3.1.1-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild -* Tue Mar 17 2009 Bart Vanbrabant - 3.1.1-7 +* 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 @@ -675,7 +414,7 @@ install -pm 644 runtime/Cpp/include/* $RPM_BUILD_ROOT/%{_includedir}/ * Mon Nov 10 2008 Colin Walters - 3.1.1-3 - Add antlr3 script -* Thu Nov 6 2008 Bart Vanbrabant - 3.1.1-2 +* 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 diff --git a/osgi-manifest.patch b/osgi-manifest.patch deleted file mode 100644 index ff9bceb..0000000 --- a/osgi-manifest.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- a/runtime/Java/pom.xml 2022-04-10 17:09:47.418531841 -0600 -+++ b/runtime/Java/pom.xml 2022-04-10 17:16:58.890381092 -0600 -@@ -81,6 +81,35 @@ - - - -+ -+ org.apache.felix -+ maven-bundle-plugin -+ -+ -+ bundle-manifest -+ process-classes -+ -+ manifest -+ -+ -+ -+ -+ ${project.build.directory}/osgi -+ -+ org.antlr.runtime -+ !org.antlr.stringtemplate,* -+ -+ -+ -+ -+ org.apache.maven.plugins -+ maven-jar-plugin -+ -+ -+ ${project.build.directory}/osgi/MANIFEST.MF -+ -+ -+ - - - diff --git a/settings.xml b/settings.xml new file mode 100644 index 0000000..efe7bd7 --- /dev/null +++ b/settings.xml @@ -0,0 +1,47 @@ + + + + JPP + + + internal + jpp + __JPP_URL_PLACEHOLDER__ + + + external + jpp + __JAVADIR_PLACEHOLDER__ + + + local + jpp + __MAVENREPO_DIR_PLACEHOLDER__ + + + + + plugins-internal + plugins-internal + jpp + __JPP_URL_PLACEHOLDER__ + + + plugins-external + plugins-external + jpp + __JAVADIR_PLACEHOLDER__ + + + plugins-maven + plugins-maven + jpp + __MAVENDIR_PLUGIN_PLACEHOLDER__ + + + + + + JPP + + diff --git a/sources b/sources index b2ec866..4ee7ffa 100644 --- a/sources +++ b/sources @@ -1,2 +1,6 @@ -SHA512 (antlr3-3.5.3.tar.gz) = c565e1ade7a62bb127df707015afded9a9cea54cbf5488730a327671c57e8718f93f76c4fa28edd856810cb9c7ccbcb27b53a7c8f7e3efc8169e64cfcc535a4c -SHA512 (antlr-javascript-runtime-3.1.zip) = 4bc7129d3eb1d864c05d91bf33d02f0fa03362ddb1b750157be04e5279891272d34b3fb18b421631b74dfafa48723e080b213a9acb993c6f17cec4c9e94f10ed +9074e3218a14654148392edff055e0d8 antlr-3.2.tar.gz +674646e1d1bf5c6015435480cead725a libantlr3c-3.2.tar.gz +5f58e5f8c8a052225d57d518d77742fc antlr-javascript-runtime-3.1.zip +1a96b0d5d18574589f9c498445f4e47c antlr_python_runtime-3.1.2.tar.gz +b5e66bec4b95d5af7363906a5f3d27a8 antlr3-maven-plugin-3.2.jar +ee7dc3fb20cf3e9efd871e297c0d532b antlr-3.2.jar