diff --git a/antlr4-javadoc.patch b/antlr4-javadoc.patch index 613c4ac..4afc094 100644 --- a/antlr4-javadoc.patch +++ b/antlr4-javadoc.patch @@ -1,5 +1,5 @@ ---- a/antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/MojoUtils.java -+++ b/antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/MojoUtils.java +--- a/antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/MojoUtils.java 2022-04-15 15:44:52.000000000 -0600 ++++ b/antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/MojoUtils.java 2022-06-09 19:53:44.380902952 -0600 @@ -55,7 +55,7 @@ class MojoUtils { * directory and reflect the input organization of the grammar files. * @@ -9,37 +9,21 @@ * * @return The path to the grammar file relative to the source directory */ ---- a/runtime/Java/src/org/antlr/v4/runtime/atn/CodePointTransitions.java -+++ b/runtime/Java/src/org/antlr/v4/runtime/atn/CodePointTransitions.java -@@ -13,14 +13,14 @@ import org.antlr.v4.runtime.misc.Interva +--- a/runtime/Java/src/org/antlr/v4/runtime/atn/CodePointTransitions.java 2022-06-09 19:53:44.380902952 -0600 ++++ b/runtime/Java/src/org/antlr/v4/runtime/atn/CodePointTransitions.java 2022-06-09 19:54:37.763000265 -0600 +@@ -11,8 +11,8 @@ package org.antlr.v4.runtime.atn; * and {@link SetTransition} appropriately based on the range of the input. * - * To keep the serialized ATN size small, we only inline atom and -- * range transitions for Unicode code points <= U+FFFF. -+ * range transitions for Unicode code points ≤ U+FFFF. - * -- * Whenever we encounter a Unicode code point > U+FFFF, we represent that -+ * Whenever we encounter a Unicode code point > U+FFFF, we represent that - * as a set transition (even if it is logically an atom or a range). + * Previously, we distinguished between atom and range transitions for +- * Unicode code points <= U+FFFF and those above. We used a set +- * transition for a Unicode code point > U+FFFF. Now that we can serialize ++ * Unicode code points ≤ U+FFFF and those above. We used a set ++ * transition for a Unicode code point > U+FFFF. Now that we can serialize + * 32-bit int/chars in the ATN serialization, this is no longer necessary. */ public abstract class CodePointTransitions { - /** -- * If {@code codePoint} is <= U+FFFF, returns a new {@link AtomTransition}. -+ * If {@code codePoint} is ≤ U+FFFF, returns a new {@link AtomTransition}. - * Otherwise, returns a new {@link SetTransition}. - */ - public static Transition createWithCodePoint(ATNState target, int codePoint) { -@@ -34,7 +34,7 @@ public abstract class CodePointTransitio - - /** - * If {@code codePointFrom} and {@code codePointTo} are both -- * <= U+FFFF, returns a new {@link RangeTransition}. -+ * ≤ U+FFFF, returns a new {@link RangeTransition}. - * Otherwise, returns a new {@link SetTransition}. - */ - public static Transition createWithCodePointRange( ---- a/runtime/Java/src/org/antlr/v4/runtime/CharStreams.java -+++ b/runtime/Java/src/org/antlr/v4/runtime/CharStreams.java +--- a/runtime/Java/src/org/antlr/v4/runtime/CharStreams.java 2022-04-15 15:44:52.000000000 -0600 ++++ b/runtime/Java/src/org/antlr/v4/runtime/CharStreams.java 2022-06-09 19:53:44.380902952 -0600 @@ -24,7 +24,7 @@ import java.nio.file.Paths; /** This class represents the primary interface for creating {@link CharStream}s @@ -49,8 +33,8 @@ * {@link ANTLRFileStream} are now deprecated in favor of the streams created * by this interface. * ---- a/runtime/Java/src/org/antlr/v4/runtime/CodePointCharStream.java -+++ b/runtime/Java/src/org/antlr/v4/runtime/CodePointCharStream.java +--- a/runtime/Java/src/org/antlr/v4/runtime/CodePointCharStream.java 2022-04-15 15:44:52.000000000 -0600 ++++ b/runtime/Java/src/org/antlr/v4/runtime/CodePointCharStream.java 2022-06-09 19:53:44.381902953 -0600 @@ -16,7 +16,7 @@ import java.nio.charset.StandardCharsets * code units. * @@ -60,8 +44,8 @@ */ public abstract class CodePointCharStream implements CharStream { protected final int size; ---- a/runtime/Java/src/org/antlr/v4/runtime/ParserInterpreter.java -+++ b/runtime/Java/src/org/antlr/v4/runtime/ParserInterpreter.java +--- a/runtime/Java/src/org/antlr/v4/runtime/ParserInterpreter.java 2022-04-15 15:44:52.000000000 -0600 ++++ b/runtime/Java/src/org/antlr/v4/runtime/ParserInterpreter.java 2022-06-09 19:53:44.381902953 -0600 @@ -69,7 +69,7 @@ public class ParserInterpreter extends P protected final Deque> _parentContextStack = new ArrayDeque>(); @@ -71,8 +55,8 @@ * parse trees. For now, we allow exactly one override. */ protected int overrideDecision = -1; ---- a/runtime/Java/src/org/antlr/v4/runtime/RuleContext.java -+++ b/runtime/Java/src/org/antlr/v4/runtime/RuleContext.java +--- a/runtime/Java/src/org/antlr/v4/runtime/RuleContext.java 2022-04-15 15:44:52.000000000 -0600 ++++ b/runtime/Java/src/org/antlr/v4/runtime/RuleContext.java 2022-06-09 19:53:44.381902953 -0600 @@ -31,10 +31,10 @@ import java.util.List; * Parser._ctx. * @@ -109,8 +93,8 @@ @Override public void setParent(RuleContext parent) { this.parent = parent; ---- a/runtime/Java/src/org/antlr/v4/runtime/tree/ParseTreeListener.java -+++ b/runtime/Java/src/org/antlr/v4/runtime/tree/ParseTreeListener.java +--- a/runtime/Java/src/org/antlr/v4/runtime/tree/ParseTreeListener.java 2022-04-15 15:44:52.000000000 -0600 ++++ b/runtime/Java/src/org/antlr/v4/runtime/tree/ParseTreeListener.java 2022-06-09 19:53:44.381902953 -0600 @@ -12,7 +12,7 @@ import org.antlr.v4.runtime.ParserRuleCo * by {@link ParseTreeWalker}. E.g., * @@ -120,8 +104,8 @@ * * If you want to trigger events in multiple listeners during a single * tree walk, you can use the ParseTreeDispatcher object available at ---- a/tool/src/org/antlr/v4/semantics/SymbolChecks.java -+++ b/tool/src/org/antlr/v4/semantics/SymbolChecks.java +--- a/tool/src/org/antlr/v4/semantics/SymbolChecks.java 2022-04-15 15:44:52.000000000 -0600 ++++ b/tool/src/org/antlr/v4/semantics/SymbolChecks.java 2022-06-09 19:53:44.381902953 -0600 @@ -373,7 +373,8 @@ public class SymbolChecks { } @@ -132,9 +116,9 @@ */ private List getSingleTokenValues(Rule rule) { ---- a/tool/src/org/antlr/v4/tool/ErrorType.java -+++ b/tool/src/org/antlr/v4/tool/ErrorType.java -@@ -996,7 +996,7 @@ public enum ErrorType { +--- a/tool/src/org/antlr/v4/tool/ErrorType.java 2022-04-15 15:44:52.000000000 -0600 ++++ b/tool/src/org/antlr/v4/tool/ErrorType.java 2022-06-09 19:53:44.382902955 -0600 +@@ -989,7 +989,7 @@ public enum ErrorType { * *

name is not a recognized token name

* @@ -143,7 +127,7 @@ */ CONSTANT_VALUE_IS_NOT_A_RECOGNIZED_TOKEN_NAME(175, " is not a recognized token name", ErrorSeverity.ERROR), /** -@@ -1004,7 +1004,7 @@ public enum ErrorType { +@@ -997,7 +997,7 @@ public enum ErrorType { * *

nameis not a recognized mode name

* @@ -152,7 +136,7 @@ */ CONSTANT_VALUE_IS_NOT_A_RECOGNIZED_MODE_NAME(176, " is not a recognized mode name", ErrorSeverity.ERROR), /** -@@ -1012,7 +1012,7 @@ public enum ErrorType { +@@ -1005,7 +1005,7 @@ public enum ErrorType { * *

name is not a recognized channel name

* diff --git a/antlr4-project.spec b/antlr4-project.spec index e4e9a40..37b5325 100644 --- a/antlr4-project.spec +++ b/antlr4-project.spec @@ -11,12 +11,9 @@ %global swiftarches x86_64 aarch64 %global swiftdir %{_prefix}/lib/swift/linux -# Use when a previous version has broken deps -%bcond_with bootstrap - Name: antlr4-project -Version: 4.9.3 -Release: 2%{?dist} +Version: 4.10.1 +Release: 5%{?dist} Summary: Parser generator (ANother Tool for Language Recognition) License: BSD @@ -34,28 +31,39 @@ BuildRequires: make BuildRequires: maven-local BuildRequires: mvn(com.ibm.icu:icu4j) BuildRequires: mvn(com.webguys:string-template-maven-plugin) +BuildRequires: mvn(junit:junit) BuildRequires: mvn(org.abego.treelayout:org.abego.treelayout.core) -BuildRequires: mvn(org.antlr:antlr3-maven-plugin) -%if %{without bootstrap} -BuildRequires: mvn(org.antlr:antlr4-maven-plugin) -%endif -BuildRequires: mvn(org.antlr:antlr-runtime) BuildRequires: mvn(org.antlr:ST4) +BuildRequires: mvn(org.antlr:antlr-runtime) +BuildRequires: mvn(org.antlr:antlr3-maven-plugin) BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) -BuildRequires: mvn(org.apache.maven:maven-core) -BuildRequires: mvn(org.apache.maven:maven-plugin-api) +BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-annotations) +BuildRequires: mvn(org.apache.maven.plugins:maven-clean-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-compiler-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-jar-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin) -BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-annotations) +BuildRequires: mvn(org.apache.maven:maven-compat) +BuildRequires: mvn(org.apache.maven:maven-core) +BuildRequires: mvn(org.apache.maven:maven-plugin-api) BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) BuildRequires: mvn(org.codehaus.plexus:plexus-compiler-api) +BuildRequires: mvn(org.codehaus.plexus:plexus-utils) BuildRequires: mvn(org.glassfish:javax.json) +BuildRequires: mvn(org.slf4j:slf4j-api) +BuildRequires: mvn(org.slf4j:slf4j-simple) BuildRequires: mvn(org.sonatype.plexus:plexus-build-api) +BuildRequires: mvn(org.twdata.maven:mojo-executor) BuildRequires: pkgconfig(uuid) BuildRequires: python3-devel +BuildRequires: %{py3_dist pip} BuildRequires: %{py3_dist setuptools} +BuildRequires: %{py3_dist wheel} BuildRequires: utf8cpp-devel +# https://fedoraproject.org/wiki/Changes/Drop_i686_JDKs +ExclusiveArch: %{java_arches} + # We can no longer successfully build or install the mono runtime. See comment # at the top of this spec file. # This can be removed when Fedora 37 reaches EOL. @@ -65,6 +73,10 @@ Obsoletes: mono-antlr4-runtime < 4.9.1 # See https://github.com/fedora-java/xmvn/issues/58 Obsoletes: antlr4-javadoc < 4.9.2-2 +# Subpackages removed in 4.10. This can be removed when F40 reaches EOL. +Obsoletes: antlr4-runtime-test-annotations < 4.10 +Obsoletes: antlr4-runtime-test-annotation-processors < 4.10 + %global _desc %{expand: ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured @@ -74,25 +86,6 @@ and walk parse trees.} %description %_desc -%package -n antlr4-runtime-test-annotations -Summary: ANTLR runtime test annotations -BuildArch: noarch - -%description -n antlr4-runtime-test-annotations %_desc - -This package provides runtime library test annotations used by Java -ANTLR parsers. - -%package -n antlr4-runtime-test-annotation-processors -Summary: ANTLR runtime test annotation processors -BuildArch: noarch -Requires: antlr4-runtime-test-annotations = %{version}-%{release} - -%description -n antlr4-runtime-test-annotation-processors %_desc - -This package provides runtime library test annotation processors used by -Java ANTLR parsers. - %package -n antlr4-runtime Summary: ANTLR runtime BuildArch: noarch @@ -209,41 +202,20 @@ sed -i 's,\\>,>,g' tool/resources/org/antlr/v4/tool/templates/unicodedata.st # io.takari.maven.plugins:takari-plugin-testing %pom_remove_dep -r :takari-plugin-testing -# Missing plugin +# Missing plugins # io.takari.maven.plugins:takari-lifecycle-plugin %pom_remove_plugin -r :takari-lifecycle-plugin +# us.bryon:graphviz-maven-plugin +%pom_remove_plugin :graphviz-maven-plugin runtime/Java # Don't bundle dependencies %pom_remove_plugin :maven-shade-plugin tool -# Need some javax.json classes -%pom_add_dep javax.json:javax.json-api tool - -# Replace dep on deprecated maven-project with maven-core -%pom_change_dep org.apache.maven:maven-project:2.2.1 org.apache.maven:maven-core:3.6.1 antlr4-maven-plugin - -# Replace dep on maven-jdk-tools-wrapper with dep on tools.jar -%pom_change_dep :maven-jdk-tools-wrapper com.sun:tools runtime-testsuite/processors - %mvn_package :antlr4-master antlr4-runtime -%if %{with bootstrap} -# Avoid the need to build with an older version of antlr4 -%pom_remove_plugin org.antlr:antlr4-maven-plugin runtime/Java -cp -p runtime/Cpp/runtime/src/tree/xpath/XPathLexer.tokens runtime/Java/src -%endif - -# Build for JDK 1.8 -sed -i 's/1\.7/1.8/g' pom.xml - # Use utf8cpp instead of the deprecated wstring_convert sed -i 's/# \(.*DUSE_UTF8_INSTEAD_OF_CODECVT.*\)/\1/' runtime/Cpp/CMakeLists.txt -# Change library install directory on 64-bit platforms -if [ "%{_lib}" != "lib" ]; then - sed -i 's/DESTINATION lib/&64/' runtime/Cpp/runtime/CMakeLists.txt -fi - %build export JAVA_HOME=%{_jvmdir}/java @@ -252,14 +224,19 @@ export JAVA_HOME=%{_jvmdir}/java %mvn_build -s -f -j -- -Dsource=1.8 # Build the C++ runtime +# Disable building tests, because that tries to download googletest from github cd runtime/Cpp -%cmake -DANTLR4_INSTALL=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo +%cmake \ + -DANTLR_BUILD_CPP_TESTS=OFF \ + -DANTLR4_INSTALL=ON \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_LIBDIR=%{_libdir} %cmake_build cd - # Build the Python 3 runtime cd runtime/Python3 -%py3_build +%pyproject_wheel cd - %ifarch %swiftarches @@ -310,19 +287,15 @@ cp -a runtime/JavaScript/src/antlr4 %{buildroot}%{nodejs_sitelib} # Install the Python 3 runtime cd runtime/Python3 -%py3_install -sed 's,#!python,#!%{python3},' bin/pygrun > %{buildroot}%{_bindir}/pygrun -touch -r bin/pygrun %{buildroot}%{_bindir}/pygrun -chmod 0755 %{buildroot}%{_bindir}/pygrun +%pyproject_install +%pyproject_save_files antlr4 cd - %ifarch %swiftarches # Install the Swift runtime -cd runtime/Swift mkdir -p %{buildroot}%{swiftdir}/%{_arch} cp -p .build/release/libAntlr4.so %{buildroot}%{swiftdir} cp -p .build/release/Antlr4.swift{doc,module} %{buildroot}%{swiftdir}/%{_arch} -cd - # Fix the rpath to have $ORIGIN first chrpath -r '$ORIGIN:%{_libexecdir}/swift/lib/swift/linux' \ @@ -332,7 +305,6 @@ chrpath -r '$ORIGIN:%{_libexecdir}/swift/lib/swift/linux' \ # Create man pages export PYTHONPATH=%{buildroot}%{python3_sitelib} mkdir -p %{buildroot}%{_mandir}/man1 -%if %{with bootstrap} cat > antlr4 << EOF java -cp %{buildroot}%{_javadir}/antlr4/antlr4.jar:%{buildroot}%{_javadir}/antlr4/antlr4-runtime.jar:$(build-classpath antlr3-runtime stringtemplate4 treelayout) org.antlr.v4.Tool EOF @@ -340,11 +312,6 @@ chmod a+x antlr4 help2man -N --version-string=%{version} -h '' ./antlr4 > \ %{buildroot}%{_mandir}/man1/antlr4.1 cd %{buildroot}%{_bindir} -%else -cd %{buildroot}%{_bindir} -help2man -N --version-string=%{version} -h '' ./antlr4 > \ - %{buildroot}%{_mandir}/man1/antlr4.1 -%endif help2man -N --version-string=%{version} ./pygrun > \ %{buildroot}%{_mandir}/man1/pygrun.1 cd - @@ -352,17 +319,12 @@ cd - # Clean up bits we do not want rm -fr %{buildroot}%{_docdir}/libantlr4 -%files -n antlr4-runtime-test-annotations -f .mfiles-antlr4-runtime-test-annotations -%license LICENSE.txt - -%files -n antlr4-runtime-test-annotation-processors -f .mfiles-antlr4-runtime-test-annotation-processors - %files -n antlr4-runtime -f .mfiles-antlr4-runtime %doc README.md %license LICENSE.txt %files -n antlr4 -f .mfiles-antlr4 -%doc CHANGES.txt contributors.txt +%doc CHANGES.txt %{_bindir}/antlr4 %{_mandir}/man1/antlr4.1* @@ -397,13 +359,11 @@ rm -fr %{buildroot}%{_docdir}/libantlr4 %{nodejs_sitelib}/antlr4/ %endif -%files -n python3-antlr4-runtime +%files -n python3-antlr4-runtime -f %{pyproject_files} %doc runtime/Python3/README.txt %license LICENSE.txt %{_bindir}/pygrun %{_mandir}/man1/pygrun.1* -%python3_sitelib/antlr4/ -%python3_sitelib/antlr4*.egg-info/ %ifarch %swiftarches %files -n swift-antlr4-runtime @@ -414,9 +374,35 @@ rm -fr %{buildroot}%{_docdir}/libantlr4 %endif %changelog -* Tue Jun 21 2022 Jerry James - 4.9.3-2 +* Wed Jul 20 2022 Fedora Release Engineering - 4.10.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Tue Jul 19 2022 Jerry James - 4.10.1-3 +- Remove i686 support (https://fedoraproject.org/wiki/Changes/Drop_i686_JDKs) + +* Tue Jul 19 2022 Maxwell G - 4.9.3-6 +- Rebuild for CVE-2022-{1705,32148,30631,30633,28131,30635,30632,30630,1962} in + golang + +* Tue Jun 21 2022 Jerry James - 4.10.1-2 +- Adapt to changed Provides in javapackages-tools + +* Mon Jun 20 2022 Jerry James - 4.10.1-1 +- Version 4.10.1 - Add generated cmake files to antlr4-cpp-runtime-devel (rhbz#2098357) +* Mon Jun 13 2022 Python Maint - 4.9.3-5 +- Rebuilt for Python 3.11 + +* Wed Apr 27 2022 Jerry James - 4.9.3-4 +- Remove . from %%cmake to fix FTBFS (rhbz#2070433) + +* Sat Feb 05 2022 Jiri Vanek - 4.9.3-3 +- Rebuilt for java-17-openjdk as system jdk + +* Wed Jan 19 2022 Fedora Release Engineering - 4.9.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Sun Nov 7 2021 Jerry James - 4.9.3-1 - Version 4.9.3 - Drop upstreamed -unicode-properties and -utf8cpp patches diff --git a/sources b/sources index 04210d9..cd7d78f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (antlr4-4.9.3.tar.gz) = 61452404c9639b5a0908cda16605f17c0fed0c9adfc3278c7408f9971420e9d1fe8f9e974e0826c2e3e780fdd83324094c0246cd5b28fa63f5686b094ea08127 +SHA512 (antlr4-4.10.1.tar.gz) = d950171d279b57b0fa977c77dd33e56848ca0aaf7f6ba40e5d49d69d5963e4c2e36fde5ee89e98c594064a909396d6fed9cc20129c3a1895d864eb889581e982