2007-01-15 22:51:10 +00:00
|
|
|
#
|
|
|
|
# spec file for package antlr (Version 2.7.6)
|
|
|
|
#
|
2008-01-30 16:39:47 +00:00
|
|
|
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-15 22:51:10 +00:00
|
|
|
# This file and all modifications and additions to the pristine
|
|
|
|
# package are under the same license as the package itself.
|
|
|
|
#
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
2008-02-22 00:17:11 +00:00
|
|
|
|
2007-01-15 22:51:10 +00:00
|
|
|
Name: antlr
|
2007-05-04 09:03:51 +00:00
|
|
|
BuildRequires: ant gcc-c++ java2-devel-packages unzip xml-commons-apis
|
2007-01-15 22:51:10 +00:00
|
|
|
%define section free
|
|
|
|
%define native 0
|
|
|
|
Summary: Another Tool for Language Recognition
|
|
|
|
Version: 2.7.6
|
2008-02-22 00:17:11 +00:00
|
|
|
Release: 166
|
2008-01-30 16:39:47 +00:00
|
|
|
License: GPL v2 or later; Public Domain, Freeware; X11/MIT
|
|
|
|
Url: http://www.antlr.org/
|
2007-01-15 22:51:10 +00:00
|
|
|
Group: Development/Tools/Other
|
|
|
|
#Source0: http://www.antlr.org/download/antlr-2.7.4.tar.gz
|
|
|
|
Source0: %{name}-%{version}.tar.bz2
|
|
|
|
Source1: %{name}-build.xml
|
|
|
|
Source2: %{name}-script
|
|
|
|
Source3: http://www.antlr.org/share/1069557132934/makefile.gcj
|
|
|
|
Patch0: %{name}-jedit.patch
|
|
|
|
Patch150: java150_build.patch
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%if %{native}
|
|
|
|
%else
|
|
|
|
BuildArch: noarch
|
|
|
|
Requires: jpackage-utils
|
2008-02-22 00:17:11 +00:00
|
|
|
PreReq: update-alternatives
|
2007-01-15 22:51:10 +00:00
|
|
|
Requires(postun): %{_sbindir}/update-alternatives
|
|
|
|
%endif
|
|
|
|
Provides: %{name}-bootstrap
|
|
|
|
Obsoletes: %{name}-bootstrap
|
|
|
|
|
|
|
|
%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 manual
|
|
|
|
Group: Development/Tools/Other
|
|
|
|
Summary: ANother Tool for Language Recognition (Manual)
|
|
|
|
|
|
|
|
%description manual
|
|
|
|
Manual for antlr.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package javadoc
|
|
|
|
PreReq: coreutils
|
|
|
|
Group: Development/Tools/Other
|
|
|
|
Summary: ANother Tool for Language Recognition (Java Documentation)
|
|
|
|
|
|
|
|
%description javadoc
|
|
|
|
Javadoc for antlr.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
# remove all binary libs
|
|
|
|
find . -name "*.jar" -exec rm -f {} \;
|
|
|
|
%if !%{native}
|
|
|
|
%patch0 -p0
|
|
|
|
cp -p %{SOURCE1} build.xml
|
|
|
|
## fixup paths to manual
|
|
|
|
#%{__perl} -pi -e 's|"doc/|"%{_docdir}/%{name}-manual-%{version}/|g' \
|
|
|
|
# install.html
|
|
|
|
%patch150 -p1
|
|
|
|
%endif
|
|
|
|
# check for license problematic files:
|
|
|
|
find | grep "\(ShowString.java$\|StreamConverter.java$\)" && exit 42
|
|
|
|
|
|
|
|
%build
|
|
|
|
%if %{native}
|
|
|
|
%{__make} -f %{SOURCE3} COMPOPTS="$RPM_OPT_FLAGS"
|
|
|
|
%else
|
|
|
|
ant -Dj2se.apidoc=%{_javadocdir}/java
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%install
|
|
|
|
install -dm 755 $RPM_BUILD_ROOT%{_bindir}
|
|
|
|
touch $RPM_BUILD_ROOT%{_bindir}/antlr # for %%ghost
|
|
|
|
%if %{native}
|
|
|
|
install -pm 755 cantlr $RPM_BUILD_ROOT%{_bindir}/antlr-native
|
|
|
|
%else
|
|
|
|
# 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
|
|
|
|
cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/antlr-java
|
|
|
|
# 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}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%post
|
|
|
|
%{_sbindir}/update-alternatives --install %{_bindir}/antlr \
|
|
|
|
%{name} %{_bindir}/antlr-java 10
|
|
|
|
|
|
|
|
%postun
|
|
|
|
if [ $1 -eq 0 ] ; then
|
|
|
|
%{_sbindir}/update-alternatives --remove %{name} %{_bindir}/antlr-java
|
|
|
|
fi
|
|
|
|
%if %{native}
|
|
|
|
|
|
|
|
%post native
|
|
|
|
%{_sbindir}/update-alternatives --install %{_bindir}/antlr \
|
|
|
|
%{name} %{_bindir}/antlr-native 20
|
|
|
|
|
|
|
|
%postun native
|
|
|
|
if [ $1 -eq 0 ] ; then
|
|
|
|
%{_sbindir}/update-alternatives --remove %{name} %{_bindir}/antlr-native
|
|
|
|
fi
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%post javadoc
|
|
|
|
rm -f %{_javadocdir}/%{name}
|
|
|
|
ln -s %{name}-%{version} %{_javadocdir}/%{name}
|
|
|
|
%if %{native}
|
|
|
|
|
|
|
|
%files native
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%doc install.html LICENSE.txt
|
|
|
|
%defattr(0755,root,root,0755)
|
|
|
|
%ghost %{_bindir}/antlr
|
|
|
|
%{_bindir}/antlr-native
|
|
|
|
%else
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%doc LICENSE.txt
|
|
|
|
%{_javadir}/%{name}*.jar
|
|
|
|
%defattr(0755,root,root,0755)
|
|
|
|
%ghost %{_bindir}/antlr
|
|
|
|
%{_bindir}/antlr-java
|
|
|
|
|
|
|
|
%files manual
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%doc doc/*
|
|
|
|
|
|
|
|
%files javadoc
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%doc %{_javadocdir}/%{name}-%{version}
|
|
|
|
%ghost %doc %{_javadocdir}/%{name}
|
|
|
|
%endif
|
|
|
|
|
2007-05-04 09:03:51 +00:00
|
|
|
%changelog
|
2008-02-22 00:17:11 +00:00
|
|
|
* Wed Feb 20 2008 adrian@suse.de
|
|
|
|
- do not PreReq files to fix build env setup for other packages
|
|
|
|
- remove SL-9.1 traces
|
2008-01-30 16:39:47 +00:00
|
|
|
* Fri May 04 2007 dbornkessel@suse.de
|
2007-05-04 09:03:51 +00:00
|
|
|
- added unzip to BuildRequires
|
2008-01-30 16:39:47 +00:00
|
|
|
* Sat Oct 07 2006 dbornkessel@suse.de
|
2007-01-15 22:51:10 +00:00
|
|
|
- added check that checks whether deleted files ShowString.java and StreamConverter.java are really not in place
|
2008-01-30 16:39:47 +00:00
|
|
|
* Thu Oct 05 2006 dbornkessel@suse.de
|
2007-01-15 22:51:10 +00:00
|
|
|
- deleted
|
|
|
|
antlr-2.7.6/examples/java/unicode.IDENTs/ShowString.java
|
|
|
|
antlr-2.7.6/examples/java/unicode.IDENTs/StreamConverter.java
|
|
|
|
from tar ball due to licensing issues (Bug #207621)
|
2008-01-30 16:39:47 +00:00
|
|
|
* Mon Sep 25 2006 dbornkessel@suse.de
|
2007-01-15 22:51:10 +00:00
|
|
|
- fixes necessary to compile with Java 1.5.0
|
|
|
|
- set source="1.4" and target="1.4" for ant "javac" tasks
|
|
|
|
- set source="1.4" for ant "javadoc" tasks
|
2008-01-30 16:39:47 +00:00
|
|
|
* Wed Sep 20 2006 dbornkessel@suse.de
|
2007-01-15 22:51:10 +00:00
|
|
|
- Provide: antlr-bootstrap
|
|
|
|
Obsoletes: antlr-bootstrap
|
2008-01-30 16:39:47 +00:00
|
|
|
* Mon Sep 18 2006 dbornkessel@suse.de
|
2007-01-15 22:51:10 +00:00
|
|
|
- update to 2.7.6
|
|
|
|
- added size, index methods to TokenStreamRewriteEngine.java
|
|
|
|
- bug in syn preds for tree parsers. Submitted by Ole Kniemeyer.
|
|
|
|
- all Class.forName yanked out; uses thread context loader
|
|
|
|
- option to prevent System.exit termination
|
|
|
|
- added recover() method to lexers
|
|
|
|
- fixed code gen bug for syn preds in tree parsers. Thanks to Marc Horowitz.
|
|
|
|
- BaseAST was not checking for null text in toString()
|
|
|
|
- Scott added java line ouput in code gen
|
|
|
|
- Prashant tweaked a few things for ANTLRStudio; a few new classes in ASdebug package
|
|
|
|
- Give errors if the user attempts to set k>1 in a TreeWalker
|
|
|
|
- Added missing Makefile.in for C++ heteroAST example and enabled it
|
|
|
|
in configure.in
|
|
|
|
- Many small C++ support code and codegen tweaks fixes to increase
|
|
|
|
portability. (Compaq Tru64 UNIX V5.1, VC's)
|
|
|
|
- Prevent '\' entering the bitset dump comments, might occur at end of
|
|
|
|
line. Some compilers continue the comment to the next line (not sure
|
|
|
|
if this is a compiler bug, should look it up)
|
2008-01-30 16:39:47 +00:00
|
|
|
* Wed Jan 25 2006 mls@suse.de
|
2007-01-15 22:51:10 +00:00
|
|
|
- converted neededforbuild to BuildRequires
|
2008-01-30 16:39:47 +00:00
|
|
|
* Tue Oct 25 2005 jsmeix@suse.de
|
2007-01-15 22:51:10 +00:00
|
|
|
- removed sub-package antlr-jedit because since jedit version 4.2
|
|
|
|
/usr/share/jedit/modes/antlr.xml is included in jedit.
|
2008-01-30 16:39:47 +00:00
|
|
|
* Wed Jul 27 2005 jsmeix@suse.de
|
2007-01-15 22:51:10 +00:00
|
|
|
- Adjustments in the spec file.
|
2008-01-30 16:39:47 +00:00
|
|
|
* Tue Jul 19 2005 jsmeix@suse.de
|
2007-01-15 22:51:10 +00:00
|
|
|
- Current version 2.7.4 from JPackage.org
|
2008-01-30 16:39:47 +00:00
|
|
|
* Wed Mar 02 2005 skh@suse.de
|
2007-01-15 22:51:10 +00:00
|
|
|
- added support for C++ output (#67164)
|
2008-01-30 16:39:47 +00:00
|
|
|
* Thu Sep 16 2004 skh@suse.de
|
2007-01-15 22:51:10 +00:00
|
|
|
- Fix prerequires of javadoc subpackage
|
|
|
|
- conflict with pccts
|
2008-01-30 16:39:47 +00:00
|
|
|
* Thu Sep 02 2004 skh@suse.de
|
2007-01-15 22:51:10 +00:00
|
|
|
- Initial package created with version 2.7.4 (JPackage 1.5)
|