The laf-widget library that's part of this package generates some Java
bytecode directly:
<https://sources.debian.org/src/insubstantial/7.3+dfsg3-5/laf-widget/src/main/java/org/pushingpixels/lafwidget/ant/LafMainClassAugmenter.java/?hl=174>.
Since Java 11, additional metadata (the "stackmap frame") appears to be
required for Java bytecode, and is not generated by laf-widget.

However, this code generation is apparently only used to "augment" the
rendering of other widget classes and does not seem to be essential for
the function of the library.  In fact, it was completely removed in a
later version of laf-widget:
https://github.com/kirill-grouchnikov/laf-widget/commit/8b0871e84ca6b6c0c479a6033998eb39e0fc767d

I patched the Gradle build files to disable this code generation and
the build succeeded.  I tested triplea with the old and new binaries
built from insubstantial: start the program, install the "Tutorial"
map, and start a local game with that map.  I didn't see any
regressions.  As I expected, the GUI rendering is different but only
slightly; see the attached "old" and "new" screenshots.

scilab is already broken (#1030205) so I couldn't test it.

I will NMU with the attached changes shortly.

Ben.

-- 
Ben Hutchings
Never put off till tomorrow what you can avoid all together.
diff -Nru insubstantial-7.3+dfsg3/debian/changelog insubstantial-7.3+dfsg3/debian/changelog
--- insubstantial-7.3+dfsg3/debian/changelog	2019-08-26 13:49:59.000000000 +0200
+++ insubstantial-7.3+dfsg3/debian/changelog	2023-03-03 23:42:05.000000000 +0100
@@ -1,3 +1,10 @@
+insubstantial (7.3+dfsg3-5.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Java 11: disable augmentation (fixes FTBFS) (Closes: #1013594)
+
+ -- Ben Hutchings <b...@debian.org>  Fri, 03 Mar 2023 23:42:05 +0100
+
 insubstantial (7.3+dfsg3-5) unstable; urgency=medium
 
   [ Andrius Merkys ]
diff -Nru insubstantial-7.3+dfsg3/debian/patches/java-11-disable-augmentation.patch insubstantial-7.3+dfsg3/debian/patches/java-11-disable-augmentation.patch
--- insubstantial-7.3+dfsg3/debian/patches/java-11-disable-augmentation.patch	1970-01-01 01:00:00.000000000 +0100
+++ insubstantial-7.3+dfsg3/debian/patches/java-11-disable-augmentation.patch	2023-03-03 23:11:22.000000000 +0100
@@ -0,0 +1,51 @@
+From: Ben Hutchings <b...@debian.org>
+Subject: Java 11: disable augmentation
+Date: Fri, 03 Mar 2023 23:11:14 +0100
+Bug-Debian: https://bugs.debian.org/1013594
+
+Since Java 11, Java bytecode is required to include some additional
+metadata.  The bytecode generated by laf-widget for "augmentation" of
+other widget libraries does not follow this requirement, resulting in
+a build failure.
+
+A later version of laf-widget has removed this augmentation rather
+than fixing it:
+https://github.com/kirill-grouchnikov/laf-widget/commit/8b0871e84ca6b6c0c479a6033998eb39e0fc767d
+
+This augmentation does not seem to be essential, so disable it until
+it is fixed or properly removed.
+
+---
+--- a/substance-flamingo/build.gradle
++++ b/substance-flamingo/build.gradle
+@@ -24,6 +24,8 @@ dependencies {
+ 
+ task augmentation(dependsOn: classes) {
+   description = "Performs code augmentaiton for the laf-plugin and laf-widget libraries on the substance jar classes"
++  // Broken under Java 11 - see Debian bug #1013594
++  enabled = false
+ 
+   doLast {
+     def augmentClassPath = configurations.toolsCompile.asPath + File.pathSeparator + configurations.compile.asPath
+--- a/substance-swingx/build.gradle
++++ b/substance-swingx/build.gradle
+@@ -25,6 +25,8 @@ dependencies {
+ 
+ task augmentation(dependsOn: classes) {
+   description = "Performs code augmentaiton for the laf-plugin and laf-widget libraries on the substance jar classes"
++  // Broken under Java 11 - see Debian bug #1013594
++  enabled = false
+ 
+   doLast {
+     def augmentClassPath = configurations.toolsCompile.asPath + File.pathSeparator + configurations.compile.asPath
+--- a/substance/build.gradle
++++ b/substance/build.gradle
+@@ -28,6 +28,8 @@ dependencies {
+ 
+ task augmentation(dependsOn: classes) {
+   description = "Performs code augmentaiton for the laf-plugin and laf-widget libraries on the substance jar classes"
++  // Broken under Java 11 - see Debian bug #1013594
++  enabled = false
+ 
+   doLast {
+     def augmentClassPath = configurations.toolsCompile.asPath
diff -Nru insubstantial-7.3+dfsg3/debian/patches/series insubstantial-7.3+dfsg3/debian/patches/series
--- insubstantial-7.3+dfsg3/debian/patches/series	2019-08-26 13:49:59.000000000 +0200
+++ insubstantial-7.3+dfsg3/debian/patches/series	2023-03-03 22:31:44.000000000 +0100
@@ -4,3 +4,4 @@
 asm5.patch
 java9-compatibility.patch
 fix-56.patch
+java-11-disable-augmentation.patch

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to