Sophie

Sophie

distrib > Mageia > 8 > x86_64 > by-pkgid > 38b01c2af8ac5121fc1588a8b1acd1b9 > files > 7

antlr-2.7.7-45.mga8.src.rpm

%bcond_without doxygen
%bcond_with 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:       %mkrel 45
Group:         Development/Java
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
# see BZ#848662
Patch2:        antlr-examples-license.patch

BuildRequires: mono-core
BuildRequires: mono-winforms

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

%description
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     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

%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

%description manual
Documentation for %{name}.

%package     javadoc
Summary:       Javadoc for %{name}
BuildArch:     noarch

%description javadoc
Javadoc for %{name}.

%package     C++
Summary:       C++ bindings for antlr2 generated parsers
Provides:      antlr-static = %{version}-%{release}

%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

%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}}

# This can be removed in Fedora 30
Provides:      %{name}-python = %{version}-%{release}
Obsoletes:     %{name}-python < 2.7.7-44

BuildArch:     noarch

%description -n python2-%{name}
Python 2 runtime support for ANTLR-generated parsers
%endif

%prep
%setup -q
# remove all binary libs
find . -name "*.jar" -exec rm -f {} \;
cp -p %{SOURCE1} build.xml
%patch1
%patch2 -p1
# 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 .
export CLASSPATH=.
%configure --without-examples
make CXXFLAGS="${CXXFLAGS} -fPIC" DEBUG=1 verbose=1
# no longer needed
rm antlr.jar

# 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 {} \;
popd
%endif

%if %{with python}
# build python
cd lib/python
%py2_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

mkdir -p $RPM_BUILD_ROOT{%{_includedir}/%{name},%{_libdir},%{_bindir}}
# script
install -p -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/antlr

# C++ lib and headers, antlr-config
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}
# python
cd lib/python
%py2_install
cd ../..
%endif


%files tool -f .mfiles
%license LICENSE.txt
%{_bindir}/antlr

# 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
%{_includedir}/%{name}
%{_libdir}/libantlr.a
%{_bindir}/antlr-config

%if %{with doxygen}
%files C++-doc
%license LICENSE.txt
%doc lib/cpp/gen_doc/html/
%endif

