Hi,

 I apologise for the delay. I have a draft attached, but I am waiting
for the ppa build[1] to run and test the changes.

Best Regards,
 Vladimir.

[1] 
https://launchpad.net/~vpa1977/+archive/ubuntu/october-21/+sourcepub/15830915/+listing-archive-extra

On Fri, Mar 1, 2024 at 12:43 PM Thorsten Glaser <t...@mirbsd.de> wrote:
>
> Vladimir Petko dixit:
>
> >I will prepare the patch for Ubuntu stable releases/i386 and update the bug.
>
> Did you have any luck with this?
>
> bye,
> //mirabilos
> --
> 15:41⎜<Lo-lan-do:#fusionforge> Somebody write a testsuite for helloworld :-)
diff --git a/debian/patches/do-not-throw-when-assistive-technology-not-found.patch b/debian/patches/do-not-throw-when-assistive-technology-not-found.patch
new file mode 100644
index 0000000..6199298
--- /dev/null
+++ b/debian/patches/do-not-throw-when-assistive-technology-not-found.patch
@@ -0,0 +1,21 @@
+Description: do not throw exception when assistive technologies are not found
+ In multiarch installation we may co-install amd64 and i386 versions
+ of openjdk-8 package. i386 version for Ubuntu does not build with
+ ATK bridge for focal, jammy and mantic.
+ Replace the exception with the warning.
+Author: Vladimir Petko <vladimir.pe...@canonical.com>
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/openjdk-8/+bug/1916327
+Forwarded: not-needed
+diff --git a/jdk/src/share/classes/java/awt/Toolkit.java b/jdk/src/share/classes/java/awt/Toolkit.java
+index 91c28f4e28..4d794cc7a3 100644
+--- a/jdk/src/share/classes/java/awt/Toolkit.java
++++ b/jdk/src/share/classes/java/awt/Toolkit.java
+@@ -804,7 +804,7 @@ public abstract class Toolkit {
+                     }
+                     clazz.newInstance();
+                 } catch (ClassNotFoundException e) {
+-                    throw new AWTError("Assistive Technology not found: "
++                    System.err.println("Assistive Technology not found: "
+                             + atName);
+                 } catch (InstantiationException e) {
+                     throw new AWTError("Could not instantiate Assistive"
diff --git a/debian/rules b/debian/rules
index 7932167..1926619 100755
--- a/debian/rules
+++ b/debian/rules
@@ -305,6 +305,16 @@ else
   with_bridge = atk
 endif

+ifeq ($(derivative),Ubuntu)
+  ifeq ($(DEB_HOST_ARCH),i386)
+# disable bridge on focal, jammy and mantic until atk wrapper is introduced
+# in those releases on i386
+    ifneq (,$(filter $(distrel),focal jammy mantic))
+      with_bridge =
+    endif
+  endif
+endif
+
 with_nss = yes

 on_buildd := $(shell [ -f /CurrentlyBuilding -o "$$LOGNAME" = buildd ] && echo yes)
@@ -392,6 +402,17 @@ ifneq (,$(filter $(DEB_HOST_ARCH), $(hotspot_aarch32_archs)))
 	aarch32.diff
 endif

+# append patch to avoid error when assistive technology class
+# is not found
+ifeq ($(derivative),Ubuntu)
+  ifeq ($(DEB_HOST_ARCH),i386)
+    ifneq (,$(filter $(distrel),focal jammy mantic))
+      COMMON_PATCHES += do-not-throw-when-assistive-technology-not-found.patch
+    endif
+  endif
+endif
+
+
 DEFAULT_PATCHES = \
 	${UPSTREAM_PATCHES} \
 	$(COMMON_PATCHES) \

Reply via email to