[main] Removing invalid dependencies from `java-cup-bootstrap`. (#2634)

* Removing invalid dependencies.

* remove unneeded java-flex-bootstrap BR to fix build cycle

* revert java-cup to 11a

* fix cgmanifest + typo

Co-authored-by: Cameron Baird <cam.thebaird@gmail.com>
Co-authored-by: Cameron E Baird <cameronbaird@microsoft.com>
This commit is contained in:
Pawel Winogrodzki 2022-04-01 15:38:45 -07:00 коммит произвёл GitHub
Родитель b62bb32bef
Коммит 03ee42cba6
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
10 изменённых файлов: 83 добавлений и 62 удалений

Просмотреть файл

@ -1,7 +1,8 @@
{
"Signatures": {
"java-cup-11b.tar.gz": "7e7720ba0053e8f3253ebfb49802310767fc9ab8c591969649be2077f43ac4a6",
"java-cup-generated-files.tar.xz": "2e0fbaba016eaaf9abca1e4afe2225d952789fc8249183d75f3e8355707859e7",
"java-cup.license": "252a94c415df3c72289293888e70e137ffecef2a7c7823d984eae4e0b6287a6e"
}
"Signatures": {
"develop.tar.bz2": "9a54e59544618844fd5209d40b7832b4623753fd1432bd60bd73cac347d27e69",
"java-cup-generated-files.tar.bz2": "d5c01e033aede7be297485de7d10b1c923f6f1268d4c679d8939285a03027dde",
"java-cup.license": "252a94c415df3c72289293888e70e137ffecef2a7c7823d984eae4e0b6287a6e",
"java-cup.script": "3114c478070cc3cc3921a0d5e00fc6a10c387c4866631a2f1f821d743bb79060"
}
}

Просмотреть файл

@ -15,9 +15,8 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define cvs_version 11b
%define cvs_version 11a
%define real_name java-cup
%define pub_date 20210814
Summary: LALR Parser Generator in Java
Name: java-cup-bootstrap
@ -28,18 +27,19 @@ Group: Development/Libraries/Java
Vendor: Microsoft Corporation
Distribution: Mariner
Url: http://www2.cs.tum.edu/projects/cup/
Source0: https://versioncontrolseidl.in.tum.de/parsergenerators/cup/-/archive/master/cup-master.tar.gz#/java-cup-%{cvs_version}.tar.gz
Source1: java-cup-generated-files.tar.xz
# TODO the version of our 11a source is no longer published
Source0: develop.tar.bz2
Source1: java-cup-generated-files.tar.bz2
Source2: java-cup.license
# From http://www2.cs.tum.edu/projects/cup/
Patch1: java-cup-no-classpath-in-manifest.patch
Patch2: java-cup-no-cup-no-jflex.patch
Patch3: java-cup-classpath.patch
# Missing symbolFactory initialization in lr_parser, causes sinjdoc to crash
Patch4: java-cup-lr_parser-constructor.patch
BuildRequires: ant
BuildRequires: git
BuildRequires: java-cup-bootstrap
BuildRequires: java-devel
BuildRequires: jflex-bootstrap
BuildRequires: javapackages-local-bootstrap
BuildRequires: xml-commons-apis-bootstrap
BuildRequires: xml-commons-resolver-bootstrap
@ -47,8 +47,6 @@ BuildRequires: xml-commons-resolver-bootstrap
#!BuildIgnore: xerces-j2
#!BuildIgnore: xml-commons-apis
#!BuildIgnore: xml-commons-resolver
Obsoletes: java-cup-bootstrap < %{version}-%{release}
Provides: java-cup-bootstrap = %{version}-%{release}
Conflicts: java-cup
BuildArch: noarch
@ -62,14 +60,14 @@ java-cup is a LALR Parser Generator in Java. With v0.11, you can:
* have Your own symbol classes
%prep
%setup -q -n cup-master
%setup -q -n develop
%patch1 -p1
%setup -q -T -D -a 1 -n cup-master
%setup -q -T -D -a 1 -n develop
%patch2 -p1
# remove all binary files
find -name "*.class" -delete
find -name "*.jar" -delete
mkdir -p target/classes
%patch4 -p1
perl -pi -e 's/1\.2/1.6/g' build.xml
mkdir -p classes dist
cp %{SOURCE2} license.txt
%build
export CLASSPATH=
@ -81,8 +79,8 @@ cp %{SOURCE2} license.txt
%install
# jar
mkdir -p %{buildroot}%{_javadir}
cp -a target/dist/%{real_name}-%{cvs_version}.jar %{buildroot}%{_javadir}/%{real_name}-%{version}.jar
cp -a target/dist/%{real_name}-%{cvs_version}-runtime.jar %{buildroot}%{_javadir}/%{real_name}-runtime-%{version}.jar
cp -a dist/%{real_name}-%{cvs_version}.jar %{buildroot}%{_javadir}/%{real_name}-%{version}.jar
cp -a dist/%{real_name}-%{cvs_version}-runtime.jar %{buildroot}%{_javadir}/%{real_name}-runtime-%{version}.jar
pushd %{buildroot}%{_javadir}
for jar in *-%{version}*; do
@ -97,14 +95,13 @@ mkdir -p %{buildroot}%{_bindir}
install -p -m 755 %{SOURCE1} %{buildroot}%{_bindir}/%{real_name}
%files
%doc changelog.txt license.txt
%license license.txt
%doc changelog.txt
%attr(0755,root,root) %{_bindir}/%{real_name}
%{_javadir}/*
%changelog
* Thu Mar 24 2022 Cameron Baird <cameronbaird@microsoft.com> - 0.11-31
- Update to version 0.11b, published 20210814
- Clean up old/deprecated patches
- separate into bootstrap and non-bootstrap specs
- License verified

Просмотреть файл

@ -1,13 +1,15 @@
--- develop/build.xml.orig 2006-09-09 06:16:46.000000000 +0200
+++ develop/build.xml 2006-09-09 06:20:38.000000000 +0200
diff --git a/build.xml b/build.xml
index b4ec6382..e213cf0e 100644
--- a/build.xml
+++ b/build.xml
@@ -40,8 +40,8 @@
<delete dir="${dist}" />
</target>
- <taskdef name="cup" classname="java_cup.anttask.CUPTask" classpath="${bin}/java-cup-11.jar" />
- <taskdef name="jflex" classname="JFlex.anttask.JFlexTask" classpath="${bin}/JFlex.jar" />
+ <taskdef name="cup" classname="java_cup.anttask.CUPTask" classpath="/usr/share/java/java-cup.jar" />
+ <taskdef name="jflex" classname="jflex.anttask.JFlexTask" classpath="/usr/share/java/jflex.jar" />
+ <taskdef name="cup" classname="java_cup.anttask.CUPTask" classpath="/usr/share/java/java-cup-11.jar" />
+ <taskdef name="jflex" classname="JFlex.anttask.JFlexTask" classpath="/usr/share/java/JFlex.jar" />
<target name="cup" depends="init">
<cup srcfile="${cup}/parser.cup" interface="on" destdir="${java}" parser="parser" symbols="sym" quiet="false" nonterms="true"/>

Просмотреть файл

@ -0,0 +1,20 @@
diff --git a/src/java_cup/runtime/lr_parser.java b/src/java_cup/runtime/lr_parser.java
index 89068e10..f247dc80 100644
--- a/src/java_cup/runtime/lr_parser.java
+++ b/src/java_cup/runtime/lr_parser.java
@@ -121,6 +121,7 @@ public abstract class lr_parser {
* Simple constructor.
*/
public lr_parser() {
+ symbolFactory = new DefaultSymbolFactory();
}
/**
@@ -133,7 +134,6 @@ public abstract class lr_parser {
* Constructor that sets the default scanner and a SymbolFactory
*/
public lr_parser(Scanner s, SymbolFactory symfac) {
- this(); // in case default constructor someday does something
symbolFactory = symfac;
setScanner(s);
}

Просмотреть файл

@ -1,15 +1,12 @@
diff --git a/build.xml b/build.xml
index 705edd6d..b4ec6382 100644
--- a/build.xml
+++ b/build.xml
@@ -67,12 +67,10 @@
<jar jarfile="${dist}/java-cup-11b.jar" basedir="${classes}">
@@ -62,7 +62,6 @@
<jar jarfile="${dist}/java-cup-11a.jar" basedir="${classes}">
<manifest>
<attribute name="Main-Class" value="java_cup/Main" />
- <attribute name="Class-Path" value="java-cup-11b-runtime.jar" />
- <attribute name="Class-Path" value="java-cup-11a-runtime.jar" />
</manifest>
</jar>
<jar jarfile="${dist}/java-cup-11b-runtime.jar" basedir="${classes}" includes="java_cup/runtime/**">
<manifest>
- <attribute name="Class-Path" value="commons-jxpath-1.3.jar" />
</manifest>
</jar>
<tar longfile="gnu" destfile="${dist}/java-cup-bin-11b-${cupversion}.tar.gz" compression="gzip">
<jar jarfile="${dist}/java-cup-11a-runtime.jar" basedir="${classes}" includes="java_cup/runtime/*">

Просмотреть файл

@ -1,8 +1,8 @@
diff --git a/build.xml b/build.xml
index da94ed35..53f7b430 100644
index b4ec6382..d017546f 100644
--- a/build.xml
+++ b/build.xml
@@ -64,18 +64,7 @@
@@ -40,18 +40,7 @@
<delete dir="${dist}" />
</target>
@ -19,6 +19,6 @@ index da94ed35..53f7b430 100644
-
- <target name="compile" depends="jflex">
+ <target name="compile">
<replace file="${java}/java_cup/version.java"
token="+ version_str"
value='+ "v0.11b ${cupversion} (GIT ${svnversion})"'>
<copy todir="${java}"><fileset dir="${src}"></fileset></copy>
<javac srcdir="${java}" destdir="${classes}" verbose="off" listfiles="off" debug="on" source="1.2" target="1.2">
<classpath refid="libraries"/>

Просмотреть файл

@ -1,7 +1,8 @@
{
"Signatures": {
"java-cup-11b.tar.gz": "7e7720ba0053e8f3253ebfb49802310767fc9ab8c591969649be2077f43ac4a6",
"java-cup-generated-files.tar.xz": "2e0fbaba016eaaf9abca1e4afe2225d952789fc8249183d75f3e8355707859e7",
"java-cup.license": "252a94c415df3c72289293888e70e137ffecef2a7c7823d984eae4e0b6287a6e"
"develop.tar.bz2": "9a54e59544618844fd5209d40b7832b4623753fd1432bd60bd73cac347d27e69",
"java-cup-generated-files.tar.bz2": "d5c01e033aede7be297485de7d10b1c923f6f1268d4c679d8939285a03027dde",
"java-cup.license": "252a94c415df3c72289293888e70e137ffecef2a7c7823d984eae4e0b6287a6e",
"java-cup.script": "3114c478070cc3cc3921a0d5e00fc6a10c387c4866631a2f1f821d743bb79060"
}
}

Просмотреть файл

@ -15,9 +15,8 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define cvs_version 11b
%define cvs_version 11a
%define real_name java-cup
%define pub_date 20210814
Summary: LALR Parser Generator in Java
Name: java-cup
@ -28,19 +27,23 @@ Group: Development/Libraries/Java
Vendor: Microsoft Corporation
Distribution: Mariner
Url: http://www2.cs.tum.edu/projects/cup/
Source0: http://www2.cs.tum.edu/projects/cup/releases/%{name}-src-%{cvs_version}-%{pub_date}.tar.gz#/%{name}-%{cvs_version}.tar.gz
Source1: java-cup-generated-files.tar.xz
# TODO the version of our 11a source is no longer published
Source0: develop.tar.bz2
Source1: java-cup-generated-files.tar.bz2
Source2: java-cup.license
# From http://www2.cs.tum.edu/projects/cup/
Patch1: java-cup-no-classpath-in-manifest.patch
Patch2: java-cup-no-cup-no-jflex.patch
Patch3: java-cup-classpath.patch
# Missing symbolFactory initialization in lr_parser, causes sinjdoc to crash
Patch4: java-cup-lr_parser-constructor.patch
BuildRequires: ant
BuildRequires: git
BuildRequires: java-cup-bootstrap
BuildRequires: java-devel
BuildRequires: jflex-bootstrap
BuildRequires: javapackages-local-bootstrap
BuildRequires: javapackages-tools
BuildRequires: xml-commons-apis-bootstrap
BuildRequires: xml-commons-resolver-bootstrap
#!BuildIgnore: xalan-j2
@ -58,7 +61,7 @@ BuildArch: noarch
%description
java-cup is a LALR Parser Generator in Java. With v0.11, you can:
* use CUP in an Ant-Target
* start CUP by a simple command like java -jar java-cup-11a.jar
* start CUP by a simple command like java -jar java-cup.jar
myGrammar.cup
* use generic parametrized classes (since Java 1.5) as datatypes for
non terminals and terminals
@ -71,7 +74,7 @@ Group: Development/Libraries/Java
%description manual
java-cup is a LALR Parser Generator in Java. With v0.11, you can:
* use CUP in an Ant-Target
* start CUP by a simple command like java -jar java-cup-11a.jar
* start CUP by a simple command like java -jar java-cup.jar
myGrammar.cup
* use generic parametrized classes (since Java 1.5) as datatypes for
non
@ -79,14 +82,15 @@ java-cup is a LALR Parser Generator in Java. With v0.11, you can:
* have Your own symbol classes
%prep
%setup -q -n cup-master
%setup -q -n develop
%patch1 -p1
%patch3 -p1
# remove all binary files
find -name "*.class" -delete
find -name "*.jar" -delete
mkdir -p target/classes
%patch4 -p1
perl -pi -e 's/1\.2/1.6/g' build.xml
mkdir -p classes dist
cp %{SOURCE2} license.txt
%build
@ -97,8 +101,8 @@ ant
%install
# jar
mkdir -p %{buildroot}%{_javadir}
cp -a target/dist/%{real_name}-%{cvs_version}.jar %{buildroot}%{_javadir}/%{real_name}-%{version}.jar
cp -a target/dist/%{real_name}-%{cvs_version}-runtime.jar %{buildroot}%{_javadir}/%{real_name}-runtime-%{version}.jar
cp -a dist/%{real_name}-%{cvs_version}.jar %{buildroot}%{_javadir}/%{real_name}-%{version}.jar
cp -a dist/%{real_name}-%{cvs_version}-runtime.jar %{buildroot}%{_javadir}/%{real_name}-runtime-%{version}.jar
pushd %{buildroot}%{_javadir}
for jar in *-%{version}*; do
@ -113,7 +117,8 @@ mkdir -p %{buildroot}%{_bindir}
install -p -m 755 %{SOURCE1} %{buildroot}%{_bindir}/%{real_name}
%files
%doc changelog.txt license.txt
%license license.txt
%doc changelog.txt
%attr(0755,root,root) %{_bindir}/%{real_name}
%{_javadir}/*
@ -122,8 +127,6 @@ install -p -m 755 %{SOURCE1} %{buildroot}%{_bindir}/%{real_name}
%changelog
* Thu Mar 24 2022 Cameron Baird <cameronbaird@microsoft.com> - 0.11-31
- Update to version 0.11b, published 20210814
- Clean up old/deprecated patches
- separate into bootstrap and non-bootstrap specs
- License verified

Просмотреть файл

@ -33,7 +33,7 @@ BuildRequires: ant
BuildRequires: java-cup-bootstrap
BuildRequires: java-devel
BuildRequires: javapackages-local-bootstrap
Requires: java_cup
Requires: java-cup-bootstrap
Requires: javapackages-tools
BuildArch: noarch
Conflicts: jflex

Просмотреть файл

@ -7812,7 +7812,7 @@
"other": {
"name": "java-cup",
"version": "0.11",
"downloadUrl": "https://versioncontrolseidl.in.tum.de/parsergenerators/cup/-/archive/master/cup-master.tar.gz"
"downloadUrl": "https://cblmarinerstorage.blob.core.windows.net/sources/core/develop.tar.bz2"
}
}
},
@ -7822,7 +7822,7 @@
"other": {
"name": "java-cup-bootstrap",
"version": "0.11",
"downloadUrl": "https://versioncontrolseidl.in.tum.de/parsergenerators/cup/-/archive/master/cup-master.tar.gz"
"downloadUrl": "https://cblmarinerstorage.blob.core.windows.net/sources/core/develop.tar.bz2"
}
}
},