%files manual
%license LICENSE.txt
%doc doc/*

%files javadoc -f .mfiles-javadoc
%license LICENSE.txt

%if %{with python}
%files -n python2-%{name}
%license LICENSE.txt
%{python2_sitelib}/antlr/*
%{python2_sitelib}/antlr-*
%endif




%changelog
* Fri Sep 11 2020 daviddavid <daviddavid> 0:2.7.7-45.mga8
+ Revision: 1624519
- Set javac source / target version to 1.8 to fix issues with Java 11
- Rebuilt for JDK-11

* Thu Mar 05 2020 daviddavid <daviddavid> 0:2.7.7-44.mga8
+ Revision: 1554088
- drop python2 support
- Repack the tarball without binaries
- Switch to new license tag: ANTLR-PD
- Conditionally allow building without C++ docs
- Add conditional for python
- Proper python2 subpackage name
+ umeabot <umeabot>
- Mageia 8 Mass Rebuild

* Fri Sep 21 2018 umeabot <umeabot> 0:2.7.7-43.mga7
+ Revision: 1294342
- Mageia 7 Mass Rebuild

* Fri Jun 29 2018 pterjan <pterjan> 0:2.7.7-42.mga7
+ Revision: 1240801
- Update scripts to know about aarch64

* Wed Mar 02 2016 neoclust <neoclust> 0:2.7.7-41.mga6
+ Revision: 981796
- Second rebuild of the java stack

* Sun Feb 21 2016 neoclust <neoclust> 0:2.7.7-40.mga6
+ Revision: 975458
- First rebuild of the java stack
- sync package antlr with fedora

* Tue Feb 09 2016 umeabot <umeabot> 0:2.7.7-31.mga6
+ Revision: 951866
- Mageia 6 Mass Rebuild

* Thu Jan 08 2015 pterjan <pterjan> 0:2.7.7-30.mga5
+ Revision: 809288
- Sync with Fedora 21

* Wed Oct 15 2014 umeabot <umeabot> 0:2.7.7-29.mga5
+ Revision: 741299
- Second Mageia 5 Mass Rebuild

* Sat Sep 27 2014 tv <tv> 0:2.7.7-28.mga5
+ Revision: 725941
- rebuild for missing pythoneggs deps

* Tue Sep 16 2014 umeabot <umeabot> 0:2.7.7-27.mga5
+ Revision: 677779
- Mageia 5 Mass Rebuild

* Sat May 31 2014 pterjan <pterjan> 0:2.7.7-26.mga5
+ Revision: 628101
- Rebuild for new Python

* Tue Oct 22 2013 dmorgan <dmorgan> 0:2.7.7-25.mga4
+ Revision: 546140
- Temporarly add a mvn() provide

* Tue Oct 22 2013 umeabot <umeabot> 0:2.7.7-24.mga4
+ Revision: 545793
- Mageia 4 Mass Rebuild

* Thu Oct 17 2013 dmorgan <dmorgan> 0:2.7.7-23.mga4
+ Revision: 501809
- Rebuild with new javapackages-tools

* Mon Oct 14 2013 pterjan <pterjan> 0:2.7.7-22.mga4
+ Revision: 497633
- Rebuild to add different pythonegg provides for python 2 and 3

* Fri Jan 11 2013 umeabot <umeabot> 0:2.7.7-21.mga3
+ Revision: 345601
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Mon Dec 03 2012 dmorgan <dmorgan> 0:2.7.7-20.mga3
+ Revision: 325716
- Add Maven Pom

* Fri Nov 16 2012 fwang <fwang> 0:2.7.7-19.mga3
+ Revision: 318881
- cleanup spec

* Wed Apr 27 2011 dmorgan <dmorgan> 0:2.7.7-18.mga3
+ Revision: 92122
- Fix obsoletes

* Wed Apr 27 2011 dmorgan <dmorgan> 0:2.7.7-17.mga1
+ Revision: 92118
- Fix buildrequires
- Fix buildrequires
- Sync with fedora package

* Tue Jan 11 2011 dmorgan <dmorgan> 0:2.7.7-11.mga1
+ Revision: 6080
- imported package antlr


* Sun Oct 17 2010 Funda Wang <fwang@mandriva.org> 0:2.7.7-11mdv2011.0
+ Revision: 586334
- requires jre

* Sun Oct 17 2010 Funda Wang <fwang@mandriva.org> 0:2.7.7-10mdv2011.0
+ Revision: 586286
- antlr-native shouldnot provide main package

* Sun Oct 17 2010 Funda Wang <fwang@mandriva.org> 0:2.7.7-9mdv2011.0
+ Revision: 586251
- add more requires

* Sun Oct 17 2010 Funda Wang <fwang@mandriva.org> 0:2.7.7-8mdv2011.0
+ Revision: 586215
- fix requires

* Sun Oct 17 2010 Funda Wang <fwang@mandriva.org> 0:2.7.7-7mdv2011.0
+ Revision: 586211
- merge fedora spec so that we could build c++ interface and java interface at one time

* Tue Mar 16 2010 Oden Eriksson <oeriksson@mandriva.com> 0:2.7.7-6mdv2010.1
+ Revision: 521995
- rebuilt for 2010.1

* Sun Aug 09 2009 Oden Eriksson <oeriksson@mandriva.com> 0:2.7.7-5mdv2010.0
+ Revision: 413028
- rebuild

* Fri Mar 06 2009 Antoine Ginies <aginies@mandriva.com> 0:2.7.7-4mdv2009.1
+ Revision: 349989
- 2009.1 rebuild

* Thu Jul 24 2008 Thierry Vignaud <tv@mandriva.org> 0:2.7.7-3mdv2009.0
+ Revision: 245440
- rebuild

* Wed Jan 23 2008 Alexander Kurtakov <akurtakov@mandriva.org> 0:2.7.7-2.3.1mdv2008.1
+ Revision: 157052
- fix build

  + Thierry Vignaud <tv@mandriva.org>
    - BuildRequires  jakarta-commons-launcher
    - rebuild
    - kill re-definition of %%buildroot on Pixel's request
    - kill file require on update-alternatives

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

* Sat Sep 15 2007 Anssi Hannula <anssi@mandriva.org> 0:2.7.7-1.3mdv2008.0
+ Revision: 87196
- rebuild to filter out autorequires of GCJ AOT objects
- remove unnecessary Requires(post) on java-gcj-compat

* Tue Jul 03 2007 Anssi Hannula <anssi@mandriva.org> 0:2.7.7-1.2mdv2008.0
+ Revision: 47573
- rebuild with new libgcj


* Sat Jan 20 2007 David Walluck <walluck@mandriva.org> 2.7.7-1.1mdv2007.0
+ Revision: 111177
- 2.7.7
- Import antlr

* Thu Aug 10 2006 David Walluck <walluck@mandriva.org> 0:2.7.6-4.1mdv2007.0
- add javadoc %%postun

* Fri Aug 04 2006 David Walluck <walluck@mandriva.org> 0:2.7.6-2.2mdv2007.0
- use bcond

* Tue Jul 18 2006 David Walluck <walluck@mandriva.org> 0:2.7.6-2.1mdv2007.0
- bump release for JPackage 1.7

* Mon Jul 17 2006 David Walluck <walluck@mandriva.org> 0:2.7.6-1.3mdv2007.0
- fix bootstrap

* Sun Jun 04 2006 David Walluck <walluck@mandriva.org> 0:2.7.6-1.2mdv2007.0
- rebuild for libgcj.so.7
- aot-compile

* Fri Jan 13 2006 David Walluck <walluck@mandriva.org> 0:2.7.6-1.1mdk
- 2.7.6

* Thu Sep 15 2005 Götz Waschk <waschk@mandriva.org> 2.7.5-1mdk
- update file list
- New release 2.7.5

* Fri May 13 2005 David Walluck <walluck@mandriva.org> 0:2.7.4-2.2mdk
- rebuild as non-bootstrap

* Sun May 08 2005 David Walluck <walluck@mandriva.org> 0:2.7.4-2.1mdk
- release

* Sat Aug 21 2004 Ralph Apel <r.apel at r-apel.de> - 0:2.7.4-2jpp
- Build with ant-1.6.2.
- Made native scripts conditional

* Wed May 19 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:2.7.4-1jpp
- Update to 2.7.4.

* Sat Apr 03 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:2.7.3-2jpp
- Create alternatives also on upgrades.

* Thu Apr 01 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:2.7.3-1jpp
- Update to 2.7.3.
- Include gcj build option and a native subpackage, build using
  "--with native" to get that.
- Add /usr/bin/antlr alternative.