From 2946bcb0e7be540384957ab45c32a5c21b401457 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Mon, 27 Jan 2014 12:54:18 +0100 Subject: [PATCH] Update to upstream version 1.5.0 --- .gitignore | 1 + create-tarball.sh | 2 +- jflex-1.4.3.pom | 62 ------------------------- jflex-build_xml.patch | 32 ------------- jflex-junit-incompatibility.patch | 12 ----- jflex.spec | 75 ++++++++----------------------- sources | 2 +- 7 files changed, 21 insertions(+), 165 deletions(-) delete mode 100644 jflex-1.4.3.pom delete mode 100644 jflex-build_xml.patch delete mode 100644 jflex-junit-incompatibility.patch diff --git a/.gitignore b/.gitignore index d0de8ee..59cd3d6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ jflex-1.4.1.tar.gz jflex-1.4.3.tar.gz /jflex-1.4.3-clean.tar.gz +/jflex-1.5.0-clean.tar.gz diff --git a/create-tarball.sh b/create-tarball.sh index 81106a8..849de41 100755 --- a/create-tarball.sh +++ b/create-tarball.sh @@ -14,7 +14,7 @@ tar xvf ${NAME}-${VERSION}.tar.gz ( cd ${NAME}-${VERSION} find . -name "*.jar" -delete - rm -Rf src/java_cup/ examples/ + rm -Rf src/main/java/java_cup/ examples/ ) tar czvf ${NAME}-${VERSION}-clean.tar.gz ${NAME}-${VERSION} diff --git a/jflex-1.4.3.pom b/jflex-1.4.3.pom deleted file mode 100644 index fdec8b7..0000000 --- a/jflex-1.4.3.pom +++ /dev/null @@ -1,62 +0,0 @@ - - 4.0.0 - de.jflex - jflex - jar - 1.4.3 - - - - java_cup - java_cup - - - - JFlex - The Fast Scanner Generator for Java - JFlex is a lexical analyzer generator (also known as scanner generator) for Java(tm), written in Java(tm). - 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. - http://jflex.de/ - 1998 - - - GNU General Public License - http://jflex.de/copying.html#GPL - repo - The code generated by JFlex inherits the copyright of the specification it was produced from. If it was your specification, you may use the generated code without restriction. - - - - scm:svn:http://jflex.svn.sourceforge.net/svnroot/jflex - scm:svn:https://jflex.svn.sourceforge.net/svnroot/jflex - http://jflex.svn.sourceforge.net/viewvc/jflex/ - - - - gerwin - Gerwin Klein - lsf@jflex.de - - architect - developer - - - - - SF tracker - http://sourceforge.net/tracker/?group_id=14929 - - - - jflex-announce - http://lists.sourceforge.net/lists/listinfo/jflex-announce - http://lists.sourceforge.net/lists/listinfo/jflex-announce - http://sourceforge.net/mailarchive/forum.php?forum=jflex-announce - - - jflex-users - http://lists.sourceforge.net/lists/listinfo/jflex-users - http://lists.sourceforge.net/lists/listinfo/jflex-users - http://sourceforge.net/mailarchive/forum.php?forum=jflex-users - - - diff --git a/jflex-build_xml.patch b/jflex-build_xml.patch deleted file mode 100644 index f1f5b46..0000000 --- a/jflex-build_xml.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- src/build.xml.sav 2008-05-28 11:45:28.000000000 +0300 -+++ src/build.xml 2010-01-08 12:22:48.820864187 +0200 -@@ -69,6 +69,14 @@ - classpath=".:${junit.jar}" - debug="on" /> - -+ -+ -+ -+ - - - -@@ -89,6 +97,14 @@ - jarfile="../lib/JFlex.jar" - manifest="manifest"/> - -+ -+ -+ -+ -+ - - - diff --git a/jflex-junit-incompatibility.patch b/jflex-junit-incompatibility.patch deleted file mode 100644 index 4f31a05..0000000 --- a/jflex-junit-incompatibility.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur jflex-1.4.3.orig/src/JFlex/tests/AllTests.java jflex-1.4.3/src/JFlex/tests/AllTests.java ---- jflex-1.4.3.orig/src/JFlex/tests/AllTests.java 2009-01-31 09:52:34.000000000 +0100 -+++ jflex-1.4.3/src/JFlex/tests/AllTests.java 2012-03-12 13:47:35.835005672 +0100 -@@ -32,7 +32,7 @@ - public class AllTests { - - public static void main(String[] args) { -- junit.textui.TestRunner.run(AllTests.class); -+// junit.textui.TestRunner.run(AllTests.class); - } - - public static Test suite() { diff --git a/jflex.spec b/jflex.spec index d71d812..ff8ce74 100644 --- a/jflex.spec +++ b/jflex.spec @@ -1,37 +1,27 @@ -%bcond_with bootstrap - Summary: Fast Scanner Generator Name: jflex -Version: 1.4.3 -Release: 16%{?dist} -Epoch: 0 +Version: 1.5.0 +Release: 1%{?dist} License: GPL+ URL: http://jflex.de/ +BuildArch: noarch + # ./create-tarball.sh %%{version} Source0: %{name}-%{version}-clean.tar.gz -Source1: http://repo2.maven.org/maven2/de/jflex/jflex/1.4.3/jflex-1.4.3.pom Source2: %{name}.desktop Source3: %{name}.png Source4: %{name}.1 Source5: create-tarball.sh -Patch0: jflex-build_xml.patch -Patch1: jflex-junit-incompatibility.patch - -# Build-require itself except in bootstrapping mode -%{!?with_bootstrap:BuildRequires: jflex} - BuildRequires: jpackage-utils >= 0:1.5 BuildRequires: ant BuildRequires: emacs +BuildRequires: jflex BuildRequires: junit BuildRequires: java-devel BuildRequires: java_cup BuildRequires: desktop-file-utils Requires: emacs-filesystem >= %{_emacs_version} -Requires: java -Requires: java_cup -BuildArch: noarch %description JFlex is a lexical analyzer generator (also known as scanner @@ -52,55 +42,29 @@ This package provides %{summary}. %prep %setup -q -%patch0 -b .sav -%patch1 -p1 -b .sav +%mvn_file : %{name} +%pom_add_dep java_cup:java_cup -%{__sed} -i 's/\r//' COPYRIGHT -%{__sed} -i 's|includes="JFlex/\*\*,java_cup/\*\*,skeleton|includes="JFlex/\*\*,skeleton|g' src/build.xml +%pom_remove_plugin :maven-antrun-plugin +%pom_remove_plugin :maven-jflex-plugin %build - -pushd src -%if %{with bootstrap} -# intial build using the autogenerated sym.java LexParse.java and LexScan.java -# these are created by the jflex ant task which needs to be built first -export CLASSPATH=$(build-classpath junit java_cup) -ant jar-bootstrap -# now that the JFlex.jar has been build we can use jflex ant tasks -# removing the generated files and rebuilding using the JFlex.jar -export CLASSPATH=${CLASSPATH}:../lib/JFlex.jar -%else -export CLASSPATH=$(build-classpath junit java_cup jflex) -%endif - -ant genclean libclean jar -javadoc -sourcepath . -d ../api JFlex -popd +java -jar /usr/share/java/java_cup.jar -parser LexParse -interface -destdir src/main/java src/main/cup/LexParse.cup +jflex -d src/main/java/jflex --skel src/main/jflex/skeleton.nested src/main/jflex/LexScan.flex +%mvn_build # Compile Emacs jflex-mode source %{_emacs_bytecompile} lib/jflex-mode.el %install -install -d -m 755 %{buildroot}%{_javadir} -install -d -m 755 %{buildroot}%{_mavenpomdir} -install -d -m 755 %{buildroot}%{_javadocdir}/%{name} +%mvn_install + install -d -m 755 %{buildroot}%{_mandir}/man1 install -d -m 755 %{buildroot}%{_emacs_sitelispdir}/%{name} install -d -m 755 %{buildroot}%{_datadir}/pixmaps -# jars -install -p -m 644 lib/JFlex.jar %{buildroot}%{_javadir}/%{name}.jar -ln -sf %{name}.jar %{buildroot}%{_javadir}/JFlex.jar - -# pom -install -pm 644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom -%add_maven_depmap - -# javadoc -cp -pr api/* %{buildroot}%{_javadocdir}/%{name} - # wrapper script for direct execution -%jpackage_script JFlex.Main "" "" jflex:java_cup jflex true +%jpackage_script jflex.Main "" "" jflex:java_cup jflex true # manpage install -p -m 644 %{SOURCE4} %{buildroot}%{_mandir}/man1 @@ -113,15 +77,9 @@ install -p -m 644 %{SOURCE3} %{buildroot}%{_datadir}/pixmaps/%{name}.png install -p -m 644 lib/jflex-mode.el %{buildroot}%{_emacs_sitelispdir}/%{name} install -p -m 644 lib/jflex-mode.elc %{buildroot}%{_emacs_sitelispdir}/%{name} -%pre javadoc -# workaround for rpm bug, can be removed in F-21 -[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \ -rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || : - %files -f .mfiles %doc doc %doc COPYRIGHT -%{_javadir}/JFlex.jar %{_bindir}/%{name} %{_mandir}/man1/%{name}.1.gz %{_datadir}/applications/%{name}.desktop @@ -134,6 +92,9 @@ rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || : %changelog +* Mon Jan 27 2014 Mikolaj Izdebski - 0:1.5.0-1 +- Update to upstream version 1.5.0 + * Fri Aug 02 2013 Michal Srb - 0:1.4.3-16 - Add create-tarball.sh script to SRPM diff --git a/sources b/sources index a4d6b22..fc911c2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d214231ffdeea7f687acc1163bbf8202 jflex-1.4.3-clean.tar.gz +66e82b715db28ae10406085572bd1bfe jflex-1.5.0-clean.tar.gz