Sync from SUSE:ALP:Source:Standard:1.0 jflex revision 79cfa18d6997eb573a820827fbd8438b
This commit is contained in:
commit
683e0fade1
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -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
|
4
_multibuild
Normal file
4
_multibuild
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>jflex-bootstrap</package>
|
||||||
|
</multibuild>
|
||||||
|
|
BIN
jflex-1.8.2-generated-files.tar.xz
(Stored with Git LFS)
Normal file
BIN
jflex-1.8.2-generated-files.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
19
jflex-1.8.2-no-auto-value.patch
Normal file
19
jflex-1.8.2-no-auto-value.patch
Normal file
@ -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();
|
BIN
jflex-1.8.2.tar.gz
(Stored with Git LFS)
Normal file
BIN
jflex-1.8.2.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
110
jflex-bootstrap.changes
Normal file
110
jflex-bootstrap.changes
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Oct 25 18:27:04 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Build with source and target levels 8
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu May 4 13:37:10 UTC 2023 - Frederic Crozat <fcrozat@suse.com>
|
||||||
|
|
||||||
|
- 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 <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Build against the standalone JavaEE modules unconditionally
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Mar 17 15:42:32 UTC 2022 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- 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 <fstrba@suse.com>
|
||||||
|
|
||||||
|
- 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)
|
||||||
|
|
149
jflex-bootstrap.spec
Normal file
149
jflex-bootstrap.spec
Normal file
@ -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
|
84
jflex-build.xml
Normal file
84
jflex-build.xml
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<project name="jflex" default="package" basedir=".">
|
||||||
|
|
||||||
|
<!-- ====================================================================== -->
|
||||||
|
<!-- Build environment properties -->
|
||||||
|
<!-- ====================================================================== -->
|
||||||
|
|
||||||
|
<property file="build.properties"/>
|
||||||
|
|
||||||
|
<property name="project.artifactId" value="jflex"/>
|
||||||
|
<property name="project.version" value="1.8.2"/>
|
||||||
|
|
||||||
|
<property name="build.finalName" value="${project.artifactId}-${project.version}"/>
|
||||||
|
<property name="build.dir" value="target"/>
|
||||||
|
<property name="build.outputDir" value="${build.dir}/classes"/>
|
||||||
|
<property name="build.srcDir" value="src/main/java"/>
|
||||||
|
<property name="build.resourceDir" value="src/main/resources"/>
|
||||||
|
|
||||||
|
<property name="compiler.source" value="1.8"/>
|
||||||
|
<property name="compiler.target" value="${compiler.source}"/>
|
||||||
|
|
||||||
|
<!-- ====================================================================== -->
|
||||||
|
<!-- Defining classpaths -->
|
||||||
|
<!-- ====================================================================== -->
|
||||||
|
|
||||||
|
<path id="build.classpath">
|
||||||
|
<fileset dir="lib">
|
||||||
|
<include name="**/*.jar"/>
|
||||||
|
</fileset>
|
||||||
|
</path>
|
||||||
|
|
||||||
|
<!-- ====================================================================== -->
|
||||||
|
<!-- Cleaning up target -->
|
||||||
|
<!-- ====================================================================== -->
|
||||||
|
|
||||||
|
<target name="clean" description="Clean the output directory">
|
||||||
|
<delete dir="${build.dir}"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<!-- ====================================================================== -->
|
||||||
|
<!-- Compilation target -->
|
||||||
|
<!-- ====================================================================== -->
|
||||||
|
|
||||||
|
<target name="compile" description="Compile the code">
|
||||||
|
<mkdir dir="${build.outputDir}"/>
|
||||||
|
<javac destdir="${build.outputDir}"
|
||||||
|
nowarn="false"
|
||||||
|
debug="true"
|
||||||
|
encoding="utf8"
|
||||||
|
optimize="false"
|
||||||
|
deprecation="true"
|
||||||
|
target="${compiler.target}"
|
||||||
|
verbose="false"
|
||||||
|
fork="false"
|
||||||
|
source="${compiler.source}">
|
||||||
|
<src>
|
||||||
|
<pathelement location="${build.srcDir}"/>
|
||||||
|
</src>
|
||||||
|
<classpath refid="build.classpath"/>
|
||||||
|
</javac>
|
||||||
|
<copy todir="${build.outputDir}">
|
||||||
|
<fileset dir="${build.resourceDir}"/>
|
||||||
|
</copy>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<!-- ====================================================================== -->
|
||||||
|
<!-- Package target -->
|
||||||
|
<!-- ====================================================================== -->
|
||||||
|
|
||||||
|
<target name="package" depends="compile" description="Package the application">
|
||||||
|
<jar jarfile="${build.dir}/${build.finalName}.jar"
|
||||||
|
compress="true"
|
||||||
|
index="false"
|
||||||
|
basedir="${build.outputDir}"
|
||||||
|
excludes="**/package.html">
|
||||||
|
<manifest>
|
||||||
|
<attribute name="Main-Class"
|
||||||
|
value="jflex.Main"/>
|
||||||
|
</manifest>
|
||||||
|
</jar>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
</project>
|
110
jflex.changes
Normal file
110
jflex.changes
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Oct 25 18:27:04 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Build with source and target levels 8
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu May 4 13:37:10 UTC 2023 - Frederic Crozat <fcrozat@suse.com>
|
||||||
|
|
||||||
|
- 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 <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Build against the standalone JavaEE modules unconditionally
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Mar 17 15:42:32 UTC 2022 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- 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 <fstrba@suse.com>
|
||||||
|
|
||||||
|
- 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)
|
||||||
|
|
148
jflex.spec
Normal file
148
jflex.spec
Normal file
@ -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
|
14
pre_checkin.sh
Normal file
14
pre_checkin.sh
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user