I updated the existing debian/patches/06-java9-support.patch to include support for openjdk 11, please see the attached debdiff. On Wed, Oct 3, 2018 at 9:45 PM Emmanuel Bourg <ebo...@apache.org> wrote: > > Package: gettext > Version: 0.19.8.1-7 > Severity: important > Tags: sid buster > User: debian-j...@lists.debian.org > Usertags: default-java11 > > gettext fails to build with Java 11 because the configuration script > doesn't recognize the new version. During the build the following warning > can be seen: > > configure: WARNING: unknown target-version 11, please update gt_JAVACOMP > macro > checking for Java compiler... no > > The build later fails with: > > rm -f debian/gettext/usr/share/gettext/libintl.jar > mv debian/gettext/usr/share/gettext/gettext.jar > debian/gettext/usr/share/java > mv: cannot stat 'debian/gettext/usr/share/gettext/gettext.jar': No such > file or directory > make[1]: *** [debian/rules:139: gettext] Error 1 >
-- Tiago Stürmer Daitx Software Engineer tiago.da...@canonical.com PGP Key: 4096R/F5B213BE (hkp://keyserver.ubuntu.com) Fingerprint = 45D0 FE5A 8109 1E91 866E 8CA4 1931 8D5E F5B2 13BE
diff -Nru gettext-0.19.8.1/debian/changelog gettext-0.19.8.1/debian/changelog --- gettext-0.19.8.1/debian/changelog 2018-08-12 21:00:10.000000000 +0100 +++ gettext-0.19.8.1/debian/changelog 2018-10-04 00:10:11.000000000 +0100 @@ -1,3 +1,10 @@ +gettext (0.19.8.1-8) UNRELEASED; urgency=medium + + * debian/patches/06-java9-support.patch: update to support + openjdk 11. Closes: #910246. + + -- Tiago Stürmer Daitx <tiago.da...@ubuntu.com> Wed, 03 Oct 2018 23:10:11 +0000 + gettext (0.19.8.1-7) unstable; urgency=medium * Use dh_autoreconf to regenerate autoconf stuff. New automake diff -Nru gettext-0.19.8.1/debian/patches/06-java9-support.patch gettext-0.19.8.1/debian/patches/06-java9-support.patch --- gettext-0.19.8.1/debian/patches/06-java9-support.patch 2018-08-12 20:06:00.000000000 +0100 +++ gettext-0.19.8.1/debian/patches/06-java9-support.patch 2018-10-04 00:10:11.000000000 +0100 @@ -29,7 +29,7 @@ dnl Copyright (C) 2001-2003, 2006-2007, 2009-2016 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation -@@ -15,7 +15,14 @@ +@@ -15,7 +15,15 @@ # 1.3 inner classes # 1.4 assert keyword # 1.5 generic classes and methods @@ -39,13 +39,14 @@ +# 1.8 lambdas +# 9 private interface methods +# 10 type inference for local variables ++# 11 type inference for lambda parameters +# Instead of source-version 1.6, use 1.5, since Java 6 did not introduce any +# language changes. See +# http://docs.oracle.com/javase/8/docs/technotes/guides/language/enhancements.html # # target-version can be: classfile version: # 1.1 45.3 -@@ -24,6 +31,10 @@ +@@ -24,6 +31,11 @@ # 1.4 48.0 # 1.5 49.0 # 1.6 50.0 @@ -53,10 +54,11 @@ +# 1.8 52.0 +# 9 53.0 +# 10 54.0 ++# 11 55.0 # The classfile version of a .class file can be determined through the "file" # command. More portably, the classfile major version can be determined through # "od -A n -t d1 -j 7 -N 1 classfile". -@@ -33,12 +44,18 @@ +@@ -33,12 +44,19 @@ # 1.1 JDK 1.1, jview # 1.2 JDK/JRE 1.2 # 1.3 JDK/JRE 1.3, gij 3.3, 3.4 @@ -70,6 +72,7 @@ +# 1.8 JDK/JRE 8 +# 9 JDK/JRE 9 +# 10 JDK/JRE 10 ++# 11 JDK/JRE 11 # Note: gij >= 3.3 can in some cases handle classes compiled with -target 1.4, # and gij >= 4.1 can in some cases partially handle classes compiled with -# -target 1.5, but I have no idea how complete this support is. @@ -79,7 +82,7 @@ # # Specifying target-version is useful when building a library (.jar) that is # useful outside the given package. Omitting target-version is useful when -@@ -47,14 +64,20 @@ +@@ -47,14 +64,21 @@ # It is unreasonable to ask for: # - target-version < 1.4 with source-version >= 1.4, or # - target-version < 1.5 with source-version >= 1.5, or @@ -90,6 +93,7 @@ +# - target_version < 1.8 with source_version >= 1.8, or +# - target_version < 9 with source_version >= 9, or +# - target_version < 10 with source_version >= 10, ++# - target_version < 11 with source_version >= 11, +# because even Sun's/Oracle's javac doesn't support these combinations. # # It is redundant to ask for a target-version > source-version, since the @@ -110,11 +114,11 @@ }` case "$target_version" in - 1.1 | 1.2 | 1.3 | 1.4 | 1.5 | 1.6) ;; -+ 1.1 | 1.2 | 1.3 | 1.4 | 1.5 | 1.6 | 1.7 | 1.8 | 9 | 10) ;; ++ 1.1 | 1.2 | 1.3 | 1.4 | 1.5 | 1.6 | 1.7 | 1.8 | 9 | 10 | 11) ;; null) dnl JDK 1.1.X returns null. target_version=1.1 ;; -@@ -117,6 +140,14 @@ +@@ -117,6 +140,16 @@ 1.4) goodcode='class conftest { static { assert(true); } }' failcode='class conftestfail<T> { T foo() { return null; } }' ;; 1.5) goodcode='class conftest<T> { T foo() { return null; } }' @@ -126,10 +130,12 @@ + 9) goodcode='interface conftest { private void foo () {} }' + failcode='class conftestfail { public void m() { var i = new Integer(0); } }' ;; + 10) goodcode='class conftest { public void m() { var i = new Integer(0); } }' ++ failcode='class conftestfail { public void m() { java.util.function.Predicate<String> predicate = (var a) -> true; } }' ;; ++ 11) goodcode='class conftest { public void m() { java.util.function.Predicate<String> predicate = (var a) -> true; } }' failcode='class conftestfail syntax error' ;; *) AC_MSG_ERROR([invalid source-version argument to gt_@&t@JAVACOMP: $source_version]) ;; esac -@@ -127,6 +158,10 @@ +@@ -127,6 +158,11 @@ 1.4) cfversion=48 ;; 1.5) cfversion=49 ;; 1.6) cfversion=50 ;; @@ -137,6 +143,7 @@ + 1.8) cfversion=52 ;; + 9) cfversion=53 ;; + 10) cfversion=54 ;; ++ 11) cfversion=55 ;; *) AC_MSG_ERROR([invalid target-version argument to gt_@&t@JAVACOMP: $target_version]) ;; esac # Function to output the classfile version of a file (8th byte) in decimal. @@ -158,7 +165,7 @@ dnl dnl javac 1.3: -target 1.1 1.2 1.3 default: 1.1 dnl source always: 1.3 -@@ -181,6 +217,34 @@ +@@ -181,6 +217,42 @@ dnl -target 1.4 only possible with -source 1.3/1.4 dnl -target 1.5 only possible with -source 1.3/1.4/1.5 or no -source dnl @@ -190,6 +197,14 @@ + dnl -target 1.8 only possible with -source 1.6/1.7/1.8 + dnl -target 9 only possible with -source 1.6/1.7/1.8/9 + dnl ++ dnl javac 11: -target 1.6 1.7 1.8 9 10 default: 11 ++ dnl -source 1.6 1.7 1.8 9 10 default: 11 ++ dnl -target 1.6 only possible with -source 1.6 ++ dnl -target 1.7 only possible with -source 1.6/1.7 ++ dnl -target 1.8 only possible with -source 1.6/1.7/1.8 ++ dnl -target 9 only possible with -source 1.6/1.7/1.8/9 ++ dnl -target 10 only possible with -source 1.6/1.7/1.8/9/10 ++ dnl dnl The support of jikes for target-version and source-version: dnl dnl jikes 1.14 does not have a way to specify the target-version. It @@ -282,7 +297,7 @@ BUILDJAVA=yes --- a/gettext-tools/gnulib-lib/javacomp.c +++ b/gettext-tools/gnulib-lib/javacomp.c -@@ -99,9 +99,15 @@ +@@ -99,9 +99,18 @@ /* Determine the version from the found JVM. */ java_version_cache = javaexec_version (); if (java_version_cache == NULL @@ -297,11 +312,14 @@ + && java_version_cache[1] == '\0') + || (java_version_cache[0] == '1' + && java_version_cache[1] == '0' ++ && java_version_cache[2] == '\0') ++ || (java_version_cache[0] == '1' ++ && java_version_cache[1] == '1' + && java_version_cache[2] == '\0'))) java_version_cache = "1.1"; } return java_version_cache; -@@ -110,14 +116,24 @@ +@@ -110,14 +116,27 @@ /* ======================= Source version dependent ======================= */ /* Convert a source version to an index. */ @@ -328,10 +346,13 @@ + else if (source_version[0] == '1' && source_version[1] == '0' + && source_version[2] == '\0') + return 6; ++ else if (source_version[0] == '1' && source_version[1] == '1' ++ && source_version[2] == '\0') ++ return 6; error (EXIT_FAILURE, 0, _("invalid source_version argument to compile_java_class")); return 0; } -@@ -132,6 +148,14 @@ +@@ -132,6 +148,16 @@ return "class conftest { static { assert(true); } }\n"; if (strcmp (source_version, "1.5") == 0) return "class conftest<T> { T foo() { return null; } }\n"; @@ -343,10 +364,12 @@ + return "interface conftest { private void foo () {} }\n"; + if (strcmp (source_version, "10") == 0) + return "class conftest { public void m() { var i = new Integer(0); } }\n"; ++ if (strcmp (source_version, "11") == 0) ++ return "class conftest { public void m() { java.util.function.Predicate<String> predicate = (var a) -> true; } }\n"; error (EXIT_FAILURE, 0, _("invalid source_version argument to compile_java_class")); return NULL; } -@@ -147,6 +171,14 @@ +@@ -147,6 +171,16 @@ if (strcmp (source_version, "1.4") == 0) return "class conftestfail<T> { T foo() { return null; } }\n"; if (strcmp (source_version, "1.5") == 0) @@ -358,15 +381,17 @@ + if (strcmp (source_version, "9") == 0) + return "class conftestfail { public void m() { var i = new Integer(0); } }\n"; + if (strcmp (source_version, "10") == 0) ++ return "class conftestfail { public void m() { java.util.function.Predicate<String> predicate = (var a) -> true; } }\n"; ++ if (strcmp (source_version, "11") == 0) return NULL; error (EXIT_FAILURE, 0, _("invalid source_version argument to compile_java_class")); return NULL; -@@ -155,14 +187,19 @@ +@@ -155,14 +187,22 @@ /* ======================= Target version dependent ======================= */ /* Convert a target version to an index. */ -#define TARGET_VERSION_BOUND 6 /* exclusive upper bound */ -+#define TARGET_VERSION_BOUND 10 /* exclusive upper bound */ ++#define TARGET_VERSION_BOUND 11 /* exclusive upper bound */ static unsigned int target_version_index (const char *target_version) { @@ -380,10 +405,13 @@ + else if (target_version[0] == '1' && target_version[1] == '0' + && target_version[2] == '\0') + return 9; ++ else if (target_version[0] == '1' && target_version[1] == '1' ++ && target_version[2] == '\0') ++ return 10; error (EXIT_FAILURE, 0, _("invalid target_version argument to compile_java_class")); return 0; } -@@ -184,10 +221,34 @@ +@@ -184,10 +221,36 @@ return 49; if (strcmp (target_version, "1.6") == 0) return 50; @@ -395,6 +423,8 @@ + return 53; + if (strcmp (target_version, "10") == 0) + return 54; ++ if (strcmp (target_version, "11") == 0) ++ return 55; error (EXIT_FAILURE, 0, _("invalid target_version argument to compile_java_class")); return 0; } @@ -662,7 +692,7 @@ false); --- a/gettext-tools/gnulib-lib/javacomp.h +++ b/gettext-tools/gnulib-lib/javacomp.h -@@ -28,7 +28,11 @@ +@@ -28,7 +28,12 @@ 1.3 inner classes 1.4 assert keyword 1.5 generic classes and methods @@ -672,10 +702,11 @@ + 1.8 lambdas + 9 private interface methods + 10 type inference for local variables ++ 11 type inference for lambda parameters target_version can be: classfile version: 1.1 45.3 1.2 46.0 -@@ -36,6 +40,10 @@ +@@ -36,6 +40,11 @@ 1.4 48.0 1.5 49.0 1.6 50.0 @@ -683,10 +714,11 @@ + 1.8 52.0 + 9 53.0 + 10 54.0 ++ 11 55.0 target_version can also be given as NULL. In this case, the required target_version is determined from the found JVM (see javaversion.h). Specifying target_version is useful when building a library (.jar) that is -@@ -44,13 +52,19 @@ +@@ -44,13 +52,20 @@ It is unreasonable to ask for: - target_version < 1.4 with source_version >= 1.4, or - target_version < 1.5 with source_version >= 1.5, or @@ -697,6 +729,7 @@ + - target_version < 1.8 with source_version >= 1.8, or + - target_version < 9 with source_version >= 9, or + - target_version < 10 with source_version >= 10, ++ - target_version < 11 with source_version >= 11, + because even Sun's/Oracle's javac doesn't support these combinations. It is redundant to ask for a target_version > source_version, since the smaller target_version = source_version will also always work and newer JVMs @@ -719,7 +752,7 @@ This is the value of System.getProperty("java.specification.version"). - Some possible values are: 1.1, 1.2, 1.3, 1.4, 1.5, 1.6. Return NULL if - the Java version cannot be determined. */ -+ Some possible values are: 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 9, 10. ++ Some possible values are: 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 9, 10, 11. + Return NULL if the Java version cannot be determined. */ extern char * javaexec_version (void); @@ -732,7 +765,7 @@ dnl Copyright (C) 2001-2003, 2006-2007, 2009-2016 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation -@@ -15,7 +15,14 @@ +@@ -15,7 +15,15 @@ # 1.3 inner classes # 1.4 assert keyword # 1.5 generic classes and methods @@ -742,13 +775,14 @@ +# 1.8 lambdas +# 9 private interface methods +# 10 type inference for local variables ++# 11 type inference for lambda parameters +# Instead of source-version 1.6, use 1.5, since Java 6 did not introduce any +# language changes. See +# http://docs.oracle.com/javase/8/docs/technotes/guides/language/enhancements.html # # target-version can be: classfile version: # 1.1 45.3 -@@ -24,6 +31,10 @@ +@@ -24,6 +31,11 @@ # 1.4 48.0 # 1.5 49.0 # 1.6 50.0 @@ -756,10 +790,11 @@ +# 1.8 52.0 +# 9 53.0 +# 10 54.0 ++# 11 55.0 # The classfile version of a .class file can be determined through the "file" # command. More portably, the classfile major version can be determined through # "od -A n -t d1 -j 7 -N 1 classfile". -@@ -33,12 +44,18 @@ +@@ -33,12 +44,19 @@ # 1.1 JDK 1.1, jview # 1.2 JDK/JRE 1.2 # 1.3 JDK/JRE 1.3, gij 3.3, 3.4 @@ -773,6 +808,7 @@ +# 1.8 JDK/JRE 8 +# 9 JDK/JRE 9 +# 10 JDK/JRE 10 ++# 11 JDK/JRE 11 # Note: gij >= 3.3 can in some cases handle classes compiled with -target 1.4, # and gij >= 4.1 can in some cases partially handle classes compiled with -# -target 1.5, but I have no idea how complete this support is. @@ -782,7 +818,7 @@ # # Specifying target-version is useful when building a library (.jar) that is # useful outside the given package. Omitting target-version is useful when -@@ -47,14 +64,20 @@ +@@ -47,14 +64,21 @@ # It is unreasonable to ask for: # - target-version < 1.4 with source-version >= 1.4, or # - target-version < 1.5 with source-version >= 1.5, or @@ -793,6 +829,7 @@ +# - target_version < 1.8 with source_version >= 1.8, or +# - target_version < 9 with source_version >= 9, or +# - target_version < 10 with source_version >= 10, ++# - target_version < 11 with source_version >= 11, +# because even Sun's/Oracle's javac doesn't support these combinations. # # It is redundant to ask for a target-version > source-version, since the @@ -813,11 +850,11 @@ }` case "$target_version" in - 1.1 | 1.2 | 1.3 | 1.4 | 1.5 | 1.6) ;; -+ 1.1 | 1.2 | 1.3 | 1.4 | 1.5 | 1.6 | 1.7 | 1.8 | 9 | 10) ;; ++ 1.1 | 1.2 | 1.3 | 1.4 | 1.5 | 1.6 | 1.7 | 1.8 | 9 | 10 | 11) ;; null) dnl JDK 1.1.X returns null. target_version=1.1 ;; -@@ -117,6 +140,14 @@ +@@ -117,6 +140,16 @@ 1.4) goodcode='class conftest { static { assert(true); } }' failcode='class conftestfail<T> { T foo() { return null; } }' ;; 1.5) goodcode='class conftest<T> { T foo() { return null; } }' @@ -829,10 +866,12 @@ + 9) goodcode='interface conftest { private void foo () {} }' + failcode='class conftestfail { public void m() { var i = new Integer(0); } }' ;; + 10) goodcode='class conftest { public void m() { var i = new Integer(0); } }' ++ failcode='class conftestfail { public void m() { java.util.function.Predicate<String> predicate = (var a) -> true; } }' ;; ++ 11) goodcode='class conftest { public void m() { java.util.function.Predicate<String> predicate = (var a) -> true; } }' failcode='class conftestfail syntax error' ;; *) AC_MSG_ERROR([invalid source-version argument to gt_@&t@JAVACOMP: $source_version]) ;; esac -@@ -127,6 +158,10 @@ +@@ -127,6 +158,11 @@ 1.4) cfversion=48 ;; 1.5) cfversion=49 ;; 1.6) cfversion=50 ;; @@ -840,6 +879,7 @@ + 1.8) cfversion=52 ;; + 9) cfversion=53 ;; + 10) cfversion=54 ;; ++ 11) cfversion=55 ;; *) AC_MSG_ERROR([invalid target-version argument to gt_@&t@JAVACOMP: $target_version]) ;; esac # Function to output the classfile version of a file (8th byte) in decimal. @@ -861,7 +901,7 @@ dnl dnl javac 1.3: -target 1.1 1.2 1.3 default: 1.1 dnl source always: 1.3 -@@ -181,6 +217,34 @@ +@@ -181,6 +217,42 @@ dnl -target 1.4 only possible with -source 1.3/1.4 dnl -target 1.5 only possible with -source 1.3/1.4/1.5 or no -source dnl @@ -893,6 +933,14 @@ + dnl -target 1.8 only possible with -source 1.6/1.7/1.8 + dnl -target 9 only possible with -source 1.6/1.7/1.8/9 + dnl ++ dnl javac 11: -target 1.6 1.7 1.8 9 10 default: 10 ++ dnl -source 1.6 1.7 1.8 9 10 default: 10 ++ dnl -target 1.6 only possible with -source 1.6 ++ dnl -target 1.7 only possible with -source 1.6/1.7 ++ dnl -target 1.8 only possible with -source 1.6/1.7/1.8 ++ dnl -target 9 only possible with -source 1.6/1.7/1.8/9 ++ dnl -target 10 only possible with -source 1.6/1.7/1.8/9/10 ++ dnl dnl The support of jikes for target-version and source-version: dnl dnl jikes 1.14 does not have a way to specify the target-version. It @@ -937,7 +985,7 @@ Written by Bruno Haible <hai...@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify -@@ -1203,7 +1203,7 @@ +@@ -1206,7 +1206,7 @@ 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;