Sync with RHAPS

This commit is contained in:
gbenson 2005-01-11 14:40:39 +00:00
parent e683e581b7
commit 0107a2b584
4 changed files with 313 additions and 17 deletions

View File

@ -1,4 +1,4 @@
antlr-2.7.2.tar.gz
antlr-2.7.2
antlr-2.7.4.tar.gz
antlr-2.7.4
noarch
*.src.rpm

View File

@ -1,25 +1,35 @@
%define section free
%define native %{?_with_native:1}%{!?_without_native:0}
%define build_jedit %{?_with_jedit:1}%{!?_without_jedit:0}
Summary: ANother Tool for Language Recognition
Name: antlr
Version: 2.7.2
Release: 3jpp_3fc
Version: 2.7.4
Release: 2jpp_1fc
Epoch: 0
License: Public Domain
URL: http://www.antlr.org/
Group: Development/Code Generators
#Vendor: JPackage Project
#Distribution: JPackage
Source0: http://www.antlr.org/download/antlr-2.7.2.tar.gz
Source0: http://www.antlr.org/download/antlr-2.7.4.tar.gz
Source1: %{name}-build.xml
Source2: %{name}-script
Source3: http://www.antlr.org/share/1069557132934/makefile.gcj
Patch0: %{name}-jedit.patch
Patch1: %{name}-bz144775.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
%if %{native}
BuildRequires: %{_bindir}/gcj, %{__make}
%else
BuildArch: noarch
BuildRequires: ant, perl, java-javadoc
BuildRequires: ant
BuildRequires: %{__perl}, java-javadoc
Requires: jpackage-utils
Requires(post): %{_sbindir}/update-alternatives
Requires(postun): %{_sbindir}/update-alternatives
%endif
%description
ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) is a
@ -28,6 +38,19 @@ compilers, and translators from grammatical descriptions containing
C++ or Java actions [You can use PCCTS 1.xx to generate C-based
parsers].
%package native
Group: Development/Code Generators
Summary: ANother Tool for Language Recognition (native version)
Requires(post): %{_sbindir}/update-alternatives
Requires(postun): %{_sbindir}/update-alternatives
%description native
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]. This package includes the native version of the antlr tool.
%package manual
Group: Development/Code Generators
Summary: Manual for %{name}
@ -58,30 +81,45 @@ ANTLR mode for jEdit. To enable this mode, insert the following into your
%prep
%setup -q
%patch0 -p0
cp -p %{SOURCE1} build.xml
# remove all binary libs
find . -name "*.jar" -exec rm -f {} \;
%if !%{native}
%patch0 -p0
%patch1 -p2
cp -p %{SOURCE1} build.xml
# fixup paths to manual
perl -pi -e 's|"doc/|"%{_docdir}/%{name}-manual-%{version}/|g' \
%{__perl} -pi -e 's|"doc/|"%{_docdir}/%{name}-manual-%{version}/|g' \
install.html
%endif
%build
%if %{native}
%{__make} -f %{SOURCE3} COMPOPTS="$RPM_OPT_FLAGS"
%else
ant -Dj2se.apidoc=%{_javadocdir}/java
%endif
%install
rm -rf $RPM_BUILD_ROOT
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 (use the same name as in scripts/)
mkdir -p $RPM_BUILD_ROOT%{_bindir}
cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/run-antlr
# script
cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/antlr-java
# javadoc
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
@ -93,22 +131,54 @@ ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/jedit/modes
cp -p extras/antlr-jedit.xml $RPM_BUILD_ROOT%{_datadir}/jedit/modes/antlr.xml
%endif
%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 install.html RIGHTS
%attr(0755,root,root) %{_bindir}/*
%{_javadir}/*
%doc install.html LICENSE.txt
%{_javadir}/%{name}*.jar
%defattr(0755,root,root,0755)
%ghost %{_bindir}/antlr
%{_bindir}/antlr-java
%files manual
%defattr(0644,root,root,0755)
@ -124,16 +194,39 @@ ln -s %{name}-%{version} %{_javadocdir}/%{name}
%defattr(0644,root,root,0755)
%{_datadir}/jedit/modes/*
%endif
%endif
%changelog
* Tue Jan 11 2005 Gary Benson <gbenson@redhat.com> - 0:2.7.4-2jpp_1rh
- Sync with RHAPS.
* Mon Nov 15 2004 Fernando Nasser <fnasser@redhat.com> - 0:2.7.4-2jpp_1rh
- Merge with upstream for upgrade
* Fri Nov 12 2004 Gary Benson <gbenson@redhat.com> - 0:2.7.2-3jpp_3fc
- Omit the jedit subpackage to fix dependencies.
* Thu Nov 4 2004 Gary Benson <gbenson@redhat.com> - 0:2.7.2-3jpp_2fc
- Build into Fedora.
* Thu Mar 4 2004 Frank Ch. Eigler <fche@redhat.com> - 0:2.7.2-3jpp_1rh
* Fri Aug 20 2004 Ralph Apel <r.apel at r-apel.de> - 0:2.7.4-2jpp
- Build with ant-1.6.2.
- Made native scripts conditional
* Tue May 18 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:2.7.4-1jpp
- Update to 2.7.4.
* Fri Apr 2 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:2.7.3-2jpp
- Create alternatives also on upgrades.
* Wed Mar 31 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 %{_bindir}/antlr alternative.
* Thu Mar 4 2004 Frank Ch. Eigler <fche@redhat.com - 0:2.7.2-3jpp_1rh
- RH vacuuming
* Mon Dec 15 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:2.7.2-3jpp

203
makefile.gcj Normal file
View File

@ -0,0 +1,203 @@
# Use this file to compile the antlr tool in a static executable using the
# GNU gcj compiler.
# Author: Luca Di Gaspero (luca.digaspero@diegm.uniud.it)
# http://www.diegm.uniud.it/digaspero/
# Usage: make -f makefile.gcj
GCJ = gcj
COMPOPTS = -O3
SOURCES=antlr/ActionElement.java \
antlr/actions/cpp/ActionLexer.java \
antlr/actions/cpp/ActionLexerTokenTypes.java \
antlr/actions/java/ActionLexer.java \
antlr/actions/java/ActionLexerTokenTypes.java \
antlr/ActionTransInfo.java \
antlr/Alternative.java \
antlr/AlternativeBlock.java \
antlr/AlternativeElement.java \
antlr/ANTLRError.java \
antlr/ANTLRException.java \
antlr/ANTLRGrammarParseBehavior.java \
antlr/ANTLRHashString.java \
antlr/ANTLRLexer.java \
antlr/ANTLRParser.java \
antlr/ANTLRStringBuffer.java \
antlr/ANTLRTokdefLexer.java \
antlr/ANTLRTokdefParser.java \
antlr/ANTLRTokdefParserTokenTypes.java \
antlr/ANTLRTokenTypes.java \
antlr/ASTFactory.java \
antlr/ASTIterator.java \
antlr/ASTNULLType.java \
antlr/ASTPair.java \
antlr/ASTVisitor.java \
antlr/BaseAST.java \
antlr/BlockContext.java \
antlr/BlockEndElement.java \
antlr/BlockWithImpliedExitPath.java \
antlr/ByteBuffer.java \
antlr/CharBuffer.java \
antlr/CharFormatter.java \
antlr/CharLiteralElement.java \
antlr/CharQueue.java \
antlr/CharRangeElement.java \
antlr/CharScanner.java \
antlr/CharStreamException.java \
antlr/CharStreamIOException.java \
antlr/CodeGenerator.java \
antlr/collections/AST.java \
antlr/collections/ASTEnumeration.java \
antlr/collections/Enumerator.java \
antlr/collections/impl/ASTArray.java \
antlr/collections/impl/ASTEnumerator.java \
antlr/collections/impl/BitSet.java \
antlr/collections/impl/IndexedVector.java \
antlr/collections/impl/IntRange.java \
antlr/collections/impl/LLCell.java \
antlr/collections/impl/LLEnumeration.java \
antlr/collections/impl/LList.java \
antlr/collections/impl/Vector.java \
antlr/collections/impl/VectorEnumeration.java \
antlr/collections/impl/VectorEnumerator.java \
antlr/collections/List.java \
antlr/collections/Stack.java \
antlr/CommonAST.java \
antlr/CommonASTWithHiddenTokens.java \
antlr/CommonHiddenStreamToken.java \
antlr/CommonToken.java \
antlr/CppBlockFinishingInfo.java \
antlr/CppCharFormatter.java \
antlr/CppCodeGenerator.java \
antlr/debug/DebuggingCharScanner.java \
antlr/debug/DebuggingInputBuffer.java \
antlr/debug/DebuggingParser.java \
antlr/debug/Event.java \
antlr/debug/GuessingEvent.java \
antlr/debug/InputBufferAdapter.java \
antlr/debug/InputBufferEvent.java \
antlr/debug/InputBufferEventSupport.java \
antlr/debug/InputBufferListener.java \
antlr/debug/InputBufferReporter.java \
antlr/debug/ListenerBase.java \
antlr/debug/LLkDebuggingParser.java \
antlr/debug/MessageAdapter.java \
antlr/debug/MessageEvent.java \
antlr/debug/MessageListener.java \
antlr/debug/NewLineEvent.java \
antlr/debug/NewLineListener.java \
antlr/debug/ParserAdapter.java \
antlr/debug/ParserController.java \
antlr/debug/ParserEventSupport.java \
antlr/debug/ParserListener.java \
antlr/debug/ParserMatchAdapter.java \
antlr/debug/ParserMatchEvent.java \
antlr/debug/ParserMatchListener.java \
antlr/debug/ParserReporter.java \
antlr/debug/ParserTokenAdapter.java \
antlr/debug/ParserTokenEvent.java \
antlr/debug/ParserTokenListener.java \
antlr/debug/SemanticPredicateAdapter.java \
antlr/debug/SemanticPredicateEvent.java \
antlr/debug/SemanticPredicateListener.java \
antlr/debug/SyntacticPredicateAdapter.java \
antlr/debug/SyntacticPredicateEvent.java \
antlr/debug/SyntacticPredicateListener.java \
antlr/debug/TraceAdapter.java \
antlr/debug/TraceEvent.java \
antlr/debug/TraceListener.java \
antlr/debug/Tracer.java \
antlr/DefaultFileLineFormatter.java \
antlr/DefaultToolErrorHandler.java \
antlr/DefineGrammarSymbols.java \
antlr/DiagnosticCodeGenerator.java \
antlr/DocBookCodeGenerator.java \
antlr/DumpASTVisitor.java \
antlr/ExceptionHandler.java \
antlr/ExceptionSpec.java \
antlr/FileCopyException.java \
antlr/FileLineFormatter.java \
antlr/Grammar.java \
antlr/GrammarAnalyzer.java \
antlr/GrammarAtom.java \
antlr/GrammarElement.java \
antlr/GrammarSymbol.java \
antlr/HTMLCodeGenerator.java \
antlr/ImportVocabTokenManager.java \
antlr/InputBuffer.java \
antlr/JavaBlockFinishingInfo.java \
antlr/JavaCharFormatter.java \
antlr/JavaCodeGenerator.java \
antlr/LexerGrammar.java \
antlr/LexerSharedInputState.java \
antlr/LLkAnalyzer.java \
antlr/LLkGrammarAnalyzer.java \
antlr/LLkParser.java \
antlr/Lookahead.java \
antlr/MakeGrammar.java \
antlr/MismatchedCharException.java \
antlr/MismatchedTokenException.java \
antlr/NameSpace.java \
antlr/NoViableAltException.java \
antlr/NoViableAltForCharException.java \
antlr/OneOrMoreBlock.java \
antlr/Parser.java \
antlr/ParserGrammar.java \
antlr/ParserSharedInputState.java \
antlr/preprocessor/Grammar.java \
antlr/preprocessor/GrammarFile.java \
antlr/preprocessor/Hierarchy.java \
antlr/preprocessor/Option.java \
antlr/preprocessor/Preprocessor.java \
antlr/preprocessor/PreprocessorLexer.java \
antlr/preprocessor/PreprocessorTokenTypes.java \
antlr/preprocessor/Rule.java \
antlr/preprocessor/Tool.java \
antlr/PreservingFileWriter.java \
antlr/RecognitionException.java \
antlr/RuleBlock.java \
antlr/RuleEndElement.java \
antlr/RuleRefElement.java \
antlr/RuleSymbol.java \
antlr/SemanticException.java \
antlr/SimpleTokenManager.java \
antlr/StringLiteralElement.java \
antlr/StringLiteralSymbol.java \
antlr/StringUtils.java \
antlr/SynPredBlock.java \
antlr/Token.java \
antlr/TokenBuffer.java \
antlr/TokenManager.java \
antlr/TokenQueue.java \
antlr/TokenRangeElement.java \
antlr/TokenRefElement.java \
antlr/TokenStream.java \
antlr/TokenStreamBasicFilter.java \
antlr/TokenStreamException.java \
antlr/TokenStreamHiddenTokenFilter.java \
antlr/TokenStreamIOException.java \
antlr/TokenStreamRecognitionException.java \
antlr/TokenStreamRetryException.java \
antlr/TokenStreamSelector.java \
antlr/TokenSymbol.java \
antlr/Tool.java \
antlr/ToolErrorHandler.java \
antlr/TreeBlockContext.java \
antlr/TreeElement.java \
antlr/TreeParser.java \
antlr/TreeParserSharedInputState.java \
antlr/TreeSpecifierNode.java \
antlr/TreeWalkerGrammar.java \
antlr/Version.java \
antlr/WildcardElement.java \
antlr/ZeroOrMoreBlock.java
OBJFILES = $(SOURCES:%.java=%.o)
all: cantlr
cantlr: $(OBJFILES)
$(GCJ) --main=antlr.Tool $(OBJFILES) -o $@
%.o:%.java
$(GCJ) $(COMPOPTS) -c -o $@ $<
clean:
rm -f $(OBJFILES)

View File

@ -1 +1 @@
d67ffcaba6b2cedd99601b9052f63957 antlr-2.7.2.tar.gz
33df7cdc8e80447cdd78607c76f02bac antlr-2.7.4.tar.gz