From 9169ccdcb145633670684bc68c59d2e9af8b818e64921989674af0d12a7e7075 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Sun, 20 Mar 2022 14:17:51 +0000 Subject: [PATCH 1/2] OBS-URL: https://build.opensuse.org/package/show/Java:packages/ecj?expand=0&rev=52 --- ecj.changes | 10 ++++++++++ ecj.spec | 10 ++++++---- encoding.patch | 10 ++++++++++ javaAPI.patch | 4 ++-- 4 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 encoding.patch diff --git a/ecj.changes b/ecj.changes index 2f61433..5b16387 100644 --- a/ecj.changes +++ b/ecj.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Sun Mar 20 13:35:05 UTC 2022 - Fridrich Strba + +- Added patch: + * encoding.patch + + the encoding needs to be set for all JDK versions +- Modified patch: + * javaAPI.patch + + extract the encoding part to a separate patch + ------------------------------------------------------------------- Mon Oct 18 21:28:05 UTC 2021 - Marcel Witte diff --git a/ecj.spec b/ecj.spec index b1ae279..74b6dd0 100644 --- a/ecj.spec +++ b/ecj.spec @@ -1,7 +1,7 @@ # # spec file for package ecj # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -40,8 +40,9 @@ Source3: java15api.pom Source4: MANIFEST.MF # Always generate debug info when building RPMs Patch0: %{name}-rpmdebuginfo.patch +Patch1: encoding.patch # Include java API stubs in build with java < 15 -Patch1: javaAPI.patch +Patch2: javaAPI.patch BuildRequires: ant BuildRequires: java-devel >= 10 BuildRequires: javapackages-local @@ -55,8 +56,9 @@ the JDT Core batch compiler. %prep %setup -q -c -a 1 %patch0 -p1 +%patch1 -p1 %if %{?pkg_vcmp:%pkg_vcmp java-devel < 15}%{!?pkg_vcmp:1} -%patch1 +%patch2 %endif sed -i -e 's|debuglevel=\"lines,source\"|debug=\"yes\"|g' build.xml @@ -79,7 +81,7 @@ jar -cf java15api.jar -C build/classes . # Remove everything except the jar, since ant looks for java files in "." rm -rf java15api-src build/classes -ant \ +%ant \ %if %{?pkg_vcmp:%pkg_vcmp java-devel < 15}%{!?pkg_vcmp:1} -Djavaapi=java15api.jar \ %endif diff --git a/encoding.patch b/encoding.patch new file mode 100644 index 0000000..cb16b42 --- /dev/null +++ b/encoding.patch @@ -0,0 +1,10 @@ +--- ecj-4.18.orig/build.xml 2022-03-20 14:23:39.947886348 +0100 ++++ ecj-4.18/build.xml 2022-03-20 14:26:28.600913037 +0100 +@@ -27,6 +27,7 @@ + + + diff --git a/javaAPI.patch b/javaAPI.patch index b71762e..0f0bd2f 100644 --- a/javaAPI.patch +++ b/javaAPI.patch @@ -1,6 +1,6 @@ --- build.xml.orig 2020-09-02 22:05:12.000000000 +0200 +++ build.xml 2021-03-16 14:41:19.331235267 +0100 -@@ -18,16 +18,20 @@ +@@ -18,17 +18,20 @@ @@ -13,7 +13,7 @@ From 50c34951c92572502fd7ef25410a634b4b2ead631d6b8b96b53a9eafc84f6eba Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Sun, 20 Mar 2022 14:53:05 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/Java:packages/ecj?expand=0&rev=53 --- ecj-rpmdebuginfo.patch | 2 +- ecj.changes | 2 ++ encoding.patch | 2 +- javaAPI.patch | 7 ++----- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/ecj-rpmdebuginfo.patch b/ecj-rpmdebuginfo.patch index 931f884..c12e694 100644 --- a/ecj-rpmdebuginfo.patch +++ b/ecj-rpmdebuginfo.patch @@ -7,7 +7,7 @@ retrieving revision 1.327 diff -u -r1.327 Main.java --- batch/org/eclipse/jdt/internal/compiler/batch/Main.java 21 Apr 2008 15:00:59 -0000 1.327 +++ batch/org/eclipse/jdt/internal/compiler/batch/Main.java 20 Nov 2008 19:26:57 -0000 -@@ -2609,6 +2609,29 @@ +@@ -3097,6 +3097,29 @@ public void configure(String[] argv) { this.options.put(CompilerOptions.OPTION_Process_Annotations, CompilerOptions.ENABLED); } diff --git a/ecj.changes b/ecj.changes index 5b16387..55c5502 100644 --- a/ecj.changes +++ b/ecj.changes @@ -5,6 +5,8 @@ Sun Mar 20 13:35:05 UTC 2022 - Fridrich Strba * encoding.patch + the encoding needs to be set for all JDK versions - Modified patch: + * ecj-rpmdebuginfo.patch + + rediff * javaAPI.patch + extract the encoding part to a separate patch diff --git a/encoding.patch b/encoding.patch index cb16b42..7a90d0f 100644 --- a/encoding.patch +++ b/encoding.patch @@ -1,6 +1,6 @@ --- ecj-4.18.orig/build.xml 2022-03-20 14:23:39.947886348 +0100 +++ ecj-4.18/build.xml 2022-03-20 14:26:28.600913037 +0100 -@@ -27,6 +27,7 @@ +@@ -24,6 +24,7 @@ @@ -10,10 +10,7 @@ - - -