From 0af37e9612331be5c8fd4eb204734a7e6b1e664008e26e1126194001615f680f Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Wed, 9 Mar 2022 08:58:04 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Java:packages/java-cup?expand=0&rev=24 --- java-cup-bootstrap.changes | 7 +++++++ java-cup-bootstrap.spec | 15 ++++++++++++--- java-cup.changes | 7 +++++++ java-cup.spec | 15 ++++++++++++--- java_cup_v9e.tar.gz | 3 +++ 5 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 java_cup_v9e.tar.gz diff --git a/java-cup-bootstrap.changes b/java-cup-bootstrap.changes index e8b67d5..80e74d8 100644 --- a/java-cup-bootstrap.changes +++ b/java-cup-bootstrap.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Mar 9 08:52:37 UTC 2022 - Fridrich Strba + +- Build and package also the previous API version 0.9e, since the + jump from 0.9 to 0.10 is completely API incompatible and the + build does not require any additional dependencies + ------------------------------------------------------------------- Fri Jan 14 06:59:22 UTC 2022 - Fridrich Strba diff --git a/java-cup-bootstrap.spec b/java-cup-bootstrap.spec index f775d90..b56fba1 100644 --- a/java-cup-bootstrap.spec +++ b/java-cup-bootstrap.spec @@ -22,6 +22,8 @@ %define real_name java-cup %define git_hash d69c832 %define git_date 20210814 +%define compat_name java_cup +%define compat_version 9e %bcond_with bootstrap Name: java-cup-bootstrap Version: 0.11 @@ -32,6 +34,7 @@ Group: Development/Libraries/Java URL: http://www2.cs.tum.edu/projects/cup/ Source0: %{real_name}-%{git_hash}.tar.xz Source1: %{real_name}-generated-files.tar.xz +Source2: https://www.cs.princeton.edu/~appel/modern/java/CUP/%{compat_name}_v%{compat_version}.tar.gz Source100: java-cup-nogit.patch.in Patch0: java-cup-no-classpath-in-manifest.patch Patch1: java-cup-java8.patch @@ -93,6 +96,7 @@ java-cup is a LALR Parser Generator in Java. With v0.11, you can: * %prep %setup -q -n %{real_name}-%{git_hash} +%setup -q -T -D -a 2 -n %{real_name}-%{git_hash}/compat cat %{SOURCE100} | sed 's#@GIT_HASH@#%{git_hash}#g' | sed 's#@GIT_DATE@#%{git_date}#g' | patch -p1 -u -l %patch0 -p1 %patch1 -p1 @@ -104,6 +108,7 @@ cat %{SOURCE100} | sed 's#@GIT_HASH@#%{git_hash}#g' | sed 's#@GIT_DATE@#%{git_da %endif find . -name '*.jar' -print -delete mkdir -p target/classes +mkdir -p compat/classes %build %if %{with bootstrap} @@ -113,21 +118,25 @@ export CLASSPATH=$(build-classpath java-cup jflex) %endif export OPT_JAR_LIST=: ant +pushd compat +javac -d classes -source 1.7 -target 1.7 %{compat_name}/runtime/*.java %{compat_name}/*.java +jar -cf %{compat_name}.jar -c classes . +popd %install # jar mkdir -p %{buildroot}%{_javadir} cp -a target/dist/%{real_name}-%{cvs_version}.jar %{buildroot}%{_javadir}/%{real_name}.jar cp -a target/dist/%{real_name}-%{cvs_version}-runtime.jar %{buildroot}%{_javadir}/%{real_name}-runtime.jar +cp -a compat/%{compat_name}.jar %{buildroot}%{_javadir}/%{compat_name}.jar %if %{without bootstrap} # maven data %add_maven_depmap com.github.vbmacher:%{real_name}:%{cvs_version}-%{git_date} %{real_name}.jar %add_maven_depmap com.github.vbmacher:%{real_name}-runtime:%{cvs_version}-%{git_date} %{real_name}-runtime.jar +%add_maven_depmap %{compat_name}:${compat_name}:%{compat_version} %{compat_name}.jar %endif -# compatibility symlinks -(cd %{buildroot}%{_javadir} && ln -s %{real_name}.jar java_cup.jar && ln -s %{real_name}-runtime.jar java_cup-runtime.jar) mkdir -p %{buildroot}%{_bindir} %jpackage_script java_cup.Main "" "" %{real_name}:%{real_name}-runtime %{real_name} true @@ -135,6 +144,7 @@ mkdir -p %{buildroot}%{_bindir} %if %{with bootstrap} %files %{_javadir}/%{real_name}*.jar +%{_javadir}/%{compat_name}.jar %else %files -f .mfiles @@ -142,7 +152,6 @@ mkdir -p %{buildroot}%{_bindir} %license licence.txt %doc changelog.txt %attr(0755,root,root) %{_bindir}/%{real_name} -%{_javadir}/java_cup*.jar %if %{without bootstrap} %files manual diff --git a/java-cup.changes b/java-cup.changes index e8b67d5..80e74d8 100644 --- a/java-cup.changes +++ b/java-cup.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Mar 9 08:52:37 UTC 2022 - Fridrich Strba + +- Build and package also the previous API version 0.9e, since the + jump from 0.9 to 0.10 is completely API incompatible and the + build does not require any additional dependencies + ------------------------------------------------------------------- Fri Jan 14 06:59:22 UTC 2022 - Fridrich Strba diff --git a/java-cup.spec b/java-cup.spec index ca8ef47..1bc1104 100644 --- a/java-cup.spec +++ b/java-cup.spec @@ -21,6 +21,8 @@ %define real_name java-cup %define git_hash d69c832 %define git_date 20210814 +%define compat_name java_cup +%define compat_version 9e %bcond_with bootstrap Name: java-cup Version: 0.11 @@ -31,6 +33,7 @@ Group: Development/Libraries/Java URL: http://www2.cs.tum.edu/projects/cup/ Source0: %{real_name}-%{git_hash}.tar.xz Source1: %{real_name}-generated-files.tar.xz +Source2: https://www.cs.princeton.edu/~appel/modern/java/CUP/%{compat_name}_v%{compat_version}.tar.gz Source100: java-cup-nogit.patch.in Patch0: java-cup-no-classpath-in-manifest.patch Patch1: java-cup-java8.patch @@ -92,6 +95,7 @@ java-cup is a LALR Parser Generator in Java. With v0.11, you can: * %prep %setup -q -n %{real_name}-%{git_hash} +%setup -q -T -D -a 2 -n %{real_name}-%{git_hash}/compat cat %{SOURCE100} | sed 's#@GIT_HASH@#%{git_hash}#g' | sed 's#@GIT_DATE@#%{git_date}#g' | patch -p1 -u -l %patch0 -p1 %patch1 -p1 @@ -103,6 +107,7 @@ cat %{SOURCE100} | sed 's#@GIT_HASH@#%{git_hash}#g' | sed 's#@GIT_DATE@#%{git_da %endif find . -name '*.jar' -print -delete mkdir -p target/classes +mkdir -p compat/classes %build %if %{with bootstrap} @@ -112,21 +117,25 @@ export CLASSPATH=$(build-classpath java-cup jflex) %endif export OPT_JAR_LIST=: ant +pushd compat +javac -d classes -source 1.7 -target 1.7 %{compat_name}/runtime/*.java %{compat_name}/*.java +jar -cf %{compat_name}.jar -c classes . +popd %install # jar mkdir -p %{buildroot}%{_javadir} cp -a target/dist/%{real_name}-%{cvs_version}.jar %{buildroot}%{_javadir}/%{real_name}.jar cp -a target/dist/%{real_name}-%{cvs_version}-runtime.jar %{buildroot}%{_javadir}/%{real_name}-runtime.jar +cp -a compat/%{compat_name}.jar %{buildroot}%{_javadir}/%{compat_name}.jar %if %{without bootstrap} # maven data %add_maven_depmap com.github.vbmacher:%{real_name}:%{cvs_version}-%{git_date} %{real_name}.jar %add_maven_depmap com.github.vbmacher:%{real_name}-runtime:%{cvs_version}-%{git_date} %{real_name}-runtime.jar +%add_maven_depmap %{compat_name}:${compat_name}:%{compat_version} %{compat_name}.jar %endif -# compatibility symlinks -(cd %{buildroot}%{_javadir} && ln -s %{real_name}.jar java_cup.jar && ln -s %{real_name}-runtime.jar java_cup-runtime.jar) mkdir -p %{buildroot}%{_bindir} %jpackage_script java_cup.Main "" "" %{real_name}:%{real_name}-runtime %{real_name} true @@ -134,6 +143,7 @@ mkdir -p %{buildroot}%{_bindir} %if %{with bootstrap} %files %{_javadir}/%{real_name}*.jar +%{_javadir}/%{compat_name}.jar %else %files -f .mfiles @@ -141,7 +151,6 @@ mkdir -p %{buildroot}%{_bindir} %license licence.txt %doc changelog.txt %attr(0755,root,root) %{_bindir}/%{real_name} -%{_javadir}/java_cup*.jar %if %{without bootstrap} %files manual diff --git a/java_cup_v9e.tar.gz b/java_cup_v9e.tar.gz new file mode 100644 index 0000000..3c2b134 --- /dev/null +++ b/java_cup_v9e.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be176e9356ff1695c64d08277ba31cea14ea4f617b93787502cf93c6fd35625f +size 93657