From 077990608d6a8bfb8a33f1c0dbb9770a50599036c327cb11af029b9174ec775b Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Tue, 19 Apr 2022 12:11:23 +0000 Subject: [PATCH] Accepting request 967863 from home:fstrba:branches:Base:System Fix gettext-java build in Factory OBS-URL: https://build.opensuse.org/request/show/967863 OBS-URL: https://build.opensuse.org/package/show/Base:System/gettext-runtime?expand=0&rev=178 --- gettext-0.21-jdk17.patch | 136 +++++++++++++++++++++++++++++++++++ gettext-csharp.changes | 9 +++ gettext-csharp.spec | 6 +- gettext-java.changes | 9 +++ gettext-java.spec | 6 +- gettext-runtime-mini.changes | 9 +++ gettext-runtime-mini.spec | 4 +- gettext-runtime.changes | 9 +++ gettext-runtime.spec | 4 +- 9 files changed, 186 insertions(+), 6 deletions(-) create mode 100644 gettext-0.21-jdk17.patch diff --git a/gettext-0.21-jdk17.patch b/gettext-0.21-jdk17.patch new file mode 100644 index 0000000..9b1934f --- /dev/null +++ b/gettext-0.21-jdk17.patch @@ -0,0 +1,136 @@ +--- gettext-0.21/gettext-runtime/configure.ac 2022-04-08 16:40:35.014012388 +0200 ++++ gettext-0.21/gettext-runtime/configure.ac 2022-04-08 16:42:34.054638232 +0200 +@@ -34,7 +34,7 @@ + + gt_JAVA_CHOICE + +-gt_JAVACOMP([1.5], [1.6]) ++gt_JAVACOMP([1.8], [1.8]) + AC_CHECK_PROG([JAR], [jar], [jar]) + if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then + BUILDJAVA=yes +--- gettext-0.21/gettext-tools/configure.ac 2022-04-08 16:40:35.138012934 +0200 ++++ gettext-0.21/gettext-tools/configure.ac 2022-04-08 16:59:13.080602790 +0200 +@@ -35,7 +35,7 @@ + gt_JAVA_CHOICE + + gt_JAVAEXEC +-gt_JAVACOMP([1.5]) ++gt_JAVACOMP([1.8], [1.8]) + AC_CHECK_PROG([JAR], [jar], [jar]) + if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then + BUILDJAVA=yes +--- gettext-0.21/gettext-tools/gnulib-lib/javacomp.c 2022-04-08 16:40:35.238013375 +0200 ++++ gettext-0.21/gettext-tools/gnulib-lib/javacomp.c 2022-04-08 16:41:56.686411176 +0200 +@@ -116,9 +116,8 @@ + && (java_version_cache[1] >= '2' + && java_version_cache[1] <= '7') + && java_version_cache[2] == '\0') +- /* Assume that these (not yet released) Java versions will behave +- like the preceding ones. */ +- java_version_cache = "11"; ++ /* It's one of the valid target version values. */ ++ ; + else + java_version_cache = "1.1"; + } +@@ -128,7 +127,7 @@ + /* ======================= Source version dependent ======================= */ + + /* Convert a source version to an index. */ +-#define SOURCE_VERSION_BOUND 8 /* exclusive upper bound */ ++#define SOURCE_VERSION_BOUND 14 /* exclusive upper bound */ + static unsigned int + source_version_index (const char *source_version) + { +@@ -144,7 +143,7 @@ + else if (source_version[0] == '9' && source_version[1] == '\0') + return 5; + else if (source_version[0] == '1' +- && (source_version[1] >= '0' && source_version[1] <= '1') ++ && (source_version[1] >= '0' && source_version[1] <= '7') + && source_version[2] == '\0') + return source_version[1] - '0' + 6; + error (EXIT_FAILURE, 0, _("invalid source_version argument to compile_java_class")); +@@ -171,6 +170,10 @@ + return "class conftest { public void m() { var i = new Integer(0); } }\n"; + if (strcmp (source_version, "11") == 0) + return "class conftest { Readable r = (var b) -> 0; }\n"; ++ if (source_version[0] == '1' ++ && (source_version[1] >= '2' && source_version[1] <= '7') ++ && source_version[2] == '\0') ++ return "class conftest { Readable r = (var b) -> 0; }\n"; + error (EXIT_FAILURE, 0, _("invalid source_version argument to compile_java_class")); + return NULL; + } +@@ -197,6 +200,10 @@ + return "class conftestfail { Readable r = (var b) -> 0; }\n"; + if (strcmp (source_version, "11") == 0) + return NULL; ++ if (source_version[0] == '1' ++ && (source_version[1] >= '2' && source_version[1] <= '7') ++ && source_version[2] == '\0') ++ return NULL; + error (EXIT_FAILURE, 0, _("invalid source_version argument to compile_java_class")); + return NULL; + } +@@ -204,7 +211,7 @@ + /* ======================= Target version dependent ======================= */ + + /* Convert a target version to an index. */ +-#define TARGET_VERSION_BOUND 11 /* exclusive upper bound */ ++#define TARGET_VERSION_BOUND 17 /* exclusive upper bound */ + static unsigned int + target_version_index (const char *target_version) + { +@@ -215,7 +222,7 @@ + else if (target_version[0] == '9' && target_version[1] == '\0') + return 8; + else if (target_version[0] == '1' +- && (target_version[1] >= '0' && target_version[1] <= '1') ++ && (target_version[1] >= '0' && target_version[1] <= '7') + && target_version[2] == '\0') + return target_version[1] - '0' + 9; + error (EXIT_FAILURE, 0, _("invalid target_version argument to compile_java_class")); +@@ -245,10 +252,10 @@ + return 52; + if (strcmp (target_version, "9") == 0) + return 53; +- if (strcmp (target_version, "10") == 0) +- return 54; +- if (strcmp (target_version, "11") == 0) +- return 55; ++ if (target_version[0] == '1' ++ && (target_version[1] >= '0' && target_version[1] <= '7') ++ && target_version[2] == '\0') ++ return target_version[1] + 54; + error (EXIT_FAILURE, 0, _("invalid target_version argument to compile_java_class")); + return 0; + } +@@ -2433,7 +2440,7 @@ + } + } + +- error (0, 0, _("Java compiler not found, try installing gcj or set $JAVAC")); ++ /* error (0, 0, _("Java compiler not found, try installing gcj or set $JAVAC")); */ + err = true; + + done2: +--- gettext-0.21/gettext-tools/src/write-java.c 2022-04-08 16:40:35.218013286 +0200 ++++ gettext-0.21/gettext-tools/src/write-java.c 2022-04-08 16:41:56.690411201 +0200 +@@ -1208,8 +1208,14 @@ + Java compilers create the class files in the source file's directory - + which is in a temporary directory in our case. */ + java_sources[0] = java_file_name; +- if (compile_java_class (java_sources, 1, NULL, 0, "1.5", "1.6", directory, ++ if (1 ++ && (compile_java_class (java_sources, 1, NULL, 0, "17", "17", directory, ++ true, false, true, verbose > 0)) /* assume JDK 17 */ ++ && (compile_java_class (java_sources, 1, NULL, 0, "11", "11", directory, ++ true, false, true, verbose > 0)) /* assume JDK 11 */ ++ && (compile_java_class (java_sources, 1, NULL, 0, "1.5", "1.6", directory, + true, false, true, verbose > 0)) ++ ) + { + if (!verbose) + error (0, 0, diff --git a/gettext-csharp.changes b/gettext-csharp.changes index 1e65b3c..16f7009 100644 --- a/gettext-csharp.changes +++ b/gettext-csharp.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Apr 8 15:05:10 UTC 2022 - Fridrich Strba + +- Added patch: + * gettext-0.21-jdk17.patch + + Build with java source and target levels 1.8 + + Allows building with JDK17 + + Fixes build in Factory + ------------------------------------------------------------------- Mon Nov 29 20:32:32 UTC 2021 - Michael Gorse diff --git a/gettext-csharp.spec b/gettext-csharp.spec index d9e3eb4..be3bf53 100644 --- a/gettext-csharp.spec +++ b/gettext-csharp.spec @@ -1,7 +1,7 @@ # # spec file for package gettext-csharp # -# 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 @@ -32,7 +32,7 @@ Source2: suse-start-po-mode.el Source3: gettext-linkdupes.sh Source4: gettext-rpmlintrc Source5: %{name}.keyring -Patch: gettext-0.12.1-sigfpe.patch +Patch0: gettext-0.12.1-sigfpe.patch Patch1: gettext-0.19.3-fix-bashisms.patch Patch2: gettext-0.12.1-gettextize.patch Patch3: use-acinit-for-libtextstyle.patch @@ -40,6 +40,7 @@ Patch4: gettext-po-mode.diff Patch5: gettext-initialize_vars.patch # PATCH-FIX-OPENSUSE gettext-dont-test-gnulib.patch -- coolo@suse.de Patch6: gettext-dont-test-gnulib.patch +Patch7: gettext-0.21-jdk17.patch # PATCH-FIX-UPSTREAM boo#941629 -- pth@suse.com Patch11: boo941629-unnessary-rpath-on-standard-path.patch # PATCH-FIX-SUSE Bug boo#1106843 @@ -87,6 +88,7 @@ reliably than 'resgen'. %patch4 %patch5 %patch6 -p1 +%patch7 -p1 %patch11 -p1 %patch13 -p1 %patch14 -p1 diff --git a/gettext-java.changes b/gettext-java.changes index ebd240a..b40d7ee 100644 --- a/gettext-java.changes +++ b/gettext-java.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Apr 8 15:05:10 UTC 2022 - Fridrich Strba + +- Added patch: + * gettext-0.21-jdk17.patch + + Build with java source and target levels 1.8 + + Allows building with JDK17 + + Fixes build in Factory + ------------------------------------------------------------------- Mon Nov 29 20:32:32 UTC 2021 - Michael Gorse diff --git a/gettext-java.spec b/gettext-java.spec index b7949f8..dbff89c 100644 --- a/gettext-java.spec +++ b/gettext-java.spec @@ -1,7 +1,7 @@ # # spec file for package gettext-java # -# 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 @@ -37,6 +37,7 @@ Patch4: gettext-po-mode.diff Patch5: gettext-initialize_vars.patch # PATCH-FIX-OPENSUSE gettext-dont-test-gnulib.patch -- coolo@suse.de Patch6: gettext-dont-test-gnulib.patch +Patch7: gettext-0.21-jdk17.patch # PATCH-FIX-UPSTREAM boo#941629 -- pth@suse.com Patch11: boo941629-unnessary-rpath-on-standard-path.patch # PATCH-FIX-SUSE Bug boo#1106843 @@ -47,7 +48,7 @@ Patch15: 0002-msgcat-Merge-headers-when-use-first.patch BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: glib2-devel -BuildRequires: java-devel +BuildRequires: java-devel >= 1.8 BuildRequires: libtextstyle-devel BuildRequires: libtool BuildRequires: libxml2-devel @@ -72,6 +73,7 @@ java+swing. %patch4 %patch5 %patch6 -p1 +%patch7 -p1 %patch11 -p1 %patch13 -p1 %patch14 -p1 diff --git a/gettext-runtime-mini.changes b/gettext-runtime-mini.changes index f3a9a9b..1df24ac 100644 --- a/gettext-runtime-mini.changes +++ b/gettext-runtime-mini.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Apr 8 15:05:10 UTC 2022 - Fridrich Strba + +- Added patch: + * gettext-0.21-jdk17.patch + + Build with java source and target levels 1.8 + + Allows building with JDK17 + + Fixes build in Factory + ------------------------------------------------------------------- Mon Nov 29 20:32:32 UTC 2021 - Michael Gorse diff --git a/gettext-runtime-mini.spec b/gettext-runtime-mini.spec index 4dc1fd9..b12cba1 100644 --- a/gettext-runtime-mini.spec +++ b/gettext-runtime-mini.spec @@ -1,7 +1,7 @@ # # spec file for package gettext-runtime-mini # -# 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 @@ -67,6 +67,7 @@ Patch4: gettext-po-mode.diff Patch5: gettext-initialize_vars.patch # PATCH-FIX-OPENSUSE gettext-dont-test-gnulib.patch -- coolo@suse.de Patch6: gettext-dont-test-gnulib.patch +Patch7: gettext-0.21-jdk17.patch # PATCH-FIX-UPSTREAM boo#941629 -- pth@suse.com Patch11: boo941629-unnessary-rpath-on-standard-path.patch # PATCH-FIX-SUSE Bug boo#1106843 @@ -159,6 +160,7 @@ This package provides headers and static libraries for libtextstyle %patch4 %patch5 %patch6 -p1 +%patch7 -p1 %patch11 -p1 %patch13 -p1 %patch14 -p1 diff --git a/gettext-runtime.changes b/gettext-runtime.changes index f3a9a9b..1df24ac 100644 --- a/gettext-runtime.changes +++ b/gettext-runtime.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Apr 8 15:05:10 UTC 2022 - Fridrich Strba + +- Added patch: + * gettext-0.21-jdk17.patch + + Build with java source and target levels 1.8 + + Allows building with JDK17 + + Fixes build in Factory + ------------------------------------------------------------------- Mon Nov 29 20:32:32 UTC 2021 - Michael Gorse diff --git a/gettext-runtime.spec b/gettext-runtime.spec index 547d1ad..954e551 100644 --- a/gettext-runtime.spec +++ b/gettext-runtime.spec @@ -1,7 +1,7 @@ # # spec file for package gettext-runtime # -# 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 @@ -67,6 +67,7 @@ Patch4: gettext-po-mode.diff Patch5: gettext-initialize_vars.patch # PATCH-FIX-OPENSUSE gettext-dont-test-gnulib.patch -- coolo@suse.de Patch6: gettext-dont-test-gnulib.patch +Patch7: gettext-0.21-jdk17.patch # PATCH-FIX-UPSTREAM boo#941629 -- pth@suse.com Patch11: boo941629-unnessary-rpath-on-standard-path.patch # PATCH-FIX-SUSE Bug boo#1106843 @@ -159,6 +160,7 @@ This package provides headers and static libraries for libtextstyle %patch4 %patch5 %patch6 -p1 +%patch7 -p1 %patch11 -p1 %patch13 -p1 %patch14 -p1