The package rpms/antlr4-project.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s): https://src.fedoraproject.org/cgit/rpms/antlr4-project.git/commit/?id=ef8cbe....
Change: +%ifarch %nodejs_arches
Thanks.
Full change: ============
commit ef8cbeb297aa3498f473a8e059dd21afae35b082 Author: Jerry James loganjerry@gmail.com Date: Mon Nov 30 10:54:26 2020 -0700
Version 4.9.
- Add the JavaScript runtime. - Add -utf8cpp patch.
diff --git a/antlr4-project.spec b/antlr4-project.spec index ff993f2..6eafadb 100644 --- a/antlr4-project.spec +++ b/antlr4-project.spec @@ -1,17 +1,17 @@ -# NOTE: The JavaScript runtime library includes a bundled copy of an obsolete -# version of Torben Hasse's require.js. If somebody who knows about JavaScript -# will do something about that, we can include that runtime as well. For now, -# it is omitted. -# # NOTE: A PHP runtime is available as a separate project: # https://github.com/antlr/antlr-php-runtime/ +# +# NOTE: A dart target is available, should dart ever be added to Fedora.
%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.8 -Release: 5%{?dist} +Version: 4.9 +Release: 1%{?dist} Summary: Parser generator (ANother Tool for Language Recognition)
License: BSD @@ -24,7 +24,10 @@ Patch0: antlr4-unicode-properties.patch # Upstream is not yet ready to move to newer mono versions. Patch1: antlr4-mono-ambiguous.patch # Fix some javadoc problems +# https://github.com/antlr/antlr4/pull/2960 Patch2: antlr4-javadoc.patch +# Unbundle utf8cpp +Patch3: antlr4-utf8cpp.patch
BuildRequires: cmake BuildRequires: gcc-c++ @@ -35,7 +38,9 @@ BuildRequires: mvn(com.ibm.icu:icu4j) BuildRequires: mvn(com.webguys:string-template-maven-plugin) 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.apache.felix:maven-bundle-plugin) @@ -51,6 +56,7 @@ BuildRequires: mvn(org.sonatype.plexus:plexus-build-api) BuildRequires: pkgconfig(uuid) BuildRequires: python3-devel BuildRequires: %{py3_dist setuptools} +BuildRequires: utf8cpp-devel
%global _desc %{expand: ANTLR (ANother Tool for Language Recognition) is a powerful parser @@ -166,6 +172,18 @@ This package provides the runtime library used by C# (mono) ANTLR parsers. %endif
+%ifarch %nodejs_arches +%package -n nodejs-antlr4 +Summary: ANTLR runtime for JavaScript +BuildArch: noarch +BuildRequires: nodejs + +%description -n nodejs-antlr4 %_desc + +This package provides the runtime library used by JavaScript ANTLR +parsers. +%endif + %package -n python3-antlr4-runtime Summary: ANTLR runtime for Python 3 BuildArch: noarch @@ -227,22 +245,29 @@ sed -i 's,\>,>,g' tool/resources/org/antlr/v4/tool/templates/unicodedata.st
%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 -# Ensure we get the jit on arm -%ifarch %{arm} -export JAVA_HOME=$(ls -1d %{_jvmdir}/java-1.8.0-openjdk-aarch32*) -%else export JAVA_HOME=%{_jvmdir}/java -%endif
# Build for Java # Due to the missing takari packages, we cannot run the tests -%mvn_build -s -f -- -Dsource=1.7 +%mvn_build -s -f -- -Dsource=1.8
# Build the C++ runtime cd runtime/Cpp @@ -308,6 +333,12 @@ mkdir -p %{buildroot}%{_monogacdir} gacutil -i runtime/CSharp/runtime/CSharp/Antlr4.Runtime/lib/Debug/Antlr4.Runtime.Standard.dll -f -package antlr4 -root %{buildroot}%{_prefix}/lib %endif
+# Install the JavaScript runtime +%ifarch %nodejs_arches +mkdir -p %{buildroot}%{nodejs_sitelib} +cp -a runtime/JavaScript/src/antlr4 %{buildroot}%{nodejs_sitelib} +%endif + # Install the Python 3 runtime cd runtime/Python3 %py3_install @@ -328,9 +359,19 @@ cd - # 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 +chmod a+x antlr4 +help2man -N --version-string=4.8 -h '' ./antlr4 > \ + %{buildroot}%{_mandir}/man1/antlr4.1 +cd %{buildroot}%{_bindir} +%else cd %{buildroot}%{_bindir} help2man -N --version-string=4.8 -h '' ./antlr4 > \ %{buildroot}%{_mandir}/man1/antlr4.1 +%endif help2man -N --version-string=4.8 ./pygrun > \ %{buildroot}%{_mandir}/man1/pygrun.1 cd - @@ -385,6 +426,13 @@ rm -fr %{buildroot}%{_docdir}/libantlr4 %{_monogacdir}/Antlr4.Runtime.Standard/ %endif
+%ifarch %nodejs_arches +%files -n nodejs-antlr4 +%doc runtime/JavaScript/README.md +%license LICENSE.txt +%{nodejs_sitelib}/antlr4/ +%endif + %files -n python3-antlr4-runtime %doc runtime/Python3/README.txt %license LICENSE.txt @@ -402,6 +450,11 @@ rm -fr %{buildroot}%{_docdir}/libantlr4 %endif
%changelog +* Mon Nov 30 2020 Jerry James loganjerry@gmail.com - 4.9-1 +- Version 4.9 +- Add the JavaScript runtime +- Add -utf8cpp patch + * Mon Jul 27 2020 Fedora Release Engineering releng@fedoraproject.org - 4.8-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
diff --git a/antlr4-utf8cpp.patch b/antlr4-utf8cpp.patch new file mode 100644 index 0000000..d61c185 --- /dev/null +++ b/antlr4-utf8cpp.patch @@ -0,0 +1,55 @@ +--- a/runtime/Cpp/runtime/CMakeLists.txt ++++ b/runtime/Cpp/runtime/CMakeLists.txt +@@ -1,19 +1,6 @@ + + include(${CMAKE_ROOT}/Modules/ExternalProject.cmake) + +-set(THIRDPARTY_DIR ${CMAKE_BINARY_DIR}/runtime/thirdparty) +-set(UTFCPP_DIR ${THIRDPARTY_DIR}/utfcpp) +-ExternalProject_Add( +- utfcpp +- GIT_REPOSITORY "git://github.com/nemtrif/utfcpp" +- GIT_TAG "v3.1.1" +- SOURCE_DIR ${UTFCPP_DIR} +- UPDATE_DISCONNECTED 1 +- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${UTFCPP_DIR}/install -Dgtest_force_shared_crt=ON +- TEST_AFTER_INSTALL 1 +- STEP_TARGETS build) +- +- + include_directories( + ${PROJECT_SOURCE_DIR}/runtime/src + ${PROJECT_SOURCE_DIR}/runtime/src/atn +@@ -23,8 +10,6 @@ include_directories( + ${PROJECT_SOURCE_DIR}/runtime/src/tree + ${PROJECT_SOURCE_DIR}/runtime/src/tree/pattern + ${PROJECT_SOURCE_DIR}/runtime/src/tree/xpath +- ${UTFCPP_DIR}/install/include/utf8cpp +- ${UTFCPP_DIR}/install/include/utf8cpp/utf8 + ) + + +@@ -50,9 +35,6 @@ add_custom_target(make_lib_output_dir AL + COMMAND ${CMAKE_COMMAND} -E make_directory ${LIB_OUTPUT_DIR} + ) + +-add_dependencies(antlr4_shared make_lib_output_dir utfcpp) +-add_dependencies(antlr4_static make_lib_output_dir utfcpp) +- + if(CMAKE_SYSTEM_NAME MATCHES "Linux") + target_link_libraries(antlr4_shared ${UUID_LIBRARIES}) + target_link_libraries(antlr4_static ${UUID_LIBRARIES}) +@@ -131,13 +113,3 @@ install(DIRECTORY "${PROJECT_SOURCE_DIR} + FILES_MATCHING PATTERN "*.h" + ) + +-install(FILES "${UTFCPP_DIR}/source/utf8.h" +- DESTINATION "include/antlr4-runtime") +-install(DIRECTORY "${UTFCPP_DIR}/source/utf8" +- DESTINATION "include/antlr4-runtime" +- COMPONENT dev +- FILES_MATCHING PATTERN "*.h" +- ) +- +- +- diff --git a/sources b/sources index 6b5ca42..577b141 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (antlr4-4.8.tar.gz) = 9edcb28593a7312736a5c332af277ddcbc7fd67f044c47410ea21cff17397d71f3e46a16bb0f58a73a1502c78fd1be00add3bb10797b794d50f2c6b5561c937e +SHA512 (antlr4-4.9.tar.gz) = f46850cad08cc82fa7162e0b1651aeea5be81943ab20d0216ef9b1453b4cae039c09a93e5a8bd87e15afca63ff6eab3f41d7534e9c8cdde408d474a3e04b5fab
arch-excludes@lists.fedoraproject.org