commit 683e0fade1021aaa3bb4efaff5dbad62d2f7761d Author: Adrian Schröter Date: Mon Feb 19 15:41:44 2024 +0100 Sync from SUSE:ALP:Source:Standard:1.0 jflex revision 79cfa18d6997eb573a820827fbd8438b diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fecc750 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..1ffd516 --- /dev/null +++ b/_multibuild @@ -0,0 +1,4 @@ + + jflex-bootstrap + + diff --git a/jflex-1.8.2-generated-files.tar.xz b/jflex-1.8.2-generated-files.tar.xz new file mode 100644 index 0000000..301c963 --- /dev/null +++ b/jflex-1.8.2-generated-files.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1d890172db8a2b5c581cc79012e17a64abfbe577aa01970972abe66900c5696f +size 33184 diff --git a/jflex-1.8.2-no-auto-value.patch b/jflex-1.8.2-no-auto-value.patch new file mode 100644 index 0000000..88a72a5 --- /dev/null +++ b/jflex-1.8.2-no-auto-value.patch @@ -0,0 +1,19 @@ +--- jflex/src/main/java/jflex/base/IntPair.java ++++ jflex/src/main/java/jflex/base/IntPair.java +@@ -9,8 +9,6 @@ + + package jflex.base; + +-import com.google.auto.value.AutoValue; +- + /** + * Simple pair of integers. + * +@@ -19,7 +17,6 @@ import com.google.auto.value.AutoValue; + * @author Gerwin Klein + * @version JFlex 1.8.2 + */ +-@AutoValue + public abstract class IntPair { + + public abstract int start(); diff --git a/jflex-1.8.2.tar.gz b/jflex-1.8.2.tar.gz new file mode 100644 index 0000000..339f089 --- /dev/null +++ b/jflex-1.8.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a1e0d25e341d01de6b93ec32b45562905e69d06598113934b74f76b1be7927ab +size 4922218 diff --git a/jflex-bootstrap.changes b/jflex-bootstrap.changes new file mode 100644 index 0000000..4c84422 --- /dev/null +++ b/jflex-bootstrap.changes @@ -0,0 +1,110 @@ +------------------------------------------------------------------- +Wed Oct 25 18:27:04 UTC 2023 - Fridrich Strba + +- Build with source and target levels 8 + +------------------------------------------------------------------- +Thu May 4 13:37:10 UTC 2023 - Frederic Crozat + +- Add _multibuild to define additional spec files as additional + flavors. + Eliminates the need for source package links in OBS. + +------------------------------------------------------------------- +Wed Mar 30 10:16:51 UTC 2022 - Fridrich Strba + +- Build against the standalone JavaEE modules unconditionally + +------------------------------------------------------------------- +Thu Mar 17 15:42:32 UTC 2022 - Fridrich Strba + +- Build against standalone glassfish-annotation-api for relevant + distribution versions that have JDK that does not contain the + JavaEE modules + +------------------------------------------------------------------- +Fri Jan 14 07:05:37 UTC 2022 - Fridrich Strba + +- Upgrade to version 1.8.2 + * fix build with recent java-cup +- Build the bootstrap package using ant with a generated build.xml +- Build the non-bootstrap package using maven, since its dependency + auto is already built with maven +- Added patch: + * jflex-1.8.2-no-auto-value.patch + + do not process auto-value-annotations in bootstrap build + + the generated file is pre-generated outside build for this + variant +- Removed patches: + * jflex-byaccj-utl.patch + * jflex-classpath.patch + * jflex-javac-no-target.patch + * jflex-junit4.patch + * jflex-no-cup-no-jflex.patch + + not needed in this version + +------------------------------------------------------------------- +Wed Oct 4 07:49:17 UTC 2017 - fstrba@suse.com + +- Removed a jflex-lex-scan.patch again, so that bot is happy + +------------------------------------------------------------------- +Tue Oct 3 17:31:18 UTC 2017 - fstrba@suse.com + +- Don't BuildRequire java-1_5_0-gcj-compat-devel, since it will be + soon gone; BuildRequire java-devel +- Build with java source and target level 1.6 to allow building + with jdk9 +- Sync the bootstrap and non-bootstrap spec files using the + jpackage-bootstrap-prepare.sh script and clean spec file + +------------------------------------------------------------------- +Mon Dec 2 12:44:19 UTC 2013 - mvyskocil@suse.com + +- conflict the non-bootstrap variant with the bootstrap variant + +------------------------------------------------------------------- +Thu Nov 14 12:31:24 UTC 2013 - mvyskocil@suse.com + +- Fix build with junit 4 + * jflex-junit4.patch + +------------------------------------------------------------------- +Mon Sep 9 11:06:00 UTC 2013 - tchvatal@suse.com + +- Move from jpackage-utils to javapackage-tools + +------------------------------------------------------------------- +Mon Aug 26 12:18:15 UTC 2013 - mvyskocil@suse.com + +- don't build tests when bootstrapping +- properly synchronized both spec files +- drop antlr-bootstrap dependency, it's pointless withouth javadoc + +------------------------------------------------------------------- +Fri Aug 23 09:06:21 UTC 2013 - mvyskocil@suse.com + +- don't build javadoc + +------------------------------------------------------------------- +Thu Feb 17 00:59:58 CET 2011 - mvyskocil@suse.cz + +- fix build with antlr-bootstrap + +------------------------------------------------------------------- +Thu May 21 17:11:33 CEST 2009 - mvyskocil@suse.cz + +- Removed a jflex-lex-scan.patch + +------------------------------------------------------------------- +Tue May 5 09:35:07 CEST 2009 - mvyskocil@suse.cz + +- Update to 1.4.3 (bugfix release) +- Build using java-1_5_0-gcj to allow openjdk bootstrap +- Recreated jflex-lex-scan.patch + +------------------------------------------------------------------- +Wed Apr 29 16:16:14 CEST 2009 - mvyskocil@suse.cz + +- Initial packaging of jflex-bootstrap 1.4.2 in SUSE (from jpp5) + diff --git a/jflex-bootstrap.spec b/jflex-bootstrap.spec new file mode 100644 index 0000000..301f353 --- /dev/null +++ b/jflex-bootstrap.spec @@ -0,0 +1,149 @@ +# +# spec file for package jflex-bootstrap +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +##### WARNING: please do not edit this auto generated spec file. Use the jflex.spec! ##### +%global with_bootstrap 1 +%bcond_with bootstrap +Name: jflex-bootstrap +Version: 1.8.2 +Release: 0 +Summary: Lexical Analyzer Generator for Java +License: BSD-3-Clause +Group: Development/Libraries/Java +URL: https://www.jflex.de/ +Source0: http://www.jflex.de/release/jflex-%{version}.tar.gz +Source1: jflex-%{version}-generated-files.tar.xz +Source2: jflex-build.xml +Patch0: jflex-1.8.2-no-auto-value.patch +BuildRequires: ant +BuildRequires: glassfish-annotation-api +BuildRequires: java-devel +BuildRequires: javapackages-local +Requires: java_cup +Requires: javapackages-tools +BuildArch: noarch +%if %{without bootstrap} +BuildRequires: fdupes +BuildRequires: java-cup +BuildRequires: jflex-bootstrap +BuildRequires: maven-local +BuildRequires: mvn(com.google.auto.value:auto-value) +BuildRequires: mvn(com.google.auto.value:auto-value-annotations) +Conflicts: jflex-bootstrap +%else +BuildRequires: java-cup-bootstrap +Conflicts: jflex +%endif + +%description +JFlex is a lexical analyzer generator for Java written in Java. 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. + +Design goals The main design goals of JFlex are: + + * Full unicode support + * Fast generated scanners + * Fast scanner generation + * Convenient specification syntax + * Platform independence + * JLex compatibility + +%if %without bootstrap +%package javadoc +Summary: API documentation for %{name} +Provides: %{name}-doc = %{version}-%{release} +Obsoletes: %{name}-doc < %{version}-%{release} + +%description javadoc +This package provides %{summary}. + +%endif + +%prep +%setup -q -n jflex-%{version} +find . -name '*.jar' -print -delete +find . -name '.gitignore' -print -delete +rm -rf src/generated +%pom_remove_plugin :jflex-maven-plugin +%pom_remove_plugin :cup-maven-plugin +%pom_remove_plugin :maven-shade-plugin +%pom_remove_plugin :jacoco-maven-plugin + +%pom_xpath_remove "pom:plugin[pom:artifactId='maven-site-plugin']" parent.xml +%pom_xpath_remove "pom:plugin[pom:artifactId='fmt-maven-plugin']" parent.xml +%pom_xpath_remove "pom:plugin[pom:artifactId='cup-maven-plugin']" parent.xml +%pom_xpath_remove "pom:plugin[pom:artifactId='maven-shade-plugin']" parent.xml +%pom_xpath_remove "pom:plugin[pom:artifactId='jacoco-maven-plugin']" parent.xml + +%pom_xpath_set pom:project/pom:properties/pom:jflex.jdk.version 1.8 parent.xml + +%if %{with bootstrap} +%setup -q -T -D -a 1 -n jflex-%{version} +cp %{SOURCE2} build.xml +mkdir -p lib +%patch0 -p1 +build-jar-repository -s lib java-cup-runtime glassfish-annotation-api +%else +%{mvn_file} : %{name} JFlex +%endif + +%build +%if %{with bootstrap} +%{ant} package +%else +java-cup -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} -f +%endif + +%install + +%if %{with bootstrap} +# jar +mkdir -p %{buildroot}%{_javadir} +cp -a target/jflex-%{version}.jar %{buildroot}%{_javadir}/jflex.jar + +# compatibility symlink +(cd %{buildroot}%{_javadir} && ln -s jflex.jar JFlex.jar) +%else +%mvn_install +%fdupes -s %{buildroot}/%{_javadocdir}/%{name} +%endif + +%jpackage_script jflex.Main "" "" jflex:java-cup jflex true + +%if %{with bootstrap} +%files +%{_javadir}/jflex.jar +%{_javadir}/JFlex.jar +%else + +%files -f .mfiles +%endif +%license src/main/resources/LICENSE_JFLEX +%doc README.md changelog.md +%attr(0755,root,root) %{_bindir}/jflex + +%if %without bootstrap +%files javadoc -f .mfiles-javadoc +%license src/main/resources/LICENSE_JFLEX +%endif + +%changelog diff --git a/jflex-build.xml b/jflex-build.xml new file mode 100644 index 0000000..23f405e --- /dev/null +++ b/jflex-build.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jflex.changes b/jflex.changes new file mode 100644 index 0000000..4c84422 --- /dev/null +++ b/jflex.changes @@ -0,0 +1,110 @@ +------------------------------------------------------------------- +Wed Oct 25 18:27:04 UTC 2023 - Fridrich Strba + +- Build with source and target levels 8 + +------------------------------------------------------------------- +Thu May 4 13:37:10 UTC 2023 - Frederic Crozat + +- Add _multibuild to define additional spec files as additional + flavors. + Eliminates the need for source package links in OBS. + +------------------------------------------------------------------- +Wed Mar 30 10:16:51 UTC 2022 - Fridrich Strba + +- Build against the standalone JavaEE modules unconditionally + +------------------------------------------------------------------- +Thu Mar 17 15:42:32 UTC 2022 - Fridrich Strba + +- Build against standalone glassfish-annotation-api for relevant + distribution versions that have JDK that does not contain the + JavaEE modules + +------------------------------------------------------------------- +Fri Jan 14 07:05:37 UTC 2022 - Fridrich Strba + +- Upgrade to version 1.8.2 + * fix build with recent java-cup +- Build the bootstrap package using ant with a generated build.xml +- Build the non-bootstrap package using maven, since its dependency + auto is already built with maven +- Added patch: + * jflex-1.8.2-no-auto-value.patch + + do not process auto-value-annotations in bootstrap build + + the generated file is pre-generated outside build for this + variant +- Removed patches: + * jflex-byaccj-utl.patch + * jflex-classpath.patch + * jflex-javac-no-target.patch + * jflex-junit4.patch + * jflex-no-cup-no-jflex.patch + + not needed in this version + +------------------------------------------------------------------- +Wed Oct 4 07:49:17 UTC 2017 - fstrba@suse.com + +- Removed a jflex-lex-scan.patch again, so that bot is happy + +------------------------------------------------------------------- +Tue Oct 3 17:31:18 UTC 2017 - fstrba@suse.com + +- Don't BuildRequire java-1_5_0-gcj-compat-devel, since it will be + soon gone; BuildRequire java-devel +- Build with java source and target level 1.6 to allow building + with jdk9 +- Sync the bootstrap and non-bootstrap spec files using the + jpackage-bootstrap-prepare.sh script and clean spec file + +------------------------------------------------------------------- +Mon Dec 2 12:44:19 UTC 2013 - mvyskocil@suse.com + +- conflict the non-bootstrap variant with the bootstrap variant + +------------------------------------------------------------------- +Thu Nov 14 12:31:24 UTC 2013 - mvyskocil@suse.com + +- Fix build with junit 4 + * jflex-junit4.patch + +------------------------------------------------------------------- +Mon Sep 9 11:06:00 UTC 2013 - tchvatal@suse.com + +- Move from jpackage-utils to javapackage-tools + +------------------------------------------------------------------- +Mon Aug 26 12:18:15 UTC 2013 - mvyskocil@suse.com + +- don't build tests when bootstrapping +- properly synchronized both spec files +- drop antlr-bootstrap dependency, it's pointless withouth javadoc + +------------------------------------------------------------------- +Fri Aug 23 09:06:21 UTC 2013 - mvyskocil@suse.com + +- don't build javadoc + +------------------------------------------------------------------- +Thu Feb 17 00:59:58 CET 2011 - mvyskocil@suse.cz + +- fix build with antlr-bootstrap + +------------------------------------------------------------------- +Thu May 21 17:11:33 CEST 2009 - mvyskocil@suse.cz + +- Removed a jflex-lex-scan.patch + +------------------------------------------------------------------- +Tue May 5 09:35:07 CEST 2009 - mvyskocil@suse.cz + +- Update to 1.4.3 (bugfix release) +- Build using java-1_5_0-gcj to allow openjdk bootstrap +- Recreated jflex-lex-scan.patch + +------------------------------------------------------------------- +Wed Apr 29 16:16:14 CEST 2009 - mvyskocil@suse.cz + +- Initial packaging of jflex-bootstrap 1.4.2 in SUSE (from jpp5) + diff --git a/jflex.spec b/jflex.spec new file mode 100644 index 0000000..e36e0e6 --- /dev/null +++ b/jflex.spec @@ -0,0 +1,148 @@ +# +# spec file for package jflex +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global _without_bootstrap 1 +%bcond_with bootstrap +Name: jflex +Version: 1.8.2 +Release: 0 +Summary: Lexical Analyzer Generator for Java +License: BSD-3-Clause +Group: Development/Libraries/Java +URL: https://www.jflex.de/ +Source0: http://www.jflex.de/release/jflex-%{version}.tar.gz +Source1: jflex-%{version}-generated-files.tar.xz +Source2: jflex-build.xml +Patch0: jflex-1.8.2-no-auto-value.patch +BuildRequires: ant +BuildRequires: glassfish-annotation-api +BuildRequires: java-devel +BuildRequires: javapackages-local +Requires: java_cup +Requires: javapackages-tools +BuildArch: noarch +%if %{without bootstrap} +BuildRequires: fdupes +BuildRequires: java-cup +BuildRequires: jflex-bootstrap +BuildRequires: maven-local +BuildRequires: mvn(com.google.auto.value:auto-value) +BuildRequires: mvn(com.google.auto.value:auto-value-annotations) +Conflicts: jflex-bootstrap +%else +BuildRequires: java-cup-bootstrap +Conflicts: jflex +%endif + +%description +JFlex is a lexical analyzer generator for Java written in Java. 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. + +Design goals The main design goals of JFlex are: + + * Full unicode support + * Fast generated scanners + * Fast scanner generation + * Convenient specification syntax + * Platform independence + * JLex compatibility + +%if %without bootstrap +%package javadoc +Summary: API documentation for %{name} +Provides: %{name}-doc = %{version}-%{release} +Obsoletes: %{name}-doc < %{version}-%{release} + +%description javadoc +This package provides %{summary}. + +%endif + +%prep +%setup -q -n jflex-%{version} +find . -name '*.jar' -print -delete +find . -name '.gitignore' -print -delete +rm -rf src/generated +%pom_remove_plugin :jflex-maven-plugin +%pom_remove_plugin :cup-maven-plugin +%pom_remove_plugin :maven-shade-plugin +%pom_remove_plugin :jacoco-maven-plugin + +%pom_xpath_remove "pom:plugin[pom:artifactId='maven-site-plugin']" parent.xml +%pom_xpath_remove "pom:plugin[pom:artifactId='fmt-maven-plugin']" parent.xml +%pom_xpath_remove "pom:plugin[pom:artifactId='cup-maven-plugin']" parent.xml +%pom_xpath_remove "pom:plugin[pom:artifactId='maven-shade-plugin']" parent.xml +%pom_xpath_remove "pom:plugin[pom:artifactId='jacoco-maven-plugin']" parent.xml + +%pom_xpath_set pom:project/pom:properties/pom:jflex.jdk.version 1.8 parent.xml + +%if %{with bootstrap} +%setup -q -T -D -a 1 -n jflex-%{version} +cp %{SOURCE2} build.xml +mkdir -p lib +%patch0 -p1 +build-jar-repository -s lib java-cup-runtime glassfish-annotation-api +%else +%{mvn_file} : %{name} JFlex +%endif + +%build +%if %{with bootstrap} +%{ant} package +%else +java-cup -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} -f +%endif + +%install + +%if %{with bootstrap} +# jar +mkdir -p %{buildroot}%{_javadir} +cp -a target/jflex-%{version}.jar %{buildroot}%{_javadir}/jflex.jar + +# compatibility symlink +(cd %{buildroot}%{_javadir} && ln -s jflex.jar JFlex.jar) +%else +%mvn_install +%fdupes -s %{buildroot}/%{_javadocdir}/%{name} +%endif + +%jpackage_script jflex.Main "" "" jflex:java-cup jflex true + +%if %{with bootstrap} +%files +%{_javadir}/jflex.jar +%{_javadir}/JFlex.jar +%else + +%files -f .mfiles +%endif +%license src/main/resources/LICENSE_JFLEX +%doc README.md changelog.md +%attr(0755,root,root) %{_bindir}/jflex + +%if %without bootstrap +%files javadoc -f .mfiles-javadoc +%license src/main/resources/LICENSE_JFLEX +%endif + +%changelog diff --git a/pre_checkin.sh b/pre_checkin.sh new file mode 100644 index 0000000..4a21123 --- /dev/null +++ b/pre_checkin.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +NAME1=jflex +NAME2=jflex-bootstrap +COPY_CHANGES=true + +EDIT_WARNING="##### WARNING: please do not edit this auto generated spec file. Use the ${NAME1}.spec! #####\n" +sed "s/^%global _without_bootstrap.*$/${EDIT_WARNING}%global with_bootstrap 1/; + s/^\(Name:.*\)$/\1-bootstrap/; + " < ${NAME1}.spec > ${NAME2:-${NAME1}-bootstrap}.spec + +if ${COPY_CHANGES}; then + cp ${NAME1}.changes ${NAME2:-${NAME1}-bootstrap}.changes +fi