From 2079a55c4518a6da27798d0afd52afd0bc1ac8e0 Mon Sep 17 00:00:00 2001 From: gil Date: Sat, 6 Jan 2024 00:05:31 +0100 Subject: [PATCH] rebuilt devel [release 1.4.1-4mamba;Thu Nov 25 2010] --- README.md | 5 + java-jflex-1.4.1-build_xml.patch | 32 ++++++ java-jflex-1.4.1-byaccj.patch | 12 ++ java-jflex-1.4.1-classpath.patch | 36 ++++++ java-jflex-1.4.1-cup-anttask.patch | 29 +++++ java-jflex-1.4.1-no-cup-no-jflex.patch | 47 ++++++++ java-jflex.script | 27 +++++ java-jflex.spec | 149 +++++++++++++++++++++++++ 8 files changed, 337 insertions(+) create mode 100644 java-jflex-1.4.1-build_xml.patch create mode 100644 java-jflex-1.4.1-byaccj.patch create mode 100644 java-jflex-1.4.1-classpath.patch create mode 100644 java-jflex-1.4.1-cup-anttask.patch create mode 100644 java-jflex-1.4.1-no-cup-no-jflex.patch create mode 100644 java-jflex.script create mode 100644 java-jflex.spec diff --git a/README.md b/README.md index de56d31..9a00560 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,7 @@ # java-jflex +JFlex is a lexical analyzer generator (also known as scanner generator) for Java(tm), written in Java(tm). It is also a rewrite of the very useful tool JLex which was developed by Elliot Berk at Princeton University. +As Vern Paxson states for his C/C++ tool flex: They do not share any code though. + +JFlex is designed to work together with the LALR parser generator CUP by Scott Hudson, and the Java modification of Berkeley Yacc BYacc/J by Bob Jamison. It can also be used together with other parser generators like ANTLR or as a standalone tool. + diff --git a/java-jflex-1.4.1-build_xml.patch b/java-jflex-1.4.1-build_xml.patch new file mode 100644 index 0000000..b941382 --- /dev/null +++ b/java-jflex-1.4.1-build_xml.patch @@ -0,0 +1,32 @@ +--- jflex-1.4.1/src/build.xml 2004-05-20 01:37:43.000000000 +0200 ++++ jflex-1.4.1/src/build.xml-gil 2009-03-02 15:24:58.000000000 +0100 +@@ -59,7 +59,14 @@ + description="compile all classes"> + ++ ++ ++ ++ + +@@ -93,6 +100,13 @@ + + + ++ ++ ++ ++ + + + diff --git a/java-jflex-1.4.1-byaccj.patch b/java-jflex-1.4.1-byaccj.patch new file mode 100644 index 0000000..8053ab0 --- /dev/null +++ b/java-jflex-1.4.1-byaccj.patch @@ -0,0 +1,12 @@ +--- jflex-1.4.1/examples/byaccj/README 2003-01-07 16:30:17.000000000 +0100 ++++ jflex-1.4.1/examples/byaccj/README-gil 2009-03-02 18:31:10.000000000 +0100 +@@ -1,8 +1,7 @@ + This directory contains an interoperability example for BYacc/J and JFlex + (a small calculator) + +-You need the parser generator byacc/j from +-http://troi.lincom-asg.com/~rjamison/byacc/ ++You need the parser generator byacc/j from http://byaccj.sourceforge.net/ + for this example to work (version byacc/j 1.1 has been tested). + + Use the Makefile to generate the lexer and parser. diff --git a/java-jflex-1.4.1-classpath.patch b/java-jflex-1.4.1-classpath.patch new file mode 100644 index 0000000..3dcb950 --- /dev/null +++ b/java-jflex-1.4.1-classpath.patch @@ -0,0 +1,36 @@ +--- jflex-1.4.1/src/build.xml 2009-03-02 18:43:48.000000000 +0100 ++++ jflex-1.4.1/src/build.xml-gil 2009-03-02 18:49:32.000000000 +0100 +@@ -7,10 +7,10 @@ + + + +- ++ + + +- ++ + + + +@@ -25,7 +25,6 @@ + + + +- + + + +@@ -38,12 +37,6 @@ + + + +- +- +- +- +- +- + + + diff --git a/java-jflex-1.4.1-cup-anttask.patch b/java-jflex-1.4.1-cup-anttask.patch new file mode 100644 index 0000000..621fc3e --- /dev/null +++ b/java-jflex-1.4.1-cup-anttask.patch @@ -0,0 +1,29 @@ +--- jflex-1.4.1/src/build.xml 2009-03-02 18:38:52.000000000 +0100 ++++ jflex-1.4.1/src/build.xml-gil 2009-03-02 18:42:35.000000000 +0100 +@@ -7,7 +7,7 @@ + + + +- ++ + + + +@@ -35,7 +35,7 @@ + + + +- ++ + + + +@@ -76,7 +76,7 @@ + + + +- ++ + + + diff --git a/java-jflex-1.4.1-no-cup-no-jflex.patch b/java-jflex-1.4.1-no-cup-no-jflex.patch new file mode 100644 index 0000000..11ddf89 --- /dev/null +++ b/java-jflex-1.4.1-no-cup-no-jflex.patch @@ -0,0 +1,47 @@ +--- jflex-1.4.1/src/build.xml 2009-03-02 15:32:03.000000000 +0100 ++++ jflex-1.4.1/src/build.xml-gil 2009-03-02 15:37:29.000000000 +0100 +@@ -25,7 +25,6 @@ + + + +- + + + +@@ -38,12 +37,6 @@ + + + +- +- +- +- +- +- + + + +@@ -55,7 +48,7 @@ + + +- + + + +- +- +- +- +- +- +- +- + + + diff --git a/java-jflex.script b/java-jflex.script new file mode 100644 index 0000000..74ee0cd --- /dev/null +++ b/java-jflex.script @@ -0,0 +1,27 @@ +#!/bin/sh +# +# jflex script +# JPackage Project + +# Source functions library +if [ -f /usr/share/java-utils/java-functions ] ; then + . /usr/share/java-utils/java-functions +else + echo "Can't find functions library, aborting" + exit 1 +fi + +# Configuration +MAIN_CLASS="JFlex.Main" +BASE_FLAGS="" +BASE_OPTIONS="" +BASE_JARS="jflex" + +# Set parameters +set_jvm +set_classpath $BASE_JARS +set_flags $BASE_FLAGS +set_options $BASE_OPTIONS + +# Let's start +run "$@" diff --git a/java-jflex.spec b/java-jflex.spec new file mode 100644 index 0000000..5109ea2 --- /dev/null +++ b/java-jflex.spec @@ -0,0 +1,149 @@ +%define bootstrap 0 +Name: java-jflex +Version: 1.4.1 +Release: 4mamba +Summary: JFlex - The Fast Scanner Generator for Java +Group: Development/Libraries/Java +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://jflex.de/ +Source0: http://jflex.de/jflex-%{version}.tar.gz +Source1: java-jflex.script +Patch0: java-jflex-1.4.1-build_xml.patch +Patch1: java-jflex-1.4.1-no-cup-no-jflex.patch +Patch2: java-jflex-1.4.1-cup-anttask.patch +Patch3: java-jflex-1.4.1-classpath.patch +Patch4: java-jflex-1.4.1-byaccj.patch +License: GPL +BuildRequires: apache-ant +BuildRequires: java_cup +BuildRequires: java-junit3 +BuildRequires: jpackage-utils +BuildRequires: sinjdoc +Requires: java_cup +Requires: jpackage-utils +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +JFlex is a lexical analyzer generator (also known as scanner generator) for Java(tm), written in Java(tm). It is also a rewrite of the very useful tool JLex which was developed by Elliot Berk at Princeton University. +As Vern Paxson states for his C/C++ tool flex: They do not share any code though. + +JFlex is designed to work together with the LALR parser generator CUP by Scott Hudson, and the Java modification of Berkeley Yacc BYacc/J by Bob Jamison. It can also be used together with other parser generators like ANTLR or as a standalone tool. + +%package javadoc +Group: Documentation +Summary: Javadoc for %{name} + +%description javadoc +JFlex is a lexical analyzer generator (also known as scanner generator) for Java(tm), written in Java(tm). It is also a rewrite of the very useful tool JLex which was developed by Elliot Berk at Princeton University. +As Vern Paxson states for his C/C++ tool flex: They do not share any code though. + +This package contains Javadoc for %{name}. + +%prep +#rm -rf jflex* +%setup -q -n jflex-%{version} +%patch0 -p1 +%if ! %bootstrap +%patch1 -p1 +%else +%patch2 -p1 +%patch3 -p1 +sed -i "s|_JAVA-DIR_|%{_javadir}|" src/build.xml +%patch4 -p1 + +%endif +rm -rf src/java_cup +#find . -name "*.class" -exec rm {} \; + +for j in $(find . -name "*.jar"); do + mv $j ${j}.no +done + +sed -i 's/\r//' COPYRIGHT + +%build + +pushd src + %if ! %bootstrap + # bootstrap generated JFlex.jar + CLASSPATH=$(build-classpath java-cup java-cup-runtime junit-3.8.2) \ + ant jar-bootstrap + # rebuilding using the JFlex.jar + CLASSPATH=$(build-classpath java-cup java-cup-runtime junit-3.8.2):../lib/JFlex.jar \ + ant \ + genclean libclean \ + jar + + %else + CLASSPATH=$(build-classpath java-cup java_cup-runtime junit-3.8.2) \ + ant jar + %endif + mkdir -p ../dist/docs/api + sinjdoc -d ../dist/docs/api \ + -classpath $(build-classpath junit-3.8.2 ant-1.7.1):lib/JFlex.jar \ + -encoding iso-8859-1 \ + -sourcepath . JFlex \ + -doctitle 'JFlex %{version} API' \ + `find src -name '*.java'` +popd + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +mkdir -p %{buildroot}%{_javadir} + +install -pm 644 lib/JFlex.jar \ + %{buildroot}%{_javadir}/jflex-%{version}.jar + +( cd %{buildroot}%{_javadir} + for jar in *-%{version}.jar; do + ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"` + done + ln -s jflex.jar JFlex.jar +) + +mkdir -p %{buildroot}%{_javadocdir}/jflex-%{version} + +cp -pr dist/docs/api/* %{buildroot}%{_javadocdir}/jflex-%{version} +ln -s jflex-%{version} %{buildroot}%{_javadocdir}/jflex + +mkdir -p %{buildroot}%{_bindir} +install -m 755 %{S:1} %{buildroot}%{_bindir}/jflex + +rm -rf doc/COPYRIGHT + +perl -pi -e 's/\r$//g' examples/standalone/sample.inp + +#%{_bindir}/aot-compile-rpm + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +%{_bindir}/jflex +%{_javadir}/jflex-%{version}.jar +%{_javadir}/jflex.jar +%{_javadir}/JFlex.jar +%doc COPYRIGHT doc/* +%doc examples src/README src/changelog + +%files javadoc +%defattr(-,root,root) +%{_javadocdir}/jflex-%{version} +%{_javadocdir}/jflex + +%changelog +* Thu Nov 25 2010 gil 1.4.1-4mamba +- rebuilt devel + +* Mon Mar 02 2009 gil 1.4.1-3mamba +- fixed some bugs + +* Mon Mar 02 2009 gil 1.4.1-2mamba +- rebuilt + +* Mon Mar 02 2009 gil 1.4.1-1mamba +- package created by autospec