diff --git a/antlr-build.xml b/antlr-build.xml
index d280255..eadf11b 100644
--- a/antlr-build.xml
+++ b/antlr-build.xml
@@ -60,8 +60,7 @@
version="true"
packagenames="${packagenames}"
splitindex="true"
- use="true"
- additionalparam="-Xdoclint:none">
+ use="true">
diff --git a/antlr.spec b/antlr.spec
index c66a0dd..ff050a9 100644
--- a/antlr.spec
+++ b/antlr.spec
@@ -1,47 +1,36 @@
-%bcond_without doxygen
-%bcond_without python
-
%global debug_package %{nil}
# since we have only a static library
-Summary: ANother Tool for Language Recognition
-Name: antlr
-Version: 2.7.7
-Release: 56%{?dist}
-Epoch: 0
-License: ANTLR-PD
-URL: http://www.antlr2.org/
-# ./generate-tarball.sh
-Source0: antlr-%{version}.tar.gz
-Source1: %{name}-build.xml
-Source2: %{name}-script
-Source3: http://repo2.maven.org/maven2/antlr/antlr/%{version}/%{name}-%{version}.pom
-# Repack the tarball without prebuilt binaries of unknown origin
-Source4: generate-tarball.sh
-Patch1: %{name}-%{version}-newgcc.patch
+Summary: ANother Tool for Language Recognition
+Name: antlr
+Version: 2.7.7
+Release: 30%{?dist}
+Epoch: 0
+License: Public Domain
+URL: http://www.antlr.org/
+Group: Development/Tools
+Source0: http://www.antlr2.org/download/antlr-%{version}.tar.gz
+Source1: %{name}-build.xml
+Source2: %{name}-script
+Source3: http://repo2.maven.org/maven2/%{name}/%{name}/%{version}/%{name}-%{version}.pom
+Patch1: %{name}-%{version}-newgcc.patch
# see BZ#848662
-Patch2: antlr-examples-license.patch
+Patch2: antlr-examples-license.patch
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
-%ifarch %{mono_arches}
+%ifarch %ix86 x86_64 ia64 armv4l sparcv9 alpha s390x ppc ppc64
%if ! 0%{?rhel} >= 6
-BuildRequires: mono-core
-BuildRequires: mono-winforms
+BuildRequires: mono-core
+BuildRequires: mono-winforms
%endif
%endif
-BuildRequires: gcc-c++
-BuildRequires: make
-BuildRequires: ant
-BuildRequires: java-devel >= 1:1.7.0
-BuildRequires: java-javadoc
-BuildRequires: javapackages-local
-%if %{with doxygen}
-BuildRequires: doxygen graphviz
-%endif
-%if %{with python}
-# Do not support Python3
-BuildRequires: python2-devel
-BuildRequires: python2-setuptools
-%endif
+BuildRequires: ant
+BuildRequires: java-javadoc
+BuildRequires: jpackage-utils
+BuildRequires: java-devel >= 1:1.7.0
+
+Requires: jpackage-utils
+Requires: java >= 1:1.7.0
%description
ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) is a
@@ -50,66 +39,65 @@ compilers, and translators from grammatical descriptions containing
C++ or Java actions [You can use PCCTS 1.xx to generate C-based
parsers].
-%package tool
-Summary: ANother Tool for Language Recognition
-Provides: %{name} = %{version}-%{release}
-# Explicit requires for javapackages-tools since antlr-script
-# uses /usr/share/java-utils/java-functions
-Requires: javapackages-tools
-BuildArch: noarch
+%package tool
+Group: Development/Tools
+Summary: ANother Tool for Language Recognition
+Provides: %{name} = %{version}-%{release}
+Obsoletes: %{name} < %{version}-%{release}
+Requires: jpackage-utils
+Requires: java >= 1:1.7.0
+BuildArch: noarch
-%description tool
+%description tool
ANTLR, 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
C++ or Java actions [You can use PCCTS 1.xx to generate C-based
parsers].
-%package manual
-Summary: Manual for %{name}
-BuildArch: noarch
+%package manual
+Group: Development/Tools
+Summary: Manual for %{name}
+BuildArch: noarch
-%description manual
+%description manual
Documentation for %{name}.
-%package javadoc
-Summary: Javadoc for %{name}
-BuildArch: noarch
+%package javadoc
+Group: Documentation
+Summary: Javadoc for %{name}
+BuildArch: noarch
-%description javadoc
+%description javadoc
Javadoc for %{name}.
-%package C++
-Summary: C++ bindings for antlr2 generated parsers
-Provides: antlr-static = %{version}-%{release}
+%package C++
+Group: Development/Libraries
+Summary: C++ bindings for antlr2 generated parsers
+Provides: antlr-static = %{version}-%{release}
-%description C++
+%description C++
This package provides a static C++ library for parsers generated by ANTLR2.
-%if %{with doxygen}
-%package C++-doc
-Summary: Documentation for C++ bindings for antlr2 generated parsers
-BuildArch: noarch
+%package C++-doc
+Group: Documentation
+Summary: Documentation for C++ bindings for antlr2 generated parsers
+BuildRequires: doxygen
+BuildArch: noarch
-%description C++-doc
+%description C++-doc
This package contains the documentation for the C++ bindings for parsers
generated by ANTLR2.
-%endif
-%if %{with python}
-%package -n python2-%{name}
-Summary: Python 2 runtime support for ANTLR-generated parsers
-%{?python_provide:%python_provide python2-%{name}}
+%package python
+Group: Development/Libraries
+Summary: Python runtime support for ANTLR-generated parsers
+BuildRequires: python2-devel
+BuildRequires: python-setuptools-devel
+BuildArch: noarch
-# This can be removed in Fedora 30
-Provides: %{name}-python = %{version}-%{release}
-Obsoletes: %{name}-python < 2.7.7-48
-
-BuildArch: noarch
-
-%description -n python2-%{name}
+%description python
Python runtime support for ANTLR-generated parsers
-%endif
%prep
%setup -q
@@ -121,189 +109,112 @@ cp -p %{SOURCE1} build.xml
# CRLF->LF
sed -i 's/\r//' LICENSE.txt
-# set jar location
-%mvn_file %{name}:%{name} %{name}
-
%build
ant -Dj2se.apidoc=%{_javadocdir}/java
-# make expects to find it here
-cp work/lib/antlr.jar .
+cp work/lib/antlr.jar . # make expects to find it here
export CLASSPATH=.
%configure --without-examples
make CXXFLAGS="${CXXFLAGS} -fPIC" DEBUG=1 verbose=1
-# no longer needed
-rm antlr.jar
+rm antlr.jar # no longer needed
# fix doc permissions and remove Makefiles
rm doc/{Makefile,Makefile.in}
chmod 0644 doc/*
-%if %{with doxygen}
# generate doxygen docs for C++ bindings
pushd lib/cpp
- doxygen doxygen.cfg
- find gen_doc -type f -exec chmod 0644 {} \;
+ doxygen doxygen.cfg
+ find gen_doc -type f -exec chmod 0644 {} \;
popd
-%endif
-%if %{with python}
# build python
cd lib/python
-%py2_build
+%{__python} setup.py build
cd ../../
-%endif
%install
-# jars, POM and depmap
-%mvn_artifact %{SOURCE3} work/lib/%{name}.jar
-%mvn_alias %{name}:%{name} %{name}:%{name}all
-%mvn_install -J work/api
-
+rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT{%{_includedir}/%{name},%{_libdir},%{_bindir}}
+
+# jars
+mkdir -p $RPM_BUILD_ROOT%{_javadir}
+cp -p work/lib/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
+(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
+
# script
install -p -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/antlr
-# C++ lib and headers, antlr-config
+# C++ lib and headers
+
install -p -m 644 lib/cpp/antlr/*.hpp $RPM_BUILD_ROOT%{_includedir}/%{name}
install -p -m 644 lib/cpp/src/libantlr.a $RPM_BUILD_ROOT%{_libdir}
-install -p -m 755 scripts/antlr-config $RPM_BUILD_ROOT%{_bindir}
-%if %{with python}
+# javadoc
+mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
+cp -pr work/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
+ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+
# python
cd lib/python
-%py2_install
+%{__python} setup.py install -O1 --skip-build --root %{buildroot}
cd ../..
-%endif
+# POM and depmap
+install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
+install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
+%add_maven_depmap -a antlr:antlrall
-%files tool -f .mfiles
-%license LICENSE.txt
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files tool
+%defattr(-,root,root,-)
+%doc LICENSE.txt
+%{_javadir}/%{name}*.jar
%{_bindir}/antlr
+%{_mavenpomdir}/JPP-%{name}.pom
+%{_mavendepmapfragdir}/%{name}
# this is actually a development package for the C++ target
# as we ship only a static library, it doesn't make sense
# to have a separate -devel package for the headers
%files C++
-%license LICENSE.txt
+%defattr(-,root,root,-)
%{_includedir}/%{name}
%{_libdir}/libantlr.a
-%{_bindir}/antlr-config
-%if %{with doxygen}
%files C++-doc
-%license LICENSE.txt
+%defattr(-,root,root,-)
%doc lib/cpp/gen_doc/html/
-%endif
%files manual
-%license LICENSE.txt
+%defattr(-,root,root,-)
%doc doc/*
-%files javadoc -f .mfiles-javadoc
-%license LICENSE.txt
+%files javadoc
+%defattr(-,root,root,-)
+%doc %{_javadocdir}/%{name}-%{version}
+%doc %{_javadocdir}/%{name}
-%if %{with python}
-%files -n python2-%{name}
-%license LICENSE.txt
-%{python2_sitelib}/antlr/*
-%{python2_sitelib}/antlr-*
-%endif
+%files python
+%defattr(-,root,root,-)
+%{python_sitelib}/antlr/*
+%{python_sitelib}/antlr-*
%changelog
-* Mon Jul 30 2018 Severin Gehwolf - 0:2.7.7-56
-- Add explicit requirement of javapackages-tools.
+* Fri Mar 14 2014 Mikolaj Izdebski - 0:2.7.7-30
+- Don't install antlr-config script
+- Resolves: rhbz#1076406
-* Tue Jul 24 2018 Michael Simacek - 0:2.7.7-55
-- Repack the tarball without binaries
+* Fri Jan 24 2014 Daniel Mach - 02.7.7-29
+- Mass rebuild 2014-01-24
-* Thu Jul 12 2018 Fedora Release Engineering - 0:2.7.7-54
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
+* Fri Dec 27 2013 Daniel Mach - 02.7.7-28
+- Mass rebuild 2013-12-27
-* Wed Feb 07 2018 Fedora Release Engineering - 0:2.7.7-53
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
-
-* Tue Nov 7 2017 Mikolaj Izdebski - 0:2.7.7-52
-- Switch to new license tag: ANTLR-PD
-
-* Sat Sep 23 2017 Mikolaj Izdebski - 0:2.7.7-51
-- Conditionally allow building without C++ docs
-
-* Wed Aug 02 2017 Fedora Release Engineering - 0:2.7.7-50
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
-
-* Wed Jul 26 2017 Fedora Release Engineering - 0:2.7.7-49
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
-
-* Wed Jul 12 2017 Miro HronĨok - 0:2.7.7-48
-- Proper python2 subpackage name
-
-* Thu Feb 16 2017 Michael Simacek - 0:2.7.7-47
-- Add conditional for python
-
-* Wed Feb 15 2017 Mikolaj Izdebski - 0:2.7.7-46
-- Generalize requires on python2 packages
-
-* Fri Feb 10 2017 Fedora Release Engineering - 0:2.7.7-45
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
-
-* Tue Jan 31 2017 Mikolaj Izdebski - 0:2.7.7-44
-- Add missing build-requires on GCC
-
-* Tue Jul 19 2016 Fedora Release Engineering - 0:2.7.7-43
-- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
-
-* Tue Mar 01 2016 gil cattaneo 0:2.7.7-42
-- fix URL field (rhbz#1313275)
-
-* Mon Feb 29 2016 gil cattaneo 0:2.7.7-41
-- use python macros
-
-* Wed Feb 03 2016 Fedora Release Engineering - 0:2.7.7-40
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
-
-* Fri Oct 02 2015 gil cattaneo 0:2.7.7-39
-- adapt to current guideline
-- remove some rpmlint problems
-- disable javadoc doclint
-- introduce license macro
-
-* Fri Aug 21 2015 Marcin Juszkiewicz - 0:2.7.7-38
-- use %%{mono_archs} instead of hardcoding list (rhbz#1255726)
-
-* Tue Jun 16 2015 Fedora Release Engineering - 0:2.7.7-37
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
-
-* Fri Apr 24 2015 Orion Poplawski - 0:2.7.7-36
-- Rebuild for gcc 5 C++11 ABI again
-
-* Sun Feb 22 2015 Orion Poplawski - 0:2.7.7-35
-- Rebuild for gcc 5 C++11 ABI
-
-* Fri Aug 15 2014 Fedora Release Engineering - 0:2.7.7-34
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
-
-* Mon Jun 30 2014 Toshio Kuratomi - 2.7.7-33
-- Change python-setuptools-devel BR into python-setuptools.
-
-* Sat Jun 07 2014 Fedora Release Engineering - 0:2.7.7-32
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
-
-* Wed May 21 2014 Mikolaj Izdebski - 0:2.7.7-31
-- Use .mfiles generated during build
-
-* Tue Mar 04 2014 Stanislav Ochotnicky - 0:2.7.7-30
-- Use Requires: java-headless rebuild (#1067528)
-
-* Mon Nov 11 2013 Stanislav Ochotnicky - 0:2.7.7-29
-- Do not install versioned jar (#1022080)
-- Install LICENSE files in each independent subpackage
-- Minor spec cleanups
-
-* Fri Nov 08 2013 Marek Goldmann - 0:2.7.7-28
-- Rebuild
-
-* Sat Aug 03 2013 Fedora Release Engineering - 0:2.7.7-27
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
+* Fri Jun 28 2013 Mikolaj Izdebski - 0:2.7.7-27
+- Rebuild to regenerate API documentation
+- Resolves: CVE-2013-1571
* Wed Feb 13 2013 Fedora Release Engineering - 0:2.7.7-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
diff --git a/sources b/sources
index e0b7852..11d229c 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (antlr-2.7.7.tar.gz) = 7e05d440513663dab1960974ac61694552583bdd20d6eac2bff27f5142b118a26022d910b44312cdac9164b087c7cd4d1c8325e1ec914f9704b3cdd5f4b2b166
+SHA1 (antlr-2.7.7.tar.gz) = 802655c343cc7806aaf1ec2177a0e663ff209de1