import CS gettext-0.21-8.el9
This commit is contained in:
parent
d64810d677
commit
1c0d19ec10
116
SOURCES/gettext-java17-2062407.patch
Normal file
116
SOURCES/gettext-java17-2062407.patch
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
diff -urp '--exclude=*~' gettext-0.21.orig/gettext-tools/gnulib-lib/javacomp.c gettext-0.21/gettext-tools/gnulib-lib/javacomp.c
|
||||||
|
--- gettext-0.21.orig/gettext-tools/gnulib-lib/javacomp.c 2022-03-09 12:22:05.000000000 +0900
|
||||||
|
+++ gettext-0.21/gettext-tools/gnulib-lib/javacomp.c 2022-03-20 18:23:53.636052943 +0900
|
||||||
|
@@ -116,9 +116,8 @@ default_target_version (void)
|
||||||
|
&& (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 @@ default_target_version (void)
|
||||||
|
/* ======================= 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 @@ source_version_index (const char *source
|
||||||
|
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 @@ get_goodcode_snippet (const char *source
|
||||||
|
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 @@ get_failcode_snippet (const char *source
|
||||||
|
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 @@ get_failcode_snippet (const char *source
|
||||||
|
/* ======================= 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 @@ target_version_index (const char *target
|
||||||
|
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 @@ corresponding_classfile_version (const c
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
@@ -2439,7 +2446,7 @@ compile_java_class (const char * const *
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- 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:
|
||||||
|
diff -urp '--exclude=*~' gettext-0.21.orig/gettext-tools/src/write-java.c gettext-0.21/gettext-tools/src/write-java.c
|
||||||
|
--- gettext-0.21.orig/gettext-tools/src/write-java.c 2022-03-09 12:17:21.000000000 +0900
|
||||||
|
+++ gettext-0.21/gettext-tools/src/write-java.c 2022-03-20 18:26:06.941734979 +0900
|
||||||
|
@@ -1209,8 +1209,14 @@ msgdomain_write_java (message_list_ty *m
|
||||||
|
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,
|
@ -4,7 +4,7 @@
|
|||||||
Summary: GNU libraries and utilities for producing multi-lingual messages
|
Summary: GNU libraries and utilities for producing multi-lingual messages
|
||||||
Name: gettext
|
Name: gettext
|
||||||
Version: 0.21
|
Version: 0.21
|
||||||
Release: 7%{?dist}
|
Release: 8%{?dist}
|
||||||
# The following are licensed under LGPLv2+:
|
# The following are licensed under LGPLv2+:
|
||||||
# - libintl and its headers
|
# - libintl and its headers
|
||||||
# - libasprintf and its headers
|
# - libasprintf and its headers
|
||||||
@ -31,6 +31,7 @@ Source3: msghack.1
|
|||||||
Patch1: gettext-0.21-gnulib-perror-tests.patch
|
Patch1: gettext-0.21-gnulib-perror-tests.patch
|
||||||
Patch2: gettext-0.21-disable-libtextstyle.patch
|
Patch2: gettext-0.21-disable-libtextstyle.patch
|
||||||
Patch3: gettext-0.21-covscan.patch
|
Patch3: gettext-0.21-covscan.patch
|
||||||
|
Patch4: gettext-java17-2062407.patch
|
||||||
|
|
||||||
# for bootstrapping
|
# for bootstrapping
|
||||||
# BuildRequires: autoconf >= 2.62
|
# BuildRequires: autoconf >= 2.62
|
||||||
@ -371,6 +372,9 @@ make check LIBUNISTRING=-lunistring
|
|||||||
%{_mandir}/man1/msghack.1*
|
%{_mandir}/man1/msghack.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Mar 30 2023 Jens Petersen <petersen@redhat.com> - 0.21-8
|
||||||
|
- add Java 17 support patch from Mamoru Tasaka (rhbz#2182696)
|
||||||
|
|
||||||
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0.21-7
|
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0.21-7
|
||||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||||
Related: rhbz#1991688
|
Related: rhbz#1991688
|
||||||
|
Loading…
Reference in New Issue
Block a user