Add gettext-0.21-jdk17 patch to fix rhbz#2062407

This commit is contained in:
Jerry James 2022-03-11 21:16:56 -07:00
parent b217c073ed
commit 7462bfbbd5
2 changed files with 44 additions and 1 deletions

39
gettext-0.21-jdk17.patch Normal file
View File

@ -0,0 +1,39 @@
diff --git a/gettext-runtime/configure.ac b/gettext-runtime/configure.ac
index 2b946c9f7..4416f074b 100644
--- a/gettext-runtime/configure.ac
+++ b/gettext-runtime/configure.ac
@@ -34,7 +34,7 @@ AC_PROG_INSTALL
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
diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac
index 65476ab85..71dadeef4 100644
--- a/gettext-tools/configure.ac
+++ b/gettext-tools/configure.ac
@@ -35,7 +35,7 @@ AC_PROG_INSTALL
gt_JAVA_CHOICE
gt_JAVAEXEC
-gt_JAVACOMP([1.5])
+gt_JAVACOMP([1.8])
AC_CHECK_PROG([JAR], [jar], [jar])
if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then
BUILDJAVA=yes
diff --git a/gettext-tools/src/write-java.c b/gettext-tools/src/write-java.c
index 970aae6f0..0b0a3274f 100644
--- a/gettext-tools/src/write-java.c
+++ b/gettext-tools/src/write-java.c
@@ -1209,7 +1209,7 @@ msgdomain_write_java (message_list_ty *mlp, const char *canon_encoding,
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 (compile_java_class (java_sources, 1, NULL, 0, "1.8", "1.8", directory,
true, false, true, verbose > 0))
{
if (!verbose)

View File

@ -5,7 +5,7 @@
Summary: GNU libraries and utilities for producing multi-lingual messages
Name: gettext
Version: 0.21
Release: 12%{?dist}.0.%{snapshot}
Release: 13%{?dist}.0.%{snapshot}
# The following are licensed under LGPLv2+:
# - libintl and its headers
@ -30,6 +30,7 @@ Source3: msghack.1
Patch1: %{name}-%{version}-disable-libtextstyle.patch
Patch2: %{name}-%{version}-covscan.patch
Patch3: %{name}-%{version}-jdk17.patch
# for bootstrapping
# BuildRequires: autoconf >= 2.62
@ -373,6 +374,9 @@ make check LIBUNISTRING=-lunistring
%{_mandir}/man1/msghack.1*
%changelog
* Sat Mar 12 2022 Jerry James <loganjerry@gmail.com> - 0.21-13.0.20220203
- Add gettext-0.21-jdk17 patch to fix rhbz#2062407
* Wed Mar 9 2022 Sundeep Anand <suanand@redhat.com> - 0.21-12
- fix gettext snapshot versioning issue to make it canonical (#2061646)