Hello community, here is the log from the commit of package antlr4 for openSUSE:Factory checked in at 2019-11-07 23:19:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/antlr4 (Old) and /work/SRC/openSUSE:Factory/.antlr4.new.2990 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "antlr4" Thu Nov 7 23:19:42 2019 rev:2 rq:746117 version:4.7.2 Changes: -------- --- /work/SRC/openSUSE:Factory/antlr4/antlr4.changes 2019-06-12 13:12:40.480918886 +0200 +++ /work/SRC/openSUSE:Factory/.antlr4.new.2990/antlr4.changes 2019-11-07 23:19:51.320750620 +0100 @@ -1,0 +2,15 @@ +Sat Nov 2 21:55:47 UTC 2019 - Fridrich Strba <fst...@suse.com> + +- Added Java build + * antlr4-java -> Java runtime package + * antlr4-tool -> antlr4 grammar compiler + * antlr4-maven-plugin -> plugin to generate antlr4 parsers in + maven build + * antlr4-javadoc -> documentation + +------------------------------------------------------------------- +Thu Oct 17 13:11:57 UTC 2019 - Richard Brown <rbr...@suse.com> + +- Remove obsolete Groups tag (fate#326485) + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ antlr4.spec ++++++ --- /var/tmp/diff_new_pack.oxGFlP/_old 2019-11-07 23:19:53.044752469 +0100 +++ /var/tmp/diff_new_pack.oxGFlP/_new 2019-11-07 23:19:53.056752482 +0100 @@ -1,7 +1,7 @@ # # spec file for package antlr4 # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,19 +12,9 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # -%bcond_with complete -%bcond_without runtime_cpp -# TODO: using of conditions -%bcond_with runtime_cs -%bcond_with runtime_go -%bcond_with runtime_java -%bcond_with runtime_js -%bcond_with runtime_python2 -%bcond_with runtime_python3 -%bcond_with runtime_swift %define libver 4_7_2 %define runtime_cpp_lib libantlr4-runtime @@ -33,36 +23,92 @@ Name: antlr4 Version: 4.7.2 Release: 0 -Summary: A parser generator +Summary: Java parser generator +# C# runtime is MIT-licensed, but currently it is not used in this package License: BSD-3-Clause -Group: Development/Tools/Other -Url: http://www.antlr.org/ -Source: %{name}-%{version}.tar.gz -# PATCH-FIX-OPENSUSE Change installation paths for docs&libs to openSUSE default +URL: https://www.antlr.org/ +Source0: https://github.com/antlr/antlr4/archive/%{version}.tar.gz#/antlr4-%{version}.tar.gz Patch0: antlr4-install-path.patch -%if %{with complete} -BuildRequires: java-devel >= 1.7 -BuildRequires: maven -%endif -#BuildArch: noarch +BuildRequires: cmake >= 3.3.0 +BuildRequires: fdupes +BuildRequires: gcc-c++ +BuildRequires: libstdc++-devel +BuildRequires: maven-local +BuildRequires: pkg-config +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: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.plugin-tools:maven-plugin-annotations) +BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin) +BuildRequires: mvn(org.apache.maven:maven-plugin-api) +BuildRequires: mvn(org.apache.maven:maven-project) +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.sonatype.oss:oss-parent:pom:) +BuildRequires: mvn(org.sonatype.plexus:plexus-build-api) +BuildRequires: mvn(org.twdata.maven:mojo-executor) +BuildRequires: pkgconfig(uuid) +#!BuildRequires: stringtemplate4 antlr3-tool %description -ANTLR (ANother Tool for Language Recognition) is a parser generator -for reading, processing, executing, or translating structured text or -binary files. It can be used to build languages, tools, and -frameworks. From a grammar, ANTLR generates a parser that can build -and walk parse trees. +ANTLR (ANother Tool for Language Recognition) is a parser +generator for reading, processing, executing, or translating +structured text or binary files. It can be used to build languages, +tools, and frameworks. From a grammar, ANTLR generates a parser that +can build and walk parse trees. + +%package java +Summary: ANTLR 4 Java runtime +Provides: %{name}-runtime = %{version}-%{release} +Obsoletes: %{name}-runtime < %{version}-%{release} +BuildArch: noarch + +%description java +This package provides Java runtime library used by parsers generated by +ANTLR 4. + +%package tool +Summary: ANTLR 4 Tool +# Explicit requires for javapackages-tools since antlr4-script +# uses /usr/share/java-utils/java-functions +Requires: javapackages-tools +Provides: %{name} = %{version}-%{release} +Obsoletes: %{name} < %{version}-%{release} +BuildArch: noarch + +%description tool +ANTLR (ANother Tool for Language Recognition) is a parser +generator for reading, processing, executing, or translating +structured text or binary files. It can be used to build languages, +tools, and frameworks. From a grammar, ANTLR generates a parser that +can build and walk parse trees. + +This package provides the ANTLR 4 grammar compiler. + +%package maven-plugin +Summary: ANTLR 4 plugin for Apache Maven +BuildArch: noarch + +%description maven-plugin +This package provides plugin for Apache Maven which can be used to +generate ANTLR parsers during build. + +%package javadoc +Summary: API documentation for %{name} +BuildArch: noarch -%if %{with runtime_cpp} +%description javadoc +This package contains %{summary}. %package -n %{runtime_cpp_libver} Summary: Runtime C++ ANTRL libraries -Group: System/Libraries -BuildRequires: cmake >= 3.3.0 -BuildRequires: gcc-c++ -BuildRequires: pkg-config -BuildRequires: libstdc++-devel -BuildRequires: pkgconfig(uuid) %description -n %{runtime_cpp_libver} ANTLR runtime libraries for C++. @@ -72,7 +118,6 @@ %package -n %{runtime_cpp_lib}-devel Summary: Development files for the ANTRL libraries -Group: Development/Libraries/C and C++ Requires: %{runtime_cpp_libver} = %{version} %description -n %{runtime_cpp_lib}-devel @@ -81,52 +126,64 @@ for reading, processing, executing, or translating structured text or binary files. -%endif - %prep %setup -q %patch0 -p1 +find -name \*.jar -delete +perl -pi -e 's#\\>#>#g' tool/resources/org/antlr/v4/tool/templates/unicodedata.st + +# Missing test deps: org.seleniumhq.selenium:selenium-java +%pom_disable_module runtime-testsuite +%pom_disable_module runtime-testsuite/annotations +%pom_disable_module runtime-testsuite/processors +%pom_disable_module tool-testsuite + +# Don't bundle dependencies +%pom_remove_plugin :maven-shade-plugin tool +# There are no grammars to process +%pom_remove_plugin :antlr4-maven-plugin runtime/Java +# Don't use the takari lifecycle, use the usual maven lifecycle instead +%pom_remove_plugin :takari-lifecycle-plugin antlr4-maven-plugin + +%{mvn_package} :antlr4-master antlr4-runtime + %build -%if %{with complete} -# it looks like we need antlr4-bootstrap for this -export MAVEN_OPTS="-Xmx1G" -mvn clean -mvn -DskipTests install -%endif +%{mvn_build} -s -f -- -Dsource=7 -%if %{with runtime_cpp} pushd runtime/Cpp %cmake -DWITH_DEMO=False -%cmake_build +make %{?_smp_mflags} popd -%endif %install -%if %{with complete} -#tree ~/.m2/repository/org/antlr -install -m 0644 -p ~/.m2/repository/org/antlr/antlr4-master/%{version}/%{name}-%{version}-complete.jar %{buildroot}/%{_datadir}/java/%{name}-%{version}-complete.jar -%endif +%mvn_install +%fdupes -s %{buildroot}%{_javadocdir} + +%jpackage_script org.antlr.v4.Tool "" "" antlr4/antlr4:antlr3-runtime:antlr4/antlr4-runtime:stringtemplate4:treelayout %{name} true -%if %{with runtime_cpp} pushd runtime/Cpp %cmake_install popd # drop static library as unused rm %{buildroot}/%{_libdir}/lib%{name}-runtime.a -%endif - -%if %{with runtime_cpp} %post -n %{runtime_cpp_libver} -p /sbin/ldconfig %postun -n %{runtime_cpp_libver} -p /sbin/ldconfig -%endif +%files tool -f .mfiles-antlr4 +%{_bindir}/%{name} +%doc tool/MIGRATION.txt -%files -%license LICENSE.txt +%files java -f .mfiles-antlr4-runtime %doc CHANGES.txt README.md +%license LICENSE.txt + +%files maven-plugin -f .mfiles-antlr4-maven-plugin + +%files javadoc -f .mfiles-javadoc +%license LICENSE.txt %files -n %{runtime_cpp_libver} %license LICENSE.txt