Bug#1034757: unblock (pre-approval): scilab/6.1.1+dfsg2-5 libjogl2-java/2.3.2+dfsg-10 gluegen2/2.3.2-9

Pierre Gruet pgt at debian.org
Sun Apr 23 16:27:30 BST 2023


Package: release.debian.org
Severity: normal
User: release.debian.org at packages.debian.org
Usertags: unblock
X-Debbugs-Cc: scilab at packages.debian.org
Control: affects -1 + src:scilab src:libjogl2-java src:gluegen2

Dear Release team,

I am writing to get a pre-approval about unblocking the three packages of the
dependency chain:
gluegen2 -> libjogl2-javva -> scilab

I have not uploaded anything to unstable right now, everything is done in
experimental for these three packages. Below is the rationale for my request:

[ Reason ]

Currently, the key package scilab/6.1.1+dfsg2-5 in sid/testing has two big
problems:
- it does not start since we have openjdk-17 as default Java machine, see grave
  bug #1033496: it is unusable right now;
- if one starts it with an older jdk, it is impossible to draw any plot due to #959732 in libjogl2-java.

Also the key package gluegen2 has a RC bug #1034752 about non-free files it
contains.

gluegen2/2.4.0+dfsg-1~exp1, libjogl2-java/2.4.0+dfsg-1~exp1 and
scilab/6.1.1+dfsg2-6~exp1 fix all of these issues and are working well in
experimental, so if you pre-approve this request, I will upload them to
unstable.

[ Impact ]

If the unblock is not granted, scilab will remain unusable in Bookworm (which
would be a shame given its huge importance as a numerical computation tool) and
also the users of libjogl2-java would meet Java exceptions in common use cases,
see #959732.

[ Tests ]

I installed the packages from experimental on my computer runnint Bookworm and
could plainly use scilab (computing things and plotting figures), all the
errors described above are gone.  Also I built the only other rdep of
libjogl2-java, king, and ran it with no error on my computer.

[ Risks ]

This unblock would lead to new upstream versions (with some packaging work more
complex than just refreshing patches) of gluegen2 and libjogl2 shipped into
Bookworm, which I trust to be OK as they have only one rdep, king, which works
well with them.

[ Checklist ]
  [X] all changes are documented in the d/changelog
  [X] I reviewed all changes (did them myself) and I approve them
  [X] attach debdiffs of the three packages in experimental against the
      packages in testing

Thanks a lot for your advice,

-- 
Pierre
-------------- next part --------------
diff -Nru scilab-6.1.1+dfsg2/debian/changelog scilab-6.1.1+dfsg2/debian/changelog
--- scilab-6.1.1+dfsg2/debian/changelog	2023-03-11 16:23:07.000000000 +0100
+++ scilab-6.1.1+dfsg2/debian/changelog	2023-04-23 10:42:22.000000000 +0200
@@ -1,3 +1,19 @@
+scilab (6.1.1+dfsg2-6~exp1) experimental; urgency=medium
+
+  * Adding a binNMUable versioned dependency of scilab on scilab-full-bin
+
+ -- Pierre Gruet <pgt at debian.org>  Sun, 23 Apr 2023 10:42:22 +0200
+
+scilab (6.1.1+dfsg2-6~exp0) experimental; urgency=medium
+
+  * Team upload
+  * Rebuild against libjogl2-java version 2.4.0+dfsg, which changed the name of
+    the .so file shipped in libjogl2-jni
+  * Removing the unneeded build-dependency on dpkg-dev
+  * Adding one more --add-opens in the invocation to work with openjdk-17
+
+ -- Pierre Gruet <pgt at debian.org>  Sat, 22 Apr 2023 17:53:23 +0200
+
 scilab (6.1.1+dfsg2-5) unstable; urgency=medium
 
   * Team upload
diff -Nru scilab-6.1.1+dfsg2/debian/control scilab-6.1.1+dfsg2/debian/control
--- scilab-6.1.1+dfsg2/debian/control	2023-03-10 23:21:05.000000000 +0100
+++ scilab-6.1.1+dfsg2/debian/control	2023-04-23 10:41:52.000000000 +0200
@@ -6,12 +6,12 @@
 Build-Depends: debhelper-compat (= 13), gfortran, time, default-jdk, chrpath,
  ocaml-nox, libnum-ocaml-dev, fakeroot, tcl-dev, tk-dev, libxml2-dev,
  libpcre3-dev, libcurl4-openssl-dev, gettext, libreadline-dev, pkg-config,
- procps, dpkg-dev,
+ procps,
 # numerical libraries
  libblas-dev | librefblas3-dev | libatlas-base-dev, liblapack-dev,
  libarpack2-dev, libeigen3-dev,
 # Java deps
- default-jre-headless, libflexdock-java, libjogl2-java, libgl1-mesa-dev,
+ default-jre-headless, libflexdock-java, libjogl2-java (>= 2.4.0+dfsg), libgl1-mesa-dev,
  libjrosetta-java, ant, libjgoodies-looks-java, libskinlf-java,
  liblucene4.10-java, libactivation-java, libjaxb-java,
 # graphic
@@ -61,7 +61,9 @@
 
 Package: scilab
 Architecture: all
-Depends: scilab-cli (>= ${source:Version}), ${misc:Depends}, scilab-full-bin
+Depends: scilab-cli (>= ${source:Version}), ${misc:Depends},
+         scilab-full-bin (>= ${binary:Version}),
+         scilab-full-bin (<< ${binary:Version}.1~)
 Recommends: scilab-doc (= ${binary:Version}),
 Suggests: scilab-doc-fr (= ${binary:Version}),
  scilab-doc-pt-br (= ${binary:Version}),
@@ -155,7 +157,7 @@
 Package: scilab-full-bin
 Architecture: amd64 armhf i386 powerpc s390x arm64 ppc64el
 Depends: ${shlibs:Depends}, scilab-minimal-bin (= ${binary:Version}),
- libflexdock-java, libjogl2-java, libjrosetta-java,
+ libflexdock-java, libjogl2-java (>= 2.4.0+dfsg), libjrosetta-java,
  libjlatexmath-java, libjlatexmath-fop-java,
  libjeuclid-core-java, libbatik-java, default-jre, bwidget,
  fop, libsaxon-java, libavalon-framework-java, docbook-xsl,
diff -Nru scilab-6.1.1+dfsg2/debian/patches/libjogl2-java-2.4.0.patch scilab-6.1.1+dfsg2/debian/patches/libjogl2-java-2.4.0.patch
--- scilab-6.1.1+dfsg2/debian/patches/libjogl2-java-2.4.0.patch	1970-01-01 01:00:00.000000000 +0100
+++ scilab-6.1.1+dfsg2/debian/patches/libjogl2-java-2.4.0.patch	2023-04-22 17:45:07.000000000 +0200
@@ -0,0 +1,30 @@
+Description: changing the name of the JNI library shipped in libjogl2-jni,
+ which changed in libjogl2-java/2.4.0+dfsg.
+Author: Pierre Gruet <pgt at debian.org>
+Forwarded: no
+Last-Update: 2023-04-22
+
+--- a/scilab/configure.ac
++++ b/scilab/configure.ac
+@@ -1006,8 +1006,8 @@
+                    LDFLAGS="$LDFLAGS -L/usr/lib/gluegen2 -L/usr/lib64/gluegen2"         # RedHat
+                    LDFLAGS="$LDFLAGS -L$SCI_SRCDIR/thirdparty -L$SCI_SRCDIR/lib/thirdparty -L$SCI_SRCDIR/bin"        # Scilab thirdparties
+                    symbol="Java_jogamp_common_jvm_JVMUtil_initialize"
+-                   AC_CHECK_LIB([gluegen2-rt], [$symbol], [GLUEGEN2_RT_LIBS="-lgluegen2-rt"],
+-                   [AC_MSG_ERROR([libgluegen2-rt: Library missing (Cannot find symbol $symbol). Check if libgluegen-rt - C/Java (JNI) interface for GLUEGEN2 - is installed and if the version is correct. Note that you might have to update etc/librarypath.xml to provide the actual path to the JNI libraries.])],
++                   AC_CHECK_LIB([gluegen2_rt], [$symbol], [GLUEGEN2_RT_LIBS="-lgluegen2_rt"],
++                   [AC_MSG_ERROR([libgluegen2_rt: Library missing (Cannot find symbol $symbol). Check if libgluegen-rt - C/Java (JNI) interface for GLUEGEN2 - is installed and if the version is correct. Note that you might have to update etc/librarypath.xml to provide the actual path to the JNI libraries.])],
+                    [-ldl])
+                    LDFLAGS=$LDFLAGS_save
+                 fi
+--- a/scilab/modules/gui/src/java/org/scilab/modules/gui/SwingView.java
++++ b/scilab/modules/gui/src/java/org/scilab/modules/gui/SwingView.java
+@@ -161,7 +161,7 @@
+ 
+     static {
+         try {
+-            System.loadLibrary("gluegen2-rt");
++            System.loadLibrary("gluegen2_rt");
+         } catch (Exception e) {
+             System.err.println(e);
+         }
diff -Nru scilab-6.1.1+dfsg2/debian/patches/populating_java_options_by_default.patch scilab-6.1.1+dfsg2/debian/patches/populating_java_options_by_default.patch
--- scilab-6.1.1+dfsg2/debian/patches/populating_java_options_by_default.patch	2023-03-11 14:13:54.000000000 +0100
+++ scilab-6.1.1+dfsg2/debian/patches/populating_java_options_by_default.patch	2023-04-22 17:46:54.000000000 +0200
@@ -14,7 +14,7 @@
 +# We initialize _JAVA_OPTIONS so that the right paths are looked into and we
 +# add the needed --add-opens to work with OpenJDK 17.
 +if ! echo "${_JAVA_OPTIONS}" | grep -q "java\.library\.path" ; then
-+    _JAVA_OPTIONS="${_JAVA_OPTIONS} -Djava.library.path=/usr/lib/jni:/usr/lib/scilab --add-opens=java.desktop/sun.awt.X11=ALL-UNNAMED --add-opens=java.desktop/sun.java2d.opengl=ALL-UNNAMED"
++    _JAVA_OPTIONS="${_JAVA_OPTIONS} -Djava.library.path=/usr/lib/jni:/usr/lib/scilab --add-opens=java.desktop/sun.awt.X11=ALL-UNNAMED --add-opens=java.desktop/sun.java2d.opengl=ALL-UNNAMED --add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED"
 +fi
 +
  if test ! -z "$SCIVERBOSE"; then
diff -Nru scilab-6.1.1+dfsg2/debian/patches/series scilab-6.1.1+dfsg2/debian/patches/series
--- scilab-6.1.1+dfsg2/debian/patches/series	2023-03-11 00:29:51.000000000 +0100
+++ scilab-6.1.1+dfsg2/debian/patches/series	2023-04-22 17:42:07.000000000 +0200
@@ -24,3 +24,4 @@
 selecting_unversioned_jars.patch
 fixing_doc_build.patch
 populating_java_options_by_default.patch
+libjogl2-java-2.4.0.patch
-------------- next part --------------
diff -Nru gluegen2-2.3.2/.classpath gluegen2-2.4.0+dfsg/.classpath
--- gluegen2-2.3.2/.classpath	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/.classpath	2023-02-01 18:52:41.000000000 +0100
@@ -23,11 +23,15 @@
 	<classpathentry kind="src" path="test/junit"/>
 	<classpathentry kind="src" path="jcpp/src/main/java"/>
 	<classpathentry kind="src" path="jcpp/src/test/java"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Ant"/>
 	<classpathentry kind="lib" path="make/lib/antlr.jar" sourcepath="make/lib/antlr-src.zip"/>
-	<classpathentry kind="lib" path="make/lib/android-sdk/15/android.jar" sourcepath="make/lib/android-sdk/15/android-java-src.zip"/>
 	<classpathentry kind="lib" path="make/lib/junit.jar" sourcepath="make/lib/junit-sources.jar"/>
 	<classpathentry kind="lib" path="make/lib/semantic-versioning/semver.jar" sourcepath="make/lib/semantic-versioning/semver-src.zip"/>
+	<classpathentry kind="lib" path="make/lib/android-sdk/24/android.jar" sourcepath="make/lib/android-sdk/24/android-java-src.zip"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
+		<attributes>
+			<attribute name="module" value="true"/>
+		</attributes>
+	</classpathentry>
 	<classpathentry kind="output" path="build/eclipse-classes"/>
 </classpath>
diff -Nru gluegen2-2.3.2/debian/ant.properties gluegen2-2.4.0+dfsg/debian/ant.properties
--- gluegen2-2.3.2/debian/ant.properties	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/ant.properties	2023-03-18 08:00:23.000000000 +0100
@@ -1,6 +1,6 @@
-target.sourcelevel=1.7
-target.targetlevel=1.7
-target.rt.jar=1.7
+target.sourcelevel=1.8
+target.targetlevel=1.8
+target.rt.jar=1.8
 antlr.jar=/usr/share/java/antlr.jar
 junit.jar=/usr/share/java/junit4.jar
 ant.jar=/usr/share/java/ant.jar
diff -Nru gluegen2-2.3.2/debian/changelog gluegen2-2.4.0+dfsg/debian/changelog
--- gluegen2-2.3.2/debian/changelog	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/changelog	2023-04-16 22:05:09.000000000 +0200
@@ -1,3 +1,47 @@
+gluegen2 (2.4.0+dfsg-1~exp1) experimental; urgency=medium
+
+  * Team upload.
+  * Providing the right path for the Debian-installed cpptasks jar
+
+ -- Pierre Gruet <pgt at debian.org>  Sun, 16 Apr 2023 22:05:09 +0200
+
+gluegen2 (2.4.0+dfsg-1~exp0) experimental; urgency=medium
+
+  * Team upload.
+  * New upstream version 2.4.0+dfsg:
+    - Repacking through the Files-Excluded mechanism and a MUT package
+    - Excluding non-free contents in make/stub_includes/jni
+  * Raising Standards version to 4.6.2
+    - Setting Rules-Requires-Root: no
+  * Working on debian/patches/:
+    - Refreshing patches
+    - Revising all patch headers
+    - Cleaning old, long unused patches
+  * Working on debian/control:
+    - Revising the versioned dependencies and the Suggests:
+    - Revising the short descriptions of the binary packages
+    - Marking the -doc package as Multi-Arch: foreign
+    - Marking the junit4 B-D with nocheck
+  * Working on debian/rules:
+    - Rewriting get-orig-pom rule as we now append +dfsg to upstream version
+      numbers
+    - Honouring DEB_BUILD_OPTIONS=nocheck
+  * Refreshing debian/copyright
+  * Raising debian/watch version to 4
+  * Raising sourcelevel and targetlevel to 1.8 in debian/ant.properties
+  * Removing now outdated debian/README.source file
+  * Removing cc attributes that ant does not understand
+  * Providing the path of the build .so file to the tests
+  * Including the jni headers from the system instead of the non-free embedded
+    ones
+  * Changing the name of the .so to be installed in the -jni package
+  * Adding missing shebangs in packaged scripts
+  * Hardening by passing the LDFLAGS contents to the ant build file
+  * Adding a Lintian override for shipped text files, seen as documentation
+  * Manually updating the embedded pom file
+
+ -- Pierre Gruet <pgt at debian.org>  Sun, 19 Mar 2023 08:20:16 +0100
+
 gluegen2 (2.3.2-9) unstable; urgency=medium
 
   * Team upload.
diff -Nru gluegen2-2.3.2/debian/control gluegen2-2.4.0+dfsg/debian/control
--- gluegen2-2.3.2/debian/control	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/control	2023-03-19 08:03:11.000000000 +0100
@@ -9,12 +9,13 @@
  ant-contrib-cpptasks,
  ant-optional,
  debhelper-compat (= 13),
- default-jdk (>= 2:1.7),
- junit4,
+ default-jdk,
+ junit4 <!nocheck>,
  libantlr-java,
  libjsr305-java,
  maven-repo-helper
-Standards-Version: 4.5.1
+Standards-Version: 4.6.2
+Rules-Requires-Root: no
 Vcs-Git: https://salsa.debian.org/java-team/gluegen2.git
 Vcs-Browser: https://salsa.debian.org/java-team/gluegen2
 Homepage: https://jogamp.org
@@ -26,7 +27,7 @@
  antlr,
  libgluegen2-jni (>= ${source:Version}),
  ${misc:Depends}
-Description: Tool to automatically generate the Java and JNI code
+Description: tool to automatically generate Java and JNI code (runtime files)
  Gluegen reads as input ANSI C header files and separate configuration files
  which provide control over many aspects of the glue code generation. GlueGen
  uses a complete ANSI C parser and an internal representation (IR) capable of
@@ -42,7 +43,7 @@
 Architecture: all
 Suggests: libgluegen2-doc
 Depends: antlr, ${misc:Depends}
-Description: Tool to automatically generate the Java and JNI code
+Description: tool to automatically generate Java and JNI code (Java sources)
  Gluegen reads as input ANSI C header files and separate configuration files
  which provide control over many aspects of the glue code generation. GlueGen
  uses a complete ANSI C parser and an internal representation (IR) capable of
@@ -58,7 +59,7 @@
 Package: libgluegen2-jni
 Architecture: any
 Depends: ${misc:Depends}, ${shlibs:Depends}
-Description: Tool to automatically generate the Java and JNI code
+Description: tool to automatically generate Java and JNI code (native library)
  Gluegen reads as input ANSI C header files and separate configuration files
  which provide control over many aspects of the glue code generation. GlueGen
  uses a complete ANSI C parser and an internal representation (IR) capable of
@@ -74,8 +75,9 @@
 Architecture: all
 Section: doc
 Depends: ${misc:Depends}
-Suggests: libgluegen2
-Description: Tool to automatically generate the Java and JNI code
+Suggests: libgluegen2-build-java, libgluegen2-rt-java
+Multi-Arch: foreign
+Description: tool to automatically generate Java and JNI code (documentation)
  Gluegen reads as input ANSI C header files and separate configuration files
  which provide control over many aspects of the glue code generation. GlueGen
  uses a complete ANSI C parser and an internal representation (IR) capable of
diff -Nru gluegen2-2.3.2/debian/copyright gluegen2-2.4.0+dfsg/debian/copyright
--- gluegen2-2.3.2/debian/copyright	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/copyright	2023-03-19 08:03:11.000000000 +0100
@@ -1,10 +1,164 @@
 Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Source: https://jogamp.org
+Files-Excluded: .gitignore
+                .htaccess
+                make/lib
+                **/*.jar
+                make/stub_includes/jni
+Comment: Removing cruft and non-free contents, especially the
+         "PROPRIETARY/CONFIDENTIAL" ones in m/s/jni and the embedded jars.
 
 Files: *
-Copyright: 2003-2005, Sun Microsystems, Inc.
-           2010, JogAmp Community.
-License: BSD-2-clause
+Copyright: 2010-2019 JogAmp Community.
+License: BSD-2-Clause-Views
+
+Files: jcpp/*
+Copyright: 2007-2008 Shevek
+License: Apache-2.0
+
+Files: jcpp/src/main/java/com/jogamp/gluegen/jcpp/JCPP.java
+Copyright: 2015 JogAmp Community.
+License: Apache-2.0
+
+Files: src/java/com/jogamp/common/jvm/*
+       src/java/com/jogamp/common/os/DynamicLookupHelper.java
+       src/java/com/jogamp/gluegen/*
+Copyright: 2003-2006 Sun Microsystems, Inc.
+License: BSD-3-Clause-No-Nuclear-Warranty
+
+Files: src/java/com/jogamp/common/net/Uri.java
+Copyright: 2014 JogAmp Community.
+           2006-2010 The Apache Software Foundation.
+License: Apache-2.0
+
+Files: src/java/com/jogamp/common/nio/Buffers.java
+       src/java/com/jogamp/common/nio/StructAccessor.java
+       src/java/com/jogamp/common/os/MachineDataInfo.java
+       src/java/com/jogamp/common/os/NativeLibrary.java
+       src/java/com/jogamp/common/util/ReflectionUtil.java
+Copyright: 2010-2011 JogAmp Community.
+           2003-2006 Sun Microsystems, Inc.
+License: BSD-3-Clause-No-Nuclear-Warranty
+
+Files: src/java/com/jogamp/common/util/WeakIdentityHashMap.java
+Copyright: 2019 JogAmp Community.
+           Apache Software Foundation
+License: BSD-2-Clause-Views and Apache-2.0
+
+Files: src/java/com/jogamp/gluegen/ASTLocusTag.java
+       src/java/com/jogamp/gluegen/ConstantDefinition.java
+       src/java/com/jogamp/gluegen/GenericCPP.java
+       src/java/com/jogamp/gluegen/GlueGenException.java
+       src/java/com/jogamp/gluegen/Logging.java
+       src/java/com/jogamp/gluegen/TypeConfig.java
+Copyright: 2010-2019 JogAmp Community.
+License: BSD-2-Clause-Views
+
+Files: src/java/com/jogamp/gluegen/GlueGen.java
+       src/java/com/jogamp/gluegen/JavaConfiguration.java
+       src/java/com/jogamp/gluegen/JavaEmitter.java
+       src/java/com/jogamp/gluegen/JavaType.java
+       src/java/com/jogamp/gluegen/TypeInfo.java
+Copyright: 2010 JogAmp Community.
+           2003 Sun Microsystems, Inc.
+License: BSD-3-Clause-No-Nuclear-Warranty
+
+Files: src/java/com/jogamp/gluegen/SymbolFilter.java
+       src/java/jogamp/common/jvm/*
+Copyright: 2008 Sun Microsystems, Inc.
+License: BSD-3-Clause
+
+Files: src/java/com/jogamp/gluegen/ant/GlueGenTask.java
+Copyright: 2010 JogAmp Community.
+           2003-2005 Sun Microsystems, Inc.
+           2003 Rob Grzywinski
+License: BSD-3-Clause-No-Nuclear-Warranty
+
+Files: src/java/com/jogamp/gluegen/cgram/*
+Copyright: 2010-2014 JogAmp Community.
+           2003-2006 Sun Microsystems, Inc.
+License: BSD-3-Clause-No-Nuclear-Warranty
+
+Files: src/java/com/jogamp/gluegen/cgram/Define.java
+       src/java/com/jogamp/gluegen/runtime/BufferFactoryInternal.java
+Copyright: 2003-2006 Sun Microsystems, Inc.
+License: BSD-3-Clause-No-Nuclear-Warranty
+
+Files: src/java/com/jogamp/gluegen/cgram/types/AliasedSymbol.java
+       src/java/com/jogamp/gluegen/cgram/types/CompoundTypeKind.java
+       src/java/com/jogamp/gluegen/cgram/types/MemoryLayoutType.java
+       src/java/com/jogamp/gluegen/cgram/types/StructType.java
+       src/java/com/jogamp/gluegen/cgram/types/TypeComparator.java
+       src/java/com/jogamp/gluegen/cgram/types/UnionType.java
+       src/java/com/jogamp/gluegen/runtime/FunctionAddressResolver.java
+Copyright: 2010-2019 JogAmp Community.
+License: BSD-2-Clause-Views
+
+Files: src/java/com/jogamp/gluegen/cgram/types/CVAttributes.java
+       src/java/com/jogamp/gluegen/cgram/types/Field.java
+       src/java/com/jogamp/gluegen/cgram/types/FunctionSymbol.java
+       src/java/com/jogamp/gluegen/cgram/types/TypeDictionary.java
+       src/java/com/jogamp/gluegen/cgram/types/TypeVisitor.java
+Copyright: 2003-2006 Sun Microsystems, Inc.
+License: BSD-3-Clause-No-Nuclear-Warranty
+
+Files: src/java/com/jogamp/gluegen/procaddress/ProcAddressEmitter.java
+       src/java/com/jogamp/gluegen/runtime/ProcAddressTable.java
+Copyright: 2013 JogAmp Community.
+           2003-2005 Sun Microsystems, Inc.
+License: BSD-3-Clause-No-Nuclear-Warranty
+
+Files: src/java/com/jogamp/gluegen/structgen/*
+Copyright: 2013 JogAmp Community.
+           2010 Michael Bien.
+License: BSD-3-Clause
+
+Files: src/native/common/JVMUtil.c
+Copyright: 2014 JogAmp Community.
+           2003 Sun Microsystems, Inc.
+License: BSD-3-Clause-No-Nuclear-Warranty
+
+Files: test/*
+Copyright: 2004-2010 P. Simon Tuffs (simon at simontuffs.com)
+License: BSD-3-Clause
+
+Files: test/junit/*
+Copyright: 2010 JogAmp Community.
+License: BSD-2-Clause-Views
+
+Files: debian/*
+Copyright: 2010-2014 Sylvestre Ledru <sylvestre at debian.org>
+           2013-2022 tony mancill <tmancill at debian.org>
+           2023 Pierre Gruet <pgt at debian.org>
+License: Expat
+
+License: BSD-2-Clause-Views
+ Redistribution and use in source and binary forms, with or without modification, are
+ permitted provided that the following conditions are met:
+ .
+ 1. Redistributions of source code must retain the above copyright notice, this list of
+    conditions and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list
+    of conditions and the following disclaimer in the documentation and/or other materials
+    provided with the distribution.
+ .
+ THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ .
+ The views and conclusions contained in the software and documentation are those of the
+ authors and should not be interpreted as representing official policies, either expressed
+ or implied, of JogAmp Community.
+ 
+
+License: BSD-3-Clause-No-Nuclear-Warranty
  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions are
  met:
@@ -37,428 +191,7 @@
  in the design, construction, operation or maintenance of any nuclear
  facility.
 
-
-Files: src/java/com/jogamp/*
-Copyright: 1998-2000, Non, Inc.
-License: BSD-4-clause
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
- .
- Redistributions of source code must retain the above copyright
- notice, this list of conditions, and the following disclaimer.
- .
- Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions, and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
- .
- All advertising materials mentioning features or use of this
- software must display the following acknowledgement:  
- .
- This product includes software developed by Non, Inc. and
- its contributors.
- .
- Neither name of the company nor the names of its contributors
- may be used to endorse or promote products derived from this
- software without specific prior written permission.
- .
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
- IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COMPANY OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-
-
-Files: doc/manual/index.html
-       www/index.html
-Copyright: 2010, JogAmp Community
-License: CC-BY-SA-3.0
- Creative Commons Attribution-ShareAlike 3.0 Unported
- ?
- CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
- LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN
- ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION
- ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE
- INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
- ITS USE.
- ?
- License
- ?
- THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE
- COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY
- COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS
- AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
- ?
- BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE
- TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY
- BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS
- CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND
- CONDITIONS.
- ?
- 1. Definitions
- ?
- a. "Adaptation" means a work based upon the Work, or upon the Work and
- other pre-existing works, such as a translation, adaptation, derivative
- work, arrangement of music or other alterations of a literary or
- artistic work, or phonogram or performance and includes cinematographic
- adaptations or any other form in which the Work may be recast,
- transformed, or adapted including in any form recognizably derived from
- the original, except that a work that constitutes a Collection will not
- be considered an Adaptation for the purpose of this License. For the
- avoidance of doubt, where the Work is a musical work, performance or
- phonogram, the synchronization of the Work in timed-relation with a
- moving image ("synching") will be considered an Adaptation for the
- purpose of this License.
- ?
- b. "Collection" means a collection of literary or artistic works, such
- as encyclopedias and anthologies, or performances, phonograms or
- broadcasts, or other works or subject matter other than works listed in
- Section 1(f) below, which, by reason of the selection and arrangement of
- their contents, constitute intellectual creations, in which the Work is
- included in its entirety in unmodified form along with one or more other
- contributions, each constituting separate and independent works in
- themselves, which together are assembled into a collective whole. A work
- that constitutes a Collection will not be considered an Adaptation (as
- defined below) for the purposes of this License.
- ?
- c. "Creative Commons Compatible License" means a license that is listed
- at http://creativecommons.org/compatiblelicenses that has been approved
- by Creative Commons as being essentially equivalent to this License,
- including, at a minimum, because that license: (i) contains terms that
- have the same purpose, meaning and effect as the License Elements of
- this License; and, (ii) explicitly permits the relicensing of
- adaptations of works made available under that license under this
- License or a Creative Commons jurisdiction license with the same License
- Elements as this License.
- ?
- d. "Distribute" means to make available to the public the original and
- copies of the Work or Adaptation, as appropriate, through sale or other
- transfer of ownership.
- ?
- e. "License Elements" means the following high-level license attributes
- as selected by Licensor and indicated in the title of this License:
- Attribution, ShareAlike.
- ?
- f. "Licensor" means the individual, individuals, entity or entities that
- offer(s) the Work under the terms of this License.
- ?
- g. "Original Author" means, in the case of a literary or artistic work,
- the individual, individuals, entity or entities who created the Work or
- if no individual or entity can be identified, the publisher; and in
- addition (i) in the case of a performance the actors, singers,
- musicians, dancers, and other persons who act, sing, deliver, declaim,
- play in, interpret or otherwise perform literary or artistic works or
- expressions of folklore; (ii) in the case of a phonogram the producer
- being the person or legal entity who first fixes the sounds of a
- performance or other sounds; and, (iii) in the case of broadcasts, the
- organization that transmits the broadcast.
- ?
- h. "Work" means the literary and/or artistic work offered under the
- terms of this License including without limitation any production in the
- literary, scientific and artistic domain, whatever may be the mode or
- form of its expression including digital form, such as a book, pamphlet
- and other writing; a lecture, address, sermon or other work of the same
- nature; a dramatic or dramatico-musical work; a choreographic work or
- entertainment in dumb show; a musical composition with or without words;
- a cinematographic work to which are assimilated works expressed by a
- process analogous to cinematography; a work of drawing, painting,
- architecture, sculpture, engraving or lithography; a photographic work
- to which are assimilated works expressed by a process analogous to
- photography; a work of applied art; an illustration, map, plan, sketch
- or three-dimensional work relative to geography, topography,
- architecture or science; a performance; a broadcast; a phonogram; a
- compilation of data to the extent it is protected as a copyrightable
- work; or a work performed by a variety or circus performer to the extent
- it is not otherwise considered a literary or artistic work.
- ?
- i. "You" means an individual or entity exercising rights under this
- License who has not previously violated the terms of this License with
- respect to the Work, or who has received express permission from the
- Licensor to exercise rights under this License despite a previous
- violation.
- ?
- j. "Publicly Perform" means to perform public recitations of the Work
- and to communicate to the public those public recitations, by any means
- or process, including by wire or wireless means or public digital
- performances; to make available to the public Works in such a way that
- members of the public may access these Works from a place and at a place
- individually chosen by them; to perform the Work to the public by any
- means or process and the communication to the public of the performances
- of the Work, including by public digital performance; to broadcast and
- rebroadcast the Work by any means including signs, sounds or images.
- ?
- k. "Reproduce" means to make copies of the Work by any means including
- without limitation by sound or visual recordings and the right of
- fixation and reproducing fixations of the Work, including storage of a
- protected performance or phonogram in digital form or other electronic
- medium.
- ?
- 2. Fair Dealing Rights. Nothing in this License is intended to reduce,
- limit, or restrict any uses free from copyright or rights arising from
- limitations or exceptions that are provided for in connection with the
- copyright protection under copyright law or other applicable laws.
- ?
- 3. License Grant. Subject to the terms and conditions of this License,
- Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
- perpetual (for the duration of the applicable copyright) license to
- exercise the rights in the Work as stated below:
- ?
- a. to Reproduce the Work, to incorporate the Work into one or more
- Collections, and to Reproduce the Work as incorporated in the
- Collections;
- ?
- b. to create and Reproduce Adaptations provided that any such
- Adaptation, including any translation in any medium, takes reasonable
- steps to clearly label, demarcate or otherwise identify that changes
- were made to the original Work. For example, a translation could be
- marked "The original work was translated from English to Spanish," or a
- modification could indicate "The original work has been modified.";
- ?
- c. to Distribute and Publicly Perform the Work including as incorporated
- in Collections; and,
- ?
- d. to Distribute and Publicly Perform Adaptations.
- ?
- e. For the avoidance of doubt:
- ?
- i. Non-waivable Compulsory License Schemes. In those jurisdictions in
- which the right to collect royalties through any statutory or compulsory
- licensing scheme cannot be waived, the Licensor reserves the exclusive
- right to collect such royalties for any exercise by You of the rights
- granted under this License;
- ?
- ii. Waivable Compulsory License Schemes. In those jurisdictions in which
- the right to collect royalties through any statutory or compulsory
- licensing scheme can be waived, the Licensor waives the exclusive right
- to collect such royalties for any exercise by You of the rights granted
- under this License; and,
- ?
- iii. Voluntary License Schemes. The Licensor waives the right to collect
- royalties, whether individually or, in the event that the Licensor is a
- member of a collecting society that administers voluntary licensing
- schemes, via that society, from any exercise by You of the rights
- granted under this License.
- ?
- The above rights may be exercised in all media and formats whether now
- known or hereafter devised. The above rights include the right to make
- such modifications as are technically necessary to exercise the rights
- in other media and formats. Subject to Section 8(f), all rights not
- expressly granted by Licensor are hereby reserved.
- ?
- 4. Restrictions. The license granted in Section 3 above is expressly
- made subject to and limited by the following restrictions:
- ?
- a. You may Distribute or Publicly Perform the Work only under the terms
- of this License. You must include a copy of, or the Uniform Resource
- Identifier (URI) for, this License with every copy of the Work You
- Distribute or Publicly Perform. You may not offer or impose any terms on
- the Work that restrict the terms of this License or the ability of the
- recipient of the Work to exercise the rights granted to that recipient
- under the terms of the License. You may not sublicense the Work. You
- must keep intact all notices that refer to this License and to the
- disclaimer of warranties with every copy of the Work You Distribute or
- Publicly Perform. When You Distribute or Publicly Perform the Work, You
- may not impose any effective technological measures on the Work that
- restrict the ability of a recipient of the Work from You to exercise the
- rights granted to that recipient under the terms of the License. This
- Section 4(a) applies to the Work as incorporated in a Collection, but
- this does not require the Collection apart from the Work itself to be
- made subject to the terms of this License. If You create a Collection,
- upon notice from any Licensor You must, to the extent practicable,
- remove from the Collection any credit as required by Section 4(c), as
- requested. If You create an Adaptation, upon notice from any Licensor
- You must, to the extent practicable, remove from the Adaptation any
- credit as required by Section 4(c), as requested.
- ?
- b. You may Distribute or Publicly Perform an Adaptation only under the
- terms of: (i) this License; (ii) a later version of this License with
- the same License Elements as this License; (iii) a Creative Commons
- jurisdiction license (either this or a later license version) that
- contains the same License Elements as this License (e.g.,
- Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons Compatible
- License. If you license the Adaptation under one of the licenses
- mentioned in (iv), you must comply with the terms of that license. If
- you license the Adaptation under the terms of any of the licenses
- mentioned in (i), (ii) or (iii) (the "Applicable License"), you must
- comply with the terms of the Applicable License generally and the
- following provisions: (I) You must include a copy of, or the URI for,
- the Applicable License with every copy of each Adaptation You Distribute
- or Publicly Perform; (II) You may not offer or impose any terms on the
- Adaptation that restrict the terms of the Applicable License or the
- ability of the recipient of the Adaptation to exercise the rights
- granted to that recipient under the terms of the Applicable License;
- (III) You must keep intact all notices that refer to the Applicable
- License and to the disclaimer of warranties with every copy of the Work
- as included in the Adaptation You Distribute or Publicly Perform; (IV)
- when You Distribute or Publicly Perform the Adaptation, You may not
- impose any effective technological measures on the Adaptation that
- restrict the ability of a recipient of the Adaptation from You to
- exercise the rights granted to that recipient under the terms of the
- Applicable License. This Section 4(b) applies to the Adaptation as
- incorporated in a Collection, but this does not require the Collection
- apart from the Adaptation itself to be made subject to the terms of the
- Applicable License.
- ?
- c. If You Distribute, or Publicly Perform the Work or any Adaptations or
- Collections, You must, unless a request has been made pursuant to
- Section 4(a), keep intact all copyright notices for the Work and
- provide, reasonable to the medium or means You are utilizing: (i) the
- name of the Original Author (or pseudonym, if applicable) if supplied,
- and/or if the Original Author and/or Licensor designate another party or
- parties (e.g., a sponsor institute, publishing entity, journal) for
- attribution ("Attribution Parties") in Licensor's copyright notice,
- terms of service or by other reasonable means, the name of such party or
- parties; (ii) the title of the Work if supplied; (iii) to the extent
- reasonably practicable, the URI, if any, that Licensor specifies to be
- associated with the Work, unless such URI does not refer to the
- copyright notice or licensing information for the Work; and (iv) ,
- consistent with Ssection 3(b), in the case of an Adaptation, a credit
- identifying the use of the Work in the Adaptation (e.g., "French
- translation of the Work by Original Author," or "Screenplay based on
- original Work by Original Author"). The credit required by this Section
- 4(c) may be implemented in any reasonable manner; provided, however,
- that in the case of a Adaptation or Collection, at a minimum such credit
- will appear, if a credit for all contributing authors of the Adaptation
- or Collection appears, then as part of these credits and in a manner at
- least as prominent as the credits for the other contributing authors.
- For the avoidance of doubt, You may only use the credit required by this
- Section for the purpose of attribution in the manner set out above and,
- by exercising Your rights under this License, You may not implicitly or
- explicitly assert or imply any connection with, sponsorship or
- endorsement by the Original Author, Licensor and/or Attribution Parties,
- as appropriate, of You or Your use of the Work, without the separate,
- express prior written permission of the Original Author, Licensor and/or
- Attribution Parties.
- ?
- d. Except as otherwise agreed in writing by the Licensor or as may be
- otherwise permitted by applicable law, if You Reproduce, Distribute or
- Publicly Perform the Work either by itself or as part of any Adaptations
- or Collections, You must not distort, mutilate, modify or take other
- derogatory action in relation to the Work which would be prejudicial to
- the Original Author's honor or reputation. Licensor agrees that in those
- jurisdictions (e.g. Japan), in which any exercise of the right granted
- in Section 3(b) of this License (the right to make Adaptations) would be
- deemed to be a distortion, mutilation, modification or other derogatory
- action prejudicial to the Original Author's honor and reputation, the
- Licensor will waive or not assert, as appropriate, this Section, to the
- fullest extent permitted by the applicable national law, to enable You
- to reasonably exercise Your right under Section 3(b) of this License
- (right to make Adaptations) but not otherwise.
- ?
- 5. Representations, Warranties and Disclaimer
- ?
- UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR
- OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY
- KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,
- INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,
- FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF
- LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,
- WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE
- EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
- ?
- 6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE
- LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR
- ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES
- ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS
- BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- ?
- 7. Termination
- ?
- a. This License and the rights granted hereunder will terminate
- automatically upon any breach by You of the terms of this License.
- Individuals or entities who have received Adaptations or Collections
- from You under this License, however, will not have their licenses
- terminated provided such individuals or entities remain in full
- compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will
- survive any termination of this License.
- ?
- b. Subject to the above terms and conditions, the license granted here
- is perpetual (for the duration of the applicable copyright in the Work).
- Notwithstanding the above, Licensor reserves the right to release the
- Work under different license terms or to stop distributing the Work at
- any time; provided, however that any such election will not serve to
- withdraw this License (or any other license that has been, or is
- required to be, granted under the terms of this License), and this
- License will continue in full force and effect unless terminated as
- stated above.
- ?
- 8. Miscellaneous
- ?
- a. Each time You Distribute or Publicly Perform the Work or a
- Collection, the Licensor offers to the recipient a license to the Work
- on the same terms and conditions as the license granted to You under
- this License.
- ?
- b. Each time You Distribute or Publicly Perform an Adaptation, Licensor
- offers to the recipient a license to the original Work on the same terms
- and conditions as the license granted to You under this License.
- ?
- c. If any provision of this License is invalid or unenforceable under
- applicable law, it shall not affect the validity or enforceability of
- the remainder of the terms of this License, and without further action
- by the parties to this agreement, such provision shall be reformed to
- the minimum extent necessary to make such provision valid and
- enforceable.
- ?
- d. No term or provision of this License shall be deemed waived and no
- breach consented to unless such waiver or consent shall be in writing
- and signed by the party to be charged with such waiver or consent.
- ?
- e. This License constitutes the entire agreement between the parties
- with respect to the Work licensed here. There are no understandings,
- agreements or representations with respect to the Work not specified
- here. Licensor shall not be bound by any additional provisions that may
- appear in any communication from You. This License may not be modified
- without the mutual written agreement of the Licensor and You.
- ?
- f. The rights granted under, and the subject matter referenced, in this
- License were drafted utilizing the terminology of the Berne Convention
- for the Protection of Literary and Artistic Works (as amended on
- September 28, 1979), the Rome Convention of 1961, the WIPO Copyright
- Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and
- the Universal Copyright Convention (as revised on July 24, 1971). These
- rights and subject matter take effect in the relevant jurisdiction in
- which the License terms are sought to be enforced according to the
- corresponding provisions of the implementation of those treaty
- provisions in the applicable national law. If the standard suite of
- rights granted under applicable copyright law includes additional rights
- not granted under this License, such additional rights are deemed to be
- included in the License; this License is not intended to restrict the
- license of any rights under applicable law.
- ?
- ?
- Creative Commons Notice
- ?
- Creative Commons is not a party to this License, and makes no warranty
- whatsoever in connection with the Work. Creative Commons will not be
- liable to You or any party on any legal theory for any damages
- whatsoever, including without limitation any general, special,
- incidental or consequential damages arising in connection to this
- license. Notwithstanding the foregoing two (2) sentences, if Creative
- Commons has expressly identified itself as the Licensor hereunder, it
- shall have all rights and obligations of Licensor.
- ?
- Except for the limited purpose of indicating to the public that the Work
- is licensed under the CCPL, Creative Commons does not authorize the use
- by either party of the trademark "Creative Commons" or any related
- trademark or logo of Creative Commons without the prior written consent
- of Creative Commons. Any permitted use will be in compliance with
- Creative Commons' then-current trademark usage guidelines, as may be
- published on its website or otherwise made available upon request from
- time to time. For the avoidance of doubt, this trademark restriction
- does not form part of the License.
- ?
- Creative Commons may be contacted at http://creativecommons.org/.
-
-Files: make/stub_includes/unix/dynamic-linker.h
-Copyright: 1994, The Regents of the University of California
-License: BSD-3-clause
+License: BSD-3-Clause
  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions
  are met:
@@ -467,50 +200,14 @@
  2. Redistributions in binary form must reproduce the above copyright
     notice, this list of conditions and the following disclaimer in the
     documentation and/or other materials provided with the distribution.
- 3. Neither the name of the University nor the names of its contributors
-    may be used to endorse or promote products derived from this software
-    without specific prior written permission.
+ 3. Neither the name of the copyright holder nor the names of its
+    contributors may be used to endorse or promote products derived from
+    this software without specific prior written permission.
 
-Files: src/java/com/jogamp/gluegen/ant/GlueGenTask.java
-Copyright: 2003, Rob Grzywinski <rgrzywinski at realityinteractive.com>
-           2003-2005, Sun Microsystems, Inc.
-           2010, JogAmp Community
-License: BSD-2-clause
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
- .
- - Redistribution of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
- .
- - Redistribution in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
- .
- Neither the name of Sun Microsystems, Inc. or the names of
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-Files: jcpp/*
-Copyright: 2007-2008, Shevek
-Comment: As noted by upstream:
- This branch is modified for JogAmp
- to supply [GlueGen](http://jogamp.org/gluegen/www/) with JCPP.
- . 
- This branch is only intended as a submodule for GlueGen
- and hence must be [build from within GlueGen]
- (http://jogamp.org/gluegen/doc/HowToBuild.html).
- .
- # Original JCPP Version
- * [Homepage](http://www.anarres.org/projects/jcpp/)
- * [GitHub](https://github.com/shevek/jcpp.git)
 License: Apache-2.0
  On Debian systems, the complete text of the Apache 2.0 License
  can be found in the `/usr/share/common-licenses/Apache-2.0' file.
 
-Files: debian/*
-Copyright: 2010-2014, Sylvestre Ledru <sylvestre at debian.org>
- 2013-2022, tony mancill <tmancill at debian.org>
 License: Expat
  Permission is hereby granted, free of charge, to any person obtaining
  a copy of this software and associated documentation files (the
diff -Nru gluegen2-2.3.2/debian/gbp.conf gluegen2-2.4.0+dfsg/debian/gbp.conf
--- gluegen2-2.3.2/debian/gbp.conf	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/debian/gbp.conf	2023-03-11 15:32:38.000000000 +0100
@@ -0,0 +1,3 @@
+[DEFAULT]
+pristine-tar=True
+component=['jcpp']
diff -Nru gluegen2-2.3.2/debian/libgluegen2-build-java.lintian-overrides gluegen2-2.4.0+dfsg/debian/libgluegen2-build-java.lintian-overrides
--- gluegen2-2.3.2/debian/libgluegen2-build-java.lintian-overrides	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/debian/libgluegen2-build-java.lintian-overrides	2023-03-17 22:38:42.000000000 +0100
@@ -0,0 +1,3 @@
+# The package embeds the full source, and hence it includes some text files
+# for test purposes.
+package-contains-documentation-outside-usr-share-doc [usr/share/gluegen2/*]
diff -Nru gluegen2-2.3.2/debian/libgluegen2-jni.install gluegen2-2.4.0+dfsg/debian/libgluegen2-jni.install
--- gluegen2-2.3.2/debian/libgluegen2-jni.install	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/libgluegen2-jni.install	2023-03-13 18:33:10.000000000 +0100
@@ -1 +1 @@
-build/obj/libgluegen2-rt.so      /usr/lib/jni/
+build/obj/libgluegen2_rt.so      /usr/lib/jni/
diff -Nru gluegen2-2.3.2/debian/orig-tar.sh gluegen2-2.4.0+dfsg/debian/orig-tar.sh
--- gluegen2-2.3.2/debian/orig-tar.sh	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/orig-tar.sh	1970-01-01 01:00:00.000000000 +0100
@@ -1,27 +0,0 @@
-#!/bin/sh -e
-
-VERSION=$2
-DIR=gluegen-v$VERSION
-TAR=gluegen2_$VERSION.orig.tar.xz
-
-# clean up the upstream tarball
-tar xvf $3
-cd $DIR
-rm -rf .gitignore .htaccess make/lib/
-rm -f $(find . -iname '*.jar')
-cd ..
-# download jcpp
-wget http://jogamp.org/deployment/jogamp-current/archive/Sources/jcpp-v$VERSION.tar.xz
-tar xvf jcpp-v$VERSION.tar.xz -C $DIR/jcpp --strip 1
-
-XZ_OPT=--best tar Jcvf ../$TAR $DIR
-rm -rf $DIR jcpp-v$VERSION.tar.xz
-
-# move to directory 'tarballs'
-if [ -r .svn/deb-layout ]; then
-    . .svn/deb-layout
-    mv $TAR $origDir
-    echo "moved $TAR to $origDir"
-fi
-
-exit 0
diff -Nru gluegen2-2.3.2/debian/patches/add-mips64el-mipsn32-support.diff gluegen2-2.4.0+dfsg/debian/patches/add-mips64el-mipsn32-support.diff
--- gluegen2-2.3.2/debian/patches/add-mips64el-mipsn32-support.diff	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/patches/add-mips64el-mipsn32-support.diff	2023-03-15 17:18:54.000000000 +0100
@@ -3,7 +3,7 @@
 Forwarded: no
 --- a/make/build.xml
 +++ b/make/build.xml
-@@ -298,6 +298,30 @@
+@@ -318,6 +318,30 @@
        <property name="linker.cfg.id"                        value="linker.cfg.linux.mipsel" /> 
      </target>
  
@@ -34,18 +34,18 @@
      <target name="declare.linux.ppc" if="isLinuxPpc">
        <echo message="Linux.ppc" />
        <property name="compiler.cfg.id"                      value="compiler.cfg.linux" /> 
-@@ -340,7 +364,7 @@
+@@ -354,7 +378,7 @@
        <property name="linker.cfg.id"                        value="linker.cfg.linux.sparc" /> 
      </target>
      
--    <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.alpha,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.ppc,declare.linux.ppc64,declare.linux.ppc64le,declare.linux.aarch64,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6.armel,declare.linux.armv6.armhf" if="isLinux" >
-+    <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.alpha,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.mipsn32,declare.linux.mipsn32el,declare.linux.mips64,declare.linux.mips64el,declare.linux.ppc,declare.linux.ppc64,declare.linux.ppc64le,declare.linux.aarch64,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6.armel,declare.linux.armv6.armhf" if="isLinux" >
+-    <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.alpha,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.ppc,declare.linux.ppc64,declare.linux.ppc64le,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6.armel,declare.linux.armv6.armhf,declare.linux.aarch64" if="isLinux" >
++    <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.alpha,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.mipsn32,declare.linux.mipsn32el,declare.linux.mips64,declare.linux.mips64el,declare.linux.ppc,declare.linux.ppc64,declare.linux.ppc64le,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6.armel,declare.linux.armv6.armhf,declare.linux.aarch64" if="isLinux" >
        <property name="c.src.dir.os"                         value="unix" />
      </target>
  
 --- a/make/gluegen-cpptasks-base.xml
 +++ b/make/gluegen-cpptasks-base.xml
-@@ -47,6 +47,10 @@
+@@ -48,6 +48,10 @@
     -   isLinuxHppa
     -   isLinuxMips
     -   isLinuxMipsel
@@ -56,7 +56,7 @@
     -   isLinuxPpc
     -   isLinuxPpc64
     -   isLinuxPpc64le
-@@ -135,6 +139,10 @@
+@@ -145,6 +149,10 @@
     -   compiler.cfg.linux.hppa
     -   compiler.cfg.linux.mips
     -   compiler.cfg.linux.mipsel
@@ -67,7 +67,7 @@
     -   compiler.cfg.linux.ppc
     -   compiler.cfg.linux.ppc64
     -   compiler.cfg.linux.ppc64le
-@@ -160,6 +168,10 @@
+@@ -172,6 +180,10 @@
     -   linker.cfg.linux.hppa
     -   linker.cfg.linux.mips
     -   linker.cfg.linux.mipsel
@@ -78,7 +78,7 @@
     -   linker.cfg.linux.ppc
     -   linker.cfg.linux.ppc64le
     -   linker.cfg.linux.s390
-@@ -420,6 +432,42 @@
+@@ -444,6 +456,42 @@
      <condition property="mipsel">
        <os arch="mipsel" />
      </condition>
@@ -121,18 +121,7 @@
      <condition property="isLinuxPpc">
        <and>
          <istrue value="${isLinux}" />
-@@ -639,6 +687,10 @@
-     <echo message="LinuxHppa=${isLinuxHppa}" />
-     <echo message="LinuxMips=${isLinuxMips}" />
-     <echo message="LinuxMipsel=${isLinuxMipsel}" />
-+    <echo message="LinuxMips=${isLinuxMipsn32}" />
-+    <echo message="LinuxMipsel=${isLinuxMipsn32el}" />
-+    <echo message="LinuxMips=${isLinuxMips64}" />
-+    <echo message="LinuxMipsel=${isLinuxMips64el}" />
-     <echo message="LinuxPpc=${isLinuxPpc}" />
-     <echo message="LinuxPpc64=${isLinuxPpc64}" />
-     <echo message="LinuxPpc64le=${isLinuxPpc64le}" />
-@@ -721,6 +773,22 @@
+@@ -691,6 +739,22 @@
      <property name="os.and.arch" value="linux-mipsel" />
    </target>
  
@@ -155,16 +144,27 @@
    <target name="gluegen.cpptasks.detect.os.linux.ppc" unless="gluegen.cpptasks.detected.os.2" if="isLinuxPpc">
      <property name="os.and.arch" value="linux-ppc" />
    </target>
-@@ -757,7 +825,7 @@
-     <property name="os.and.arch" value="android-aarch64" />
+@@ -731,7 +795,7 @@
+     <property name="os.and.arch" value="android-x86" />
    </target>
  
--  <target name="gluegen.cpptasks.detect.os.linux" depends="gluegen.cpptasks.detect.os.linux.amd64,gluegen.cpptasks.detect.os.linux.ia64,gluegen.cpptasks.detect.os.linux.x86,gluegen.cpptasks.detect.os.linux.armv6.armel,gluegen.cpptasks.detect.os.linux.armv6.armhf,gluegen.cpptasks.detect.os.android.armv6.armel,gluegen.cpptasks.detect.os.linux.aarch64,gluegen.cpptasks.detect.os.android.armv6.armhf,gluegen.cpptasks.detect.os.android.aarch64,gluegen.cpptasks.detect.os.linux.alpha,gluegen.cpptasks.detect.os.linux.hppa,gluegen.cpptasks.detect.os.linux.mips,gluegen.cpptasks.detect.os.linux.mipsel,gluegen.cpptasks.detect.os.linux.ppc,gluegen.cpptasks.detect.os.linux.ppc64,gluegen.cpptasks.detect.os.linux.ppc64le,gluegen.cpptasks.detect.os.linux.s390,gluegen.cpptasks.detect.os.linux.s390x,gluegen.cpptasks.detect.os.linux.sparc" unless="gluegen.cpptasks.detected.os.2" />
-+  <target name="gluegen.cpptasks.detect.os.linux" depends="gluegen.cpptasks.detect.os.linux.amd64,gluegen.cpptasks.detect.os.linux.ia64,gluegen.cpptasks.detect.os.linux.x86,gluegen.cpptasks.detect.os.linux.armv6.armel,gluegen.cpptasks.detect.os.linux.armv6.armhf,gluegen.cpptasks.detect.os.android.armv6.armel,gluegen.cpptasks.detect.os.linux.aarch64,gluegen.cpptasks.detect.os.android.armv6.armhf,gluegen.cpptasks.detect.os.android.aarch64,gluegen.cpptasks.detect.os.linux.alpha,gluegen.cpptasks.detect.os.linux.hppa,gluegen.cpptasks.detect.os.linux.mips,gluegen.cpptasks.detect.os.linux.mipsel,gluegen.cpptasks.detect.os.linux.mipsn32,gluegen.cpptasks.detect.os.linux.mipsn32el,gluegen.cpptasks.detect.os.linux.mips64,gluegen.cpptasks.detect.os.linux.mips64el,gluegen.cpptasks.detect.os.linux.ppc,gluegen.cpptasks.detect.os.linux.ppc64,gluegen.cpptasks.detect.os.linux.ppc64le,gluegen.cpptasks.detect.os.linux.s390,gluegen.cpptasks.detect.os.linux.s390x,gluegen.cpptasks.detect.os.linux.sparc" unless="gluegen.cpptasks.detected.os.2" />
+-  <target name="gluegen.cpptasks.detect.os.linux" depends="gluegen.cpptasks.detect.os.linux.amd64,gluegen.cpptasks.detect.os.linux.ia64,gluegen.cpptasks.detect.os.linux.x86,gluegen.cpptasks.detect.os.linux.armv6.armel,gluegen.cpptasks.detect.os.linux.armv6.armhf,gluegen.cpptasks.detect.os.android.armv6.armel,gluegen.cpptasks.detect.os.linux.aarch64,gluegen.cpptasks.detect.os.android.armv6.armhf,gluegen.cpptasks.detect.os.android.aarch64,gluegen.cpptasks.detect.os.android.x86,gluegen.cpptasks.detect.os.linux.alpha,gluegen.cpptasks.detect.os.linux.hppa,gluegen.cpptasks.detect.os.linux.mips,gluegen.cpptasks.detect.os.linux.mipsel,gluegen.cpptasks.detect.os.linux.ppc,gluegen.cpptasks.detect.os.linux.ppc64,gluegen.cpptasks.detect.os.linux.ppc64le,gluegen.cpptasks.detect.os.linux.s390,gluegen.cpptasks.detect.os.linux.s390x,gluegen.cpptasks.detect.os.linux.sparc" unless="gluegen.cpptasks.detected.os.2" />
++  <target name="gluegen.cpptasks.detect.os.linux" depends="gluegen.cpptasks.detect.os.linux.amd64,gluegen.cpptasks.detect.os.linux.ia64,gluegen.cpptasks.detect.os.linux.x86,gluegen.cpptasks.detect.os.linux.armv6.armel,gluegen.cpptasks.detect.os.linux.armv6.armhf,gluegen.cpptasks.detect.os.android.armv6.armel,gluegen.cpptasks.detect.os.linux.aarch64,gluegen.cpptasks.detect.os.android.armv6.armhf,gluegen.cpptasks.detect.os.android.aarch64,gluegen.cpptasks.detect.os.android.x86,gluegen.cpptasks.detect.os.linux.alpha,gluegen.cpptasks.detect.os.linux.hppa,gluegen.cpptasks.detect.os.linux.mips,gluegen.cpptasks.detect.os.linux.mipsel,gluegen.cpptasks.detect.os.linux.mipsn32,gluegen.cpptasks.detect.os.linux.mipsn32el,gluegen.cpptasks.detect.os.linux.mips64,gluegen.cpptasks.detect.os.linux.mips64el,gluegen.cpptasks.detect.os.linux.ppc,gluegen.cpptasks.detect.os.linux.ppc64,gluegen.cpptasks.detect.os.linux.ppc64le,gluegen.cpptasks.detect.os.linux.s390,gluegen.cpptasks.detect.os.linux.s390x,gluegen.cpptasks.detect.os.linux.sparc" unless="gluegen.cpptasks.detected.os.2" />
  
    <target name="gluegen.cpptasks.detect.os.osx" unless="gluegen.cpptasks.detected.os.2" if="isOSX">
-     <property name="native.library.suffix"     value="*lib" />
-@@ -1308,6 +1376,18 @@
+     <property name="native.library.prefix"     value="lib" />
+@@ -873,6 +937,10 @@
+     <echo message="LinuxHppa=${isLinuxHppa}" />
+     <echo message="LinuxMips=${isLinuxMips}" />
+     <echo message="LinuxMipsel=${isLinuxMipsel}" />
++    <echo message="LinuxMips=${isLinuxMipsn32}" />
++    <echo message="LinuxMipsel=${isLinuxMipsn32el}" />
++    <echo message="LinuxMips=${isLinuxMips64}" />
++    <echo message="LinuxMipsel=${isLinuxMips64el}" />
+     <echo message="LinuxPpc=${isLinuxPpc}" />
+     <echo message="LinuxPpc64=${isLinuxPpc64}" />
+     <echo message="LinuxPpc64le=${isLinuxPpc64le}" />
+@@ -1414,6 +1482,18 @@
      <linker id="linker.cfg.linux.mipsel" name="${gcc.compat.compiler}">
      </linker>
  
@@ -183,43 +183,43 @@
      <linker id="linker.cfg.linux.ppc" name="${gcc.compat.compiler}">
      </linker>
  
-@@ -1549,6 +1629,34 @@
-       <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/mipsel" />
+@@ -1714,6 +1794,34 @@
+       <property name="java.lib.dir.platform"         value="${java.home.dir}/lib"/> <!-- new default -->
      </target>
  
 +    <target name="gluegen.cpptasks.declare.compiler.linux.mipsn32" if="isLinuxMipsn32">
 +      <echo message="Linux.Mipsn32" />
-+      <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" /> 
-+      <property name="linker.cfg.id.base"            value="linker.cfg.linux" /> 
++      <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" />
++      <property name="linker.cfg.id.base"            value="linker.cfg.linux" />
 +      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/mipsn32" />
 +    </target>
 +
 +    <target name="gluegen.cpptasks.declare.compiler.linux.mipsn32el" if="isLinuxMipsn32el">
 +      <echo message="Linux.Mipsn32el" />
-+      <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" /> 
-+      <property name="linker.cfg.id.base"            value="linker.cfg.linux" /> 
++      <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" />
++      <property name="linker.cfg.id.base"            value="linker.cfg.linux" />
 +      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/mipsn32el" />
 +    </target>
 +
 +    <target name="gluegen.cpptasks.declare.compiler.linux.mips64" if="isLinuxMips64">
 +      <echo message="Linux.Mips64" />
-+      <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" /> 
-+      <property name="linker.cfg.id.base"            value="linker.cfg.linux" /> 
++      <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" />
++      <property name="linker.cfg.id.base"            value="linker.cfg.linux" />
 +      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/mips64" />
 +    </target>
 +
 +    <target name="gluegen.cpptasks.declare.compiler.linux.mips64el" if="isLinuxMips64el">
 +      <echo message="Linux.Mips64el" />
-+      <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" /> 
-+      <property name="linker.cfg.id.base"            value="linker.cfg.linux" /> 
++      <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" />
++      <property name="linker.cfg.id.base"            value="linker.cfg.linux" />
 +      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/mips64el" />
 +    </target>
 +
      <target name="gluegen.cpptasks.declare.compiler.linux.ppc" if="isLinuxPpc">
        <echo message="Linux.Ppc" />
        <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" /> 
-@@ -1591,7 +1699,7 @@
-       <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/sparc" />
+@@ -1780,7 +1888,7 @@
+       <property name="java.lib.dir.platform"         value="${java.home.dir}/lib"/> <!-- new default -->
      </target>
  
 -    <target name="gluegen.cpptasks.declare.compiler.linux" depends="gluegen.cpptasks.declare.compiler.linux.x86,gluegen.cpptasks.declare.compiler.linux.amd64,gluegen.cpptasks.declare.compiler.linux.ia64,gluegen.cpptasks.declare.compiler.linux.armv6,gluegen.cpptasks.declare.compiler.linux.aarch64,gluegen.cpptasks.declare.compiler.linux.alpha,gluegen.cpptasks.declare.compiler.linux.hppa,gluegen.cpptasks.declare.compiler.linux.mips,gluegen.cpptasks.declare.compiler.linux.mipsel,gluegen.cpptasks.declare.compiler.linux.ppc,gluegen.cpptasks.declare.compiler.linux.ppc64,gluegen.cpptasks.declare.compiler.linux.ppc64le,gluegen.cpptasks.declare.compiler.linux.s390,gluegen.cpptasks.declare.compiler.linux.s390x,gluegen.cpptasks.declare.compiler.linux.sparc" if="isLinux">
diff -Nru gluegen2-2.3.2/debian/patches/add-mips-support.patch gluegen2-2.4.0+dfsg/debian/patches/add-mips-support.patch
--- gluegen2-2.3.2/debian/patches/add-mips-support.patch	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/patches/add-mips-support.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,199 +0,0 @@
-From: Dejan Latinovic <Dejan.Latinovic at imgtec.com>
-Subject: mips support for gluegen2
-Date: Wed, 4 Jun 2014 11:34:11 +0000
-
-https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=750548
-
-Package sivp fails to build on Debian for mips/mipsel arch with an
-error:
-
-> SCI_DISABLE_TK=1 SCI_JAVA_ENABLE_HEADLESS=1 DOCBOOK_ROOT=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh \
-> /usr/bin/scilab -nw -f builder.sce
-> Could not create a Scilab main class. Error:
-> Exception in thread "main" java.lang.ExceptionInInitializerError
->         at javax.media.opengl.GLProfile.<clinit>(GLProfile.java:83)
->         at org.scilab.modules.gui.SwingView.<init>(Unknown Source)
->         at org.scilab.modules.gui.SwingView.registerSwingView(Unknown Source)
->         at org.scilab.modules.core.Scilab.<init>(Unknown Source)
-> Caused by: java.lang.RuntimeException: Please port CPU detection to your platform (linux/mipsel)
->         at jogamp.common.os.PlatformPropsImpl.getCPUTypeImpl(PlatformPropsImpl.java:302)
->         at jogamp.common.os.PlatformPropsImpl.<clinit>(PlatformPropsImpl.java:134)
->         ... 4 more
-> 
-> Scilab cannot create Scilab Java Main-Class (we have not been able to find the main Scilab class. Check if the Scilab and thirdparty packages are available).
-> debian/rules:9: recipe for target 'build-arch' failed
-> 
-
-The reason for this failure is a lack of support for mips/mipsel in
-Debian package gluegen2, version 2.1.5.
-
-Patch add-mips-support.patch that contains support for mips/mipsel is
-attached.
-
-After rebuilding gluegen2 with these changes, I was able to build sivp
-successfully.
-
-Index: gluegen-v2.2.0/src/java/com/jogamp/common/os/MachineDescription.java
-===================================================================
---- gluegen-v2.2.0.orig/src/java/com/jogamp/common/os/MachineDescription.java	2014-08-10 15:38:44.861874993 +0200
-+++ gluegen-v2.2.0/src/java/com/jogamp/common/os/MachineDescription.java	2014-08-10 15:38:44.857874863 +0200
-@@ -60,7 +60,11 @@
-       /** {@link Platform.CPUType#X86_64} Little Endian Windows */
-       X86_64_WINDOWS(Platform.CPUType.X86_64),
-       /** {@link Platform.CPUType#SPARC_32} Big Endian Solaris */
--      SPARC_32_SUNOS(Platform.CPUType.SPARC_32);
-+      SPARC_32_SUNOS(Platform.CPUType.SPARC_32),
-+      /** {@link Platform.CPUType#MIPS_32} Big Endian Unix */
-+      MIPS_32_UNIX(Platform.CPUType.MIPS_32),
-+      /** {@link Platform.CPUType#MIPSEL_32} Little Endian Unix */
-+      MIPSEL_32_UNIX(Platform.CPUType.MIPSEL_32);
- 
-       public final Platform.CPUType cpu;
- 
-@@ -77,6 +81,7 @@
-   private final static int[] size_x86_64_unix     =  { 4,    8,     4,     8,     16,    8,   4096 };
-   private final static int[] size_x86_64_windows  =  { 4,    4,     4,     8,     16,    8,   4096 };
-   private final static int[] size_sparc_32_sunos  =  { 4,    4,     4,     8,     16,    4,   8192 };
-+  private final static int[] size_mips_32_unix    =  { 4,    4,     4,     8,      8,    4,   4096 };
- 
-   /*                               arch   os          i8, i16, i32, i64, int, long, float, doubl, ldoubl, ptr */
-   private final static int[] align_armeabi        =  { 1,   2,   4,   8,   4,    4,     4,     8,      8,   4 };
-@@ -86,6 +91,7 @@
-   private final static int[] align_x86_64_unix    =  { 1,   2,   4,   8,   4,    8,     4,     8,     16,   8 };
-   private final static int[] align_x86_64_windows =  { 1,   2,   4,   8,   4,    4,     4,     8,     16,   8 };
-   private final static int[] align_sparc_32_sunos =  { 1,   2,   4,   8,   4,    4,     4,     8,      8,   4 };
-+  private final static int[] align_mips_32_unix   =  { 1,   2,   4,   8,   4,    4,     4,     8,      8,   4 };
- 
-   public enum StaticConfig {
-       /** {@link MachineDescription.ID#ARMle_EABI } */
-@@ -101,7 +107,11 @@
-       /** {@link MachineDescription.ID#X86_64_WINDOWS } */
-       X86_64_WINDOWS(ID.X86_64_WINDOWS, true,  size_x86_64_windows, align_x86_64_windows),
-       /** {@link MachineDescription.ID#SPARC_32_SUNOS } */
--      SPARC_32_SUNOS(ID.SPARC_32_SUNOS, false, size_sparc_32_sunos, align_sparc_32_sunos);
-+      SPARC_32_SUNOS(ID.SPARC_32_SUNOS, false, size_sparc_32_sunos, align_sparc_32_sunos),
-+      /** {@link MachineDescription.ID#MIPS_32_UNIX } */
-+      MIPS_32_UNIX(ID.MIPS_32_UNIX, false, size_mips_32_unix, align_mips_32_unix),
-+     /** {@link MachineDescription.ID#MIPSEL_32_UNIX } */
-+      MIPSEL_32_UNIX(ID.MIPSEL_32_UNIX, true, size_mips_32_unix, align_mips_32_unix);
- 
-       public final ID id;
-       public final MachineDescription md;
-Index: gluegen-v2.2.0/src/java/com/jogamp/common/os/Platform.java
-===================================================================
---- gluegen-v2.2.0.orig/src/java/com/jogamp/common/os/Platform.java	2014-08-10 15:38:44.861874993 +0200
-+++ gluegen-v2.2.0/src/java/com/jogamp/common/os/Platform.java	2014-08-10 15:38:44.857874863 +0200
-@@ -113,6 +113,8 @@
-         MIPS_32(  CPUFamily.MIPS,     0x0001),
-         /** MIPS 64bit */
-         MIPS_64(  CPUFamily.MIPS,     0x0002),
-+        /** MIPS 32bit LE*/
-+        MIPSEL_32(  CPUFamily.MIPS,   0x0004),
-         /** Itanium default */
-         IA64(      CPUFamily.IA64,    0x0000),
-         /** PA_RISC2_0 */
-Index: gluegen-v2.2.0/src/java/jogamp/common/os/MachineDescriptionRuntime.java
-===================================================================
---- gluegen-v2.2.0.orig/src/java/jogamp/common/os/MachineDescriptionRuntime.java	2014-08-10 15:38:44.861874993 +0200
-+++ gluegen-v2.2.0/src/java/jogamp/common/os/MachineDescriptionRuntime.java	2014-08-10 15:38:44.857874863 +0200
-@@ -78,6 +78,8 @@
-         case ARMv5:
-         case ARMv6:
-         case ARMv7:
-+        case MIPS_32:
-+        case MIPSEL_32:
-         case SPARC_32:
-         case PPC:
-             return true;
-@@ -95,6 +97,10 @@
-       if( isCPUArch32Bit(cpuType) ) {
-           if( cpuType.getFamily() == Platform.CPUFamily.ARM && littleEndian) {
-               return StaticConfig.ARMle_EABI;
-+          } else if( cpuType == Platform.CPUType.MIPS_32) {
-+              return StaticConfig.MIPS_32_UNIX;
-+          } else if( cpuType == Platform.CPUType.MIPSEL_32) {
-+              return StaticConfig.MIPSEL_32_UNIX;
-           } else if( osType == Platform.OSType.WINDOWS ) {
-               return StaticConfig.X86_32_WINDOWS;
-           } else if( osType == Platform.OSType.MACOS ) {
-Index: gluegen-v2.2.0/src/java/jogamp/common/os/PlatformPropsImpl.java
-===================================================================
---- gluegen-v2.2.0.orig/src/java/jogamp/common/os/PlatformPropsImpl.java	2014-08-10 15:38:44.861874993 +0200
-+++ gluegen-v2.2.0/src/java/jogamp/common/os/PlatformPropsImpl.java	2014-08-10 15:38:44.857874863 +0200
-@@ -298,6 +298,8 @@
-             return CPUType.PPC;
-         } else if( archLower.equals("mips") ) {        // android
-             return CPUType.MIPS_32;
-+        } else if( archLower.equals("mipsel") ) {
-+            return CPUType.MIPSEL_32;
-         } else {
-             throw new RuntimeException("Please port CPU detection to your platform (" + OS_lower + "/" + archLower + ")");
-         }
-@@ -406,6 +408,9 @@
-             } else if ( eh.isMips() ) {
-                 cpuType[0] = CPUType.MIPS_32; // FIXME
-                 abiType[0] = ABIType.GENERIC_ABI;
-+            } else if ( eh.isMipsel() ) {
-+                cpuType[0] = CPUType.MIPSEL_32;
-+                abiType[0] = ABIType.GENERIC_ABI;
-             }
-             res = eh;
-         } catch(final Throwable t) {
-@@ -501,6 +506,8 @@
-      *   <li>linux-i586</li>
-      *   <li>linux-armv6</li>
-      *   <li>linux-armv6hf</li>
-+     *   <li>linux-mips</li>
-+     *   <li>linux-mipsel</li>
-      *   <li>android-armv6</li>
-      *   <li>macosx-universal</li>
-      *   <li>solaris-sparc</li>
-@@ -530,6 +537,12 @@
-                     _and_arch_tmp = "armv6";    // TODO: sync with gluegen-cpptasks-base.xml
-                 }
-                 break;
-+            case MIPS_32:
-+                _and_arch_tmp = "mips";
-+                break;
-+            case MIPSEL_32:
-+                _and_arch_tmp = "mipsel";
-+                break;
-             case SPARC_32:
-                 _and_arch_tmp = "sparc";
-                 break;
-Index: gluegen-v2.2.0/src/java/jogamp/common/os/elf/ElfHeader.java
-===================================================================
---- gluegen-v2.2.0.orig/src/java/jogamp/common/os/elf/ElfHeader.java	2014-08-10 15:38:44.861874993 +0200
-+++ gluegen-v2.2.0/src/java/jogamp/common/os/elf/ElfHeader.java	2014-08-10 15:38:44.857874863 +0200
-@@ -484,12 +484,19 @@
- 
-     /**
-      * Returns true if {@link #getMachine() machine} is a 32 or 64 bit MIPS CPU
--     * of type {@link #EM_MIPS}, {@link #EM_MIPS_X} or {@link #EM_MIPS_RS3_LE}. */
-+     * of type {@link #EM_MIPS} or {@link #EM_MIPS_X}. */
-     public final boolean isMips() {
-         final short m = getMachine();
-         return EM_MIPS == m ||
--               EM_MIPS_X == m ||
--               EM_MIPS_RS3_LE == m;
-+               EM_MIPS_X == m;
-+    }
-+
-+    /**
-+     * Returns true if {@link #getMachine() machine} is a 32  MIPS CPU
-+     * of type {@link #EM_MIPS_RS3_LE}. */
-+    public final boolean isMipsel() {
-+        final short m = getMachine();
-+        return EM_MIPS_RS3_LE == m;
-     }
- 
-     /** Returns the processor-specific flags associated with the file. */
-@@ -568,6 +575,8 @@
-             machineS=", itanium";
-         } else if( isMips() ) {
-             machineS=", mips";
-+        } else if( isMipsel() ) {
-+            machineS=", mipsel";
-         } else {
-             machineS="";
-         }
diff -Nru gluegen2-2.3.2/debian/patches/armhf.diff gluegen2-2.4.0+dfsg/debian/patches/armhf.diff
--- gluegen2-2.3.2/debian/patches/armhf.diff	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/patches/armhf.diff	2023-03-15 17:07:26.000000000 +0100
@@ -1,8 +1,11 @@
-Index: gluegen2/make/build.xml
-===================================================================
---- gluegen2.orig/make/build.xml
-+++ gluegen2/make/build.xml
-@@ -262,10 +262,16 @@
+Description: supporting armhf during a Debian build
+Author: Sylvestre Ledru <sylvestre at debian.org>
+Forwarded: not-needed
+Last-Update: 2023-03-15
+
+--- a/make/build.xml
++++ b/make/build.xml
+@@ -276,10 +276,16 @@
        <property name="linker.cfg.id"                        value="linker.cfg.linux" /> 
      </target>
  
@@ -22,39 +25,37 @@
 +      <property name="linker.cfg.id"                        value="linker.cfg.linux.armv6.armhf" />
      </target>
  
-     <target name="declare.linux.alpha" if="isLinuxAlpha">
-@@ -328,7 +334,7 @@
+     <target name="declare.linux.aarch64" if="isLinuxARM64">
+@@ -348,7 +354,7 @@
        <property name="linker.cfg.id"                        value="linker.cfg.linux.sparc" /> 
      </target>
      
--    <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.ppc,declare.linux.ppc64,declare.linux.ppc64le,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6" if="isLinux" >
-+    <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.ppc,declare.linux.ppc64,declare.linux.ppc64le,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6.armel,declare.linux.armv6.armhf" if="isLinux" >
+-    <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.ppc,declare.linux.ppc64,declare.linux.ppc64le,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6,declare.linux.aarch64" if="isLinux" >
++    <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.ppc,declare.linux.ppc64,declare.linux.ppc64le,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6.armel,declare.linux.armv6.armhf,declare.linux.aarch64" if="isLinux" >
        <property name="c.src.dir.os"                         value="unix" />
      </target>
  
-Index: gluegen2/make/gluegen-cpptasks-base.xml
-===================================================================
---- gluegen2.orig/make/gluegen-cpptasks-base.xml
-+++ gluegen2/make/gluegen-cpptasks-base.xml
-@@ -1032,7 +1032,7 @@
-            - lib/gluegen-cpptasks-linux-armv6.xml   (armv5te + softfp), or 
+--- a/make/gluegen-cpptasks-base.xml
++++ b/make/gluegen-cpptasks-base.xml
+@@ -1098,7 +1098,7 @@
             - lib/gluegen-cpptasks-linux-armv6hf.xml (armv6   + hardfp) 
+            - lib/gluegen-cpptasks-linux-aarch64.xml (armv8 64bit) 
           for official JogAmp builds! -->
 -    <compiler id="compiler.cfg.linux.armv6" name="${gcc.compat.compiler}">
 +    <compiler id="compiler.cfg.linux.armv6.armel" name="${gcc.compat.compiler}">
        <defineset>
          <define name="__unix__"/>
          <define name="__X11__"  if="isX11"/>
-@@ -1270,7 +1270,7 @@
-            - lib/gluegen-cpptasks-linux-armv6.xml   (armv5te + softfp), or 
+@@ -1372,7 +1372,7 @@
             - lib/gluegen-cpptasks-linux-armv6hf.xml (armv6   + hardfp) 
+            - lib/gluegen-cpptasks-linux-aarch64.xml (armv8 64bit) 
           for official JogAmp builds! -->
 -    <linker id="linker.cfg.linux.armv6" name="${gcc.compat.compiler}">
 +    <linker id="linker.cfg.linux.armv6.armel" name="${gcc.compat.compiler}">
        <linkerarg value="-fpic" /> 
        <linkerarg value="-nostdlib" />
        <linkerarg value="-Bdynamic" />
-@@ -1286,6 +1286,9 @@
+@@ -1392,6 +1392,9 @@
        <linkerarg value="-static-libstdc++" if="isGCC"/>
      </linker>
  
diff -Nru gluegen2-2.3.2/debian/patches/cc_attributes_in_build.patch gluegen2-2.4.0+dfsg/debian/patches/cc_attributes_in_build.patch
--- gluegen2-2.3.2/debian/patches/cc_attributes_in_build.patch	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/debian/patches/cc_attributes_in_build.patch	2023-03-15 17:21:24.000000000 +0100
@@ -0,0 +1,17 @@
+Description: removing cc attributes that are not recognized by
+ Debian-packaged ant
+Author: Pierre Gruet <pgt at debian.org>
+Forwarded: not-needed
+Last-Update: 2023-03-15
+
+--- a/make/build.xml
++++ b/make/build.xml
+@@ -501,8 +501,6 @@
+       <echo message="user.dir=${user.dir}" />
+ 
+       <cc outtype="${output.lib.type}" 
+-          usehighleveltool="true"
+-          writesoname="true"
+           objdir="${gluegen.lib.dir}"
+           outfile="${gluegen.lib.dir}/${output.lib.name}"
+           optimize="${c.compiler.optimise}" 
diff -Nru gluegen2-2.3.2/debian/patches/cpptasks_jar_location.patch gluegen2-2.4.0+dfsg/debian/patches/cpptasks_jar_location.patch
--- gluegen2-2.3.2/debian/patches/cpptasks_jar_location.patch	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/debian/patches/cpptasks_jar_location.patch	2023-04-16 22:04:19.000000000 +0200
@@ -0,0 +1,16 @@
+Description: providing the path to the Debian-installed cpptasks jar
+Author: Pierre Gruet <pgt at debian.org>
+Forwarded: not-needed
+Last-Update: 2023-04-16
+
+--- a/make/gluegen-cpptasks.xml
++++ b/make/gluegen-cpptasks.xml
+@@ -20,7 +20,7 @@
+ 
+   <!-- import cpptasks -->
+   <!--typedef resource="net/sf/antcontrib/cpptasks/antlib.xml" classpath="${gluegen.root}/make/lib/cpptasks.jar;${gluegen.root}/make/lib/CppTasksGCCNamespaceHack.jar"/-->
+-  <typedef resource="net/sf/antcontrib/cpptasks/antlib.xml" classpath="${gluegen.root}/make/lib/cpptasks.jar"/>
++  <typedef resource="net/sf/antcontrib/cpptasks/antlib.xml" classpath="/usr/share/java/ant-contrib-cpptasks.jar"/>
+ 
+   <!-- 0 fetch environment variable GLUEGEN_CPPTASKS_FILE -> gluegen-cpptasks.file -->
+   <property environment="env" />
diff -Nru gluegen2-2.3.2/debian/patches/disable_android2.diff gluegen2-2.4.0+dfsg/debian/patches/disable_android2.diff
--- gluegen2-2.3.2/debian/patches/disable_android2.diff	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/patches/disable_android2.diff	1970-01-01 01:00:00.000000000 +0100
@@ -1,141 +0,0 @@
-Index: gluegen-v2.0-rc8/make/build.xml
-===================================================================
---- gluegen-v2.0-rc8.orig/make/build.xml	2012-05-15 14:31:28.000000000 +0200
-+++ gluegen-v2.0-rc8/make/build.xml	2012-05-15 15:28:39.000000000 +0200
-@@ -131,7 +131,7 @@
- 
-     <property name="jogamp.android-launcher.classes" value="jogamp/android/launcher/**"/>
-     <property name="jogamp.awt.classes" value="jogamp/common/awt/**"/>
--    <property name="gluegen.excludes.all" value="${gluegen.excludes.nsig} ${jogamp.android-launcher.classes}" />
-+    <property name="gluegen.excludes.all" value="${gluegen.excludes.nsig} ${jogamp.android-launcher.classes} jogamp/common/os/android/**" />
-     <property name="gluegen-rt.classes" value="com/jogamp/gluegen/runtime/**"/>
-     <property name="jogamp.common.classes" value="com/jogamp/common/** jogamp/common/**"/>
-   </target>
-@@ -638,8 +638,11 @@
-     </antcall>
- 
-     <!-- Build GlueGen using the generated Java files along with the
--      - original source. -->
--
-+         - original source. -->
-+    <delete>
-+      <fileset dir="${src.java}/jogamp/common/os/android/"/>
-+    </delete>
-+    
-     <!--compile gluegen-rt first-->
-     <javac destdir="${classes}"
-            includeAntRuntime="false"
-Index: gluegen-v2.0-rc8/src/java/com/jogamp/common/util/IOUtil.java
-===================================================================
---- gluegen-v2.0-rc8.orig/src/java/com/jogamp/common/util/IOUtil.java	2012-05-15 14:29:21.000000000 +0200
-+++ gluegen-v2.0-rc8/src/java/com/jogamp/common/util/IOUtil.java	2012-05-15 14:50:46.000000000 +0200
-@@ -44,13 +44,13 @@
- import java.nio.ByteBuffer;
- 
- import jogamp.common.Debug;
--import jogamp.common.os.android.StaticContext;
-+//import jogamp.common.os.android.StaticContext;
- 
--import android.content.Context;
-+//import android.content.Context;
- 
- import com.jogamp.common.net.AssetURLContext;
- import com.jogamp.common.nio.Buffers;
--import com.jogamp.common.os.AndroidVersion;
-+//import com.jogamp.common.os.AndroidVersion;
- import com.jogamp.common.os.MachineDescription;
- import com.jogamp.common.os.Platform;
- 
-@@ -648,19 +648,19 @@
-     public static File getTempRoot(AccessControlContext acc)
-         throws SecurityException, RuntimeException
-     {
--        if(AndroidVersion.isAvailable) {
--            final Context ctx = StaticContext.getContext();
--            if(null != ctx) {
--                final File tmpRoot = ctx.getDir("temp", Context.MODE_WORLD_READABLE);
--                if(null==tmpRoot|| !tmpRoot.isDirectory() || !tmpRoot.canWrite()) {
--                    throw new RuntimeException("Not a writable directory: '"+tmpRoot+"', retrieved Android static context");
--                }
--                if(DEBUG) {
--                    System.err.println("IOUtil.getTempRoot(Android): temp dir: "+tmpRoot.getAbsolutePath());
--                }
--                return tmpRoot;
--            }
--        }
-+        // if(AndroidVersion.isAvailable) {
-+        //     final Context ctx = StaticContext.getContext();
-+        //     if(null != ctx) {
-+        //         final File tmpRoot = ctx.getDir("temp", Context.MODE_WORLD_READABLE);
-+        //         if(null==tmpRoot|| !tmpRoot.isDirectory() || !tmpRoot.canWrite()) {
-+        //             throw new RuntimeException("Not a writable directory: '"+tmpRoot+"', retrieved Android static context");
-+        //         }
-+        //         if(DEBUG) {
-+        //             System.err.println("IOUtil.getTempRoot(Android): temp dir: "+tmpRoot.getAbsolutePath());
-+        //         }
-+        //         return tmpRoot;
-+        //     }
-+        // }
-         final String tmpRootName = PropertyAccess.getProperty(java_io_tmpdir_propkey, false, acc);
-         if(null == tmpRootName || 0 == tmpRootName.length()) {
-             throw new RuntimeException("Property '"+java_io_tmpdir_propkey+"' value is empty: <"+tmpRootName+">");
-@@ -670,7 +670,7 @@
-             throw new RuntimeException("Not a writable directory: '"+tmpRoot+"', retrieved by propery '"+java_io_tmpdir_propkey+"'");
-         }
-         if(DEBUG) {
--            System.err.println("IOUtil.getTempRoot(isAndroid: "+AndroidVersion.isAvailable+"): temp dir: "+tmpRoot.getAbsolutePath());
-+//            System.err.println("IOUtil.getTempRoot(isAndroid: "+AndroidVersion.isAvailable+"): temp dir: "+tmpRoot.getAbsolutePath());
-         }
-         return tmpRoot;
-     }
-Index: gluegen-v2.0-rc8/src/java/com/jogamp/common/util/JogampVersion.java
-===================================================================
---- gluegen-v2.0-rc8.orig/src/java/com/jogamp/common/util/JogampVersion.java	2012-05-15 14:29:21.000000000 +0200
-+++ gluegen-v2.0-rc8/src/java/com/jogamp/common/util/JogampVersion.java	2012-05-15 15:29:41.000000000 +0200
-@@ -29,7 +29,7 @@
- package com.jogamp.common.util;
- 
- import com.jogamp.common.GlueGenVersion;
--import com.jogamp.common.os.AndroidVersion;
-+//import com.jogamp.common.os.AndroidVersion;
- import com.jogamp.common.os.Platform;
- 
- import java.util.Iterator;
-@@ -37,7 +37,7 @@
- import java.util.jar.Attributes;
- import java.util.jar.Manifest;
- 
--import jogamp.common.os.android.PackageInfoUtil;
-+//import jogamp.common.os.android.PackageInfoUtil;
- 
- public class JogampVersion {
- 
-@@ -58,11 +58,11 @@
-         this.hash = this.mf.hashCode();
-         mainAttributes = this.mf.getMainAttributes();
-         mainAttributeNames = mainAttributes.keySet();
--        if(AndroidVersion.isAvailable) {
--            androidPackageVersionName = PackageInfoUtil.getPackageInfoVersionName(packageName);
--        } else {
-+//        if(AndroidVersion.isAvailable) {
-+//            androidPackageVersionName = PackageInfoUtil.getPackageInfoVersionName(packageName);
-+//        } else {
-             androidPackageVersionName = null;
--        }
-+///        }
-     }
- 
-     @Override
-@@ -109,9 +109,9 @@
-     }
- 
-     public final String getExtensionName() {
--        if(null != androidPackageVersionName) {
--            return packageName;
--        }
-+//        if(null != androidPackageVersionName) {
-+//            return packageName;
-+//        }
-         return this.getAttribute(Attributes.Name.EXTENSION_NAME);
-     }
- 
diff -Nru gluegen2-2.3.2/debian/patches/disable_android.diff gluegen2-2.4.0+dfsg/debian/patches/disable_android.diff
--- gluegen2-2.3.2/debian/patches/disable_android.diff	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/patches/disable_android.diff	1970-01-01 01:00:00.000000000 +0100
@@ -1,109 +0,0 @@
-Index: gluegen2-2.0-rc3/make/build.xml
-===================================================================
---- gluegen2-2.0-rc3.orig/make/build.xml	2011-10-06 14:16:27.000000000 +0200
-+++ gluegen2-2.0-rc3/make/build.xml	2011-10-06 14:29:49.000000000 +0200
-@@ -21,7 +21,7 @@
- 
-   <import file="gluegen-cpptasks.xml" />
-   <import file="jogamp-archivetasks.xml" />
--  <import file="jogamp-androidtasks.xml" />
-+<!--  <import file="jogamp-androidtasks.xml" /> -->
-   <import file="jogamp-env.xml" />
- 
-   <condition property="rootrel.build" value="build">
-@@ -114,7 +114,7 @@
-          This requires the user-defined "antlr.jar" property. -->
-     <path id="gluegencompile.classpath">
-       <pathelement location="${antlr.jar}" />
--      <pathelement location="${android.jar}"/>
-+<!--      <pathelement location="${android.jar}"/> -->
-     </path>
-     
-     <!-- Create the classpath for using GlueGen. -->
-@@ -147,7 +147,7 @@
-     <!-- property name="javac.memorymax"  value="128m" /-->  <!-- I ran out of memory with these .. linux x86_64 6u14 -->
-     <property name="javac.memorymax"  value="512m" /> 
- 
--    <property name="gluegen.excludes.all" value="${gluegen.excludes.nsig}" />
-+    <property name="gluegen.excludes.all" value="${gluegen.excludes.nsig} jogamp/common/os/android/**" />
-     <property name="gluegen-rt.classes" value="com/jogamp/gluegen/runtime/**"/>
-     <property name="jogamp.common.classes" value="com/jogamp/common/**"/>
-   </target>
-Index: gluegen2-2.0-rc3/src/java/com/jogamp/common/util/IOUtil.java
-===================================================================
---- gluegen2-2.0-rc3.orig/src/java/com/jogamp/common/util/IOUtil.java	2011-10-06 14:38:04.000000000 +0200
-+++ gluegen2-2.0-rc3/src/java/com/jogamp/common/util/IOUtil.java	2011-10-06 14:38:48.000000000 +0200
-@@ -42,9 +42,9 @@
- import java.nio.ByteBuffer;
- 
- import jogamp.common.Debug;
--import jogamp.common.os.android.StaticContext;
-+//import jogamp.common.os.android.StaticContext;
- 
--import android.content.Context;
-+//import android.content.Context;
- 
- import com.jogamp.common.nio.Buffers;
- import com.jogamp.common.os.AndroidVersion;
-@@ -491,14 +491,14 @@
-         throws SecurityException
-     {
-         if(AndroidVersion.isAvailable) {
--            final Context ctx = StaticContext.getContext();
-+/*            final Context ctx = StaticContext.getContext();
-             if(null != ctx) {
-                 final File tmpRoot = ctx.getDir("temp", Context.MODE_WORLD_READABLE);
-                 if(DEBUG) {
-                     System.err.println("IOUtil.getTempRoot(Android): temp dir: "+tmpRoot.getAbsolutePath());
-                 }
-                 return tmpRoot;
--            }
-+                }*/
-         }
-         final String tmpRootName = System.getProperty("java.io.tmpdir");
-         final File tmpRoot = new File(tmpRootName);
-Index: gluegen2-2.0-rc3/src/java/com/jogamp/common/util/JogampVersion.java
-===================================================================
---- gluegen2-2.0-rc3.orig/src/java/com/jogamp/common/util/JogampVersion.java	2011-10-06 14:37:11.000000000 +0200
-+++ gluegen2-2.0-rc3/src/java/com/jogamp/common/util/JogampVersion.java	2011-10-06 14:37:43.000000000 +0200
-@@ -29,7 +29,7 @@
- package com.jogamp.common.util;
- 
- import com.jogamp.common.GlueGenVersion;
--import com.jogamp.common.os.AndroidVersion;
-+//import com.jogamp.common.os.AndroidVersion;
- import com.jogamp.common.os.Platform;
- 
- import java.util.Iterator;
-@@ -37,7 +37,7 @@
- import java.util.jar.Attributes;
- import java.util.jar.Manifest;
- 
--import jogamp.common.os.android.PackageInfoUtil;
-+//import jogamp.common.os.android.PackageInfoUtil;
- 
- public class JogampVersion {
- 
-@@ -50,7 +50,7 @@
-     private Attributes mainAttributes;
-     private Set/*<Attributes.Name>*/ mainAttributeNames;
-     
--    private final String androidPackageVersionName;
-+    private final String androidPackageVersionName = null;
-     
-     protected JogampVersion(String packageName, Manifest mf) {        
-         this.packageName = packageName;
-@@ -58,11 +58,11 @@
-         this.hash = this.mf.hashCode();
-         mainAttributes = this.mf.getMainAttributes();
-         mainAttributeNames = mainAttributes.keySet();
--        if(AndroidVersion.isAvailable) {
-+/*        if(AndroidVersion.isAvailable) {
-             androidPackageVersionName = PackageInfoUtil.getPackageInfoVersionName(packageName);
-         } else {
-             androidPackageVersionName = null;
--        }
-+            }*/
-     }
- 
-     @Override
diff -Nru gluegen2-2.3.2/debian/patches/disableArchive7z.diff gluegen2-2.4.0+dfsg/debian/patches/disableArchive7z.diff
--- gluegen2-2.3.2/debian/patches/disableArchive7z.diff	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/patches/disableArchive7z.diff	2023-03-14 23:46:47.000000000 +0100
@@ -1,8 +1,12 @@
-Index: gluegen2/make/build.xml
-===================================================================
---- gluegen2.orig/make/build.xml
-+++ gluegen2/make/build.xml
-@@ -1088,9 +1088,9 @@
+Description: skipping the build of the 7z archive, which we don't need for a
+ Debian build
+Author: Sylvestre Ledru <sylvestre at debian.org>
+Forwarded: not-needed
+Last-Update: 2023-03-14
+
+--- a/make/build.xml
++++ b/make/build.xml
+@@ -1298,9 +1298,9 @@
      <copy todir="${javadoc.gluegen.path}/resources" overwrite="true">
          <fileset dir="doc/javadoc/resources" includes="*" />
      </copy>
@@ -14,7 +18,7 @@
    </target>
  
      <!-- ================================================================== -->
-@@ -1138,9 +1138,9 @@
+@@ -1348,9 +1348,9 @@
              <fileset dir="lib" includes="junit.jar"/>
          </copy>
  
diff -Nru gluegen2-2.3.2/debian/patches/disable_git_call.diff gluegen2-2.4.0+dfsg/debian/patches/disable_git_call.diff
--- gluegen2-2.3.2/debian/patches/disable_git_call.diff	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/patches/disable_git_call.diff	2023-03-15 16:41:18.000000000 +0100
@@ -1,6 +1,11 @@
+Description: no need to fiddle with git during this build
+Author: Pierre Gruet <pgt at debian.org>
+Forwarded: not-needed
+Last-Update: 2023-03-15
+
 --- a/make/build.xml
 +++ b/make/build.xml
-@@ -70,14 +70,6 @@
+@@ -77,14 +77,6 @@
      <property name="gluegen.build.number" value="manual"/>
      <property name="gluegen.build.id"     value="${version.timestamp}"/>
      <mkdir dir="${build}" />
diff -Nru gluegen2-2.3.2/debian/patches/disable-java-version-check.diff gluegen2-2.4.0+dfsg/debian/patches/disable-java-version-check.diff
--- gluegen2-2.3.2/debian/patches/disable-java-version-check.diff	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/patches/disable-java-version-check.diff	2023-03-15 17:18:07.000000000 +0100
@@ -4,21 +4,15 @@
 Forwarded: not-needed
 --- a/make/jogamp-env.xml
 +++ b/make/jogamp-env.xml
-@@ -45,21 +45,6 @@
-       </condition>
-     </fail>
+@@ -128,15 +128,6 @@
+     </condition>
+     <echo message="minJava8                   ${minJava8}"/> 
  
--    <fail message="Unsupported Java version: ${ant.java.version}. Make sure that the version of the Java compiler is 1.6 (6.0) or greater.">
+-    <!-- Only for junit runtime tests Java [8-10] is allowed, for building Java 11 is required. -->
+-    <fail message="Unsupported Java version: ${ant.java.version}. Make sure that the version of Java is 1.8 or greater.">
 -        <condition>
 -            <not>
--                <or>
--                    <equals arg1="${ant.java.version}" arg2="1.6"/>
--                    <equals arg1="${ant.java.version}" arg2="1.7"/>
--                    <equals arg1="${ant.java.version}" arg2="1.8"/>
--                    <equals arg1="${ant.java.version}" arg2="1.9"/>
--                    <equals arg1="${ant.java.version}" arg2="2.0"/>
--                    <equals arg1="${ant.java.version}" arg2="2.1"/>
--                </or>
+-                <istrue value="${minJava8}"/>
 -            </not>
 -        </condition>
 -    </fail>
diff -Nru gluegen2-2.3.2/debian/patches/disable-static-linking.diff gluegen2-2.4.0+dfsg/debian/patches/disable-static-linking.diff
--- gluegen2-2.3.2/debian/patches/disable-static-linking.diff	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/patches/disable-static-linking.diff	2023-03-15 17:15:45.000000000 +0100
@@ -1,10 +1,11 @@
 Description: disable static linking for native libraries.
 Author: Gilles Filippini <pini at debian.org>
-Index: gluegen2/make/gluegen-cpptasks-base.xml
-===================================================================
---- gluegen2.orig/make/gluegen-cpptasks-base.xml
-+++ gluegen2/make/gluegen-cpptasks-base.xml
-@@ -1262,20 +1262,14 @@
+Forwarded: not-needed
+Last-Update: 2023-03-15
+
+--- a/make/gluegen-cpptasks-base.xml
++++ b/make/gluegen-cpptasks-base.xml
+@@ -1364,20 +1364,14 @@
      <!-- Unix linker configuration -->
  
      <linker id="linker.cfg.linux" name="${gcc.compat.compiler}">
@@ -25,7 +26,7 @@
      </linker>
  
      <!-- Using default compiler settings - utilize:
-@@ -1286,16 +1280,12 @@
+@@ -1388,8 +1382,6 @@
        <linkerarg value="-fpic" /> 
        <linkerarg value="-nostdlib" />
        <linkerarg value="-Bdynamic" />
@@ -33,7 +34,8 @@
 -      <linkerarg value="-static-libstdc++" if="isGCC"/>
      </linker>
  
-     <linker id="linker.cfg.linux.aarch64" name="${gcc.compat.compiler}">
+     <!-- Using default compiler settings - utilize:
+@@ -1400,8 +1392,6 @@
        <linkerarg value="-fpic" /> 
        <linkerarg value="-nostdlib" />
        <linkerarg value="-Bdynamic" />
diff -Nru gluegen2-2.3.2/debian/patches/disable-test-zip-archive.diff gluegen2-2.4.0+dfsg/debian/patches/disable-test-zip-archive.diff
--- gluegen2-2.3.2/debian/patches/disable-test-zip-archive.diff	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/patches/disable-test-zip-archive.diff	2023-03-15 16:40:11.000000000 +0100
@@ -1,6 +1,11 @@
+Description: no need to zip the archive
+Author: Sylvestre Ledru <sylvestre at debian.org>
+Forwarded: |not-needed
+Last-Update: 2023-03-15
+
 --- a/make/build-test.xml
 +++ b/make/build-test.xml
-@@ -505,7 +505,7 @@
+@@ -513,7 +513,7 @@
      </target>
  
      <target name="junit.run" depends="junit.run.settings, junit.run.if.enabled, junit.run.if.disabled">
diff -Nru gluegen2-2.3.2/debian/patches/fix-alpha-build-config.patch gluegen2-2.4.0+dfsg/debian/patches/fix-alpha-build-config.patch
--- gluegen2-2.3.2/debian/patches/fix-alpha-build-config.patch	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/patches/fix-alpha-build-config.patch	2023-03-15 17:09:11.000000000 +0100
@@ -1,13 +1,16 @@
-Index: gluegen2/make/build.xml
-===================================================================
---- gluegen2.orig/make/build.xml
-+++ gluegen2/make/build.xml
-@@ -334,7 +334,7 @@
+Description: handling the alpha architecture
+Author: Tony Mancill <tmancill at debian.org>
+Forwarded: no
+Last-Update: 2023-03-15
+
+--- a/make/build.xml
++++ b/make/build.xml
+@@ -354,7 +354,7 @@
        <property name="linker.cfg.id"                        value="linker.cfg.linux.sparc" /> 
      </target>
      
--    <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.ppc,declare.linux.ppc64,declare.linux.ppc64le,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6.armel,declare.linux.armv6.armhf" if="isLinux" >
-+    <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.alpha,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.ppc,declare.linux.ppc64,declare.linux.ppc64le,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6.armel,declare.linux.armv6.armhf" if="isLinux" >
+-    <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.ppc,declare.linux.ppc64,declare.linux.ppc64le,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6.armel,declare.linux.armv6.armhf,declare.linux.aarch64" if="isLinux" >
++    <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.alpha,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.ppc,declare.linux.ppc64,declare.linux.ppc64le,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6.armel,declare.linux.armv6.armhf,declare.linux.aarch64" if="isLinux" >
        <property name="c.src.dir.os"                         value="unix" />
      </target>
  
diff -Nru gluegen2-2.3.2/debian/patches/fix-arm64-build-config.diff gluegen2-2.4.0+dfsg/debian/patches/fix-arm64-build-config.diff
--- gluegen2-2.3.2/debian/patches/fix-arm64-build-config.diff	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/patches/fix-arm64-build-config.diff	2023-03-15 17:14:32.000000000 +0100
@@ -1,34 +1,25 @@
-Index: gluegen2/make/build.xml
-===================================================================
---- gluegen2.orig/make/build.xml
-+++ gluegen2/make/build.xml
-@@ -316,6 +316,12 @@
-       <property name="linker.cfg.id"                        value="linker.cfg.linux.ppc64le" />
+Description: having the software build on Debian arm64
+Author: Tony Mancill <tmancill at debian.org>
+Forwarded: not-needed
+Last-Update: 2023-03-15
+
+--- a/make/build.xml
++++ b/make/build.xml
+@@ -288,9 +288,9 @@
+       <property name="linker.cfg.id"                        value="linker.cfg.linux.armv6.armhf" />
      </target>
  
+-    <target name="declare.linux.aarch64" if="isLinuxARM64">
 +    <target name="declare.linux.aarch64" if="isLinuxAarch64">
-+      <echo message="Linux.aarch64" />
+       <echo message="Linux.aarch64" />
+-      <property name="compiler.cfg.id"                      value="compiler.cfg.linux.aarch64" />
 +      <property name="compiler.cfg.id"                      value="compiler.cfg.linux" />
-+      <property name="linker.cfg.id"                        value="linker.cfg.linux.aarch64" />
-+    </target>
-+
-     <target name="declare.linux.s390" if="isLinuxs390">
-       <echo message="Linux.s390" />
-       <property name="compiler.cfg.id"                      value="compiler.cfg.linux" /> 
-@@ -334,7 +340,7 @@
-       <property name="linker.cfg.id"                        value="linker.cfg.linux.sparc" /> 
-     </target>
-     
--    <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.alpha,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.ppc,declare.linux.ppc64,declare.linux.ppc64le,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6.armel,declare.linux.armv6.armhf" if="isLinux" >
-+    <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.alpha,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.ppc,declare.linux.ppc64,declare.linux.ppc64le,declare.linux.aarch64,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6.armel,declare.linux.armv6.armhf" if="isLinux" >
-       <property name="c.src.dir.os"                         value="unix" />
+       <property name="linker.cfg.id"                        value="linker.cfg.linux.aarch64" />
      </target>
  
-Index: gluegen2/make/gluegen-cpptasks-base.xml
-===================================================================
---- gluegen2.orig/make/gluegen-cpptasks-base.xml
-+++ gluegen2/make/gluegen-cpptasks-base.xml
-@@ -50,6 +50,7 @@
+--- a/make/gluegen-cpptasks-base.xml
++++ b/make/gluegen-cpptasks-base.xml
+@@ -51,6 +51,7 @@
     -   isLinuxPpc
     -   isLinuxPpc64
     -   isLinuxPpc64le
@@ -36,7 +27,7 @@
     -   isLinuxs390
     -   isLinuxs390x
     -   isLinuxSparc
-@@ -137,6 +138,7 @@
+@@ -147,6 +148,7 @@
     -   compiler.cfg.linux.ppc
     -   compiler.cfg.linux.ppc64
     -   compiler.cfg.linux.ppc64le
@@ -44,7 +35,7 @@
     -   compiler.cfg.linux.s390
     -   compiler.cfg.linux.s390x
     -   compiler.cfg.linux.sparc
-@@ -440,6 +442,15 @@
+@@ -464,6 +466,15 @@
      <condition property="ppc64le">
        <os arch="ppc64le" />
      </condition>
@@ -60,7 +51,7 @@
      <condition property="isLinuxs390">
        <and>
          <istrue value="${isLinux}" />
-@@ -626,6 +637,7 @@
+@@ -860,6 +871,7 @@
      <echo message="LinuxPpc=${isLinuxPpc}" />
      <echo message="LinuxPpc64=${isLinuxPpc64}" />
      <echo message="LinuxPpc64le=${isLinuxPpc64le}" />
@@ -68,12 +59,3 @@
      <echo message="Linuxs390=${isLinuxs390}" />
      <echo message="Linuxs390x=${isLinuxs390x}" />
      <echo message="LinuxSparc=${isLinuxSparc}" />
-@@ -1511,7 +1523,7 @@
-       <echo message="Linux.aarch64" />
-       <property name="compiler.cfg.id.base"          value="compiler.cfg.linux.aarch64" /> 
-       <property name="linker.cfg.id.base"            value="linker.cfg.linux.aarch64" /> 
--      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/arm" />
-+      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/aarch64" />
-     </target>
- 
-     <target name="gluegen.cpptasks.declare.compiler.linux.ia64" if="isLinuxIA64">
diff -Nru gluegen2-2.3.2/debian/patches/fix_gcc-10.patch gluegen2-2.4.0+dfsg/debian/patches/fix_gcc-10.patch
--- gluegen2-2.3.2/debian/patches/fix_gcc-10.patch	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/patches/fix_gcc-10.patch	2023-03-12 14:34:57.000000000 +0100
@@ -6,14 +6,14 @@
 
 ---
 
---- gluegen2-2.3.2.orig/src/junit/com/jogamp/gluegen/test/junit/generation/test1.h
-+++ gluegen2-2.3.2/src/junit/com/jogamp/gluegen/test/junit/generation/test1.h
-@@ -299,9 +299,6 @@ MYAPI MYAPIConfig *  MYAPIENTRY typeTest
+--- a/src/junit/com/jogamp/gluegen/test/junit/generation/test1.h
++++ b/src/junit/com/jogamp/gluegen/test/junit/generation/test1.h
+@@ -299,9 +299,6 @@
  #define HUGE_VALF_3        ((int) 1e53)
  #define DOUBLE_DEFINE_BRACKETS_3 HUGE_VALF_3
  
--size_t unsigned_size_t_1;
--ptrdiff_t a_signed_pointer_t_1;
+-extern size_t unsigned_size_t_1;
+-extern ptrdiff_t a_signed_pointer_t_1;
 -
  MYAPI int32_t   MYAPIENTRY typeTestInt32T(const int32_t i1, int32_t i2);
  MYAPI uint32_t  MYAPIENTRY typeTestUInt32T(const uint32_t ui1, uint32_t ui2);
diff -Nru gluegen2-2.3.2/debian/patches/fix_issues.diff gluegen2-2.4.0+dfsg/debian/patches/fix_issues.diff
--- gluegen2-2.3.2/debian/patches/fix_issues.diff	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/patches/fix_issues.diff	1970-01-01 01:00:00.000000000 +0100
@@ -1,18 +0,0 @@
-Index: gluegen2-2.0-rc3/make/gluegen-cpptasks-base.xml
-===================================================================
---- gluegen2-2.0-rc3.orig/make/gluegen-cpptasks-base.xml	2011-10-06 14:11:59.000000000 +0200
-+++ gluegen2-2.0-rc3/make/gluegen-cpptasks-base.xml	2011-10-06 14:12:58.000000000 +0200
-@@ -1136,6 +1136,13 @@
-       <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/amd64" />
-     </target>
- 
-+    <target name="gluegen.cpptasks.declare.compiler.linux.alpha" if="isLinuxAlpha">
-+      <echo message="Linux.alpha" />
-+      <property name="compiler.cfg.id.base"          value="compiler.cfg.linux.alpha" /> 
-+      <property name="linker.cfg.id.base"            value="linker.cfg.linux.alpha" /> 
-+      <property name="java.lib.dir.platform"         value="${env.TARGET_JAVA_LIBS}" />
-+    </target>
-+
-     <target name="gluegen.cpptasks.declare.compiler.linux.armv7" if="isLinuxARMv7">
-       <echo message="Linux.armv7" />
-       <property name="compiler.cfg.id.base"          value="compiler.cfg.linux.armv7" /> 
diff -Nru gluegen2-2.3.2/debian/patches/hardening.patch gluegen2-2.4.0+dfsg/debian/patches/hardening.patch
--- gluegen2-2.3.2/debian/patches/hardening.patch	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/debian/patches/hardening.patch	2023-03-19 07:50:26.000000000 +0100
@@ -0,0 +1,18 @@
+Description: nsuring proper hardening by spreading LDFLAGS
+Author: Pierre Gruet <pgt at debian.org>
+Forwarded: not-needed
+Last-Update: 2023-03-19
+
+--- a/make/build.xml
++++ b/make/build.xml
+@@ -536,7 +536,9 @@
+           <includepath path="${src.generated.c}/Windows" if="isWindows"/>
+         </compiler>
+ 
+-        <linker extends="${linker.cfg.id}" />
++        <linker extends="${linker.cfg.id}">
++            #LINKER_ARGS#
++        </linker>
+ 
+       </cc>
+ 
diff -Nru gluegen2-2.3.2/debian/patches/hideException.diff gluegen2-2.4.0+dfsg/debian/patches/hideException.diff
--- gluegen2-2.3.2/debian/patches/hideException.diff	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/patches/hideException.diff	2023-03-15 17:13:32.000000000 +0100
@@ -1,13 +1,16 @@
-Index: gluegen2/src/java/com/jogamp/common/os/Platform.java
-===================================================================
---- gluegen2.orig/src/java/com/jogamp/common/os/Platform.java
-+++ gluegen2/src/java/com/jogamp/common/os/Platform.java
-@@ -305,15 +305,6 @@ public class Platform extends PlatformPr
-                 _USE_TEMP_JAR_CACHE[0] = ( OS_TYPE != OSType.ANDROID ) && ( null != platformClassJarURI ) &&
+Description: disabling the display of the cache jar exception
+Author: Sylvestre Ledru <sylvestre at debian.org>
+Forwarded: not-needed
+Last-Update: 2023-03-15
+
+--- a/src/java/com/jogamp/common/os/Platform.java
++++ b/src/java/com/jogamp/common/os/Platform.java
+@@ -309,15 +309,6 @@
+                                          ( null != platformClassJarURI ) &&
                                           PropertyAccess.getBooleanProperty(useTempJarCachePropName, true, true);
  
 -                // load GluegenRT native library
--                if(_USE_TEMP_JAR_CACHE[0] && TempJarCache.initSingleton()) {
+-                if(_USE_TEMP_JAR_CACHE[0] && TempJarCache.initSingleton() && TempJarCache.isInitialized(true) ) {
 -                    try {
 -                        JNILibLoaderBase.addNativeJarLibs(new Class<?>[] { jogamp.common.Debug.class }, null);
 -                    } catch (final Exception e0) {
diff -Nru gluegen2-2.3.2/debian/patches/java10-compatibility.patch gluegen2-2.4.0+dfsg/debian/patches/java10-compatibility.patch
--- gluegen2-2.3.2/debian/patches/java10-compatibility.patch	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/patches/java10-compatibility.patch	2023-03-12 14:34:15.000000000 +0100
@@ -3,15 +3,24 @@
 Forwarded: no
 --- a/src/java/net/highteq/nativetaglet/NativeTaglet.java
 +++ /dev/null
-@@ -1,237 +0,0 @@
+@@ -1,224 +0,0 @@
 -package net.highteq.nativetaglet;
 -
--import com.sun.tools.doclets.Taglet;
--import com.sun.javadoc.*;
+-import jdk.javadoc.doclet.Taglet;
+-import com.sun.source.doctree.DocTree;
+-import com.sun.source.doctree.TextTree;
+-import com.sun.source.doctree.UnknownBlockTagTree;
+-import com.sun.source.doctree.UnknownInlineTagTree;
+-import com.sun.source.util.SimpleDocTreeVisitor;
+-
+-import javax.lang.model.element.Element;
 -
 -import java.util.Map;
 -import java.util.Properties;
+-import java.util.Set;
+-import java.util.HashSet;
 -import java.util.Iterator;
+-import java.util.List;
 -import java.io.InputStream;
 -import java.net.URL;
 -import java.net.MalformedURLException;
@@ -31,65 +40,6 @@
 -  }
 -
 -  /**
--   * @return true since this tag can be used in a field
--   *         doc comment
--   */
--  @Override
--  public boolean inField()
--  {
--    return true;
--  }
--
--  /**
--   * @return true since this tag can be used in a constructor
--   *         doc comment
--   */
--  @Override
--  public boolean inConstructor()
--  {
--    return true;
--  }
--
--  /**
--   * @return true since this tag can be used in a method
--   *         doc comment
--   */
--  @Override
--  public boolean inMethod()
--  {
--    return true;
--  }
--
--  /**
--   * @return true since this tag can be used in an overview
--   *         doc comment
--   */
--  @Override
--  public boolean inOverview()
--  {
--    return true;
--  }
--
--  /**
--   * @return true since this tag can be used in a package
--   *         doc comment
--   */
--  @Override
--  public boolean inPackage()
--  {
--    return true;
--  }
--
--  /**
--   * @return true since this
--   */
--  @Override
--  public boolean inType()
--  {
--    return true;
--  }
--
--  /**
 -   * Will return true since this is an inline tag.
 -   *
 -   * @return true since this is an inline tag.
@@ -117,16 +67,54 @@
 -    tagletMap.put(tag.getName(), tag);
 -  }
 -
+-    /**
+-     * Utility function to visit the tree of tags and return the text.
+-     * @param tags the list of instances of this tag
+-     * @return the text of the tags.
+-     */
+-    static String getTagsText(DocTree tags) {
+-        return new SimpleDocTreeVisitor<String, Void>() {
+-            @Override
+-            public String visitText(TextTree node, Void unused) {
+-                return node.getBody();
+-            }
+-
+-            @Override
+-            public String visitUnknownBlockTag(UnknownBlockTagTree node, Void unused) {
+-                for(DocTree doctree : node.getContent())
+-                    return doctree.accept(this, unused);
+-
+-                return "";
+-            }
+-
+-            @Override
+-            public String visitUnknownInlineTag(UnknownInlineTagTree node, Void unused) {
+-                for(DocTree doctree : node.getContent())
+-                    return doctree.accept(this, unused);
+-
+-                return "";
+-            }
+-
+-            @Override
+-            protected String defaultAction(DocTree node, Void unused) {
+-                return "";
+-            }
+-
+-      }.visit(tags, null);
+-  }
+-
 -  /**
--   * Given the <code>Tag</code> representation of this custom
--   * tag, return its string representation.
+-   * Returns the string representation of a series of instances of
+-   * this tag to be included in the generated output.
 -   *
--   * @param tag the <code>Tag</code> representation of this custom tag.
+-   * @param tags the list of instances of this tag
+-   * @param element the element to which the enclosing comment belongs
+-   * @return the string representation of the tags to be included in
+-   *  the generated output
 -   */
 -  @Override
--  public String toString(final Tag tag)
--  {
--    String text= tag.text().trim();
+-  public String toString(List<? extends DocTree> tags, Element element) {
+-    String text= getTagsText(tags.get(0)).trim();
 -    if(mapping== null)
 -      {
 -        mapping= new Properties();
@@ -228,36 +216,15 @@
 -    return false;
 -  }
 -
--  /**
--   * This method should not be called since arrays of inline tags do not
--   * exist.  Method {@link #tostring(Tag)} should be used to convert this
--   * inline tag to a string.
--   *
--   * @param tags the array of <code>Tag</code>s representing of this custom tag.
--   */
--  @Override
--  public String toString(final Tag[] tags)
--  {
--    return null;
--  }
+-    @Override
+-    public Set<Location> getAllowedLocations() {
+-        Set<Location> locations = new HashSet<Location>();
+-        locations.add(Location.FIELD);
+-        locations.add(Location.CONSTRUCTOR);
+-        locations.add(Location.METHOD);
+-        locations.add(Location.OVERVIEW);
+-        locations.add(Location.PACKAGE);
+-        locations.add(Location.TYPE);
+-        return locations;
+-    }
 -}
---- a/make/build.xml
-+++ b/make/build.xml
-@@ -466,9 +466,6 @@
-       <fail message="Requires '${compiler.cfg.id}'"      unless="compiler.cfg.id"/>
-       <fail message="Requires '${linker.cfg.id}'"        unless="linker.cfg.id"/>
- 
--      <javah destdir="${src.generated.c}"         classpath="${classes}" class="com.jogamp.common.os.Platform, com.jogamp.common.nio.PointerBuffer, jogamp.common.jvm.JVMUtil, com.jogamp.common.util.JarUtil, jogamp.common.os.MachineDataInfoRuntime" />
--      <javah destdir="${src.generated.c}/Unix"    classpath="${classes}" class="jogamp.common.os.UnixDynamicLinkerImpl" />
--      <javah destdir="${src.generated.c}/Windows" classpath="${classes}" class="jogamp.common.os.WindowsDynamicLinkerImpl"/>
- 
-       <echo message="Output lib name = ${output.lib.name} -> ${output.lib.name.os}" />
- 
-@@ -746,6 +743,7 @@
- 
-     <!-- Compile gluegen-rt first -->
-     <javac destdir="${classes}"
-+           nativeHeaderDir="${src.generated.c}"
-            includeAntRuntime="false"
-            includes="${gluegen-rt.classes} ${jogamp.common.classes}"
-            excludes="${gluegen.excludes.all} ${java.part.android}"
diff -Nru gluegen2-2.3.2/debian/patches/java_include_dir.patch gluegen2-2.4.0+dfsg/debian/patches/java_include_dir.patch
--- gluegen2-2.3.2/debian/patches/java_include_dir.patch	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/debian/patches/java_include_dir.patch	2023-03-15 17:22:42.000000000 +0100
@@ -0,0 +1,52 @@
+Description: including jni headers from the system path, as the embedded ones
+ have a non-free license.
+Author: Pierre Gruet <pgt at debian.org>
+Forwarded: not-needed
+Last-Update: 2023-03-14
+
+--- a/make/gluegen-cpptasks-base.xml
++++ b/make/gluegen-cpptasks-base.xml
+@@ -1131,7 +1131,7 @@
+                  else="${java.home}" >
+                  <available file="${java.home}/../jre" type="dir" />
+       </condition>
+-      <property name="java.includes.dir" value="${gluegen.root.abs-path}/make/stub_includes/jni" />
++      <property name="java.includes.dir" value="/usr/lib/jvm/default-java/include" />
+       <echo message="java.home.dir      ${java.home.dir}" />
+       <echo message="java.includes.dir  ${java.includes.dir}" />
+   </target>
+@@ -1913,7 +1913,7 @@
+     </target>
+ 
+     <target name="gluegen.cpptasks.declare.compiler.linux" depends="gluegen.cpptasks.declare.compiler.linux.x86,gluegen.cpptasks.declare.compiler.linux.amd64,gluegen.cpptasks.declare.compiler.linux.ia64,gluegen.cpptasks.declare.compiler.linux.armv6,gluegen.cpptasks.declare.compiler.linux.aarch64,gluegen.cpptasks.declare.compiler.linux.alpha,gluegen.cpptasks.declare.compiler.linux.hppa,gluegen.cpptasks.declare.compiler.linux.mips,gluegen.cpptasks.declare.compiler.linux.mipsel,gluegen.cpptasks.declare.compiler.linux.mipsn32,gluegen.cpptasks.declare.compiler.linux.mipsn32el,gluegen.cpptasks.declare.compiler.linux.mips64,gluegen.cpptasks.declare.compiler.linux.mips64el,gluegen.cpptasks.declare.compiler.linux.ppc,gluegen.cpptasks.declare.compiler.linux.ppc64,gluegen.cpptasks.declare.compiler.linux.ppc64le,gluegen.cpptasks.declare.compiler.linux.riscv64,gluegen.cpptasks.declare.compiler.linux.s390,gluegen.cpptasks.declare.compiler.linux.s390x,gluegen.cpptasks.declare.compiler.linux.sparc" if="isLinux">
+-        <property name="java.includes.dir.platform" value="${java.includes.dir}/x11" />
++        <property name="java.includes.dir.platform" value="${java.includes.dir}/linux" />
+     </target>
+ 
+     <target name="gluegen.cpptasks.declare.compiler.solaris32" if="isSolaris32Bit">
+@@ -1935,7 +1935,7 @@
+     </target>
+ 
+     <target name="gluegen.cpptasks.declare.compiler.solaris" depends="gluegen.cpptasks.declare.compiler.solaris32,gluegen.cpptasks.declare.compiler.solaris.sparcv9,gluegen.cpptasks.declare.compiler.solaris.amd64" if="isSolaris">
+-      <property name="java.includes.dir.platform"    value="${java.includes.dir}/x11" />
++      <property name="java.includes.dir.platform"    value="${java.includes.dir}/linux" />
+       <available property="java.lib.dir.platform"    value="${java.home.dir}/jre/lib/${solaris.cpu}" 
+                                                       file="${java.home.dir}/jre/lib/${solaris.cpu}/libjava.so"/>
+       <available property="java.lib.dir.platform"    value="${java.home.dir}/lib/${solaris.cpu}"     
+@@ -1996,14 +1996,14 @@
+     </target>
+ 
+     <target name="gluegen.cpptasks.declare.compiler.freebsd" depends="gluegen.cpptasks.declare.compiler.freebsd.x86,gluegen.cpptasks.declare.compiler.freebsd.amd64" if="isFreeBSD">
+-      <property name="java.includes.dir.platform"    value="${java.includes.dir}/x11" />
++      <property name="java.includes.dir.platform"    value="${java.includes.dir}/linux" />
+     </target>
+ 
+     <target name="gluegen.cpptasks.declare.compiler.hpux" if="isHPUX">
+       <echo message="HP-UX" />
+       <property name="compiler.cfg.id.base"          value="compiler.cfg.hpux" />
+       <property name="linker.cfg.id.base"            value="linker.cfg.hpux" />
+-      <property name="java.includes.dir.platform"    value="${java.includes.dir}/x11" />
++      <property name="java.includes.dir.platform"    value="${java.includes.dir}/linux" />
+       <available property="java.lib.dir.platform"    value="${java.home.dir}/jre/lib/PA_RISC2.0" 
+                                                       file="${java.home.dir}/jre/lib/PA_RISC2.0/libjava.so"/>
+       <available property="java.lib.dir.platform"    value="${java.home.dir}/lib/PA_RISC2.0"     
diff -Nru gluegen2-2.3.2/debian/patches/linker.diff gluegen2-2.4.0+dfsg/debian/patches/linker.diff
--- gluegen2-2.3.2/debian/patches/linker.diff	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/patches/linker.diff	1970-01-01 01:00:00.000000000 +0100
@@ -1,13 +0,0 @@
-Index: gluegen2/make/gluegen-cpptasks-base.xml
-===================================================================
---- gluegen2.orig/make/gluegen-cpptasks-base.xml
-+++ gluegen2/make/gluegen-cpptasks-base.xml
-@@ -1316,6 +1316,8 @@
-     <linker id="linker.cfg.linux.sparc" name="${gcc.compat.compiler}">
-     </linker>
- 
-+
-+
-     <compiler id="linker.cfg.android" name="${gcc.compat.compiler}">
-       <!-- shall be defined in custom ${gluegen-cpptasks.file} ! -->
-     </compiler>
diff -Nru gluegen2-2.3.2/debian/patches/looking_for_native_lib_in_tests.patch gluegen2-2.4.0+dfsg/debian/patches/looking_for_native_lib_in_tests.patch
--- gluegen2-2.3.2/debian/patches/looking_for_native_lib_in_tests.patch	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/debian/patches/looking_for_native_lib_in_tests.patch	2023-03-15 17:22:35.000000000 +0100
@@ -0,0 +1,19 @@
+Description: putting the path of the build .so in the java.library.path for
+ the tests, so that it can be loaded as native code.
+Author: Pierre Gruet <pgt at debian.org>
+Forwarded: no
+Last-Update: 2023-03-15
+
+--- a/make/scripts/runtest.sh
++++ b/make/scripts/runtest.sh
+@@ -83,8 +83,8 @@
+     echo LD_LIBRARY_PATH $LD_LIBRARY_PATH
+     echo USE_CLASSPATH $USE_CLASSPATH
+     which java
+-    echo java -cp "$USE_CLASSPATH" $X_ARGS $D_ARGS -Djava.library.path=$libspath $*
+-    java -cp "$USE_CLASSPATH" $X_ARGS $D_ARGS -Djava.library.path="$libspath" $*
++    echo java -cp "$USE_CLASSPATH" $X_ARGS $D_ARGS -Djava.library.path=$libspath:$builddir/obj $*
++    java -cp "$USE_CLASSPATH" $X_ARGS $D_ARGS -Djava.library.path="$libspath:$builddir/obj" $*
+     #echo java -cp "$USE_CLASSPATH" $X_ARGS $D_ARGS $*
+     #java -cp "$USE_CLASSPATH" $X_ARGS $D_ARGS $*
+     #j3 -cp "$USE_CLASSPATH" $X_ARGS $D_ARGS $*
diff -Nru gluegen2-2.3.2/debian/patches/missing-arch-symbol.diff gluegen2-2.4.0+dfsg/debian/patches/missing-arch-symbol.diff
--- gluegen2-2.3.2/debian/patches/missing-arch-symbol.diff	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/patches/missing-arch-symbol.diff	2023-03-15 17:11:19.000000000 +0100
@@ -1,17 +1,25 @@
-Index: gluegen2/make/stub_includes/platform/glibc-compat-symbols.h
-===================================================================
---- gluegen2.orig/make/stub_includes/platform/glibc-compat-symbols.h
-+++ gluegen2/make/stub_includes/platform/glibc-compat-symbols.h
-@@ -15,35 +15,7 @@
+Description: fixing missing architecture support
+Author: Sylvestre Ledru <sylvestre at debian.org>
+Forwarded: not-needed
+Last-Update: 2023-03-15
+
+--- a/make/stub_includes/platform/glibc-compat-symbols.h
++++ b/make/stub_includes/platform/glibc-compat-symbols.h
+@@ -15,45 +15,7 @@
   *
   * Check build-in macro definitions via 'gcc -dM -E - < /dev/null'
   */
 -#if defined(__linux__) /* Actually we like to test whether we link against GLIBC .. */
 -    #if defined(__GNUC__)
 -        #if defined(__aarch64__)
--           #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.4");
+-           /* glibc 2.17 is the first glibc version that support aarch64
+-              however memcpy is not versioned for aarch64 */
+-           #define GLIBC_COMPAT_SYMBOL(FFF)
 -        #elif defined(__arm__)
+-           /** On recent toolchain memcpy is no more versioned for arm 
 -           #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.4");
+-            */
+-           #define GLIBC_COMPAT_SYMBOL(FFF)
 -        #elif defined(__amd64__)
 -           #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.2.5");
 -        #else
@@ -19,9 +27,14 @@
 -        #endif /*__amd64__*/
 -    #elif defined(__clang__)
 -        #if defined(__aarch64__)
--           #define GLIBC_COMPAT_SYMBOL(FFF) asm(".symver " #FFF "," #FFF "@GLIBC_2.4");
+-           /* glibc 2.17 is the first glibc version that support aarch64
+-              however memcpy is not versioned for aarch64 */
+-           #define GLIBC_COMPAT_SYMBOL(FFF)
 -        #elif defined(__arm__)
--           #define GLIBC_COMPAT_SYMBOL(FFF) asm(".symver " #FFF "," #FFF "@GLIBC_2.4");
+-           /** On recent toolchain memcpy is no more versioned for arm 
+-           #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.4");
+-            */
+-           #define GLIBC_COMPAT_SYMBOL(FFF)
 -        #elif defined(__amd64__)
 -           #define GLIBC_COMPAT_SYMBOL(FFF) asm(".symver " #FFF "," #FFF "@GLIBC_2.2.5");
 -        #else
diff -Nru gluegen2-2.3.2/debian/patches/missing_shebangs.patch gluegen2-2.4.0+dfsg/debian/patches/missing_shebangs.patch
--- gluegen2-2.3.2/debian/patches/missing_shebangs.patch	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/debian/patches/missing_shebangs.patch	2023-03-17 23:09:23.000000000 +0100
@@ -0,0 +1,89 @@
+Description: some .sh files are missing a shebang; adding it
+Author: Pierre Gruet <pgt at debian.org>
+Forwarded: no
+Last-Update: 2023-03-17
+
+--- a/make/scripts/adb-install-all-aarch64.sh
++++ b/make/scripts/adb-install-all-aarch64.sh
+@@ -1,2 +1,4 @@
++#!/bin/sh
++
+ adb $* install ../build-android-aarch64/jogamp-android-launcher.apk
+ adb $* install ../build-android-aarch64/gluegen-rt-android-aarch64.apk
+--- a/make/scripts/adb-install-all-armv6.sh
++++ b/make/scripts/adb-install-all-armv6.sh
+@@ -1,2 +1,4 @@
++#! /bin/sh
++
+ adb $* install ../build-android-armv6/jogamp-android-launcher.apk
+ adb $* install ../build-android-armv6/gluegen-rt-android-armv6.apk
+--- a/make/scripts/adb-install-all-x86.sh
++++ b/make/scripts/adb-install-all-x86.sh
+@@ -1,2 +1,4 @@
++#! /bin/sh
++
+ adb $* install ../build-android-x86/jogamp-android-launcher.apk
+ adb $* install ../build-android-x86/gluegen-rt-android-x86.apk
+--- a/make/scripts/adb-logcat.sh
++++ b/make/scripts/adb-logcat.sh
+@@ -1,3 +1,5 @@
++#! /bin/sh
++
+ sdir=`dirname $0`
+ 
+ adb $* logcat -c
+--- a/make/scripts/adb-reinstall-all-aarch64.sh
++++ b/make/scripts/adb-reinstall-all-aarch64.sh
+@@ -1,3 +1,5 @@
++#! /bin/sh
++
+ sdir=`dirname $0`
+ 
+ $sdir/adb-uninstall-all.sh $*
+--- a/make/scripts/adb-reinstall-all-armv6.sh
++++ b/make/scripts/adb-reinstall-all-armv6.sh
+@@ -1,3 +1,5 @@
++#! /bin/sh
++
+ sdir=`dirname $0`
+ 
+ $sdir/adb-uninstall-all.sh $*
+--- a/make/scripts/adb-reinstall-all-x86.sh
++++ b/make/scripts/adb-reinstall-all-x86.sh
+@@ -1,3 +1,5 @@
++#! /bin/sh
++
+ sdir=`dirname $0`
+ 
+ $sdir/adb-uninstall-all.sh $*
+--- a/make/scripts/adb-uninstall-all.sh
++++ b/make/scripts/adb-uninstall-all.sh
+@@ -1,2 +1,4 @@
++#! /bin/sh
++
+ adb $* uninstall jogamp.android.launcher
+ adb $* uninstall com.jogamp.common
+--- a/make/scripts/crosstest-java-linux-armv6-rel.sh
++++ b/make/scripts/crosstest-java-linux-armv6-rel.sh
+@@ -1,3 +1,5 @@
++#! /bin/sh
++
+ export HOST_UID=sven
+ export HOST_IP=jogamp02
+ export HOST_RSYNC_ROOT=PROJECTS/JogAmp
+--- a/make/scripts/crosstest-java-linux-armv6hf-rel.sh
++++ b/make/scripts/crosstest-java-linux-armv6hf-rel.sh
+@@ -1,3 +1,5 @@
++#! /bin/sh
++
+ export HOST_UID=sven
+ export HOST_IP=jogamp02
+ export HOST_RSYNC_ROOT=PROJECTS/JogAmp
+--- a/make/scripts/crosstest-junit-linux-armv7-rel.sh
++++ b/make/scripts/crosstest-junit-linux-armv7-rel.sh
+@@ -1,3 +1,5 @@
++#! /bin/sh
++
+ export HOST_UID=sven
+ export HOST_IP=192.168.0.52
+ export HOST_RSYNC_ROOT=PROJECTS/JogAmp
diff -Nru gluegen2-2.3.2/debian/patches/non-linux-support.diff gluegen2-2.4.0+dfsg/debian/patches/non-linux-support.diff
--- gluegen2-2.3.2/debian/patches/non-linux-support.diff	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/patches/non-linux-support.diff	2023-03-15 17:17:41.000000000 +0100
@@ -1,6 +1,11 @@
+Description: treat other Debian kernels as if they were Linux
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: not-needed
+Last-Update: 2023-03-15
+
 --- a/make/gluegen-cpptasks-base.xml
 +++ b/make/gluegen-cpptasks-base.xml
-@@ -292,7 +292,12 @@
+@@ -310,7 +310,12 @@
        <os name="Android" />
      </condition>
      <condition property="isLinux">
diff -Nru gluegen2-2.3.2/debian/patches/other-archs.diff gluegen2-2.4.0+dfsg/debian/patches/other-archs.diff
--- gluegen2-2.3.2/debian/patches/other-archs.diff	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/patches/other-archs.diff	1970-01-01 01:00:00.000000000 +0100
@@ -1,291 +0,0 @@
---- plop/gluegen-2.0-rc3/make/gluegen-cpptasks-base.xml	2011-10-06 13:22:16.000000000 +0200
-+++ gluegen2-2.0-rc3/make/gluegen-cpptasks-base.xml	2011-10-08 13:53:57.000000000 +0200
-@@ -29,6 +29,13 @@
-    -   isLinuxIA64
-    -   isLinuxX86
-    -   isLinuxARMv7
-+   -   isLinuxAlpha
-+   -   isLinuxHppa
-+   -   isLinuxMips
-+   -   isLinuxMipsel
-+   -   isLinuxPpc
-+   -   isLinuxs390
-+   -   isLinuxSparc
-    -   isOSX
-    -   isOSXPPC
-    -   isSolaris
-@@ -98,6 +105,13 @@
-    -   compiler.cfg.linux.x86
-    -   compiler.cfg.linux.amd64
-    -   compiler.cfg.linux.armv7
-+   -   compiler.cfg.linux.alpha
-+   -   compiler.cfg.linux.hppa
-+   -   compiler.cfg.linux.mips
-+   -   compiler.cfg.linux.mipsel
-+   -   compiler.cfg.linux.ppc
-+   -   compiler.cfg.linux.s390
-+   -   compiler.cfg.linux.sparc
-    -   compiler.cfg.solaris
-    -   compiler.cfg.solaris.sparcv9
-    -   compiler.cfg.solaris.amd64
-@@ -111,6 +125,13 @@
-    -   linker.cfg.linux.x86
-    -   linker.cfg.linux.amd64
-    -   linker.cfg.linux.armv7
-+   -   linker.cfg.linux.alpha
-+   -   linker.cfg.linux.hppa
-+   -   linker.cfg.linux.mips
-+   -   linker.cfg.linux.mipsel
-+   -   linker.cfg.linux.ppc
-+   -   linker.cfg.linux.s390
-+   -   linker.cfg.linux.sparc
-    -   linker.cfg.freebsd.x86
-    -   linker.cfg.freebsd.amd64
-    -   linker.cfg.solaris
-@@ -247,6 +268,73 @@
-         </or>
-       </and>
-     </condition>
-+    <condition property="isLinuxAlpha">
-+      <and>
-+        <istrue value="${isLinux}" />
-+        <os arch="alpha" />
-+      </and>
-+    </condition>
-+    <condition property="alpha">
-+      <os arch="alpha" />
-+    </condition>
-+    <condition property="arm">
-+      <os arch="arm" />
-+    </condition>
-+    <condition property="isLinuxHppa">
-+      <and>
-+        <istrue value="${isLinux}" />
-+        <os arch="hppa" />
-+      </and>
-+    </condition>
-+    <condition property="hppa">
-+      <os arch="hppa" />
-+    </condition>
-+    <condition property="isLinuxMips">
-+      <and>
-+        <istrue value="${isLinux}" />
-+        <os arch="mips" />
-+      </and>
-+    </condition>
-+    <condition property="mips">
-+      <os arch="mips" />
-+    </condition>
-+    <condition property="isLinuxMipsel">
-+      <and>
-+        <istrue value="${isLinux}" />
-+        <os arch="mipsel" />
-+      </and>
-+    </condition>
-+    <condition property="mipsel">
-+      <os arch="mipsel" />
-+    </condition>
-+    <condition property="isLinuxPpc">
-+      <and>
-+        <istrue value="${isLinux}" />
-+        <os arch="ppc" />
-+      </and>
-+    </condition>
-+    <condition property="ppc">
-+      <os arch="ppc" />
-+    </condition>
-+    <condition property="isLinuxs390">
-+      <and>
-+        <istrue value="${isLinux}" />
-+        <os arch="s390" />
-+      </and>
-+    </condition>
-+    <condition property="s390">
-+      <os arch="s390" />
-+    </condition>
-+    <condition property="isLinuxSparc">
-+      <and>
-+        <istrue value="${isLinux}" />
-+        <os arch="sparc" />
-+      </and>
-+    </condition>
-+    <condition property="sparc">
-+      <os arch="sparc" />
-+    </condition>
-+
-     <condition property="isLinuxX86">
-       <and>
-         <istrue value="${isLinux}" />
-@@ -347,6 +435,13 @@
-     <echo message="LinuxIA64=${isLinuxIA64}" />
-     <echo message="LinuxX86=${isLinuxX86}" />
-     <echo message="LinuxARMv7=${isLinuxARMv7}" />
-+    <echo message="LinuxAlpha=${isLinuxAlpha}" />
-+    <echo message="LinuxHppa=${isLinuxHppa}" />
-+    <echo message="LinuxMips=${isLinuxMips}" />
-+    <echo message="LinuxMipsel=${isLinuxMipsel}" />
-+    <echo message="LinuxPpc=${isLinuxPpc}" />
-+    <echo message="Linuxs390=${isLinuxs390}" />
-+    <echo message="LinuxSparc=${isLinuxSparc}" />
-     <echo message="OS X=${isOSX}" />
-     <echo message="OS X PPC=${use.macosppc}" />
-     <echo message="OS X x32=${use.macosx32}" />
-@@ -360,7 +455,10 @@
-     <echo message="Unix=${isUnix}" />
-     <echo message="Windows=${isWindows}" />
-     <echo message="X11=${isX11}" />
--  </target>
-+    <echo message="os=${os.name}" />
-+    <echo message="os=${os.version}" />
-+    <echo message="arch=${os.arch}" /> 
-+ </target>
- 
-   <target name="gluegen.cpptasks.detect.os.freebsd.x86" unless="gluegen.cpptasks.detected.os.2" if="isFreeBSDX86">
-     <property name="os.and.arch" value="freebsd-i586" />
-@@ -392,11 +490,40 @@
-     <property name="os.and.arch" value="linux-armv7" />
-   </target>
- 
-+  <target name="gluegen.cpptasks.detect.os.linux.alpha" unless="gluegen.cpptasks.detected.os.2" if="isLinuxAlpha">
-+    <property name="os.and.arch" value="linux-alpha" />
-+  </target>
-+
-+  <target name="gluegen.cpptasks.detect.os.linux.hppa" unless="gluegen.cpptasks.detected.os.2" if="isLinuxHppa">
-+    <property name="os.and.arch" value="linux-hppa" />
-+  </target>
-+
-+  <target name="gluegen.cpptasks.detect.os.linux.mips" unless="gluegen.cpptasks.detected.os.2" if="isLinuxMips">
-+    <property name="os.and.arch" value="linux-mips" />
-+  </target>
-+
-+  <target name="gluegen.cpptasks.detect.os.linux.mipsel" unless="gluegen.cpptasks.detected.os.2" if="isLinuxMipsel">
-+    <property name="os.and.arch" value="linux-mipsel" />
-+  </target>
-+
-+  <target name="gluegen.cpptasks.detect.os.linux.ppc" unless="gluegen.cpptasks.detected.os.2" if="isLinuxPpc">
-+    <property name="os.and.arch" value="linux-ppc" />
-+  </target>
-+
-+  <target name="gluegen.cpptasks.detect.os.linux.s390" unless="gluegen.cpptasks.detected.os.2" if="isLinuxs390">
-+    <property name="os.and.arch" value="linux-s390" />
-+  </target>
-+
-+  <target name="gluegen.cpptasks.detect.os.linux.sparc" unless="gluegen.cpptasks.detected.os.2" if="isLinuxSparc">
-+    <property name="os.and.arch" value="linux-sparc" />
-+  </target>
-+
-+
-   <target name="gluegen.cpptasks.detect.os.android.armv7" unless="gluegen.cpptasks.detected.os.2" if="isAndroidARMv7">
-     <property name="os.and.arch" value="android-armv7" />
-   </target>
- 
--  <target name="gluegen.cpptasks.detect.os.linux" depends="gluegen.cpptasks.detect.os.linux.amd64,gluegen.cpptasks.detect.os.linux.ia64,gluegen.cpptasks.detect.os.linux.x86,gluegen.cpptasks.detect.os.linux.armv7,gluegen.cpptasks.detect.os.android.armv7" unless="gluegen.cpptasks.detected.os.2" />
-+  <target name="gluegen.cpptasks.detect.os.linux" depends="gluegen.cpptasks.detect.os.linux.amd64,gluegen.cpptasks.detect.os.linux.ia64,gluegen.cpptasks.detect.os.linux.x86,gluegen.cpptasks.detect.os.linux.armv7,gluegen.cpptasks.detect.os.android.armv7,gluegen.cpptasks.detect.os.linux.alpha,gluegen.cpptasks.detect.os.linux.hppa,gluegen.cpptasks.detect.os.linux.mips,gluegen.cpptasks.detect.os.linux.mipsel,gluegen.cpptasks.detect.os.linux.ppc,gluegen.cpptasks.detect.os.linux.s390,gluegen.cpptasks.detect.os.linux.sparc" unless="gluegen.cpptasks.detected.os.2" />
- 
-   <target name="gluegen.cpptasks.detect.os.osx" unless="gluegen.cpptasks.detected.os.2" if="isOSX">
-     <property name="native.library.suffix"     value="*lib" />
-@@ -1009,7 +1136,49 @@
-       <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/ia64" />
-     </target>
- 
--    <target name="gluegen.cpptasks.declare.compiler.linux" depends="gluegen.cpptasks.declare.compiler.linux.x86,gluegen.cpptasks.declare.compiler.linux.amd64,gluegen.cpptasks.declare.compiler.linux.ia64,gluegen.cpptasks.declare.compiler.linux.armv7" if="isLinux">
-+    <target name="gluegen.cpptasks.declare.compiler.linux.hppa" if="isLinuxHppa">
-+      <echo message="Linux.hppa" />
-+      <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" /> 
-+      <property name="linker.cfg.id.base"            value="linker.cfg.linux" /> 
-+      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/hppa" />
-+    </target>
-+
-+    <target name="gluegen.cpptasks.declare.compiler.linux.mips" if="isLinuxMips">
-+      <echo message="Linux.Mips" />
-+      <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" /> 
-+      <property name="linker.cfg.id.base"            value="linker.cfg.linux" /> 
-+      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/mips" />
-+    </target>
-+
-+    <target name="gluegen.cpptasks.declare.compiler.linux.mipsel" if="isLinuxMipsel">
-+      <echo message="Linux.Mipsel" />
-+      <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" /> 
-+      <property name="linker.cfg.id.base"            value="linker.cfg.linux" /> 
-+      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/mipsel" />
-+    </target>
-+
-+    <target name="gluegen.cpptasks.declare.compiler.linux.ppc" if="isLinuxPpc">
-+      <echo message="Linux.Ppc" />
-+      <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" /> 
-+      <property name="linker.cfg.id.base"            value="linker.cfg.linux" /> 
-+      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/ppc" />
-+    </target>
-+
-+    <target name="gluegen.cpptasks.declare.compiler.linux.s390" if="isLinuxs390">
-+      <echo message="Linux.s390" />
-+      <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" /> 
-+      <property name="linker.cfg.id.base"            value="linker.cfg.linux" /> 
-+      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/s390" />
-+    </target>
-+
-+    <target name="gluegen.cpptasks.declare.compiler.linux.sparc" if="isLinuxSparc">
-+      <echo message="Linux.Sparc" />
-+      <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" /> 
-+      <property name="linker.cfg.id.base"            value="linker.cfg.linux" /> 
-+      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/" />
-+    </target>
-+
-+    <target name="gluegen.cpptasks.declare.compiler.linux" depends="gluegen.cpptasks.declare.compiler.linux.x86,gluegen.cpptasks.declare.compiler.linux.amd64,gluegen.cpptasks.declare.compiler.linux.ia64,gluegen.cpptasks.declare.compiler.linux.armv7,gluegen.cpptasks.declare.compiler.linux.alpha,gluegen.cpptasks.declare.compiler.linux.hppa,gluegen.cpptasks.declare.compiler.linux.mips,gluegen.cpptasks.declare.compiler.linux.mipsel,gluegen.cpptasks.declare.compiler.linux.ppc,gluegen.cpptasks.declare.compiler.linux.s390,gluegen.cpptasks.declare.compiler.linux.sparc" if="isLinux">
-         <property name="java.includes.dir.platform" value="${java.includes.dir}/linux" />
-     </target>
- 
---- plop/gluegen-2.0-rc3/make/build.xml	2011-10-06 13:22:16.000000000 +0200
-+++ gluegen2-2.0-rc3/make/build.xml	2011-10-08 13:54:07.000000000 +0200
-@@ -306,8 +306,50 @@
-       <property name="compiler.cfg.id"                      value="compiler.cfg.linux.armv7" /> 
-       <property name="linker.cfg.id"                        value="linker.cfg.linux.armv7" /> 
-     </target>
-+
-+    <target name="declare.linux.alpha" if="isLinuxAlpha">
-+      <echo message="Linux.alpha" />
-+      <property name="compiler.cfg.id"                      value="compiler.cfg.linux" /> 
-+      <property name="linker.cfg.id"                        value="linker.cfg.linux.alpha" /> 
-+    </target>
-+
-+    <target name="declare.linux.hppa" if="isLinuxHppa">
-+      <echo message="Linux.hppa" />
-+      <property name="compiler.cfg.id"                      value="compiler.cfg.linux" /> 
-+      <property name="linker.cfg.id"                        value="linker.cfg.linux.hppa" /> 
-+    </target>
-+
-+    <target name="declare.linux.mips" if="isLinuxMips">
-+      <echo message="Linux.mips" />
-+      <property name="compiler.cfg.id"                      value="compiler.cfg.linux" /> 
-+      <property name="linker.cfg.id"                        value="linker.cfg.linux.mips" /> 
-+    </target>
-+
-+    <target name="declare.linux.mipsel" if="isLinuxMipsel">
-+      <echo message="Linux.mipsel" />
-+      <property name="compiler.cfg.id"                      value="compiler.cfg.linux" /> 
-+      <property name="linker.cfg.id"                        value="linker.cfg.linux.mipsel" /> 
-+    </target>
-+
-+    <target name="declare.linux.ppc" if="isLinuxPpc">
-+      <echo message="Linux.ppc" />
-+      <property name="compiler.cfg.id"                      value="compiler.cfg.linux" /> 
-+      <property name="linker.cfg.id"                        value="linker.cfg.linux.ppc" /> 
-+    </target>
-+
-+    <target name="declare.linux.s390" if="isLinuxs390">
-+      <echo message="Linux.s390" />
-+      <property name="compiler.cfg.id"                      value="compiler.cfg.linux" /> 
-+      <property name="linker.cfg.id"                        value="linker.cfg.linux.s390" /> 
-+    </target>
-+
-+    <target name="declare.linux.sparc" if="isLinuxSparc">
-+      <echo message="Linux.sparc" />
-+      <property name="compiler.cfg.id"                      value="compiler.cfg.linux" /> 
-+      <property name="linker.cfg.id"                        value="linker.cfg.linux.sparc" /> 
-+    </target>
-     
--    <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.ia64,declare.linux.armv7" if="isLinux" >
-+    <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.ppc,declare.linux.s390,declare.linux.sparc,declare.linux.armv7" if="isLinux" >
-       <property name="c.src.dir.os"                         value="unix" />
-       <property name="java.includes.dir.platform"           value="${java.includes.dir}/linux" />
-     </target>
diff -Nru gluegen2-2.3.2/debian/patches/ppc64el-support.diff gluegen2-2.4.0+dfsg/debian/patches/ppc64el-support.diff
--- gluegen2-2.3.2/debian/patches/ppc64el-support.diff	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/patches/ppc64el-support.diff	2023-03-14 23:39:17.000000000 +0100
@@ -1,124 +1,11 @@
 Description: add support for ppc64el arch.
 Author: Gilles Filippini <pini at debian.org>
-Index: gluegen2/make/scripts/make.gluegen.all.linux-ppc64le.sh
-===================================================================
---- /dev/null
-+++ gluegen2/make/scripts/make.gluegen.all.linux-ppc64le.sh
-@@ -0,0 +1,24 @@
-+#! /bin/sh
-+
-+#    -Dc.compiler.debug=true \
-+#    -Dgluegen.cpptasks.detected.os=true \
-+#    -DisUnix=true \
-+#    -DisLinux=true \
-+#    -DisLinuxX86=true \
-+#    -DisX11=true \
-+
-+MACHINE=ppc64le
-+ARCH=ppc64el
-+TRIPLET=powerpc64le-linux-gnu
-+
-+export TARGET_PLATFORM_LIBS=/usr/lib/$TRIPLET
-+export TARGET_JAVA_LIBS=/usr/lib/jvm/java-7-openjdk-$ARCH/jre/lib/$MACHINE
-+
-+export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-linux-$MACHINE.xml"
-+
-+#export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"
-+export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet"
-+
-+ant \
-+    -Drootrel.build=build-linux-$MACHINE \
-+    $* 2>&1 | tee make.gluegen.all.linux-$MACHINE.log
-Index: gluegen2/make/gluegen-cpptasks-base.xml
-===================================================================
---- gluegen2.orig/make/gluegen-cpptasks-base.xml
-+++ gluegen2/make/gluegen-cpptasks-base.xml
-@@ -48,6 +48,8 @@
-    -   isLinuxMips
-    -   isLinuxMipsel
-    -   isLinuxPpc
-+   -   isLinuxPpc64
-+   -   isLinuxPpc64le
-    -   isLinuxs390
-    -   isLinuxs390x
-    -   isLinuxSparc
-@@ -133,6 +135,8 @@
-    -   compiler.cfg.linux.mips
-    -   compiler.cfg.linux.mipsel
-    -   compiler.cfg.linux.ppc
-+   -   compiler.cfg.linux.ppc64
-+   -   compiler.cfg.linux.ppc64le
-    -   compiler.cfg.linux.s390
-    -   compiler.cfg.linux.s390x
-    -   compiler.cfg.linux.sparc
-@@ -155,6 +159,7 @@
-    -   linker.cfg.linux.mips
-    -   linker.cfg.linux.mipsel
-    -   linker.cfg.linux.ppc
-+   -   linker.cfg.linux.ppc64le
-    -   linker.cfg.linux.s390
-    -   linker.cfg.linux.s390x
-    -   linker.cfg.linux.sparc
-@@ -417,6 +422,24 @@
-     <condition property="ppc">
-       <os arch="ppc" />
-     </condition>
-+    <condition property="isLinuxPpc64">
-+      <and>
-+        <istrue value="${isLinux}" />
-+        <os arch="ppc64" />
-+      </and>
-+    </condition>
-+    <condition property="ppc64">
-+      <os arch="ppc64" />
-+    </condition>
-+    <condition property="isLinuxPpc64le">
-+      <and>
-+        <istrue value="${isLinux}" />
-+        <os arch="ppc64le" />
-+      </and>
-+    </condition>
-+    <condition property="ppc64le">
-+      <os arch="ppc64le" />
-+    </condition>
-     <condition property="isLinuxs390">
-       <and>
-         <istrue value="${isLinux}" />
-@@ -601,6 +624,8 @@
-     <echo message="LinuxMips=${isLinuxMips}" />
-     <echo message="LinuxMipsel=${isLinuxMipsel}" />
-     <echo message="LinuxPpc=${isLinuxPpc}" />
-+    <echo message="LinuxPpc64=${isLinuxPpc64}" />
-+    <echo message="LinuxPpc64le=${isLinuxPpc64le}" />
-     <echo message="Linuxs390=${isLinuxs390}" />
-     <echo message="Linuxs390x=${isLinuxs390x}" />
-     <echo message="LinuxSparc=${isLinuxSparc}" />
-@@ -683,6 +708,14 @@
-     <property name="os.and.arch" value="linux-ppc" />
-   </target>
- 
-+  <target name="gluegen.cpptasks.detect.os.linux.ppc64" unless="gluegen.cpptasks.detected.os.2" if="isLinuxPpc64">
-+    <property name="os.and.arch" value="linux-ppc64" />
-+  </target>
-+
-+  <target name="gluegen.cpptasks.detect.os.linux.ppc64le" unless="gluegen.cpptasks.detected.os.2" if="isLinuxPpc64le">
-+    <property name="os.and.arch" value="linux-ppc64le" />
-+  </target>
-+
-   <target name="gluegen.cpptasks.detect.os.linux.s390" unless="gluegen.cpptasks.detected.os.2" if="isLinuxs390">
-     <property name="os.and.arch" value="linux-s390" />
-   </target>
-@@ -707,7 +740,7 @@
-     <property name="os.and.arch" value="android-aarch64" />
-   </target>
- 
--  <target name="gluegen.cpptasks.detect.os.linux" depends="gluegen.cpptasks.detect.os.linux.amd64,gluegen.cpptasks.detect.os.linux.ia64,gluegen.cpptasks.detect.os.linux.x86,gluegen.cpptasks.detect.os.linux.armv6.armel,gluegen.cpptasks.detect.os.linux.armv6.armhf,gluegen.cpptasks.detect.os.android.armv6.armel,gluegen.cpptasks.detect.os.linux.aarch64,gluegen.cpptasks.detect.os.android.armv6.armhf,gluegen.cpptasks.detect.os.android.aarch64,gluegen.cpptasks.detect.os.linux.alpha,gluegen.cpptasks.detect.os.linux.hppa,gluegen.cpptasks.detect.os.linux.mips,gluegen.cpptasks.detect.os.linux.mipsel,gluegen.cpptasks.detect.os.linux.ppc,gluegen.cpptasks.detect.os.linux.s390,gluegen.cpptasks.detect.os.linux.s390x,gluegen.cpptasks.detect.os.linux.sparc" unless="gluegen.cpptasks.detected.os.2" />
-+  <target name="gluegen.cpptasks.detect.os.linux" depends="gluegen.cpptasks.detect.os.linux.amd64,gluegen.cpptasks.detect.os.linux.ia64,gluegen.cpptasks.detect.os.linux.x86,gluegen.cpptasks.detect.os.linux.armv6.armel,gluegen.cpptasks.detect.os.linux.armv6.armhf,gluegen.cpptasks.detect.os.android.armv6.armel,gluegen.cpptasks.detect.os.linux.aarch64,gluegen.cpptasks.detect.os.android.armv6.armhf,gluegen.cpptasks.detect.os.android.aarch64,gluegen.cpptasks.detect.os.linux.alpha,gluegen.cpptasks.detect.os.linux.hppa,gluegen.cpptasks.detect.os.linux.mips,gluegen.cpptasks.detect.os.linux.mipsel,gluegen.cpptasks.detect.os.linux.ppc,gluegen.cpptasks.detect.os.linux.ppc64,gluegen.cpptasks.detect.os.linux.ppc64le,gluegen.cpptasks.detect.os.linux.s390,gluegen.cpptasks.detect.os.linux.s390x,gluegen.cpptasks.detect.os.linux.sparc" unless="gluegen.cpptasks.detected.os.2" />
- 
-   <target name="gluegen.cpptasks.detect.os.osx" unless="gluegen.cpptasks.detected.os.2" if="isOSX">
-     <property name="native.library.suffix"     value="*lib" />
-@@ -1268,6 +1301,12 @@
-     <linker id="linker.cfg.linux.ppc" name="${gcc.compat.compiler}">
+Forwarded: no
+Last-Update: 2023-03-14
+--- a/make/gluegen-cpptasks-base.xml
++++ b/make/gluegen-cpptasks-base.xml
+@@ -1413,6 +1413,12 @@
+     <linker id="linker.cfg.linux.ppc64le" name="${gcc.compat.compiler}">
      </linker>
  
 +    <linker id="linker.cfg.linux.ppc64" name="${gcc.compat.compiler}">
@@ -130,86 +17,3 @@
      <linker id="linker.cfg.linux.s390" name="${gcc.compat.compiler}">
      </linker>
  
-@@ -1505,6 +1544,20 @@
-       <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/ppc" />
-     </target>
- 
-+    <target name="gluegen.cpptasks.declare.compiler.linux.ppc64" if="isLinuxPpc64">
-+      <echo message="Linux.Ppc64" />
-+      <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" />
-+      <property name="linker.cfg.id.base"            value="linker.cfg.linux" />
-+      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/ppc64" />
-+    </target>
-+
-+    <target name="gluegen.cpptasks.declare.compiler.linux.ppc64le" if="isLinuxPpc64le">
-+      <echo message="Linux.Ppc64le" />
-+      <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" />
-+      <property name="linker.cfg.id.base"            value="linker.cfg.linux" />
-+      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/ppc64le" />
-+    </target>
-+
-     <target name="gluegen.cpptasks.declare.compiler.linux.s390" if="isLinuxs390">
-       <echo message="Linux.s390" />
-       <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" /> 
-@@ -1526,7 +1579,7 @@
-       <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/sparc" />
-     </target>
- 
--    <target name="gluegen.cpptasks.declare.compiler.linux" depends="gluegen.cpptasks.declare.compiler.linux.x86,gluegen.cpptasks.declare.compiler.linux.amd64,gluegen.cpptasks.declare.compiler.linux.ia64,gluegen.cpptasks.declare.compiler.linux.armv6,gluegen.cpptasks.declare.compiler.linux.aarch64,gluegen.cpptasks.declare.compiler.linux.alpha,gluegen.cpptasks.declare.compiler.linux.hppa,gluegen.cpptasks.declare.compiler.linux.mips,gluegen.cpptasks.declare.compiler.linux.mipsel,gluegen.cpptasks.declare.compiler.linux.ppc,gluegen.cpptasks.declare.compiler.linux.s390,gluegen.cpptasks.declare.compiler.linux.s390x,gluegen.cpptasks.declare.compiler.linux.sparc" if="isLinux">
-+    <target name="gluegen.cpptasks.declare.compiler.linux" depends="gluegen.cpptasks.declare.compiler.linux.x86,gluegen.cpptasks.declare.compiler.linux.amd64,gluegen.cpptasks.declare.compiler.linux.ia64,gluegen.cpptasks.declare.compiler.linux.armv6,gluegen.cpptasks.declare.compiler.linux.aarch64,gluegen.cpptasks.declare.compiler.linux.alpha,gluegen.cpptasks.declare.compiler.linux.hppa,gluegen.cpptasks.declare.compiler.linux.mips,gluegen.cpptasks.declare.compiler.linux.mipsel,gluegen.cpptasks.declare.compiler.linux.ppc,gluegen.cpptasks.declare.compiler.linux.ppc64,gluegen.cpptasks.declare.compiler.linux.ppc64le,gluegen.cpptasks.declare.compiler.linux.s390,gluegen.cpptasks.declare.compiler.linux.s390x,gluegen.cpptasks.declare.compiler.linux.sparc" if="isLinux">
-         <property name="java.includes.dir.platform" value="${java.includes.dir}/x11" />
-     </target>
- 
-Index: gluegen2/src/java/jogamp/common/os/PlatformPropsImpl.java
-===================================================================
---- gluegen2.orig/src/java/jogamp/common/os/PlatformPropsImpl.java
-+++ gluegen2/src/java/jogamp/common/os/PlatformPropsImpl.java
-@@ -522,6 +522,7 @@ public abstract class PlatformPropsImpl
-      *   <li>linux-aarch64</li>
-      *   <li>linux-amd64</li>
-      *   <li>linux-ppc64</li>
-+     *   <li>linux-ppc64le</li>
-      *   <li>linux-mips64</li>
-      *   <li>linux-ia64</li>
-      *   <li>linux-sparcv9</li>
-@@ -578,7 +579,7 @@ public abstract class PlatformPropsImpl
-                 _and_arch_tmp = "amd64";
-                 break;
-             case PPC64:
--                _and_arch_tmp = "ppc64";
-+                _and_arch_tmp = littleEndian ? "ppc64le" : "ppc64";
-                 break;
-             case MIPS_64:
-                 _and_arch_tmp = "mips64";
-Index: gluegen2/make/build.xml
-===================================================================
---- gluegen2.orig/make/build.xml
-+++ gluegen2/make/build.xml
-@@ -306,6 +306,18 @@
-       <property name="linker.cfg.id"                        value="linker.cfg.linux.ppc" /> 
-     </target>
- 
-+    <target name="declare.linux.ppc64" if="isLinuxPpc64">
-+      <echo message="Linux.ppc64" />
-+      <property name="compiler.cfg.id"                      value="compiler.cfg.linux" />
-+      <property name="linker.cfg.id"                        value="linker.cfg.linux.ppc64" />
-+    </target>
-+
-+    <target name="declare.linux.ppc64le" if="isLinuxPpc64le">
-+      <echo message="Linux.ppc64le" />
-+      <property name="compiler.cfg.id"                      value="compiler.cfg.linux" />
-+      <property name="linker.cfg.id"                        value="linker.cfg.linux.ppc64le" />
-+    </target>
-+
-     <target name="declare.linux.s390" if="isLinuxs390">
-       <echo message="Linux.s390" />
-       <property name="compiler.cfg.id"                      value="compiler.cfg.linux" /> 
-@@ -324,7 +336,7 @@
-       <property name="linker.cfg.id"                        value="linker.cfg.linux.sparc" /> 
-     </target>
-     
--    <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.ppc,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6" if="isLinux" >
-+    <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.ppc,declare.linux.ppc64,declare.linux.ppc64le,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6" if="isLinux" >
-       <property name="c.src.dir.os"                         value="unix" />
-     </target>
- 
diff -Nru gluegen2-2.3.2/debian/patches/renamedLibrary.diff gluegen2-2.4.0+dfsg/debian/patches/renamedLibrary.diff
--- gluegen2-2.3.2/debian/patches/renamedLibrary.diff	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/patches/renamedLibrary.diff	2023-03-14 23:41:20.000000000 +0100
@@ -1,72 +1,70 @@
-Index: gluegen2/src/junit/com/jogamp/common/util/TestTempJarCache.java
-===================================================================
---- gluegen2.orig/src/junit/com/jogamp/common/util/TestTempJarCache.java
-+++ gluegen2/src/junit/com/jogamp/common/util/TestTempJarCache.java
-@@ -196,8 +196,8 @@ public class TestTempJarCache extends Si
+Description: adding the digit '2' in the name of the build shared library
+Author: Sylvestre Ledru <sylvestre at debian.org>
+Forwarded: not-needed
+Last-Update: 2023-03-14
+
+--- a/src/junit/com/jogamp/common/util/TestTempJarCache.java
++++ b/src/junit/com/jogamp/common/util/TestTempJarCache.java
+@@ -196,8 +196,8 @@
      @Test
      public void testTempJarCache02AddNativeLibs() throws IOException, IllegalArgumentException, URISyntaxException {
          if(AndroidVersion.isAvailable) { System.err.println("n/a on Android"); return; }
 -        final Uri.Encoded nativeJarName = Uri.Encoded.cast("gluegen-rt-natives-"+Platform.getOSAndArch()+".jar");
--        final String libBaseName = "gluegen-rt";
+-        final String libBaseName = "gluegen_rt";
 +        final Uri.Encoded nativeJarName = Uri.Encoded.cast("gluegen2-rt-natives-"+Platform.getOSAndArch()+".jar");
-+        final String libBaseName = "gluegen2-rt";
++        final String libBaseName = "gluegen2_rt";
          final ClassLoader cl = getClass().getClassLoader();
  
          final Uri jarUri = JarUtil.getJarUri(TempJarCache.class.getName(), cl);
-Index: gluegen2/src/java/com/jogamp/common/os/Platform.java
-===================================================================
---- gluegen2.orig/src/java/com/jogamp/common/os/Platform.java
-+++ gluegen2/src/java/com/jogamp/common/os/Platform.java
-@@ -256,7 +256,7 @@ public class Platform extends PlatformPr
-     private static final String useTempJarCachePropName = "jogamp.gluegen.UseTempJarCache";
- 
-     /** fixed basename of JAR file and native library */
--    private static final String libBaseName = "gluegen-rt";
-+    private static final String libBaseName = "gluegen2-rt";
+--- a/src/java/com/jogamp/common/os/Platform.java
++++ b/src/java/com/jogamp/common/os/Platform.java
+@@ -259,7 +259,7 @@
+      * Fixed basename of JAR file and native library.
+      * Dash replaced by underscore to allow static linkage via JEP 178.
+      */
+-    private static final String libBaseName = "gluegen_rt";
++    private static final String libBaseName = "gluegen2_rt";
  
      //
      // static initialization order:
-@@ -317,7 +317,7 @@ public class Platform extends PlatformPr
+@@ -321,7 +321,7 @@
                  DynamicLibraryBundle.GlueJNILibLoader.loadLibrary(libBaseName, false, cl);
  
                  // JVM bug workaround
--                JVMUtil.initSingleton(); // requires gluegen-rt, one-time init.
-+                JVMUtil.initSingleton(); // requires gluegen2-rt, one-time init.
+-                JVMUtil.initSingleton(); // requires gluegen_rt, one-time init.
++                JVMUtil.initSingleton(); // requires gluegen2_rt, one-time init.
  
                  // AWT Headless determination
                  if( !PropertyAccess.getBooleanProperty("java.awt.headless", true) &&
-@@ -350,7 +350,7 @@ public class Platform extends PlatformPr
+@@ -354,7 +354,7 @@
      }
  
      /**
--     * kick off static initialization of <i>platform property information</i> and <i>native gluegen-rt lib loading</i>
-+     * kick off static initialization of <i>platform property information</i> and <i>native gluegen2-rt lib loading</i>
+-     * kick off static initialization of <i>platform property information</i> and <i>native gluegen_rt lib loading</i>
++     * kick off static initialization of <i>platform property information</i> and <i>native gluegen2_rt lib loading</i>
       */
      public static void initSingleton() { }
  
-Index: gluegen2/make/build.xml
-===================================================================
---- gluegen2.orig/make/build.xml
-+++ gluegen2/make/build.xml
-@@ -420,7 +420,7 @@
+--- a/make/build.xml
++++ b/make/build.xml
+@@ -443,7 +443,7 @@
        <property name="c.compiler.src.files.common" value="src/native/common/*.c" />
        <property name="c.compiler.src.files.os" value="src/native/${c.src.dir.os}/*.c" />
  
--      <property name="output.lib.name" value="gluegen-rt" />
-+      <property name="output.lib.name" value="gluegen2-rt" />
-       <condition property="output.lib.name.os" value="lib${output.lib.name}.so"><isset property="isUnix"/></condition>
-       <condition property="output.lib.name.os" value="${output.lib.name}.dll"><isset property="isWindows"/></condition>
-       <condition property="output.lib.name.os" value="lib${output.lib.name}.jnilib"><isset property="isOSX"/></condition>
-@@ -497,13 +497,13 @@
-       <antcall target="c.manifest" inheritRefs="true" />
+-      <property name="output.lib.name" value="gluegen_rt" /> <!-- dash replaced by underscore to allow static linkage via JEP 178 -->
++      <property name="output.lib.name" value="gluegen2_rt" /> <!-- dash replaced by underscore to allow static linkage via JEP 178 -->
+       <property name="output.lib.name.os" value="${native.library.prefix}${output.lib.name}.${native.library.suffix}" />
+ 
+       <uptodate property="gluegen.build.skip.native">
+@@ -546,13 +546,13 @@
+       </copy>
  
        <native.tag.jar objdir="${build}/obj"
 -                      nativejarfile="${build}/gluegen-rt-natives-${os.and.arch}.jar"
 +                      nativejarfile="${build}/gluegen2-rt-natives-${os.and.arch}.jar"
                        manifestfile="${build}/Manifest-rt-natives.temp" 
                        module="common"
--                      includelibs="*gluegen-rt.${native.library.suffix}" />
-+                      includelibs="*gluegen2-rt.${native.library.suffix}" />
+                       includelibs="*${output.lib.name}.${native.library.suffix}" />
  
        <!-- Produce duplicates for different configurations, since non-native-jar aliasing (Bug 1023/Bug 1024) -->
 -      <copy file="${build}/gluegen-rt-natives-${os.and.arch}.jar" tofile="${build}/gluegen-rt-android-natives-${os.and.arch}.jar"/>
diff -Nru gluegen2-2.3.2/debian/patches/riscv64-support.diff gluegen2-2.4.0+dfsg/debian/patches/riscv64-support.diff
--- gluegen2-2.3.2/debian/patches/riscv64-support.diff	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/patches/riscv64-support.diff	2023-03-19 08:04:29.000000000 +0100
@@ -1,10 +1,12 @@
 Description: Support building the package on riscv64
 Author: Bo YU <tsu.yubo at gmail.com>
-Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1014852
+Bug-Debian: https://bugs.debian.org/1014852
+Forwarded: no
+Last-Update: 2023-03-15
 
 --- a/make/gluegen-cpptasks-base.xml
 +++ b/make/gluegen-cpptasks-base.xml
-@@ -55,6 +55,7 @@
+@@ -56,6 +56,7 @@
     -   isLinuxPpc64
     -   isLinuxPpc64le
     -   isLinuxAarch64
@@ -12,7 +14,7 @@
     -   isLinuxs390
     -   isLinuxs390x
     -   isLinuxSparc
-@@ -147,6 +148,7 @@
+@@ -157,6 +158,7 @@
     -   compiler.cfg.linux.ppc64
     -   compiler.cfg.linux.ppc64le
     -   compiler.cfg.linux.aarch64
@@ -20,7 +22,7 @@
     -   compiler.cfg.linux.s390
     -   compiler.cfg.linux.s390x
     -   compiler.cfg.linux.sparc
-@@ -174,6 +176,7 @@
+@@ -186,6 +188,7 @@
     -   linker.cfg.linux.mips64el
     -   linker.cfg.linux.ppc
     -   linker.cfg.linux.ppc64le
@@ -28,7 +30,7 @@
     -   linker.cfg.linux.s390
     -   linker.cfg.linux.s390x
     -   linker.cfg.linux.sparc
-@@ -504,6 +507,12 @@
+@@ -528,6 +531,12 @@
      <condition property="aarch64">
        <os arch="aarch64" />
      </condition>
@@ -41,15 +43,7 @@
      <condition property="isLinuxs390">
        <and>
          <istrue value="${isLinux}" />
-@@ -695,6 +704,7 @@
-     <echo message="LinuxPpc64=${isLinuxPpc64}" />
-     <echo message="LinuxPpc64le=${isLinuxPpc64le}" />
-     <echo message="LinuxAarch64=${isLinuxAarch64}" />
-+    <echo message="LinuxRiscv64=${isLinuxRiscv64}" />
-     <echo message="Linuxs390=${isLinuxs390}" />
-     <echo message="Linuxs390x=${isLinuxs390x}" />
-     <echo message="LinuxSparc=${isLinuxSparc}" />
-@@ -801,6 +811,10 @@
+@@ -767,6 +776,10 @@
      <property name="os.and.arch" value="linux-ppc64le" />
    </target>
  
@@ -60,16 +54,24 @@
    <target name="gluegen.cpptasks.detect.os.linux.s390" unless="gluegen.cpptasks.detected.os.2" if="isLinuxs390">
      <property name="os.and.arch" value="linux-s390" />
    </target>
-@@ -825,7 +839,7 @@
-     <property name="os.and.arch" value="android-aarch64" />
+@@ -795,7 +808,7 @@
+     <property name="os.and.arch" value="android-x86" />
    </target>
  
--  <target name="gluegen.cpptasks.detect.os.linux" depends="gluegen.cpptasks.detect.os.linux.amd64,gluegen.cpptasks.detect.os.linux.ia64,gluegen.cpptasks.detect.os.linux.x86,gluegen.cpptasks.detect.os.linux.armv6.armel,gluegen.cpptasks.detect.os.linux.armv6.armhf,gluegen.cpptasks.detect.os.android.armv6.armel,gluegen.cpptasks.detect.os.linux.aarch64,gluegen.cpptasks.detect.os.android.armv6.armhf,gluegen.cpptasks.detect.os.android.aarch64,gluegen.cpptasks.detect.os.linux.alpha,gluegen.cpptasks.detect.os.linux.hppa,gluegen.cpptasks.detect.os.linux.mips,gluegen.cpptasks.detect.os.linux.mipsel,gluegen.cpptasks.detect.os.linux.mipsn32,gluegen.cpptasks.detect.os.linux.mipsn32el,gluegen.cpptasks.detect.os.linux.mips64,gluegen.cpptasks.detect.os.linux.mips64el,gluegen.cpptasks.detect.os.linux.ppc,gluegen.cpptasks.detect.os.linux.ppc64,gluegen.cpptasks.detect.os.linux.ppc64le,gluegen.cpptasks.detect.os.linux.s390,gluegen.cpptasks.detect.os.linux.s390x,gluegen.cpptasks.detect.os.linux.sparc" unless="gluegen.cpptasks.detected.os.2" />
-+  <target name="gluegen.cpptasks.detect.os.linux" depends="gluegen.cpptasks.detect.os.linux.amd64,gluegen.cpptasks.detect.os.linux.ia64,gluegen.cpptasks.detect.os.linux.x86,gluegen.cpptasks.detect.os.linux.armv6.armel,gluegen.cpptasks.detect.os.linux.armv6.armhf,gluegen.cpptasks.detect.os.android.armv6.armel,gluegen.cpptasks.detect.os.linux.aarch64,gluegen.cpptasks.detect.os.android.armv6.armhf,gluegen.cpptasks.detect.os.android.aarch64,gluegen.cpptasks.detect.os.linux.alpha,gluegen.cpptasks.detect.os.linux.hppa,gluegen.cpptasks.detect.os.linux.mips,gluegen.cpptasks.detect.os.linux.mipsel,gluegen.cpptasks.detect.os.linux.mipsn32,gluegen.cpptasks.detect.os.linux.mipsn32el,gluegen.cpptasks.detect.os.linux.mips64,gluegen.cpptasks.detect.os.linux.mips64el,gluegen.cpptasks.detect.os.linux.ppc,gluegen.cpptasks.detect.os.linux.ppc64,gluegen.cpptasks.detect.os.linux.ppc64le,gluegen.cpptasks.detect.os.linux.riscv64,gluegen.cpptasks.detect.os.linux.s390,gluegen.cpptasks.detect.os.linux.s390x,gluegen.cpptasks.detect.os.linux.sparc" unless="gluegen.cpptasks.detected.os.2" />
+-  <target name="gluegen.cpptasks.detect.os.linux" depends="gluegen.cpptasks.detect.os.linux.amd64,gluegen.cpptasks.detect.os.linux.ia64,gluegen.cpptasks.detect.os.linux.x86,gluegen.cpptasks.detect.os.linux.armv6.armel,gluegen.cpptasks.detect.os.linux.armv6.armhf,gluegen.cpptasks.detect.os.android.armv6.armel,gluegen.cpptasks.detect.os.linux.aarch64,gluegen.cpptasks.detect.os.android.armv6.armhf,gluegen.cpptasks.detect.os.android.aarch64,gluegen.cpptasks.detect.os.android.x86,gluegen.cpptasks.detect.os.linux.alpha,gluegen.cpptasks.detect.os.linux.hppa,gluegen.cpptasks.detect.os.linux.mips,gluegen.cpptasks.detect.os.linux.mipsel,gluegen.cpptasks.detect.os.linux.mipsn32,gluegen.cpptasks.detect.os.linux.mipsn32el,gluegen.cpptasks.detect.os.linux.mips64,gluegen.cpptasks.detect.os.linux.mips64el,gluegen.cpptasks.detect.os.linux.ppc,gluegen.cpptasks.detect.os.linux.ppc64,gluegen.cpptasks.detect.os.linux.ppc64le,gluegen.cpptasks.detect.os.linux.s390,gluegen.cpptasks.detect.os.linux.s390x,gluegen.cpptasks.detect.os.linux.sparc" unless="gluegen.cpptasks.detected.os.2" />
++  <target name="gluegen.cpptasks.detect.os.linux" depends="gluegen.cpptasks.detect.os.linux.amd64,gluegen.cpptasks.detect.os.linux.ia64,gluegen.cpptasks.detect.os.linux.x86,gluegen.cpptasks.detect.os.linux.armv6.armel,gluegen.cpptasks.detect.os.linux.armv6.armhf,gluegen.cpptasks.detect.os.android.armv6.armel,gluegen.cpptasks.detect.os.linux.aarch64,gluegen.cpptasks.detect.os.android.armv6.armhf,gluegen.cpptasks.detect.os.android.aarch64,gluegen.cpptasks.detect.os.android.x86,gluegen.cpptasks.detect.os.linux.alpha,gluegen.cpptasks.detect.os.linux.hppa,gluegen.cpptasks.detect.os.linux.mips,gluegen.cpptasks.detect.os.linux.mipsel,gluegen.cpptasks.detect.os.linux.mipsn32,gluegen.cpptasks.detect.os.linux.mipsn32el,gluegen.cpptasks.detect.os.linux.mips64,gluegen.cpptasks.detect.os.linux.mips64el,gluegen.cpptasks.detect.os.linux.ppc,gluegen.cpptasks.detect.os.linux.ppc64,gluegen.cpptasks.detect.os.linux.ppc64le,gluegen.cpptasks.detect.os.linux.riscv64,gluegen.cpptasks.detect.os.linux.s390,gluegen.cpptasks.detect.os.linux.s390x,gluegen.cpptasks.detect.os.linux.sparc" unless="gluegen.cpptasks.detected.os.2" />
  
    <target name="gluegen.cpptasks.detect.os.osx" unless="gluegen.cpptasks.detected.os.2" if="isOSX">
-     <property name="native.library.suffix"     value="*lib" />
-@@ -1397,6 +1411,9 @@
+     <property name="native.library.prefix"     value="lib" />
+@@ -945,6 +958,7 @@
+     <echo message="LinuxPpc64=${isLinuxPpc64}" />
+     <echo message="LinuxPpc64le=${isLinuxPpc64le}" />
+     <echo message="LinuxAarch64=${isLinuxAarch64}" />
++    <echo message="LinuxRiscv64=${isLinuxRiscv64}" />
+     <echo message="Linuxs390=${isLinuxs390}" />
+     <echo message="Linuxs390x=${isLinuxs390x}" />
+     <echo message="LinuxSparc=${isLinuxSparc}" />
+@@ -1509,6 +1523,9 @@
      <linker id="linker.cfg.linux.ppc64le" name="${gcc.compat.compiler}">
      </linker>
  
@@ -79,8 +81,8 @@
      <linker id="linker.cfg.linux.s390" name="${gcc.compat.compiler}">
      </linker>
  
-@@ -1678,6 +1695,13 @@
-       <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/ppc64le" />
+@@ -1855,6 +1872,13 @@
+       <property name="java.lib.dir.platform"         value="${java.home.dir}/lib"/> <!-- new default -->
      </target>
  
 +    <target name="gluegen.cpptasks.declare.compiler.linux.riscv64" if="isLinuxRiscv64">
@@ -93,8 +95,8 @@
      <target name="gluegen.cpptasks.declare.compiler.linux.s390" if="isLinuxs390">
        <echo message="Linux.s390" />
        <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" /> 
-@@ -1699,7 +1723,7 @@
-       <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/sparc" />
+@@ -1888,7 +1912,7 @@
+       <property name="java.lib.dir.platform"         value="${java.home.dir}/lib"/> <!-- new default -->
      </target>
  
 -    <target name="gluegen.cpptasks.declare.compiler.linux" depends="gluegen.cpptasks.declare.compiler.linux.x86,gluegen.cpptasks.declare.compiler.linux.amd64,gluegen.cpptasks.declare.compiler.linux.ia64,gluegen.cpptasks.declare.compiler.linux.armv6,gluegen.cpptasks.declare.compiler.linux.aarch64,gluegen.cpptasks.declare.compiler.linux.alpha,gluegen.cpptasks.declare.compiler.linux.hppa,gluegen.cpptasks.declare.compiler.linux.mips,gluegen.cpptasks.declare.compiler.linux.mipsel,gluegen.cpptasks.declare.compiler.linux.mipsn32,gluegen.cpptasks.declare.compiler.linux.mipsn32el,gluegen.cpptasks.declare.compiler.linux.mips64,gluegen.cpptasks.declare.compiler.linux.mips64el,gluegen.cpptasks.declare.compiler.linux.ppc,gluegen.cpptasks.declare.compiler.linux.ppc64,gluegen.cpptasks.declare.compiler.linux.ppc64le,gluegen.cpptasks.declare.compiler.linux.s390,gluegen.cpptasks.declare.compiler.linux.s390x,gluegen.cpptasks.declare.compiler.linux.sparc" if="isLinux">
@@ -131,24 +133,18 @@
 +    $* 2>&1 | tee make.gluegen.all.linux-$MACHINE.log
 --- a/src/java/com/jogamp/common/os/MachineDataInfo.java
 +++ b/src/java/com/jogamp/common/os/MachineDataInfo.java
-@@ -73,6 +73,7 @@
+@@ -75,6 +75,7 @@
    private final static int[] align_sparc_32_sunos =  { 1,   2,   4,   8,   4,    4,     4,     8,      8,   4 };
    private final static int[] align_x86_32_windows =  { 1,   2,   4,   8,   4,    4,     4,     8,      4,   4 };
    private final static int[] align_lp64_unix      =  { 1,   2,   4,   8,   4,    8,     4,     8,     16,   8 };
 +  //private final static int[] align_riscv_64_unix  =  { 1,   2,   4,   8,   4,    8,     4,     8,     16,   8 };
-   private final static int[] align_s390_64_unix   =  { 1,   2,   4,   8,   4,    8,     4,     8,      8,   8 };
    private final static int[] align_x86_64_windows =  { 1,   2,   4,   8,   4,    4,     4,     8,     16,   8 };
+   private final static int[] align_arm64_ios      =  { 1,   2,   4,   8,   4,    8,     4,     8,      8,   8 };
  
-@@ -109,11 +110,13 @@
-       X86_32_WINDOWS( size_x86_32_windows, align_x86_32_windows),
-       /** LP64 Unix, e.g.: {@link Platform.CPUType#X86_64} Unix, {@link Platform.CPUType#ARM64} EABI, {@link Platform.CPUType#PPC64} Unix, .. */
-       LP64_UNIX(      size_lp64_unix,    align_lp64_unix),
-+      /** {@link Platform.CPUType#RISCV64} Unix */
-+      // RISCV_64_UNIX(    size_lp64_unix,   align_riscv_64_unix),
-       /** {@link Platform.CPUType#S390X} Unix */
-       S390_64_UNIX(    size_lp64_unix,   align_s390_64_unix),
-       /** {@link Platform.CPUType#X86_64} Windows */
-       X86_64_WINDOWS( size_x86_64_windows, align_x86_64_windows);
+@@ -117,7 +118,7 @@
+       X86_64_WINDOWS( size_x86_64_windows, align_x86_64_windows),
+       /** {@link Platform.CPUType#ARM64 } iOS */
+       ARM64_IOS( size_arm64_ios, align_arm64_ios);
 -      // 9
 +      // 10
  
@@ -199,7 +195,7 @@
              } else if( cpuABILower.equals("s390x") ) {
 --- a/src/java/jogamp/common/os/PlatformPropsImpl.java
 +++ b/src/java/jogamp/common/os/PlatformPropsImpl.java
-@@ -527,6 +527,7 @@
+@@ -581,6 +581,7 @@
       *   <li>linux-ia64</li>
       *   <li>linux-sparcv9</li>
       *   <li>linux-risc2.0</li>
@@ -207,7 +203,7 @@
       *   <li>linux-s390x</li>
       *   <li>freebsd-i586</li>
       *   <li>freebsd-amd64</li>
-@@ -594,6 +595,9 @@
+@@ -648,6 +649,9 @@
              case PA_RISC2_0:
                  _and_arch_tmp = "risc2.0";
                  break;
@@ -244,8 +240,8 @@
                  if( 64 == getArchClassBits() ) {
 --- a/make/build.xml
 +++ b/make/build.xml
-@@ -346,6 +346,12 @@
-       <property name="linker.cfg.id"                        value="linker.cfg.linux.aarch64" />
+@@ -360,6 +360,12 @@
+       <property name="linker.cfg.id"                        value="linker.cfg.linux.ppc64le" />
      </target>
  
 +    <target name="declare.linux.riscv64" if="isLinuxRiscv64">
@@ -257,12 +253,12 @@
      <target name="declare.linux.s390" if="isLinuxs390">
        <echo message="Linux.s390" />
        <property name="compiler.cfg.id"                      value="compiler.cfg.linux" /> 
-@@ -364,7 +370,7 @@
+@@ -378,7 +384,7 @@
        <property name="linker.cfg.id"                        value="linker.cfg.linux.sparc" /> 
      </target>
      
--    <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.alpha,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.mipsn32,declare.linux.mipsn32el,declare.linux.mips64,declare.linux.mips64el,declare.linux.ppc,declare.linux.ppc64,declare.linux.ppc64le,declare.linux.aarch64,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6.armel,declare.linux.armv6.armhf" if="isLinux" >
-+    <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.alpha,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.mipsn32,declare.linux.mipsn32el,declare.linux.mips64,declare.linux.mips64el,declare.linux.ppc,declare.linux.ppc64,declare.linux.ppc64le,declare.linux.aarch64,declare.linux.s390,declare.linux.riscv64,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6.armel,declare.linux.armv6.armhf" if="isLinux" >
+-    <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.alpha,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.mipsn32,declare.linux.mipsn32el,declare.linux.mips64,declare.linux.mips64el,declare.linux.ppc,declare.linux.ppc64,declare.linux.ppc64le,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6.armel,declare.linux.armv6.armhf,declare.linux.aarch64" if="isLinux" >
++    <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.alpha,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.mipsn32,declare.linux.mipsn32el,declare.linux.mips64,declare.linux.mips64el,declare.linux.ppc,declare.linux.ppc64,declare.linux.ppc64le,declare.linux.s390,declare.linux.riscv64,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6.armel,declare.linux.armv6.armhf,declare.linux.aarch64" if="isLinux" >
        <property name="c.src.dir.os"                         value="unix" />
      </target>
  
diff -Nru gluegen2-2.3.2/debian/patches/rtjar.diff gluegen2-2.4.0+dfsg/debian/patches/rtjar.diff
--- gluegen2-2.3.2/debian/patches/rtjar.diff	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/patches/rtjar.diff	2023-03-12 15:12:03.000000000 +0100
@@ -3,7 +3,7 @@
 Forwarded: no
 --- a/make/build.xml
 +++ b/make/build.xml
-@@ -729,7 +729,6 @@
+@@ -774,7 +774,6 @@
             encoding="UTF-8"
             source="${target.sourcelevel}" 
             target="${target.targetlevel}" 
@@ -11,15 +11,7 @@
             debug="${javacdebug}" debuglevel="${javacdebuglevel}">
        <src path="${src.java}" />
        <src path="${src.generated.java}" />
-@@ -757,7 +756,6 @@
-            encoding="UTF-8"
-            source="${target.sourcelevel}"
-            target="${target.targetlevel}" 
--           bootclasspath="${host.rt.jar}"
-            debug="${javacdebug}" debuglevel="${javacdebuglevel}">
-       <src path="${src.jcpp}" />
-       <src path="${src.java}" />
-@@ -914,7 +912,6 @@
+@@ -1006,7 +1005,6 @@
             encoding="UTF-8"
             source="${target.sourcelevel}" 
             target="${target.targetlevel}" 
@@ -27,7 +19,7 @@
             debug="${javacdebug}" debuglevel="${javacdebuglevel}">
        <src path="${src.java}" />
        <src path="${src.generated.java}" />
-@@ -974,7 +971,6 @@
+@@ -1143,7 +1141,6 @@
             encoding="UTF-8"
             source="${target.sourcelevel}" 
             target="${target.targetlevel}" 
@@ -37,31 +29,21 @@
        <classpath refid="android.classpath" />
 --- a/make/jogamp-env.xml
 +++ b/make/jogamp-env.xml
-@@ -183,13 +183,6 @@
+@@ -228,16 +228,14 @@
+               <isset property="target.sourcelevel"/>
+               <isset property="target.targetlevel"/>
+               <!-- isset property="target.releaselevel"/ -->
+-              <isset property="target.rt.jar"/>
+           </and>
+     </condition>
+     <echo message="target.user.set            ${target.user.set}"/>
      <echo message="target.sourcelevel         ${target.sourcelevel}"/>
      <echo message="target.targetlevel         ${target.targetlevel}"/>
-     <echo message="target.rt.jar              ${target.rt.jar}"/>
--    <fail message="No target.rt.jar specified not found.">
--      <condition>
--        <not>
--          <isset property="target.rt.jar"/>
--        </not>
--      </condition>
--    </fail>
- 
-     <property name="host.sourcelevel"         value="${ant.java.version}" />      <!-- default values for compile time components -->
-     <property name="host.targetlevel"         value="${ant.java.version}" />      <!-- default values for compile time components -->
-@@ -206,13 +199,6 @@
-     <echo message="host.sourcelevel           ${host.sourcelevel}"/>
-     <echo message="host.targetlevel           ${host.targetlevel}"/>
-     <echo message="host.rt.jar                ${host.rt.jar}"/>
--    <fail message="No host.rt.jar specified not found.">
--      <condition>
--        <not>
--          <isset property="host.rt.jar"/>
--        </not>
--      </condition>
--    </fail>
+     <echo message="target.releaselevel        ${target.releaselevel}"/>
+-    <echo message="target.rt.jar              ${target.rt.jar}"/>
  
-     <fail message="Unsupported Target Java version (sourcelevel): ${target.sourcelevel}. Make sure that the version of the Java compiler is 1.6 (6.0) or greater.">
-         <condition>
+-    <fail message="You need to specify all properties 'target.sourcelevel', 'target.targetlevel' and 'target.rt.jar'.">
++    <fail message="You need to specify all properties 'target.sourcelevel', 'target.targetlevel'.">
+       <condition>
+         <not>
+           <istrue value="${target.user.set}"/> 
diff -Nru gluegen2-2.3.2/debian/patches/s390x-support.diff gluegen2-2.4.0+dfsg/debian/patches/s390x-support.diff
--- gluegen2-2.3.2/debian/patches/s390x-support.diff	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/patches/s390x-support.diff	2023-03-15 17:16:10.000000000 +0100
@@ -1,9 +1,10 @@
 Description: add support for s390x arch.
 Author: Gilles Filippini <pini at debian.org>
-Index: gluegen2/make/scripts/make.gluegen.all.linux-s390x.sh
-===================================================================
+Forwarded: no
+Last-Update: 2023-03-15
+
 --- /dev/null
-+++ gluegen2/make/scripts/make.gluegen.all.linux-s390x.sh
++++ b/make/scripts/make.gluegen.all.linux-s390x.sh
 @@ -0,0 +1,24 @@
 +#! /bin/sh
 +
@@ -29,11 +30,9 @@
 +ant \
 +    -Drootrel.build=build-linux-$MACHINE \
 +    $* 2>&1 | tee make.gluegen.all.linux-$MACHINE.log
-Index: gluegen2/src/java/jogamp/common/os/PlatformPropsImpl.java
-===================================================================
---- gluegen2.orig/src/java/jogamp/common/os/PlatformPropsImpl.java
-+++ gluegen2/src/java/jogamp/common/os/PlatformPropsImpl.java
-@@ -527,6 +527,7 @@ public abstract class PlatformPropsImpl
+--- a/src/java/jogamp/common/os/PlatformPropsImpl.java
++++ b/src/java/jogamp/common/os/PlatformPropsImpl.java
+@@ -581,6 +581,7 @@
       *   <li>linux-ia64</li>
       *   <li>linux-sparcv9</li>
       *   <li>linux-risc2.0</li>
@@ -41,7 +40,7 @@
       *   <li>freebsd-i586</li>
       *   <li>freebsd-amd64</li>
       *   <li>hpux-hppa</li>
-@@ -593,6 +594,9 @@ public abstract class PlatformPropsImpl
+@@ -647,6 +648,9 @@
              case PA_RISC2_0:
                  _and_arch_tmp = "risc2.0";
                  break;
@@ -51,11 +50,9 @@
              default:
                  throw new InternalError("Unhandled CPUType: "+cpuType);
          }
-Index: gluegen2/src/java/jogamp/common/os/elf/ElfHeaderPart1.java
-===================================================================
---- gluegen2.orig/src/java/jogamp/common/os/elf/ElfHeaderPart1.java
-+++ gluegen2/src/java/jogamp/common/os/elf/ElfHeaderPart1.java
-@@ -412,6 +412,15 @@ public class ElfHeaderPart1 {
+--- a/src/java/jogamp/common/os/elf/ElfHeaderPart1.java
++++ b/src/java/jogamp/common/os/elf/ElfHeaderPart1.java
+@@ -412,6 +412,15 @@
                  cpuName = "ppc64";
                  abiType = ABIType.GENERIC_ABI;
                  break;
@@ -71,11 +68,9 @@
              case EM_SH:
                  cpuName = "superh";
                  abiType = ABIType.GENERIC_ABI;
-Index: gluegen2/src/java/com/jogamp/common/os/Platform.java
-===================================================================
---- gluegen2.orig/src/java/com/jogamp/common/os/Platform.java
-+++ gluegen2/src/java/com/jogamp/common/os/Platform.java
-@@ -77,7 +77,9 @@ public class Platform extends PlatformPr
+--- a/src/java/com/jogamp/common/os/Platform.java
++++ b/src/java/com/jogamp/common/os/Platform.java
+@@ -77,7 +77,9 @@
          /** Itanium */
          IA64,
          /** Hitachi SuperH */
@@ -86,7 +81,7 @@
      }
  
      public enum CPUType {
-@@ -118,9 +120,13 @@ public class Platform extends PlatformPr
+@@ -118,9 +120,13 @@
          /** SPARC 64bit, big endian */
          SPARCV9_64(CPUFamily.SPARC,   false),
          /** PA_RISC2_0 64bit, ??? endian */
@@ -101,7 +96,7 @@
          public final CPUFamily family;
          public final boolean is32Bit;
  
-@@ -201,6 +207,8 @@ public class Platform extends PlatformPr
+@@ -201,6 +207,8 @@
                  return MIPS_32;
              } else if( cpuABILower.startsWith("superh") ) {
                  return SuperH;
@@ -110,41 +105,3 @@
              } else {
                  throw new RuntimeException("Please port CPUType detection to your platform (CPU_ABI string '" + cpuABILower + "')");
              }
-Index: gluegen2/src/java/com/jogamp/common/os/MachineDataInfo.java
-===================================================================
---- gluegen2.orig/src/java/com/jogamp/common/os/MachineDataInfo.java
-+++ gluegen2/src/java/com/jogamp/common/os/MachineDataInfo.java
-@@ -73,6 +73,7 @@ public class MachineDataInfo {
-   private final static int[] align_sparc_32_sunos =  { 1,   2,   4,   8,   4,    4,     4,     8,      8,   4 };
-   private final static int[] align_x86_32_windows =  { 1,   2,   4,   8,   4,    4,     4,     8,      4,   4 };
-   private final static int[] align_lp64_unix      =  { 1,   2,   4,   8,   4,    8,     4,     8,     16,   8 };
-+  private final static int[] align_s390_64_unix   =  { 1,   2,   4,   8,   4,    8,     4,     8,      8,   8 };
-   private final static int[] align_x86_64_windows =  { 1,   2,   4,   8,   4,    4,     4,     8,     16,   8 };
- 
-   /**
-@@ -108,9 +109,11 @@ public class MachineDataInfo {
-       X86_32_WINDOWS( size_x86_32_windows, align_x86_32_windows),
-       /** LP64 Unix, e.g.: {@link Platform.CPUType#X86_64} Unix, {@link Platform.CPUType#ARM64} EABI, {@link Platform.CPUType#PPC64} Unix, .. */
-       LP64_UNIX(      size_lp64_unix,    align_lp64_unix),
-+      /** {@link Platform.CPUType#S390X} Unix */
-+      S390_64_UNIX(    size_lp64_unix,   align_s390_64_unix),
-       /** {@link Platform.CPUType#X86_64} Windows */
-       X86_64_WINDOWS( size_x86_64_windows, align_x86_64_windows);
--      // 8
-+      // 9
- 
-       public final MachineDataInfo md;
- 
-Index: gluegen2/src/java/jogamp/common/os/MachineDataInfoRuntime.java
-===================================================================
---- gluegen2.orig/src/java/jogamp/common/os/MachineDataInfoRuntime.java
-+++ gluegen2/src/java/jogamp/common/os/MachineDataInfoRuntime.java
-@@ -112,6 +112,8 @@ public class MachineDataInfoRuntime {
-       } else {
-           if( osType == Platform.OSType.WINDOWS ) {
-               return StaticConfig.X86_64_WINDOWS;
-+          } else if ( Platform.CPUType.S390X == cpuType ) {
-+              return StaticConfig.S390_64_UNIX;
-           } else {
-               // for all 64bit unix types (x86_64, aarch64, sparcv9, ..)
-               return StaticConfig.LP64_UNIX;
diff -Nru gluegen2-2.3.2/debian/patches/series gluegen2-2.4.0+dfsg/debian/patches/series
--- gluegen2-2.3.2/debian/patches/series	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/patches/series	2023-04-09 15:41:21.000000000 +0200
@@ -1,24 +1,12 @@
 ppc64el-support.diff
-#jarPath.diff
 renamedLibrary.diff
 disableArchive7z.diff
-#other-archs.diff
-#structLayoutLinux.diff 
 disable-test-zip-archive.diff
-#fix_issues.diff
-#disable_android.diff
 disable_git_call.diff
-linker.diff
 hideException.diff
-#TARGET_JAVA_LIBS_disabled.diff
-
-#duplicatedeclaration.diff
-#disable_android2.diff
 armhf.diff
 fix-alpha-build-config.patch
 missing-arch-symbol.diff
-#add-mips-support.patch
-
 fix-arm64-build-config.diff
 tests.diff
 disable-static-linking.diff
@@ -30,3 +18,9 @@
 java10-compatibility.patch
 fix_gcc-10.patch
 riscv64-support.diff
+cc_attributes_in_build.patch
+looking_for_native_lib_in_tests.patch
+java_include_dir.patch
+missing_shebangs.patch
+hardening.patch
+cpptasks_jar_location.patch
diff -Nru gluegen2-2.3.2/debian/patches/structLayoutLinux.diff gluegen2-2.4.0+dfsg/debian/patches/structLayoutLinux.diff
--- gluegen2-2.3.2/debian/patches/structLayoutLinux.diff	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/patches/structLayoutLinux.diff	1970-01-01 01:00:00.000000000 +0100
@@ -1,43 +0,0 @@
-Index: gluegen2-2.0-rc3/src/java/com/jogamp/common/os/Platform.java
-===================================================================
---- gluegen2-2.0-rc3.orig/src/java/com/jogamp/common/os/Platform.java	2011-10-06 15:01:59.000000000 +0200
-+++ gluegen2-2.0-rc3/src/java/com/jogamp/common/os/Platform.java	2011-10-06 15:07:28.000000000 +0200
-@@ -191,6 +191,16 @@
-             CPU_ARCH = CPUType.PA_RISC2_0;
-         } else if( ARCH_lower.equals("ppc") ) {
-             CPU_ARCH = CPUType.PPC;
-+        } else if( ARCH_lower.equals("alpha") ) {
-+            CPU_ARCH = CPUType.ALPHA;
-+        } else if( ARCH_lower.equals("hppa") ) {
-+            CPU_ARCH = CPUType.HPPA;
-+        } else if( ARCH_lower.equals("mips") ) {
-+            CPU_ARCH = CPUType.MIPS;
-+        } else if( ARCH_lower.equals("mipsel") ) {
-+            CPU_ARCH = CPUType.MIPSEL;
-+        } else if( ARCH_lower.equals("s390") ) {
-+            CPU_ARCH = CPUType.S390;
-         } else {
-             throw new RuntimeException("Please port CPU detection to your platform (" + OS_lower + "/" + ARCH_lower + ")");
-         }               
-@@ -440,6 +450,21 @@
-             case PPC:
-                 _os_and_arch = "ppc"; // TODO: sync with gluegen-cpptasks-base.xml
-                 break;
-+            case ALPHA:
-+                _os_and_arch = "alpha"; 
-+                break;
-+            case HPPA:
-+                _os_and_arch = "hppa"; 
-+                break;
-+            case MIPS:
-+                _os_and_arch = "mips"; 
-+                break;
-+            case MIPSEL:
-+                _os_and_arch = "mipsel"; 
-+                break;
-+            case S390:
-+                _os_and_arch = "s390"; 
-+                break;
-             case X86_64:
-                 _os_and_arch = "amd64";
-                 break;
diff -Nru gluegen2-2.3.2/debian/patches/TARGET_JAVA_LIBS_disabled.diff gluegen2-2.4.0+dfsg/debian/patches/TARGET_JAVA_LIBS_disabled.diff
--- gluegen2-2.3.2/debian/patches/TARGET_JAVA_LIBS_disabled.diff	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/patches/TARGET_JAVA_LIBS_disabled.diff	1970-01-01 01:00:00.000000000 +0100
@@ -1,30 +0,0 @@
-Index: gluegen2-2.0-rc3/make/gluegen-cpptasks-base.xml
-===================================================================
---- gluegen2-2.0-rc3.orig/make/gluegen-cpptasks-base.xml	2011-11-20 17:13:25.000000000 +0100
-+++ gluegen2-2.0-rc3/make/gluegen-cpptasks-base.xml	2011-11-22 00:39:36.011692419 +0100
-@@ -1147,14 +1147,14 @@
-       <echo message="Linux.alpha" />
-       <property name="compiler.cfg.id.base"          value="compiler.cfg.linux.alpha" /> 
-       <property name="linker.cfg.id.base"            value="linker.cfg.linux.alpha" /> 
--      <property name="java.lib.dir.platform"         value="${env.TARGET_JAVA_LIBS}" />
-+      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/alpha" />
-     </target>
- 
-     <target name="gluegen.cpptasks.declare.compiler.linux.armv7" if="isLinuxARMv7">
-       <echo message="Linux.armv7" />
-       <property name="compiler.cfg.id.base"          value="compiler.cfg.linux.armv7" /> 
-       <property name="linker.cfg.id.base"            value="linker.cfg.linux.armv7" /> 
--      <property name="java.lib.dir.platform"         value="${env.TARGET_JAVA_LIBS}" />
-+      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/arm" />
-     </target>
- 
-     <target name="gluegen.cpptasks.declare.compiler.linux.ia64" if="isLinuxIA64">
-@@ -1203,7 +1203,7 @@
-       <echo message="Linux.Sparc" />
-       <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" /> 
-       <property name="linker.cfg.id.base"            value="linker.cfg.linux" /> 
--      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/" />
-+      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/sparc" />
-     </target>
- 
-     <target name="gluegen.cpptasks.declare.compiler.linux" depends="gluegen.cpptasks.declare.compiler.linux.x86,gluegen.cpptasks.declare.compiler.linux.amd64,gluegen.cpptasks.declare.compiler.linux.ia64,gluegen.cpptasks.declare.compiler.linux.armv7,gluegen.cpptasks.declare.compiler.linux.alpha,gluegen.cpptasks.declare.compiler.linux.hppa,gluegen.cpptasks.declare.compiler.linux.mips,gluegen.cpptasks.declare.compiler.linux.mipsel,gluegen.cpptasks.declare.compiler.linux.ppc,gluegen.cpptasks.declare.compiler.linux.s390,gluegen.cpptasks.declare.compiler.linux.sparc" if="isLinux">
diff -Nru gluegen2-2.3.2/debian/patches/tests.diff gluegen2-2.4.0+dfsg/debian/patches/tests.diff
--- gluegen2-2.3.2/debian/patches/tests.diff	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/patches/tests.diff	2023-03-15 17:15:15.000000000 +0100
@@ -1,15 +1,17 @@
 Description: enable testcases build and run.
  One testcase can't build because of missing up to date semver-java:
  - TestVersionSemantics
- Three testcases fail on every arch while the library seems functional:
+ Four testcases fail on every arch while the library seems functional:
  - TestUri99LaunchOnReservedCharPathBug908
  - TestStructGen01
  - TestStructGen02.
+ - TestVersionInfo.
 Author: Gilles Filippini <pini at debian.org>
-Index: gluegen2/make/build-test.xml
-===================================================================
---- gluegen2.orig/make/build-test.xml
-+++ gluegen2/make/build-test.xml
+Forwarded: no
+Last-Update: 2023-03-15
+
+--- a/make/build-test.xml
++++ b/make/build-test.xml
 @@ -84,6 +84,7 @@
              <pathelement location="${junit.jar}" />
              <pathelement location="${semver.jar}" />
@@ -18,11 +20,9 @@
          </path>
  
          <path id="junit.run.classpath">
-Index: gluegen2/make/scripts/runtest.sh
-===================================================================
---- gluegen2.orig/make/scripts/runtest.sh
-+++ gluegen2/make/scripts/runtest.sh
-@@ -42,7 +42,7 @@ rm -f $LOG
+--- a/make/scripts/runtest.sh
++++ b/make/scripts/runtest.sh
+@@ -42,7 +42,7 @@
  GLUEGEN_ROOT=`dirname $builddir`
  ROOTREL_BUILD=`basename $builddir`
  
@@ -31,13 +31,7 @@
  #D_ARGS="-Djogamp.debug.ProcAddressHelper -Djogamp.debug.NativeLibrary -Djogamp.debug.NativeLibrary.Lookup"
  #D_ARGS="-Djogamp.debug.TraceLock"
  #D_ARGS="-Djogamp.debug.Platform -Djogamp.debug.NativeLibrary"
-@@ -64,12 +64,12 @@ X_ARGS="-Drootrel.build=$ROOTREL_BUILD -
- #D_ARGS="-Djogamp.debug.IOUtil -Djogamp.debug.IOUtil.Exe"
- #D_ARGS="-Djogamp.debug.ByteBufferInputStream"
- #D_ARGS="-Djogamp.debug.Bitstream"
--#D_ARGS="-Djogamp.debug=all"
-+D_ARGS="-Djogamp.debug=all"
- #D_ARGS="-Djogamp.debug.Logging"
+@@ -72,7 +72,7 @@
  
  function onetest() {
      #USE_CLASSPATH=lib/junit.jar:$ANT_JARS:lib/semantic-versioning/semver.jar:"$builddir"/../make/lib/TestJarsInJar.jar:"$builddir"/gluegen-rt.jar:"$builddir"/gluegen.jar:"$builddir"/gluegen-test-util.jar:"$builddir"/test/build/gluegen-test.jar
@@ -46,19 +40,18 @@
      #USE_CLASSPATH=lib/junit.jar:$ANT_JARS:lib/semantic-versioning/semver.jar:"$builddir"/../make/lib/TestJarsInJar.jar:"$builddir"/gluegen-rt-alt.jar:"$builddir"/gluegen.jar:"$builddir"/gluegen-test-util.jar:"$builddir"/test/build/gluegen-test.jar
      libspath="$builddir"/test/build/natives
      #USE_CLASSPATH=lib/junit.jar:$ANT_JARS:"$builddir"/../make/lib/TestJarsInJar.jar:"$builddir"/classes:"$builddir"/test/build/classes
-@@ -88,66 +88,68 @@ function onetest() {
+@@ -91,67 +91,69 @@
      echo
  }
  #
-+(cd $builddir/../test/TestJarsInJar && sh make.sh)
-+#
 -#onetest com.jogamp.common.GlueGenVersion 2>&1 | tee -a $LOG
 -#onetest com.jogamp.common.util.TestSystemPropsAndEnvs 2>&1 | tee -a $LOG
--#onetest com.jogamp.common.util.TestVersionInfo 2>&1 | tee -a $LOG
--#onetest com.jogamp.common.util.TestVersionNumber 2>&1 | tee -a $LOG
++(cd $builddir/../test/TestsJarsInJar && sh make.sh)
++#
 +onetest com.jogamp.common.GlueGenVersion 2>&1 | tee -a $LOG
 +onetest com.jogamp.common.util.TestSystemPropsAndEnvs 2>&1 | tee -a $LOG
-+onetest com.jogamp.common.util.TestVersionInfo 2>&1 | tee -a $LOG
+ #onetest com.jogamp.common.util.TestVersionInfo 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.util.TestVersionNumber 2>&1 | tee -a $LOG
 +onetest com.jogamp.common.util.TestVersionNumber 2>&1 | tee -a $LOG
  #onetest com.jogamp.common.util.TestVersionSemantics 2>&1 | tee -a $LOG
 -#onetest com.jogamp.common.util.TestIteratorIndexCORE 2>&1 | tee -a $LOG
@@ -76,6 +69,8 @@
 -#onetest com.jogamp.common.util.LongIntHashMapTest 2>&1 | tee -a $LOG
 -#onetest com.jogamp.common.util.TestPlatform01 2>&1 | tee -a $LOG
 -#onetest com.jogamp.common.util.TestRunnableTask01 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.util.TestIOUtil01 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.util.TestTempJarCache 2>&1 | tee -a $LOG
 +onetest com.jogamp.common.util.TestIteratorIndexCORE 2>&1 | tee -a $LOG
 +onetest com.jogamp.common.util.locks.TestRecursiveLock01 2>&1 | tee -a $LOG
 +onetest com.jogamp.common.util.locks.TestRecursiveThreadGroupLock01 2>&1 | tee -a $LOG
@@ -91,9 +86,9 @@
 +onetest com.jogamp.common.util.LongIntHashMapTest 2>&1 | tee -a $LOG
 +onetest com.jogamp.common.util.TestPlatform01 2>&1 | tee -a $LOG
 +onetest com.jogamp.common.util.TestRunnableTask01 2>&1 | tee -a $LOG
- onetest com.jogamp.common.util.TestIOUtil01 2>&1 | tee -a $LOG
--#onetest com.jogamp.common.util.TestTempJarCache 2>&1 | tee -a $LOG
--#onetest com.jogamp.common.util.TestJarUtil 2>&1 | tee -a $LOG
++onetest com.jogamp.common.util.TestIOUtil01 2>&1 | tee -a $LOG
++onetest com.jogamp.common.util.TestTempJarCache 2>&1 | tee -a $LOG
+ #onetest com.jogamp.common.util.TestJarUtil 2>&1 | tee -a $LOG
 -#onetest com.jogamp.common.util.TestValueConversion 2>&1 | tee -a $LOG
 -#onetest com.jogamp.common.util.TestSyncRingBuffer01 $*
 -#onetest com.jogamp.common.util.TestLFRingBuffer01 $*
@@ -108,21 +103,6 @@
 -#onetest com.jogamp.common.net.TestUri01 2>&1 | tee -a $LOG
 -#onetest com.jogamp.common.net.TestUri02Composing 2>&1 | tee -a $LOG
 -#onetest com.jogamp.common.net.TestUri03Resolving 2>&1 | tee -a $LOG
--#onetest com.jogamp.common.net.TestUri99LaunchOnReservedCharPathBug908 2>&1 | tee -a $LOG
--#onetest com.jogamp.common.net.AssetURLConnectionUnregisteredTest 2>&1 | tee -a $LOG
--#onetest com.jogamp.common.net.AssetURLConnectionRegisteredTest 2>&1 | tee -a $LOG
--#onetest com.jogamp.junit.sec.TestSecIOUtil01 2>&1 | tee -a $LOG
--#onetest com.jogamp.common.nio.BuffersTest 2>&1 | tee -a $LOG
--#onetest com.jogamp.common.nio.TestBuffersFloatDoubleConversion 2>&1 | tee -a $LOG
--#onetest com.jogamp.common.nio.TestPointerBufferEndian 2>&1 | tee -a $LOG
--#onetest com.jogamp.common.nio.TestStructAccessorEndian 2>&1 | tee -a $LOG
--#onetest com.jogamp.common.nio.TestByteBufferInputStream 2>&1 | tee -a $LOG
--#onetest com.jogamp.common.nio.TestByteBufferOutputStream 2>&1 | tee -a $LOG
--#onetest com.jogamp.common.nio.TestByteBufferCopyStream 2>&1 | tee -a $LOG
--#onetest com.jogamp.common.os.TestElfReader01 $* 2>&1 | tee -a $LOG
--#onetest com.jogamp.gluegen.test.junit.internals.TestType 2>&1 | tee -a $LOG
-+onetest com.jogamp.common.util.TestTempJarCache 2>&1 | tee -a $LOG
-+onetest com.jogamp.common.util.TestJarUtil 2>&1 | tee -a $LOG
 +onetest com.jogamp.common.util.TestValueConversion 2>&1 | tee -a $LOG
 +onetest com.jogamp.common.util.TestSyncRingBuffer01 $*
 +onetest com.jogamp.common.util.TestLFRingBuffer01 $*
@@ -137,7 +117,19 @@
 +onetest com.jogamp.common.net.TestUri01 2>&1 | tee -a $LOG
 +onetest com.jogamp.common.net.TestUri02Composing 2>&1 | tee -a $LOG
 +onetest com.jogamp.common.net.TestUri03Resolving 2>&1 | tee -a $LOG
-+onetest com.jogamp.common.net.TestUri99LaunchOnReservedCharPathBug908 2>&1 | tee -a $LOG
+ #onetest com.jogamp.common.net.TestUri99LaunchOnReservedCharPathBug908 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.net.AssetURLConnectionUnregisteredTest 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.net.AssetURLConnectionRegisteredTest 2>&1 | tee -a $LOG
+-#onetest com.jogamp.junit.sec.TestSecIOUtil01 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.nio.BuffersTest 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.nio.TestBuffersFloatDoubleConversion 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.nio.TestPointerBufferEndian 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.nio.TestStructAccessorEndian 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.nio.TestByteBufferInputStream 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.nio.TestByteBufferOutputStream 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.nio.TestByteBufferCopyStream 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.os.TestElfReader01 $* 2>&1 | tee -a $LOG
+-#onetest com.jogamp.gluegen.test.junit.internals.TestType 2>&1 | tee -a $LOG
 +onetest com.jogamp.common.net.AssetURLConnectionUnregisteredTest 2>&1 | tee -a $LOG
 +onetest com.jogamp.common.net.AssetURLConnectionRegisteredTest 2>&1 | tee -a $LOG
 +onetest com.jogamp.junit.sec.TestSecIOUtil01 2>&1 | tee -a $LOG
@@ -162,14 +154,13 @@
 +onetest com.jogamp.gluegen.jcpp.TokenPastingWhitespaceTest 2>&1 | tee -a $LOG
 +onetest com.jogamp.gluegen.jcpp.PreprocessorTest 2>&1 | tee -a $LOG
  
--#onetest com.jogamp.gluegen.test.junit.generation.Test1p1JavaEmitter 2>&1 | tee -a $LOG
+ onetest com.jogamp.gluegen.test.junit.generation.Test1p1JavaEmitter 2>&1 | tee -a $LOG
 -#onetest com.jogamp.gluegen.test.junit.generation.Test1p2ProcAddressEmitter 2>&1 | tee -a $LOG
 -#onetest com.jogamp.gluegen.test.junit.generation.Test1p2LoadJNIAndImplLib 2>&1 | tee -a $LOG
--#onetest com.jogamp.gluegen.test.junit.structgen.TestStructGen01 2>&1 | tee -a $LOG
--#onetest com.jogamp.gluegen.test.junit.structgen.TestStructGen02 2>&1 | tee -a $LOG
-+onetest com.jogamp.gluegen.test.junit.generation.Test1p1JavaEmitter 2>&1 | tee -a $LOG
+-#onetest com.jogamp.gluegen.test.junit.generation.Test1p2DynamicLibraryBundle 2>&1 | tee -a $LOG
 +onetest com.jogamp.gluegen.test.junit.generation.Test1p2ProcAddressEmitter 2>&1 | tee -a $LOG
 +onetest com.jogamp.gluegen.test.junit.generation.Test1p2LoadJNIAndImplLib 2>&1 | tee -a $LOG
-+onetest com.jogamp.gluegen.test.junit.structgen.TestStructGen01 2>&1 | tee -a $LOG
-+onetest com.jogamp.gluegen.test.junit.structgen.TestStructGen02 2>&1 | tee -a $LOG
++onetest com.jogamp.gluegen.test.junit.generation.Test1p2DynamicLibraryBundle 2>&1 | tee -a $LOG
+ #onetest com.jogamp.gluegen.test.junit.structgen.TestStructGen01 2>&1 | tee -a $LOG
+ #onetest com.jogamp.gluegen.test.junit.structgen.TestStructGen02 2>&1 | tee -a $LOG
  
diff -Nru gluegen2-2.3.2/debian/pom-gluegen-rt.xml gluegen2-2.4.0+dfsg/debian/pom-gluegen-rt.xml
--- gluegen2-2.3.2/debian/pom-gluegen-rt.xml	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/pom-gluegen-rt.xml	2023-03-19 08:10:07.000000000 +0100
@@ -11,7 +11,7 @@
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.jogamp.gluegen</groupId>
   <artifactId>gluegen-rt</artifactId>
-  <version>2.3.2</version>
+  <version>2.4.0</version>
   <packaging>jar</packaging>
   <name>GlueGen Runtime</name>
   <description>JNI binding generator (runtime)</description>
diff -Nru gluegen2-2.3.2/debian/README.source gluegen2-2.4.0+dfsg/debian/README.source
--- gluegen2-2.3.2/debian/README.source	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/README.source	1970-01-01 01:00:00.000000000 +0100
@@ -1,10 +0,0 @@
-Here is how the current gluegen2 orig tarball was created:
-
-- Update debian/changelog for the new target verison.
-- Use the debian/rules get-orig-source target to retrieve and repack
-  the gluegen orig tarball.
-- Extract the gluegen orig tarball.
-- Retrieve the sources for jcpp from:
-  http://jogamp.org/deployment/jogamp-current/archive/Sources/
-- Extract the jcpp sources into the gluegen tarball.
-- Repack as gluegen2_xxx.orig.tar.gz 
diff -Nru gluegen2-2.3.2/debian/rules gluegen2-2.4.0+dfsg/debian/rules
--- gluegen2-2.3.2/debian/rules	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/rules	2023-03-19 08:09:53.000000000 +0100
@@ -2,24 +2,40 @@
 
 include /usr/share/dpkg/pkg-info.mk
 
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
+
 ifeq ($(DEB_HOST_ARCH),armhf)
 EXTRA_ANT_ARGS = -DisAbiEabiGnuArmhf=true
 endif
 
 export CLASSPATH=/usr/share/java/jsr305.jar:/usr/share/java/ant-contrib-cpptasks.jar
 
+# Providing the hardening LDFLAGS to the ant cc task.
+ARGS_FOR_LINKER=$(shell LINKERARGS=""; \
+    for arg in $(LDFLAGS); do\
+        LINKERARGS="$${LINKERARGS}<linkerarg value=\\\"$$arg\\\" \/> " ;\
+    done; \
+    echo "$${LINKERARGS}")
+
 %:
 	dh $@ --buildsystem=ant --with maven-repo-helper
 
 override_dh_auto_configure:
 	-mv src/junit/com/jogamp/junit/util/VersionSemanticsUtil.java  src/junit/com/jogamp/junit/util/VersionSemanticsUtil.java.disabled
 	-mv src/junit/com/jogamp/common/util/TestVersionSemantics.java src/junit/com/jogamp/common/util/TestVersionSemantics.java.disabled
+	# Providing the hardening LDFLAGS to the ant cc task.
+	mv make/build.xml make/build.xml.old
+	sed 's/#LINKER_ARGS#/$(ARGS_FOR_LINKER)/' make/build.xml.old > make/build.xml
 
 override_dh_auto_build:
 	dh_auto_build -- -f make/build.xml all javadoc $(EXTRA_ANT_ARGS)
 
 override_dh_auto_test:
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 	ANT_PATH=/usr/share/ant make/scripts/runtest.sh build
+endif
 
 override_dh_install-indep:
 	dh_install -i
@@ -36,6 +52,9 @@
 override_dh_auto_clean:
 	-mv src/junit/com/jogamp/junit/util/VersionSemanticsUtil.java.disabled  src/junit/com/jogamp/junit/util/VersionSemanticsUtil.java
 	-mv src/junit/com/jogamp/common/util/TestVersionSemantics.java.disabled src/junit/com/jogamp/common/util/TestVersionSemantics.java
+	# Restoring make/build.xml
+	if [ -e make/build.xml.old?]; then mv make/build.xml.old make/build.xml; fi
 
 get-orig-pom:
-	wget https://repo1.maven.org/maven2/org/jogamp/gluegen/gluegen-rt/$(DEB_VERSION_UPSTREAM)/gluegen-rt-$(DEB_VERSION_UPSTREAM).pom -O debian/pom-gluegen-rt.xml
+	VERSION_FOR_POM=$(shell echo $(DEB_VERSION_UPSTREAM) | sed 's/\+dfsg\d*//'); \
+	wget https://repo1.maven.org/maven2/org/jogamp/gluegen/gluegen-rt/$$VERSION_FOR_POM/gluegen-rt-$$VERSION_FOR_POM.pom -O debian/pom-gluegen-rt.xml
diff -Nru gluegen2-2.3.2/debian/watch gluegen2-2.4.0+dfsg/debian/watch
--- gluegen2-2.3.2/debian/watch	2022-07-14 06:28:14.000000000 +0200
+++ gluegen2-2.4.0+dfsg/debian/watch	2023-03-19 07:58:03.000000000 +0100
@@ -1,4 +1,7 @@
-version=3
-http://jogamp.org/deployment/jogamp-current/archive/Sources/ gluegen-v(.*).tar.xz \
-debian debian/orig-tar.sh
+version=4
 
+opts="dversionmangle=auto, oversionmangle=s/(.*)/$1+dfsg/" \
+ https://jogamp.org/deployment/jogamp-current/archive/Sources/ gluegen-v(.*).tar.xz debian
+
+opts="component=jcpp" \
+ https://jogamp.org/deployment/jogamp-current/archive/Sources/jcpp-v@ANY_VERSION@.tar.xz ignore
diff -Nru gluegen2-2.3.2/doc/HowToBuild.html gluegen2-2.4.0+dfsg/doc/HowToBuild.html
--- gluegen2-2.3.2/doc/HowToBuild.html	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/doc/HowToBuild.html	2023-02-01 18:52:41.000000000 +0100
@@ -2,8 +2,10 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
         <link href="../../style.css" rel="stylesheet" type="text/css"/>
-        <title>How to build JOGL</title>
+        <link href="../../style-alt1.css" rel="alternate stylesheet" title="default sans-serif font" type="text/css"/>
+        <title>How to build GlueGen</title>
     </head>
     <body>
         <div id="container">
@@ -34,138 +36,157 @@
                     if not stated otherwise.<br/>
 
                     <ul>
-                        <li> <b>Java</b><br/>
-                            A Java 1.6 compliant SDK.
+                        <li> <b>Java</b>
+                           <ul>
+                              <li>Build & Runtime: An <a href="http://openjdk.java.net/">OpenJDK</a> 17 compliant SDK.</li>
+                              <li>Runtime: An OpenJDK 8 compliant JRE.</li>
+                           </ul>
+                           You may find an appropriate <a href="http://openjdk.java.net/">OpenJDK</a> build @ <a href="https://adoptium.net/temurin/releases/">Adoptium</a>.<br/>
+                           <br/>
+                           Or you may try one of the following SDK's and/or Runtimes:
+                           <ul>
+                              <li> <a href="https://www.azul.com/downloads/zulu-community/">Azul's Zulu</a> (active, +embedded)</li>
+                              <li> <a href="https://github.com/ReadyTalk/avian">Avian</a> (inactive, not tested)</li>
+                           </ul>
                         </li>
-                        <li> <b><a href="http://ant.apache.org/">Ant</a></b> 1.9.0 or later</li>
-                        <li> <b><a href="http://www.kernel.org/pub/software/scm/git/docs/">Git</a></b> 1.6.0 or later<br/>
+                        <li> <b><a href="http://ant.apache.org/">Ant</a></b> 1.10.5 or later</li>
+                        <li> <b><a href="http://www.kernel.org/pub/software/scm/git/docs/">Git</a></b> 2.0.4 or later<br/>
                             <ul>
                                 <li> Use your Unix distribution's version, if available, or</li>
-                                <li> <a href="http://www.kernel.org/pub/software/scm/git/">Source Code for GNU/Linux, MacOSX, ..</a>, or</li>
-                                <li> Git on Windows
+                                <li> <a href="http://www.kernel.org/pub/software/scm/git/">Source Code for GNU/Linux, MacOS, ..</a>, or</li>
+                                <li> Git on Windows is provided by <a href="https://cygwin.com">cygwin</a></li>
+                                <li> Git ≥ 2.37 provided by Xcode ≥ 14</li>
+                            </ul>
+                        </li>
+
+                        <li> <b><a href="https://www.freebsd.org/">FreeBSD</a></b> x86, 32- and 64-bit, ...
+                            <ul>
+                                <li> <b><a href="https://www.freebsd.org/releases/">FreeBSD</a></b> 12 or later <i>(todo: test)</i>
                                     <ul>
-                                        <li> <a href="https://cygwin.com">cygwin</a></li>
-                                        <li> <a href="http://code.google.com/p/msysgit/">msysgit</a></li>
+                                        <li>openjdk17</li>
+                                        <li>ant</li>
+                                        <li>git</li>
+                                        <li>awk</li>
+                                        <li>p7zip-full ???</li>
+                                        <li>gcc</li>
+                                        <li>cmake</li>
                                     </ul>
-                                </li>
-                                <li> <a href="http://code.google.com/p/git-osx-installer/">git-osx-installer</a> </li>
                             </ul>
                         </li>
-
-                        <li> <b>GNU Linux</b> x86, 32- and 64-bit<br/>
+                        <li> <b>GNU Linux</b> x86_64 as well as Arm64, etc<br/>
                             You may have to install a few developer packages ...
                             <ul>
-                                <li> <b>Debian</b> 5.00 or later
+                                <li> <b>Debian</b> 11 or later
                                     <ul>
-                                        <li>openjdk-7-jre</li>
-                                        <li>openjdk-7-jdk</li>
+                                        <li>openjdk-17-jre</li>
+                                        <li>openjdk-17-jdk</li>
                                         <li>ant</li>
                                         <li>git</li>
+                                        <li>gawk</li>
                                         <li>p7zip-full</li>
                                         <li>gcc</li>
+                                        <li>cmake</li>
                                     </ul>
                                     One liner install command:
-                                    <pre>
-apt-get install openjdk-7-jre openjdk-7-jdk ant git-all p7zip-full gcc
-                                    </pre>
+                                    <ul>
+                                      <li><b>Debian</b> 11 Bullseye
+                                      <pre>
+apt-get install openjdk-17-jre openjdk-17-jdk ant git-all gawk p7zip-full gcc cmake
+                                      </pre></li>
+                                    </ul>
                                     Optional: Add <i>kernel</i> build utilities:
                                     <pre>
 apt-get install kernel-package build-essential 
                                     </pre>
-                                    Optional: Add <i>multiarch</i> i386 next to amd64 
-                                    <ul>
-                                      <li><b>Debian</b> 7.00
-                                        <pre>
-dpkg --add-architecture i386
-apt-get update
-apt-get install ia32-libs ia32-libs-gtk gcc-multilib lib32gcc1 lib32gomp1 lib32itm1 lib32quadmath0 libc6-i386 ibc6-dev-i386 g++-multilib lib32stdc++6 openjdk-7-jre:i386 openjdk-7-jdk:i386
-                                        </pre></li>
-
-                                      <li><b>Debian</b> 8.00
-                                        <pre>
-dpkg --add-architecture i386
-apt-get update
-apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 gcc-multilib lib32gcc1 lib32gomp1 lib32itm1 lib32quadmath0 libc6-i386 libc6-dev-i386 g++-multilib lib32stdc++6 openjdk-7-jre:i386 openjdk-7-jdk:i386
-                                        </pre></li>
-                                    </ul>
                                 </li>
-                                <li> <b>OpenSuSE</b> 10.2 or later
+                                <li> <b>OpenSuSE</b> 15.0 or later
                                     <ul>
-                                        <li>openjdk-7-jre</li>
-                                        <li>openjdk-7-jdk</li>
+                                        <li>java-17-openjdk</li>
                                         <li>ant</li>
                                         <li>git</li>
+                                        <li>gawk</li>
                                         <li>p7zip-full</li>
                                         <li>gcc</li>
+                                        <li>cmake</li>
                                     </ul>
                                 </li>
-                                <li> <b>CentOS / Red Hat Enterprise Linux</b> 5.4 or later<br/>
+                                <li> <b>CentOS 7 / Red Hat Enterprise Linux 7.6</b> or later<br/>
                                     <ul>
-                                        <li>openjdk-7-jre</li>
-                                        <li>openjdk-7-jdk</li>
+                                        <li>java-17-openjdk</li>
                                         <li>ant</li>
                                         <li>git</li>
+                                        <li>gawk</li>
                                         <li>p7zip-full</li>
                                         <li>gcc</li>
+                                        <li>cmake</li>
                                     </ul>
                                 </li>
                             </ul>
                         </li>
-                        <li> <b>OpenSolaris</b> SPARC and x86, 32- and 64-bit
+                        <li> <b>Android/Linux</b> Version 7.0 Nougat API Level 24 or later<br/>
                             <ul>
-                                <li> <a href="http://opensolaris.org/">OpenSolaris 2009.06 or later</a></li>
+                                <li>any of the above GNU/Linux x86_64 hosts for crosscompilation</li>
+                                <li>android ndk <i>(todo: detail instructions)</i></li>
+                                <li>android sdk <i>(todo: detail instructions)</i></li>
                             </ul>
                         </li>
-                        <li> <b>MacOSX</b> Intel
+                        <li> <b><a href="https://en.wikipedia.org/wiki/OpenSolaris#Derivatives">OpenSolaris Derivatives</a></b> SPARC and x86, 32- and 64-bit
                             <ul>
-                                <li> git, see above </li>
-                                <li> <a href="http://www.apple.com/macosx/">Mac OS X</a> 10.3 (note: will not work with earlier releases) </li>
-                                <li> <a href="http://developer.apple.com/technologies/xcode.html">Xcode</a> for gcc, etc (included in OSX)</li>
+                                <li><a href="https://www.openindiana.org/">OpenIndiana</a> using illumus's OpenSolaris continuation <i>(todo: test)</i></li>
                             </ul>
                         </li>
-                        <li> <b>Windows</b>/x86 (32 bit)
+                        <li> <b>MacOS and iOS</b> x86_64 and aarch64
                             <ul>
-                                <li>Windows XP or later </li>
-                                <li>git, see above</li>
-                                <li> <a href="http://mingw-w64.sourceforge.net/">MinGW64</a>
-                                  <ul>
-                                    <li> <a href="http://sourceforge.net/projects/mingwbuilds/files/mingw-builds-install/mingw-builds-install.exe/download">Installer</a>
-                                      <ul>
-                                        <li>mingw-build-install</li>
-                                        <li>version: 4.8.1</li>
-                                        <li>host: x32</li>
-                                        <li>threading: win32</li>
-                                        <li>exceptions: SJLJ</li>
-                                        <li>revision: 5</li>
-                                      </ul></li>
-                                    <li> or <a href="http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/">manual</a> 
-                                         via  <a href="http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.8.1/32-bit/threads-win32/sjlj/">7z archive file</a></li>
-                                  </ul></li>
+                                <li>git ≥ 2.37 provided by Xcode ≥ 14</li>
+                                <li>awk is provided by MacOS</li>
+                                <li><a href="https://cmake.org/">CMake 3.25.1</a>, and install the <a href="https://stackoverflow.com/questions/30668601/installing-cmake-command-line-tools-on-a-mac">command line tools</a></li>
+                                <li><a href="http://www.apple.com/macosx/">Mac OS</a> 11 or later (note: may not work with earlier releases) </li>
+                                <li><a href="http://developer.apple.com/technologies/xcode.html">Xcode</a> 14 or later for clang, etc (included in MacOS)</li>
+                            </ul>
+                            Prepare fat universal OpenJDK libraries
+                            <ul>
+                                <li>Open a terminal in your home folder, e.g. <i>/Users/jogamp</i></li>
+                                <li>The OpenJDK library folder of each target platform, x86_64 or aarch64, is <i>/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/lib</i></li>
+                                <li>Transfer the x86_64 OpenJDK library folder to <i>temurin-17.jdk.amd64.lib</i><li>
+                                <li>Transfer the aarch64 OpenJDK library folder to <i> temurin-17.jdk.arm64.lib</i></li>
+                                <li>Run the script <i>gluegen/make/scripts/make.macosx.jdk_lipo_libs.sh</i></li>
+                                <li>Fat universal OpenJDK libraries are produced into <i>temurin-17.jdk.fat.lib</i></li>
                             </ul>
+                            Now we have to tell the <i>gluegen</i> build framework to use <i>temurin-17.jdk.fat.lib</i>,
+                            by adding an <i>ant</i> macro in <i>$HOME/gluegen.properties</i>
+                            <pre>
+                                java.lib.dir.platform=/Users/jogamp/temurin-17.jdk.fat.lib
+                            </pre>
+                            Replace <i>jogamp</i> with your user name.
                         </li>
                         <li> <b>Windows</b>/x86_64 (64-bit)
                             <ul>
-                                <li>Windows XP or later </li>
-                                <li>git, see above</li>
-                                <li> <a href="http://mingw-w64.sourceforge.net/">MinGW64</a>
+                                <li>Windows 7 or later </li>
+                                <li>git is provided by <a href="https://cygwin.com">cygwin</a></li>
+                                <li>gawk is provided by <a href="https://cygwin.com">cygwin</a></li>
+                                <li> <a href="http://mingw-w64.org/">MinGW64</a> (<a href="https://github.com/niXman/mingw-builds-binaries/releases">files on github</a>)
                                   <ul>
-                                    <li> <a href="http://sourceforge.net/projects/mingwbuilds/files/mingw-builds-install/mingw-builds-install.exe/download">Installer</a>
+                                    <li> <a href="https://github.com/niXman/mingw-builds-binaries/releases/download/12.2.0-rt_v10-rev2/x86_64-12.2.0-release-win32-seh-msvcrt-rt_v10-rev2.7z">x86_64-12.2.0-release-win32-seh-msvcrt-rt_v10-rev2.7z</a>
                                       <ul>
-                                        <li>mingw-build-install</li>
-                                        <li>version: 4.8.1</li>
+                                        <li>version: 12.2.0</li>
                                         <li>host: x64</li>
                                         <li>threading: win32</li>
-                                        <li>exceptions: SJLJ</li>
-                                        <li>revision: 5</li>
+                                        <li>exceptions: seh</li>
+                                        <li>c-runtime: msvcrt</li>
+                                        <li>revision: 2</li>
                                       </ul></li>
-                                    <li> or <a href="http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/">manual</a> 
-                                         via  <a href="http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.8.1/64-bit/threads-win32/sjlj/">7z archive file</a></li>
-                                  </ul></li>
+                                  </ul>
+                                </li>
+                                <li><a href="https://cmake.org/">CMake 3.25.1</a> 64bit version</li>
+                                <li><a href="https://www.7-zip.org/">7-Zip 22.01</a> 64bit version</li>
                             </ul>
                         </li>
                     </ul>
 
                     <p>
+                        CMake has been added here for JOAL and JOGL.
+                    </p>
+                    <p>
                         Additional platforms such as FreeBSD and HP/UX are handled by the
                         build system, but are not officially supported.
                     </p>
@@ -173,7 +194,7 @@
                     <h2>Build Steps</h2>
                     <hr/>
                     <p>
-                        Here are the steps that are required in order to build JOGL.
+                        Here are the steps that are required in order to build GlueGen.
                     </p>
 
                     <ol>
@@ -197,7 +218,7 @@
                         </li>
 
                         <li> <b>Unset your CLASSPATH environment variable:</b> <br/>
-                            The Ant build requires that the JOGL jars not be visible on the classpath. On Unix, type
+                            The Ant build requires that the GlueGen jars not be visible on the classpath. On Unix, type
                             <code> unsetenv CLASSPATH </code> into a csh or tcsh shell, or <code> unset CLASSPATH </code>
                             into a Bourne shell. On Windows, type <code> set CLASSPATH= </code> into a command prompt.
                         </li>
@@ -207,13 +228,32 @@
                             copy <b>gluegen/make/gluegen.properties</b> into your home directory (pointed to by the Java system property <b>user.home</b>). <br/></li>
 
                         <li> <b>Build the source tree:</b> <br/>
-                            Open a command shell in the "gluegen/make" directory of the source tree and type <code>"ant"</code>.
+                            Open a command shell in the "gluegen/make" directory of the source tree and invoke <code>ant</code> 
+                            with the given properties as follows
+                            <pre>
+    cd /home/dude/projects/jogamp/gluegen/make/
+    ant -Dtarget.sourcelevel=1.8 -Dtarget.targetlevel=1.8 -Dtarget.rt.jar=/your/openjdk8/lib/rt.jar
+                            </pre>
+                            Alternatively you can also use environment variables instead of properties
+                            <pre>
+    export SOURCE_LEVEL=1.8
+    export TARGET_LEVEL=1.8
+    export TARGET_RT_JAR=/your/openjdk8/lib/rt.jar
+    ant
+                            </pre>
+                            Optionally you can also set certain build features via properites or environment variables
+                            <pre>
+    Feature                Property                          or Environment Variable
+    developer-zip-archive: build.archiveon=true                 BUILD_ARCHIVE=true
+    Native Debug Code:     c.compiler.debug=true
+    Java Debug Code:       javacdebuglevel="source,lines,vars"
+                            </pre>
                         </li>
 
-                        <li> <b>Test your build:</b> <br/> Stay in your command shell in the "gluegen/make" directory of the source tree and type <code>"ant junit.run"</code>.</li>
+                        <li> <b>Test your build:</b> <br/> Stay in your command shell in the "gluegen/make" directory of the source tree and invoke <code>ant</code> with above properties or environment variables and use the target <code>junit.run</code>.</li>
 
-                        <li> <b>Build Javadoc:</b> <br/> Stay in your command shell in the "gluegen/make" directory of the source tree and type "<code>ant javadoc"</code>.
-                            This will produce the end-user documentation for JOGL along with some auxiliary utility packages.
+                        <li> <b>Build Javadoc:</b> <br/> Stay in your command shell in the "gluegen/make" directory of the source tree and invoke <code>ant</code> with above properties or environment variables and use the target <code>javadoc</code>.
+                            This will produce the end-user documentation for GlueGen along with some auxiliary utility packages.
                         </li>
                     </ol>
 
@@ -237,7 +277,7 @@
                         </li>
 
                         <li>
-                            <b>CharScanner; panic: ClassNotFoundException: com.sun.gluegen.cgram.CToken</b>
+                            <b>CharScanner; panic: ClassNotFoundException: com.jogamp.gluegen.cgram.CToken</b>
 
                             This occurs because ANTLR was dropped into the Extensions
                             directory of the JRE/JDK. On Windows and Linux, delete any ANTLR jars from jre/lib/ext,
diff -Nru gluegen2-2.3.2/doc/manual/example1/gen.sh gluegen2-2.4.0+dfsg/doc/manual/example1/gen.sh
--- gluegen2-2.3.2/doc/manual/example1/gen.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/doc/manual/example1/gen.sh	2023-02-01 18:52:41.000000000 +0100
@@ -14,5 +14,5 @@
   SEP=:
 fi
 
-echo java -cp $GLUEGEN_JAR$SEP$ANTLR_JAR com.sun.gluegen.GlueGen -I. -Ecom.sun.gluegen.JavaEmitter -Cfunction.cfg function.h
-java -cp $GLUEGEN_JAR$SEP$ANTLR_JAR com.sun.gluegen.GlueGen -I. -Ecom.sun.gluegen.JavaEmitter -Cfunction.cfg function.h
+echo java -cp $GLUEGEN_JAR$SEP$ANTLR_JAR com.jogamp.gluegen.GlueGen -I. -Ecom.jogamp.gluegen.JavaEmitter -Cfunction.cfg function.h
+java -cp $GLUEGEN_JAR$SEP$ANTLR_JAR com.jogamp.gluegen.GlueGen -I. -Ecom.jogamp.gluegen.JavaEmitter -Cfunction.cfg function.h
diff -Nru gluegen2-2.3.2/doc/manual/example2/gen.sh gluegen2-2.4.0+dfsg/doc/manual/example2/gen.sh
--- gluegen2-2.3.2/doc/manual/example2/gen.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/doc/manual/example2/gen.sh	2023-02-01 18:52:41.000000000 +0100
@@ -14,4 +14,4 @@
   SEP=:
 fi
 
-java -cp $GLUEGEN_JAR$SEP$ANTLR_JAR com.sun.gluegen.GlueGen -I. -Ecom.sun.gluegen.JavaEmitter -Cfunction.cfg function.h
+java -cp $GLUEGEN_JAR$SEP$ANTLR_JAR com.jogamp.gluegen.GlueGen -I. -Ecom.jogamp.gluegen.JavaEmitter -Cfunction.cfg function.h
diff -Nru gluegen2-2.3.2/doc/manual/example3/gen.sh gluegen2-2.4.0+dfsg/doc/manual/example3/gen.sh
--- gluegen2-2.3.2/doc/manual/example3/gen.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/doc/manual/example3/gen.sh	2023-02-01 18:52:41.000000000 +0100
@@ -14,4 +14,4 @@
   SEP=:
 fi
 
-java -cp $GLUEGEN_JAR$SEP$ANTLR_JAR com.sun.gluegen.GlueGen -I. -Ecom.sun.gluegen.JavaEmitter -Cfunction.cfg function.h
+java -cp $GLUEGEN_JAR$SEP$ANTLR_JAR com.jogamp.gluegen.GlueGen -I. -Ecom.jogamp.gluegen.JavaEmitter -Cfunction.cfg function.h
diff -Nru gluegen2-2.3.2/doc/manual/example4/gen.sh gluegen2-2.4.0+dfsg/doc/manual/example4/gen.sh
--- gluegen2-2.3.2/doc/manual/example4/gen.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/doc/manual/example4/gen.sh	2023-02-01 18:52:41.000000000 +0100
@@ -14,4 +14,4 @@
   SEP=:
 fi
 
-java -cp $GLUEGEN_JAR$SEP$ANTLR_JAR com.sun.gluegen.GlueGen -I. -Ecom.sun.gluegen.JavaEmitter -Cfunction.cfg function.h
+java -cp $GLUEGEN_JAR$SEP$ANTLR_JAR com.jogamp.gluegen.GlueGen -I. -Ecom.jogamp.gluegen.JavaEmitter -Cfunction.cfg function.h
diff -Nru gluegen2-2.3.2/doc/manual/example5/gen.sh gluegen2-2.4.0+dfsg/doc/manual/example5/gen.sh
--- gluegen2-2.3.2/doc/manual/example5/gen.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/doc/manual/example5/gen.sh	2023-02-01 18:52:41.000000000 +0100
@@ -14,4 +14,4 @@
   SEP=:
 fi
 
-java -cp $GLUEGEN_JAR$SEP$ANTLR_JAR com.sun.gluegen.GlueGen -I. -Ecom.sun.gluegen.JavaEmitter -Cfunction.cfg function.h
+java -cp $GLUEGEN_JAR$SEP$ANTLR_JAR com.jogamp.gluegen.GlueGen -I. -Ecom.jogamp.gluegen.JavaEmitter -Cfunction.cfg function.h
diff -Nru gluegen2-2.3.2/doc/manual/example6/gen.sh gluegen2-2.4.0+dfsg/doc/manual/example6/gen.sh
--- gluegen2-2.3.2/doc/manual/example6/gen.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/doc/manual/example6/gen.sh	2023-02-01 18:52:41.000000000 +0100
@@ -14,4 +14,4 @@
   SEP=:
 fi
 
-java -cp $GLUEGEN_JAR$SEP$ANTLR_JAR com.sun.gluegen.GlueGen -I. -Ecom.sun.gluegen.JavaEmitter -Cfunction.cfg function.h
+java -cp $GLUEGEN_JAR$SEP$ANTLR_JAR com.jogamp.gluegen.GlueGen -I. -Ecom.jogamp.gluegen.JavaEmitter -Cfunction.cfg function.h
diff -Nru gluegen2-2.3.2/doc/manual/example7/gen.sh gluegen2-2.4.0+dfsg/doc/manual/example7/gen.sh
--- gluegen2-2.3.2/doc/manual/example7/gen.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/doc/manual/example7/gen.sh	2023-02-01 18:52:41.000000000 +0100
@@ -14,4 +14,4 @@
   SEP=:
 fi
 
-java -cp $GLUEGEN_JAR$SEP$ANTLR_JAR com.sun.gluegen.GlueGen -I. -Ecom.sun.gluegen.JavaEmitter -Cfunction.cfg function.h
+java -cp $GLUEGEN_JAR$SEP$ANTLR_JAR com.jogamp.gluegen.GlueGen -I. -Ecom.jogamp.gluegen.JavaEmitter -Cfunction.cfg function.h
diff -Nru gluegen2-2.3.2/doc/manual/index.html gluegen2-2.4.0+dfsg/doc/manual/index.html
--- gluegen2-2.3.2/doc/manual/index.html	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/doc/manual/index.html	2023-02-01 18:52:41.000000000 +0100
@@ -2,7 +2,9 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
         <link href="../../../style.css" rel="stylesheet" type="text/css"/>
+        <link href="../../../style-alt1.css" rel="alternate stylesheet" title="default sans-serif font" type="text/css"/>
         <title>Gluegen Manual</title>
     </head>
     <body>
@@ -363,7 +365,7 @@
 
 
                     <dl>
-                        <dt> <strong>CharScanner; panic: ClassNotFoundException: com.sun.gluegen.cgram.CToken</strong></dt>
+                        <dt> <strong>CharScanner; panic: ClassNotFoundException: com.jogamp.gluegen.cgram.CToken</strong></dt>
                         <dd> This occurs because ANTLR was dropped into the Extensions
                             directory of the JRE/JDK. On Windows and Linux, delete any ANTLR
                             jars from jre/lib/ext, and on Mac OS X, delete them from
@@ -397,9 +399,9 @@
                             <em>emitterClassName</em> as the fully-qualified name of the
                             emitter class which will be used by GlueGen to generate the glue
                             code. The emitter class must implement the
-                            <code>com.sun.gluegen.GlueEmitter</code> interface. If this
+                            <code>com.jogamp.gluegen.GlueEmitter</code> interface. If this
                             option is not specified, a
-                            <code>com.sun.gluegen.JavaEmitter</code> will be used by default.
+                            <code>com.jogamp.gluegen.JavaEmitter</code> will be used by default.
                         </li>
                         <li> -C<em>cfgFile</em> adds <em>cfgFile</em> to the list of
                             configuration files used to set up the chosen emitter. This is
@@ -435,7 +437,7 @@
 
                     <pre>
 <taskdef name="gluegen"
-    classname="com.sun.gluegen.ant.GlueGenTask"
+    classname="com.jogamp.gluegen.ant.GlueGenTask"
     classpathref="gluegen.classpath" />
                     </pre>
 
@@ -445,7 +447,7 @@
 <gluegen src="[header to parse]" 
          config="[configuration file]"
          includeRefid="[dirset for include path]"
-         emitter="com.sun.gluegen.JavaEmitter">
+         emitter="com.jogamp.gluegen.JavaEmitter">
     <classpath refid="gluegen.classpath" />
 </gluegen>
                     </pre>
@@ -1679,8 +1681,8 @@
                     </p>
 
                     <pre>
-    java -cp gluegen.jar:antlr.jar com.sun.gluegen.GlueGen \
-        -I. -Ecom.sun.gluegen.JavaEmitter -Cfunction.cfg function.h
+    java -cp gluegen.jar:antlr.jar com.jogamp.gluegen.GlueGen \
+        -I. -Ecom.jogamp.gluegen.JavaEmitter -Cfunction.cfg function.h
                     </pre>
 
                     <p> The resulting Java and native code needs to be compiled, and the
diff -Nru gluegen2-2.3.2/.gitlab-ci.yml gluegen2-2.4.0+dfsg/.gitlab-ci.yml
--- gluegen2-2.3.2/.gitlab-ci.yml	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/.gitlab-ci.yml	2023-02-01 18:52:41.000000000 +0100
@@ -0,0 +1,69 @@
+before_script:
+  - git submodule sync --recursive
+  - git submodule update --init --recursive
+
+stages:
+  - build
+  - package
+  - test
+
+build_amd64-linux_job:
+  tags:
+  - amd64
+  - linux
+  stage: build
+  script:
+  - cd make
+  - ant
+  artifacts:
+    paths:
+    - build/*
+    
+build_arm64-linux_job:
+  tags:
+  - arm64
+  - linux
+  stage: build
+  script:
+  - cd make
+  - ant
+  artifacts:
+    paths:
+    - build/*
+    
+package_job:
+  tags:
+  - amd64
+  - linux
+  stage: package
+  script:
+  - cd build
+  artifacts:
+    paths:
+    - build/*.jar
+
+test_amd64-linux_job:
+  tags:
+  - amd64
+  - linux
+  stage: test
+  script:
+  - cd make
+  - ant junit.run
+  - bash ./scripts/check-junit.sh ../build
+  artifacts:
+    paths:
+    - build/*test-results*.7z
+  
+test_arm64-linux_job:
+  tags:
+  - arm64
+  - linux
+  stage: test
+  script:
+  - cd make
+  - ant junit.run
+  - bash ./scripts/check-junit.sh ../build
+  artifacts:
+    paths:
+    - build/*test-results*.7z
\ No newline at end of file
diff -Nru gluegen2-2.3.2/LICENSE.txt gluegen2-2.4.0+dfsg/LICENSE.txt
--- gluegen2-2.3.2/LICENSE.txt	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/LICENSE.txt	2023-02-01 18:52:41.000000000 +0100
@@ -23,7 +23,7 @@
 L.1) The GlueGen source tree contains code from the JogAmp Community
      which is covered by the Simplified BSD 2-clause license:
 
-   Copyright 2010 JogAmp Community. All rights reserved.
+   Copyright 2010 - 2019 JogAmp Community. All rights reserved.
   
    Redistribution and use in source and binary forms, with or without modification, are
    permitted provided that the following conditions are met:
@@ -140,8 +140,8 @@
 A.1) The GlueGen source tree contains code from The Apache Software Foundation
      which is covered by the Apache License Version 2.0
 
-   Apache Harmony - Open Source Java SE
-   =====================================
+A.1.1) Apache Harmony - Open Source Java SE
+   ===============================================
 
    <http://harmony.apache.org/>
 
@@ -157,6 +157,25 @@
     - src/java/com/jogamp/common/net/Uri.java 
       (derived from java.net.URI.Helper and heavily modified)
 
+A.1.2) Apache Avro - A data serialization system.
+   ===============================================
+
+   <https://avro.apache.org/>
+
+   Copyright 2010-2019 The Apache Software Foundation
+
+   Apache License Version 2.0, January 2004
+   http://www.apache.org/licenses/LICENSE-2.0
+   Or within this repository: doc/licenses/Apache.LICENSE-2.0
+
+   Files:
+    - src/java/com/jogamp/common/util/WeakIdentityHashMap.java
+
+      <https://github.com/apache/avro/blob/master/lang/java/avro/src/main/java/org/apache/avro/util/WeakIdentityHashMap.java>
+      Taken as commit 70260919426f89825ca148f5ee815f3b2cf4764d
+      and using our JogAmp 'New BSD 2-Clause License' since migration.
+
+
 A.2) The GlueGen source tree contains code from Ben Mankin, a.k.a 'Shevek',
      which is covered by the Apache License Version 2.0
 
diff -Nru gluegen2-2.3.2/make/build-test.xml gluegen2-2.4.0+dfsg/make/build-test.xml
--- gluegen2-2.3.2/make/build-test.xml	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/build-test.xml	2023-02-01 18:52:41.000000000 +0100
@@ -125,6 +125,7 @@
         <echo message=" build_t.gen     ${build_t.gen}"/>
 
         <!-- Javac of Annotation Processor dependencies - First -->
+        <!-- This has a hard Java8 target spec test: source, target + bootclasspath -->
         <javac destdir="${build_t.java}" 
                fork="yes"
                includeAntRuntime="false"
@@ -140,6 +141,7 @@
         </javac>
 
         <!-- Annotation Processor - Second -->
+        <!-- This has a hard Java8 target spec test: source, target + bootclasspath -->
         <mkdir dir="${build_t.gen}/classes/com/jogamp/gluegen/test/junit/structgen"/>
         <javac destdir="${build_t.java}" 
                fork="yes"
@@ -159,6 +161,7 @@
         </javac>
 
         <!-- Javac All - Third -->
+        <!-- This has a hard Java8 target spec test: source, target + bootclasspath -->
         <javac destdir="${build_t.java}" 
                fork="yes"
                includeAntRuntime="false"
@@ -174,7 +177,9 @@
             <src path="${test.jcpp.base.dir}"/>
             <src path="${build_t.gen}" />
         </javac>
+    </target>
 
+    <target name="jar.build">
         <jar destfile="${gluegen-test-util.jar}">
           <fileset dir="${build_t.java}">
             <include name="${test.junit.util.rel}/**/*.class"/>
@@ -195,7 +200,7 @@
         </jar>
     </target>
 
-    <target name="android.package" depends="java.generate,java.build,native.build" if="isAndroid">
+    <target name="android.package" depends="java.generate,java.build,native.build,jar.build" if="isAndroid">
         <aapt.signed 
             assetsdir="resources/assets-test"
             jarbuilddir="${build_t}"
@@ -206,8 +211,14 @@
             androidmanifest.path="resources/android/AndroidManifest-Test.xml"
             androidresources.path="resources/android/res"
             version.code="${jogamp.version.int}"
-            version.name="${jogamp.version}"
-          />
+            version.name="${jogamp.version}">
+          <d8-classpaths>
+            <arg line="--classpath ${junit.jar}"/>
+            <arg line="--classpath ${semver.jar}"/>
+            <arg line="--classpath ${gluegen.jar}"/>
+            <arg line="--classpath ${gluegen-test-util.jar}"/>
+          </d8-classpaths>
+        </aapt.signed>
     </target>
 
     <target name="c.configure" depends="gluegen.cpptasks.detect.os,gluegen.cpptasks.setup.compiler">
@@ -215,12 +226,6 @@
         <property name="linker.cfg.id"   value="${linker.cfg.id.base}" />
     </target>
 
-    <!-- FIXME: this is a hack; the cpptask should have an option to change the
-                suffix or at least understand the override from dylib to jnilib -->
-    <target name="rename.dylib" if="isOSX">
-        <move file="${src}" tofile="${dest}" />
-    </target>
-
     <macrodef name="c.build">
       <attribute name="c.compiler.src.files" />
       <attribute name="compiler.cfg.id" />
@@ -240,7 +245,7 @@
 
         <condition property="c.compiler.use-debug"><istrue value="${c.compiler.debug}"/></condition>
 
-        <cc outtype="shared" 
+        <cc outtype="${output.lib.type}" 
             objdir="${build_t.obj}" 
             outfile="${build_t.lib}/@{output.lib.name}"
             optimize="${c.compiler.optimise}" 
@@ -443,8 +448,11 @@
             <jvmarg value="-Drootrel.build=${rootrel.build}"/>
             <!--
             <jvmarg value="-Djogamp.debug.NativeLibrary=true"/>
-            <jvmarg value="-Djogamp.debug.ProcAddressHelper=true"/>
             <jvmarg value="-Djogamp.debug.JNILibLoader=true"/>
+            <jvmarg value="-Djogamp.debug.TempFileCache=true"/>
+            <jvmarg value="-Djogamp.debug.JarUtil=true"/>
+            <jvmarg value="-Djogamp.debug.TempJarCache=true"/>
+            <jvmarg value="-Djogamp.debug.ProcAddressHelper=true"/>
             <jvmarg value="-verbose:jni"/> 
             <jvmarg value="-client"/>
             -->
@@ -595,21 +603,18 @@
 
         <!-- Windows hacks ro make a proper DLL -->
         <linker id="linker.test1.dll.cfg.id" extends="${linker.cfg.id}">
-            <linkerarg value="-Wl,-soname=test1.dll" if="isMingW"/>
-            <linkerarg value="-Wl,--output=test1.dll" if="isMingW"/>
         </linker>
 
         <c.build c.compiler.src.files="junit.test1i.c.src.files"
                  output.lib.name="test1"
                  compiler.cfg.id="${compiler.cfg.id}"
                  linker.cfg.id="linker.test1.dll.cfg.id"/>
+
     </target>
 
     <!-- this is a fixed binding to the test1 implementation -->
     <target name="junit.test1p1.c.build">
         <linker id="linker.test1.fixed.cfg.id" extends="${linker.cfg.id}">
-            <linkerarg value="-Wl,-soname=Bindingtest1p1.dll" if="isMingW"/>
-            <linkerarg value="-Wl,--output=Bindingtest1p1.dll" if="isMingW"/>
             <syslibset dir="${build_t.lib}" libs="test1"/>
         </linker>
 
@@ -625,18 +630,11 @@
                  output.lib.name="Bindingtest1p1"
                  compiler.cfg.id="${compiler.cfg.id}"
                  linker.cfg.id="linker.test1.fixed.cfg.id"/>
-
-        <antcall target="rename.dylib" inheritRefs="true">
-            <param name="src"  value="${build_t.lib}/libBindingtest1p1.dylib" />
-            <param name="dest" value="${build_t.lib}/libBindingtest1p1.jnilib" />
-        </antcall>
     </target>
 
     <!-- this is a dynamic lookup binding to the test1 implementation -->
     <target name="junit.test1p2.c.build">
         <linker id="linker.test1.runtime.cfg.id" extends="${linker.cfg.id}">
-            <linkerarg value="-Wl,-soname=Bindingtest1p2.dll" if="isMingW"/>
-            <linkerarg value="-Wl,--output=Bindingtest1p2.dll" if="isMingW"/>
         </linker>
 
         <patternset id="junit.test1p2.c.src.files">
@@ -651,12 +649,6 @@
                  output.lib.name="Bindingtest1p2"
                  compiler.cfg.id="${compiler.cfg.id}"
                  linker.cfg.id="linker.test1.runtime.cfg.id"/>
-
-        <antcall target="rename.dylib" inheritRefs="true">
-            <param name="src"  value="${build_t.lib}/libBindingtest1p2.dylib" />
-            <param name="dest" value="${build_t.lib}/libBindingtest1p2.jnilib" />
-        </antcall>
-
     </target>
 
     <!-- 
diff -Nru gluegen2-2.3.2/make/build.xml gluegen2-2.4.0+dfsg/make/build.xml
--- gluegen2-2.3.2/make/build.xml	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/build.xml	2023-02-01 18:52:41.000000000 +0100
@@ -33,6 +33,12 @@
       <pathelement location="${antlr.jar}" />
       <pathelement location="${semver.jar}" />
     </path>
+    <path id="javadoc_gluegen.classpath">
+      <pathelement location="${ant.jar}" />
+      <pathelement location="${antlr.jar}" />
+      <pathelement location="${semver.jar}" />
+      <pathelement location="${gluegen.jar}" />
+    </path>
   </target>
 
   <target name="init.android" if="android-jars.available" >
@@ -54,7 +60,8 @@
 
     <!-- property name="javadoc.link" value="http://java.sun.com/j2se/1.4.2/docs/api/" /-->
     <!-- property name="javadoc.link" value="http://download.oracle.com/javase/1.5.0/docs/api/" /-->
-    <property name="javadoc.link" value="http://docs.oracle.com/javase/6/docs/api/" />
+    <!-- property name="javadoc.link" value="http://docs.oracle.com/javase/6/docs/api/" /-->
+    <property name="javadoc.link" value="https://docs.oracle.com/javase/8/docs/api/" />
 
     <!-- The source and build directories. -->
     <property name="project.root"  value=".." />
@@ -87,6 +94,12 @@
 
     <property name="gluegen.version" value="${jogamp.version.base}-b${gluegen.build.number}-${version.timestamp}" />
 
+    <delete includeEmptyDirs="false">
+      <fileset dir="${project.root}" includes="make/GnuCTreeParserTokenTypes.txt make/STDCTokenTypes.txt" />
+    </delete>
+    <echo message="gluegen.build.branch         ${gluegen.build.branch}"/>
+    <echo message="gluegen.build.commit         ${gluegen.build.commit}"/>
+
     <property name="stub.includes.dir" value="stub_includes" /> <!-- NOTE:  this MUST be relative for FileSet -->
 
     <!-- The generated source directories. -->
@@ -96,6 +109,9 @@
 
     <!-- The compiler output directories. -->
     <property name="classes" value="${build}/classes" />
+    <pathconvert targetos="unix" property="classes.unix">
+        <path location="${classes}"/>
+    </pathconvert>
 
     <!-- Call the external config validator script to make sure the config is ok and consistent -->
     <ant antfile="validate-properties.xml" inheritall="true"/>
@@ -128,8 +144,6 @@
     <property name="c.grammar.out.dir" value="${src.generated.java}/com/jogamp/gluegen/cgram" />
     <property name="j.grammar.out.dir" value="${src.generated.java}/com/jogamp/gluegen/jgram" />
 
-    <property name="tools.jar" value="${java.home}/../lib/tools.jar"/>
-
     <property name="archive.name"     value="gluegen-${gluegen.version}-${os.and.arch}" />
     <property name="archive"          value="${build}/${archive.name}" />
 
@@ -276,6 +290,12 @@
       <property name="linker.cfg.id"                        value="linker.cfg.linux.armv6" /> 
     </target>
 
+    <target name="declare.linux.aarch64" if="isLinuxARM64">
+      <echo message="Linux.aarch64" />
+      <property name="compiler.cfg.id"                      value="compiler.cfg.linux.aarch64" />
+      <property name="linker.cfg.id"                        value="linker.cfg.linux.aarch64" />
+    </target>
+
     <target name="declare.linux.alpha" if="isLinuxAlpha">
       <echo message="Linux.alpha" />
       <property name="compiler.cfg.id"                      value="compiler.cfg.linux" /> 
@@ -306,6 +326,18 @@
       <property name="linker.cfg.id"                        value="linker.cfg.linux.ppc" /> 
     </target>
 
+    <target name="declare.linux.ppc64" if="isLinuxPpc64">
+      <echo message="Linux.ppc64" />
+      <property name="compiler.cfg.id"                      value="compiler.cfg.linux" />
+      <property name="linker.cfg.id"                        value="linker.cfg.linux.ppc64" />
+    </target>
+
+    <target name="declare.linux.ppc64le" if="isLinuxPpc64le">
+      <echo message="Linux.ppc64le" />
+      <property name="compiler.cfg.id"                      value="compiler.cfg.linux" />
+      <property name="linker.cfg.id"                        value="linker.cfg.linux.ppc64le" />
+    </target>
+
     <target name="declare.linux.s390" if="isLinuxs390">
       <echo message="Linux.s390" />
       <property name="compiler.cfg.id"                      value="compiler.cfg.linux" /> 
@@ -324,7 +356,7 @@
       <property name="linker.cfg.id"                        value="linker.cfg.linux.sparc" /> 
     </target>
     
-    <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.ppc,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6" if="isLinux" >
+    <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.ppc,declare.linux.ppc64,declare.linux.ppc64le,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6,declare.linux.aarch64" if="isLinux" >
       <property name="c.src.dir.os"                         value="unix" />
     </target>
 
@@ -361,6 +393,20 @@
       <property name="c.src.dir.os"                         value="unix" />
     </target>
     
+    <target name="declare.ios.amd64" if="isIOSAmd64">
+      <echo message="IOSAmd64" />
+      <property name="compiler.cfg.id"                      value="compiler.cfg.ios.amd64" /> 
+      <property name="linker.cfg.id"                        value="linker.cfg.ios.amd64" /> 
+      <property name="c.src.dir.os"                         value="unix" />
+    </target>
+    
+    <target name="declare.ios.arm64" if="isIOSArm64">
+      <echo message="IOSArm64" />
+      <property name="compiler.cfg.id"                      value="compiler.cfg.ios.arm64" /> 
+      <property name="linker.cfg.id"                        value="linker.cfg.ios.arm64" /> 
+      <property name="c.src.dir.os"                         value="unix" />
+    </target>
+    
     <target name="declare.freebsd.amd64" if="isFreeBSDAMD64">
       <echo message="FreeBSDAMD64" />
       <property name="compiler.cfg.id"                      value="compiler.cfg.freebsd" />
@@ -386,58 +432,49 @@
       <property name="c.src.dir.os"                         value="unix" />
     </target>
 
-    <target name="c.configure" depends="gluegen.cpptasks.detect.os,gluegen.cpptasks.setup.compiler,declare.win32,declare.linux,declare.android,declare.solaris,declare.macosx,declare.freebsd,declare.hpux,gluegen.cpptasks.configure.compiler" unless="build.javaonly" />
-
-    <target name="c.rename.lib.mingw" if="isMingW">
-      <!-- FIXME: this is a hack; the cpptask should have an option to change the
-           suffix or at least understand the override from .so to .dll -->
-      <move file="${build}/obj/libgluegen-rt.so" tofile="${build}/obj/gluegen-rt.dll" />
-    </target>
-
-    <target name="c.rename.lib.macosx" if="isOSX">
-      <move file="${build}/obj/libgluegen-rt.dylib" tofile="${build}/obj/libgluegen-rt.jnilib" />
-      <copy file="${build}/obj/libgluegen-rt.jnilib" tofile="${build}/obj/libgluegen-rt.so" />
-    </target>
+    <target name="c.configure" depends="gluegen.cpptasks.detect.os,gluegen.cpptasks.setup.compiler,declare.win32,declare.linux,declare.android,declare.solaris,declare.macosx,declare.ios.amd64,declare.ios.arm64,declare.freebsd,declare.hpux,gluegen.cpptasks.configure.compiler" />
 
     <target name="c.manifest" if="isVC8Family">
       <!-- exec mt, the Microsoft Manifest Tool, to include DLL manifests in order to resolve the location of msvcr80.dll -->
-      <msvc.manifest objdir="${build}/obj" dllname="gluegen-rt" />
+      <msvc.manifest objdir="${build}/obj" dllname="gluegen_rt" />
     </target>
 
-    <target name="gluegen.build.c" depends="init, c.configure" unless="build.javaonly" >
+    <target name="gluegen.build.native" depends="init, c.configure" >
       <property name="c.compiler.src.files.common" value="src/native/common/*.c" />
       <property name="c.compiler.src.files.os" value="src/native/${c.src.dir.os}/*.c" />
 
-      <property name="output.lib.name" value="gluegen-rt" />
-      <condition property="output.lib.name.os" value="lib${output.lib.name}.so"><isset property="isUnix"/></condition>
-      <condition property="output.lib.name.os" value="${output.lib.name}.dll"><isset property="isWindows"/></condition>
-      <condition property="output.lib.name.os" value="lib${output.lib.name}.jnilib"><isset property="isOSX"/></condition>
+      <property name="output.lib.name" value="gluegen_rt" /> <!-- dash replaced by underscore to allow static linkage via JEP 178 -->
+      <property name="output.lib.name.os" value="${native.library.prefix}${output.lib.name}.${native.library.suffix}" />
 
-      <uptodate property="gluegen.build.skip.c">
+      <uptodate property="gluegen.build.skip.native">
         <srcfiles dir= "${project.root}"  includes="${c.compiler.src.files.os}"/>
         <srcfiles dir= "${project.root}"  includes="${c.compiler.src.files.common}"/>
         <mapper type="merge" to="${gluegen.lib.dir}/${output.lib.name.os}"/>
       </uptodate>
 
+      <condition property="gluegen.package.native.done" value="true">
+        <isset property="gluegen.build.skip.native"/>
+      </condition>
       <antcall target="gluegen.build.c.impl" inheritAll="true" inheritRefs="true" />
     </target>
 
-    <target name="gluegen.build.c.impl" depends="init, c.configure" unless="gluegen.build.skip.c">
+    <target name="gluegen.build.c.impl" depends="init, c.configure" unless="gluegen.build.skip.native">
+      <echo message="clearing gluegen.build.shasum.done (2) - was ${gluegen.build.shasum.done}"/>
+      <var name="gluegen.build.shasum.done" unset="true"/>
+      <var name="gluegen.package.native.done" unset="true"/>
       <fail message="Requires '${compiler.cfg.id}'"      unless="compiler.cfg.id"/>
       <fail message="Requires '${linker.cfg.id}'"        unless="linker.cfg.id"/>
 
-      <javah destdir="${src.generated.c}"         classpath="${classes}" class="com.jogamp.common.os.Platform, com.jogamp.common.nio.PointerBuffer, jogamp.common.jvm.JVMUtil, com.jogamp.common.util.JarUtil, jogamp.common.os.MachineDataInfoRuntime" />
-      <javah destdir="${src.generated.c}/Unix"    classpath="${classes}" class="jogamp.common.os.UnixDynamicLinkerImpl" />
-      <javah destdir="${src.generated.c}/Windows" classpath="${classes}" class="jogamp.common.os.WindowsDynamicLinkerImpl"/>
-
-      <echo message="Output lib name = ${output.lib.name} -> ${output.lib.name.os}" />
+      <echo message="Output lib name = ${output.lib.name} -> ${output.lib.name.os} [${output.lib.type}]" />
 
       <mkdir dir="${gluegen.lib.dir}"/>
 
       <echo message="Compiling ${c.compiler.src.files.os} ${c.compiler.src.files.common}" />
       <echo message="user.dir=${user.dir}" />
 
-      <cc outtype="shared" 
+      <cc outtype="${output.lib.type}" 
+          usehighleveltool="true"
+          writesoname="true"
           objdir="${gluegen.lib.dir}"
           outfile="${gluegen.lib.dir}/${output.lib.name}"
           optimize="${c.compiler.optimise}" 
@@ -469,26 +506,50 @@
           <includepath path="${src.generated.c}" />
           <includepath path="${src.generated.c}/Unix" if="isUnix"/>
           <includepath path="${src.generated.c}/Unix" if="isOSX"/>
+          <includepath path="${src.generated.c}/Unix" if="isIOS"/>
           <includepath path="${src.generated.c}/Windows" if="isWindows"/>
         </compiler>
 
         <linker extends="${linker.cfg.id}" />
+
       </cc>
 
-      <antcall target="c.rename.lib.mingw" inheritRefs="true" />
-      <antcall target="c.rename.lib.macosx" inheritRefs="true" />
+      <gluegen.make.libsymbols builddir="${build}" 
+         nativelib="${gluegen.lib.dir}/${output.lib.name.os}" 
+         symbolsfile="${gluegen.lib.dir}/${native.library.prefix}${output.lib.name}.symbols" />
 
       <antcall target="gluegen.cpptasks.striplibs" inheritRefs="true">
           <param name="libdir" value="${gluegen.lib.dir}"/>
       </antcall>
 
       <antcall target="c.manifest" inheritRefs="true" />
+    </target>  
+
+    <target name="gluegen.package.native" depends="init, c.configure" unless="gluegen.package.native.done" >
+      <property name="gluegen.package.native.done" value="true" />
+      <copy file="Manifest-rt-natives"
+            tofile="${build}/Manifest-rt-natives.temp"
+            overwrite="true">
+          <filterset>
+              <filter token="VERSION" value="${jogamp.version}"/>
+              <filter token="BUILD_VERSION" value="${gluegen.version}"/>
+              <filter token="SCM_BRANCH" value="${gluegen.build.branch}"/>
+              <filter token="SCM_COMMIT" value="${gluegen.build.commit}"/>
+              <filter token="SHA_SOURCES" value="${gluegen.build.sha.sources}"/>
+              <filter token="SHA_CLASSES" value="${gluegen.build.sha.classes}"/>
+              <filter token="SHA_CLASSES_THIS" value="0"/>
+              <filter token="SHA_NATIVES" value="${gluegen.build.sha.natives}"/>
+              <filter token="SHA_NATIVES_THIS" value="${gluegen.build.sha.natives}"/>
+              <filter token="BASEVERSION" value="${jogamp.version.base}"/>
+              <filter token="JAR_CODEBASE_TAG" value="${jogamp.jar.codebase}"/>
+          </filterset>
+      </copy>
 
       <native.tag.jar objdir="${build}/obj"
                       nativejarfile="${build}/gluegen-rt-natives-${os.and.arch}.jar"
                       manifestfile="${build}/Manifest-rt-natives.temp" 
                       module="common"
-                      includelibs="*gluegen-rt.${native.library.suffix}" />
+                      includelibs="*${output.lib.name}.${native.library.suffix}" />
 
       <!-- Produce duplicates for different configurations, since non-native-jar aliasing (Bug 1023/Bug 1024) -->
       <copy file="${build}/gluegen-rt-natives-${os.and.arch}.jar" tofile="${build}/gluegen-rt-android-natives-${os.and.arch}.jar"/>
@@ -702,13 +763,15 @@
     </antcall>
 
     <!-- Build GlueGen using the generated Java files along with the
-      - original source. -->
+         original source in multiple stages below. -->
 
-    <!-- Compile gluegen-rt first -->
+    <!-- Compile gluegen-rt first including generation of native headers -->
+    <!-- This has a hard Java8 target spec requirement: source, target + bootclasspath -->
     <javac destdir="${classes}"
            includeAntRuntime="false"
            includes="${gluegen-rt.classes} ${jogamp.common.classes}"
            excludes="${gluegen.excludes.all} ${java.part.android}"
+           nativeheaderdir="${src.generated.c}"
            memoryMaximumSize="${javac.memorymax}"
            encoding="UTF-8"
            source="${target.sourcelevel}" 
@@ -718,8 +781,13 @@
       <src path="${src.java}" />
       <src path="${src.generated.java}" />
       <classpath refid="cc_gluegen.classpath" />
+      <!-- compilerarg line="release ${target.releaselevel}"/ -->
     </javac>
 
+    <!-- move platform-specific native headers into the right directories -->
+    <move file="${src.generated.c}/jogamp_common_os_UnixDynamicLinkerImpl.h" todir="${src.generated.c}/Unix" failonerror="false" quiet="true"/>
+    <move file="${src.generated.c}/jogamp_common_os_WindowsDynamicLinkerImpl.h" todir="${src.generated.c}/Windows" failonerror="false" quiet="true"/>
+
     <!-- make non-java code available in classpath -->
     <copy todir="${classes}">
         <fileset dir="${src.java}"
@@ -727,28 +795,37 @@
                  excludes="**/*.java"/>
     </copy>
 
-    <!-- Compile gluegen (compile time).
-
-         Uses host.rt.jar, since we require 'com.sun.tools.doclets.Taglet',
-         w/o it breaks build on OSX w/ Java6 compiler. 
-         Surprisingly it works on other platforms, which seems to pick classes
-         outside of the 'bootclasspath'.
-      -->
+    <!-- Compile gluegen (compile time).  -->
+    <!-- This has a soft Java8 bytecote target only (Using some build time APIs): target -->
     <javac destdir="${classes}"
            includeAntRuntime="true"
            excludes="${gluegen.excludes.all} ${gluegen-rt.classes} ${java.part.android}"
            memoryMaximumSize="${javac.memorymax}"
            encoding="UTF-8"
-           source="${target.sourcelevel}"
+           source="${target.sourcelevel}" 
            target="${target.targetlevel}" 
-           bootclasspath="${host.rt.jar}"
            debug="${javacdebug}" debuglevel="${javacdebuglevel}">
       <src path="${src.jcpp}" />
       <src path="${src.java}" />
       <src path="${src.generated.java}" />
       <classpath refid="cc_gluegen.classpath" />
     </javac>
+  </target>
 
+  <target name="gluegen.package.javase">
+    <java classname="com.jogamp.common.util.SHASum" logError="true" failonerror="true" fork="true" newenvironment="true"
+          classpath="${classes}"
+          outputproperty="gluegen.build.sha.classes.gluegen">
+        <sysproperty key="java.library.path" value="${gluegen.lib.dir}"/>
+
+        <arg value="--include"/>
+        <arg value="${classes.unix}/.*\.class"/>
+
+        <arg value="--exclude"/>
+        <arg value="${classes.unix}/jogamp/android/launcher"/>
+
+        <arg value="${classes.unix}"/>
+    </java>
     <copy file="Manifest"
           tofile="${build}/Manifest.temp"
           overwrite="true">
@@ -757,6 +834,11 @@
             <filter token="BUILD_VERSION" value="${gluegen.version}"/>
             <filter token="SCM_BRANCH" value="${gluegen.build.branch}"/>
             <filter token="SCM_COMMIT" value="${gluegen.build.commit}"/>
+            <filter token="SHA_SOURCES" value="${gluegen.build.sha.sources}"/>
+            <filter token="SHA_CLASSES" value="${gluegen.build.sha.classes}"/>
+            <filter token="SHA_CLASSES_THIS" value="${gluegen.build.sha.classes.gluegen}"/>
+            <filter token="SHA_NATIVES" value="${gluegen.build.sha.natives}"/>
+            <filter token="SHA_NATIVES_THIS" value="0"/>
             <filter token="BASEVERSION" value="${jogamp.version.base}"/>
             <filter token="JAR_CODEBASE_TAG" value="${jogamp.jar.codebase}"/>
         </filterset>
@@ -776,6 +858,27 @@
       </fileset>
     </jar>
 
+    <java classname="com.jogamp.common.util.SHASum" logError="true" failonerror="true" fork="true" newenvironment="true"
+          classpath="${classes}"
+          outputproperty="gluegen.build.sha.classes.gluegen-rt">
+        <sysproperty key="java.library.path" value="${gluegen.lib.dir}"/>
+
+        <arg value="--include"/>
+        <arg value="${classes.unix}/com/jogamp/gluegen/runtime/.*\.class" />
+        <arg value="--include"/>
+        <arg value="${classes.unix}/com/jogamp/common/.*" />
+        <arg value="--include"/>
+        <arg value="${classes.unix}/jogamp/common/.*" />
+
+        <arg value="--exclude"/>
+        <arg value="${classes.unix}/jogamp/android/launcher"/>
+        <arg value="--exclude"/>
+        <arg value="${classes.unix}/jogamp/common/os/android" />
+        <arg value="--exclude"/>
+        <arg value="${classes.unix}/com/jogamp/gluegen/jcpp" />
+
+        <arg value="${classes.unix}"/>
+    </java>
     <copy file="Manifest-rt"
           tofile="${build}/Manifest-rt.temp"
           overwrite="true">
@@ -784,93 +887,99 @@
             <filter token="BUILD_VERSION" value="${gluegen.version}"/>
             <filter token="SCM_BRANCH" value="${gluegen.build.branch}"/>
             <filter token="SCM_COMMIT" value="${gluegen.build.commit}"/>
+            <filter token="SHA_SOURCES" value="${gluegen.build.sha.sources}"/>
+            <filter token="SHA_CLASSES" value="${gluegen.build.sha.classes}"/>
+            <filter token="SHA_CLASSES_THIS" value="${gluegen.build.sha.classes.gluegen-rt}"/>
+            <filter token="SHA_NATIVES" value="${gluegen.build.sha.natives}"/>
+            <filter token="SHA_NATIVES_THIS" value="0"/>
             <filter token="BASEVERSION" value="${jogamp.version.base}"/>
             <filter token="JAR_CODEBASE_TAG" value="${jogamp.jar.codebase}"/>
         </filterset>
     </copy>
 
-    <copy file="jogamp-fat.mf"
-          tofile="${build}/jogamp-fat.mf"
-          overwrite="true">
-        <filterset>
-            <filter token="VERSION" value="${jogamp.version}"/>
-            <filter token="BUILD_VERSION" value="${gluegen.version}"/>
-            <filter token="SCM_BRANCH" value="${gluegen.build.branch}"/>
-            <filter token="SCM_COMMIT" value="${gluegen.build.commit}"/>
-            <filter token="BASEVERSION" value="${jogamp.version.base}"/>
-            <filter token="JAR_CODEBASE_TAG" value="${jogamp.jar.codebase}"/>
-        </filterset>
-    </copy>
+    <!-- Build gluegen-rt.jar. -->
+    <jar destfile="${build}/gluegen-rt.jar" manifest="${build}/Manifest-rt.temp" filesonly="true">
+      <fileset dir="${classes}">
+        <include name="com/jogamp/gluegen/runtime/*.class" />
+        <include name="com/jogamp/common/**" />
+        <include name="jogamp/common/**" />
+        <exclude name="${jogamp-android-launcher.classes}" />
+        <exclude name="${java.part.android}" />
+        <exclude name="${java.part.jcpp}" />
+      </fileset>
+      <fileset dir="resources/assets">
+        <include name="**" />
+      </fileset>
+    </jar>
 
-    <copy file="jogamp-fat-test.mf"
-          tofile="${build}/jogamp-fat-test.mf"
+    <!-- copy file="Manifest-rt-alt"
+          tofile="${build}/Manifest-rt-alt.temp"
           overwrite="true">
         <filterset>
             <filter token="VERSION" value="${jogamp.version}"/>
             <filter token="BUILD_VERSION" value="${gluegen.version}"/>
             <filter token="SCM_BRANCH" value="${gluegen.build.branch}"/>
             <filter token="SCM_COMMIT" value="${gluegen.build.commit}"/>
+            <filter token="SHA_SOURCES" value="${gluegen.build.sha.sources}"/>
+            <filter token="SHA_CLASSES" value="${gluegen.build.sha.classes}"/>
+            <filter token="SHA_CLASSES_THIS" value="${gluegen.build.sha.classes.gluegen-rt-alt}"/>
+            <filter token="SHA_NATIVES" value="${gluegen.build.sha.natives}"/>
+            <filter token="SHA_NATIVES_THIS" value="0"/>
             <filter token="BASEVERSION" value="${jogamp.version.base}"/>
             <filter token="JAR_CODEBASE_TAG" value="${jogamp.jar.codebase}"/>
         </filterset>
-    </copy>
+    </copy -->
+    <!-- Build gluegen-rt-alt.jar. -->
+    <!-- jar destfile="${build}/gluegen-rt-alt.jar" manifest="${build}/Manifest-rt-alt.temp">
+      <fileset dir="${classes}">
+        <include name="com/jogamp/gluegen/runtime/*.class" />
+        <include name="com/jogamp/common/**" />
+        <include name="jogamp/common/**" />
+        <exclude name="${jogamp-android-launcher.classes}" />
+        <exclude name="${java.part.android}" />
+        <exclude name="${java.part.jcpp}" />
+      </fileset>
+      <fileset dir="resources/assets">
+        <include name="**" />
+      </fileset>
+    </jar -->
 
-    <!-- copy file="Manifest-rt-alt"
-          tofile="${build}/Manifest-rt-alt.temp"
+    <copy file="jogamp-fat.mf"
+          tofile="${build}/jogamp-fat.mf"
           overwrite="true">
         <filterset>
             <filter token="VERSION" value="${jogamp.version}"/>
             <filter token="BUILD_VERSION" value="${gluegen.version}"/>
             <filter token="SCM_BRANCH" value="${gluegen.build.branch}"/>
             <filter token="SCM_COMMIT" value="${gluegen.build.commit}"/>
+            <filter token="SHA_SOURCES" value="${gluegen.build.sha.sources}"/>
+            <filter token="SHA_CLASSES" value="${gluegen.build.sha.classes}"/>
+            <filter token="SHA_CLASSES_THIS" value="${gluegen.build.sha.classes}"/>
+            <filter token="SHA_NATIVES" value="${gluegen.build.sha.natives}"/>
+            <filter token="SHA_NATIVES_THIS" value="${gluegen.build.sha.natives}"/>
             <filter token="BASEVERSION" value="${jogamp.version.base}"/>
             <filter token="JAR_CODEBASE_TAG" value="${jogamp.jar.codebase}"/>
         </filterset>
-    </copy -->
+    </copy>
 
-    <copy file="Manifest-rt-natives"
-          tofile="${build}/Manifest-rt-natives.temp"
+    <copy file="jogamp-fat-test.mf"
+          tofile="${build}/jogamp-fat-test.mf"
           overwrite="true">
         <filterset>
             <filter token="VERSION" value="${jogamp.version}"/>
             <filter token="BUILD_VERSION" value="${gluegen.version}"/>
             <filter token="SCM_BRANCH" value="${gluegen.build.branch}"/>
             <filter token="SCM_COMMIT" value="${gluegen.build.commit}"/>
+            <filter token="SHA_SOURCES" value="${gluegen.build.sha.sources}"/>
+            <filter token="SHA_CLASSES" value="${gluegen.build.sha.classes}"/>
+            <filter token="SHA_CLASSES_THIS" value="${gluegen.build.sha.classes}"/>
+            <filter token="SHA_NATIVES" value="${gluegen.build.sha.natives}"/>
+            <filter token="SHA_NATIVES_THIS" value="${gluegen.build.sha.natives}"/>
             <filter token="BASEVERSION" value="${jogamp.version.base}"/>
             <filter token="JAR_CODEBASE_TAG" value="${jogamp.jar.codebase}"/>
         </filterset>
     </copy>
 
-    <!-- Build gluegen-rt.jar. -->
-    <jar destfile="${build}/gluegen-rt.jar" manifest="${build}/Manifest-rt.temp" filesonly="true">
-      <fileset dir="${classes}">
-        <include name="com/jogamp/gluegen/runtime/*.class" />
-        <include name="com/jogamp/common/**" />
-        <include name="jogamp/common/**" />
-        <exclude name="${jogamp-android-launcher.classes}" />
-        <exclude name="${java.part.android}" />
-        <exclude name="${java.part.jcpp}" />
-      </fileset>
-      <fileset dir="resources/assets">
-        <include name="**" />
-      </fileset>
-    </jar>
-
-    <!-- Build gluegen-rt-alt.jar. -->
-    <!-- jar destfile="${build}/gluegen-rt-alt.jar" manifest="${build}/Manifest-rt-alt.temp">
-      <fileset dir="${classes}">
-        <include name="com/jogamp/gluegen/runtime/*.class" />
-        <include name="com/jogamp/common/**" />
-        <include name="jogamp/common/**" />
-        <exclude name="${jogamp-android-launcher.classes}" />
-        <exclude name="${java.part.android}" />
-        <exclude name="${java.part.jcpp}" />
-      </fileset>
-      <fileset dir="resources/assets">
-        <include name="**" />
-      </fileset>
-    </jar -->
-
     <!-- Copy antlr.jar into build directory for convenience so
          gluegen.jar can be run via "java -jar". antlr.jar is
          referenced via a Class-Path entry in the Manifest of
@@ -890,6 +999,7 @@
 
   <target name="gluegen.build.android" if="android-jars.available">
     <!--compile gluegen-rt-android last-->
+    <!-- This has a hard Java8 target spec requirement: source, target + bootclasspath -->
     <javac destdir="${classes}"
            includeAntRuntime="false"
            includes="${gluegen-rt.classes} ${jogamp.common.classes}"
@@ -904,7 +1014,28 @@
       <src path="${src.generated.java}" />
       <classpath refid="cc_gluegen_android.classpath" />
     </javac>
+  </target>
+  
+  <target name="gluegen.package.android" if="android-jars.available">
+    <java classname="com.jogamp.common.util.SHASum" logError="true" failonerror="true" fork="true" newenvironment="true"
+          classpath="${classes}"
+          outputproperty="gluegen.build.sha.classes.gluegen-rt-android">
+        <sysproperty key="java.library.path" value="${gluegen.lib.dir}"/>
+
+        <arg value="--include"/>
+        <arg value="${classes.unix}/com/jogamp/gluegen/runtime/.*\.class" />
+        <arg value="--include"/>
+        <arg value="${classes.unix}/com/jogamp/common/.*" />
+        <arg value="--include"/>
+        <arg value="${classes.unix}/jogamp/common/.*" />
+
+        <arg value="--exclude"/>
+        <arg value="${classes.unix}/jogamp/android/launcher"/>
+        <arg value="--exclude"/>
+        <arg value="${classes.unix}/com/jogamp/gluegen/jcpp" />
 
+        <arg value="${classes.unix}"/>
+    </java>
     <copy file="Manifest-rt-android"
           tofile="${build}/Manifest-rt-android.temp"
           overwrite="true">
@@ -913,6 +1044,11 @@
             <filter token="BUILD_VERSION" value="${gluegen.version}"/>
             <filter token="SCM_BRANCH" value="${gluegen.build.branch}"/>
             <filter token="SCM_COMMIT" value="${gluegen.build.commit}"/>
+            <filter token="SHA_SOURCES" value="${gluegen.build.sha.sources}"/>
+            <filter token="SHA_CLASSES" value="${gluegen.build.sha.classes}"/>
+            <filter token="SHA_CLASSES_THIS" value="${gluegen.build.sha.classes.gluegen-rt-android}"/>
+            <filter token="SHA_NATIVES" value="${gluegen.build.sha.natives}"/>
+            <filter token="SHA_NATIVES_THIS" value="0"/>
             <filter token="BASEVERSION" value="${jogamp.version.base}"/>
             <filter token="JAR_CODEBASE_TAG" value="${jogamp.jar.codebase}"/>
         </filterset>
@@ -926,6 +1062,7 @@
         <include name="jogamp/common/**" />
         <include name="${java.part.android}" />
         <exclude name="${jogamp-android-launcher.classes}" />
+        <exclude name="${java.part.jcpp}" />
       </fileset>
       <fileset dir="resources/assets">
         <include name="**" />
@@ -933,13 +1070,62 @@
     </jar>
   </target>
   
-  <target name="gluegen.build.java" depends="gluegen.cpptasks.detect.os,gluegen.build.check.java" unless="gluegen.build.skip.java">
+  <target name="gluegen.build.java" depends="gluegen.build.java.impl">
+      <condition property="gluegen.package.java.done" value="true">
+        <isset property="gluegen.build.skip.java"/>
+      </condition>
+  </target>
+  <target name="gluegen.build.java.impl" depends="gluegen.cpptasks.detect.os,gluegen.build.check.java" unless="gluegen.build.skip.java">
+    <echo message="clearing gluegen.build.shasum.done (1) - was ${gluegen.build.shasum.done}"/>
+    <var name="gluegen.build.shasum.done" unset="true"/>
+    <var name="gluegen.package.java.done" unset="true"/>
     <antcall target="generate-hash-maps"        inheritRefs="true"/>
     <antcall target="generate-primitive-stacks" inheritRefs="true"/>
     <antcall target="gluegen.build.javase"      inheritRefs="true"/>
     <antcall target="gluegen.build.android"     inheritRefs="true"/>
   </target>
 
+  <target name="gluegen.build.shasum" depends="gluegen.cpptasks.detect.os" unless="gluegen.build.shasum.done">
+    <property name="gluegen.build.shasum.done" value="true"/>
+    <java classname="com.jogamp.common.util.SHASum" logError="true" failonerror="true" fork="true" newenvironment="true"
+          classpath="${classes}"
+          outputproperty="gluegen.build.sha.sources">
+        <sysproperty key="java.library.path" value="${gluegen.lib.dir}"/>
+        <!-- jvmarg value="-Djogamp.debug.SHASum"/ -->
+
+        <arg value="--exclude"/>
+        <arg value=".*\.log"/>
+
+        <arg value="--exclude"/>
+        <arg value="../make/lib/toolchain"/>
+
+        <arg value="../src"/>
+        <arg value="../jcpp/src"/>
+        <arg value="../make"/>
+    </java>
+    <java classname="com.jogamp.common.util.SHASum" logError="true" failonerror="true" fork="true" newenvironment="true"
+          classpath="${classes}"
+          outputproperty="gluegen.build.sha.classes">
+        <sysproperty key="java.library.path" value="${gluegen.lib.dir}"/>
+        <arg value="${classes.unix}"/>
+    </java>
+    <java classname="com.jogamp.common.util.SHASum" logError="true" failonerror="true" fork="true" newenvironment="true"
+          classpath="${classes}"
+          outputproperty="gluegen.build.sha.natives">
+        <sysproperty key="java.library.path" value="${gluegen.lib.dir}"/>
+        <arg value="${gluegen.lib.dir}/${output.lib.name.os}"/>
+    </java>
+    <echo message="gluegen.build.sha.sources ${gluegen.build.sha.sources}"/>
+    <echo message="gluegen.build.sha.classes ${gluegen.build.sha.classes}"/>
+    <echo message="gluegen.build.sha.natives ${gluegen.build.sha.natives}"/>
+  </target>
+
+  <target name="gluegen.package.java" depends="gluegen.cpptasks.detect.os" unless="gluegen.package.java.done">
+    <property name="gluegen.package.java.done" value="true"/>
+    <antcall target="gluegen.package.javase"      inheritRefs="true"/>
+    <antcall target="gluegen.package.android"     inheritRefs="true"/>
+  </target>
+
   <target name="gluegen.build.check.android-launcher" depends="init">
       <uptodate property="gluegen.build.skip.android-launcher">
         <srcfiles dir= "."            includes="*.xml"/>
@@ -950,6 +1136,7 @@
   </target>
 
   <target name="android-launcher.build" depends="gluegen.cpptasks.detect.os,gluegen.build.check.android-launcher" if="android-jars.available" unless="gluegen.build.skip.android-launcher">
+    <!-- This has a hard Java8 target spec requirement: source, target + bootclasspath -->
     <javac destdir="${classes}"
            includeAntRuntime="false"
            includes="${jogamp-android-launcher.classes}"
@@ -963,7 +1150,19 @@
       <src path="${src.java}" />
       <classpath refid="android.classpath" />
     </javac>
+  </target>
 
+  <target name="android-launcher.package" depends="android-launcher.build" if="isAndroid" unless="gluegen.build.skip.android-launcher">
+    <java classname="com.jogamp.common.util.SHASum" logError="true" failonerror="true" fork="true" newenvironment="true"
+          classpath="${classes}"
+          outputproperty="gluegen.build.sha.classes.jogamp-android-launcher">
+        <sysproperty key="java.library.path" value="${gluegen.lib.dir}"/>
+
+        <arg value="--include"/>
+        <arg value="${classes.unix}/jogamp/android/launcher/.*"/>
+
+        <arg value="${classes.unix}/jogamp/android/launcher/"/>
+    </java>
     <copy file="Manifest-android-launcher"
           tofile="${build}/Manifest-android-launcher.temp"
           overwrite="true">
@@ -972,6 +1171,11 @@
             <filter token="BUILD_VERSION" value="${gluegen.version}"/>
             <filter token="SCM_BRANCH" value="${gluegen.build.branch}"/>
             <filter token="SCM_COMMIT" value="${gluegen.build.commit}"/>
+            <filter token="SHA_SOURCES" value="${gluegen.build.sha.sources}"/>
+            <filter token="SHA_CLASSES" value="${gluegen.build.sha.classes}"/>
+            <filter token="SHA_CLASSES_THIS" value="${gluegen.build.sha.classes.jogamp-android-launcher}"/>
+            <filter token="SHA_NATIVES" value="${gluegen.build.sha.natives}"/>
+            <filter token="SHA_NATIVES_THIS" value="0"/>
             <filter token="BASEVERSION" value="${jogamp.version.base}"/>
             <filter token="JAR_CODEBASE_TAG" value="${jogamp.jar.codebase}"/>
         </filterset>
@@ -982,9 +1186,6 @@
         <include name="${jogamp-android-launcher.classes}" />
       </fileset>
     </jar>
-  </target>
-
-  <target name="android-launcher.package" depends="android-launcher.build" if="isAndroid" unless="gluegen.build.skip.android-launcher">
     <aapt.signed 
         assetsdir="resources/assets-launcher"
         jarbuilddir="${build}"
@@ -1015,7 +1216,7 @@
         jarbuilddir="${build}"
         jarbasename="gluegen-rt-android"
         nativebuilddir="${gluegen.lib.dir}"
-        nativebasename="gluegen-rt"
+        nativebasename="${output.lib.name}"
         android.abi="${android.abi}"
         androidmanifest.path="resources/android/AndroidManifest-Runtime.xml"
         androidresources.path="resources/android/res"
@@ -1026,17 +1227,32 @@
   </target>
 
   <target name="base.compile" description="Base compile ensuring valid build results w/o tampering the artifacts.properties" 
-                              depends="init, android-launcher.package, gluegen.build.java, gluegen.build.c" />
+                              depends="clean-temp, android-launcher.build, gluegen.build.java, gluegen.build.native, gluegen.build.shasum, gluegen.package.java, gluegen.package.native, android-launcher.package" />
+
+  <target name="all.no_junit" description="Release build" depends="base.compile, tag.build, android.package, developer-zip-archive" >
+      <antcall target="clean-temp" inheritAll="true" inheritRefs="true" />
+  </target>
+  <target name="all" description="Release build" depends="base.compile, tag.build, junit.compile, android.package, developer-zip-archive" >
+      <antcall target="clean-temp" inheritAll="true" inheritRefs="true" />
+  </target>
 
-  <target name="all.no_junit" description="Release build" depends="init, base.compile, tag.build, android.package, developer-zip-archive" />
-  <target name="all" description="Release build" depends="init, base.compile, tag.build, junit.compile, android.package, developer-zip-archive" />
+  <target name="all.debug" description="Debug build" depends="init.debug, base.compile, tag.build, junit.compile, developer-zip-archive" >
+      <antcall target="clean-temp" inheritAll="true" inheritRefs="true" />
+  </target>
 
-  <target name="all.debug" description="Debug build" depends="init.debug, base.compile, tag.build, junit.compile, developer-zip-archive" />
+  <target name="all.ide" description="Debug IDE build including all junit tests, but don't tag the build or create archives" depends="init.debug, base.compile, tag.build, junit.compile" >
+      <antcall target="clean-temp" inheritAll="true" inheritRefs="true" />
+  </target>
 
-  <target name="all.ide" description="Debug IDE build including all junit tests, but don't tag the build or create archives" depends="init.debug, base.compile, tag.build, junit.compile" />
+  <target name="clean-temp" depends="init">
+    <delete includeEmptyDirs="true" failonerror="false">
+      <fileset dir="${project.root}/build-temp" />
+      <fileset dir="${project.root}" includes="make/GnuCTreeParserTokenTypes.txt make/STDCTokenTypes.txt" />
+    </delete>
+  </target>    
 
-  <target name="clean" depends="init">
-    <delete includeEmptyDirs="true">
+  <target name="clean" depends="clean-temp">
+    <delete includeEmptyDirs="true" failonerror="false">
       <fileset dir="${build}" />
     </delete>
   </target>    
@@ -1047,6 +1263,9 @@
     <echo message='gluegen.build.id=${gluegen.build.id}${line.separator}'         file="${build}/artifact.properties" append="true"/>
     <echo message='gluegen.build.branch=${gluegen.build.branch}${line.separator}' file="${build}/artifact.properties" append="true"/>
     <echo message='gluegen.build.commit=${gluegen.build.commit}${line.separator}' file="${build}/artifact.properties" append="true"/>
+    <echo message='gluegen.build.sha.sources=${gluegen.build.sha.sources}${line.separator}' file="${build}/artifact.properties" append="true"/>
+    <echo message='gluegen.build.sha.classes=${gluegen.build.sha.classes}${line.separator}' file="${build}/artifact.properties" append="true"/>
+    <echo message='gluegen.build.sha.natives=${gluegen.build.sha.natives}${line.separator}' file="${build}/artifact.properties" append="true"/>
   </target>
 
   <target name="junit.compile" depends="init">
@@ -1069,9 +1288,12 @@
              source="${target.sourcelevel}"
              maxmemory="${javac.memorymax}"
              stylesheetfile="doc/javadoc/stylesheet.css">
-        <classpath path="${classes}"/>
+        <classpath refid="javadoc_gluegen.classpath" />
         <link offline="true" href="${javadoc.link}" packagelistLoc="142-packages" />
+        <arg value="--frames"/>
         <arg value="${javadoc.xarg1}"/>
+        <arg value="-html5"/>
+        <arg value="--show-packages=all"/>
     </javadoc>
     <copy todir="${javadoc.gluegen.path}/resources" overwrite="true">
         <fileset dir="doc/javadoc/resources" includes="*" />
Binary files /tmp/wAOEMGTIxb/gluegen2-2.3.2/make/doc/javadoc/resources/glass.png and /tmp/0VFCL5Le0L/gluegen2-2.4.0+dfsg/make/doc/javadoc/resources/glass.png differ
Binary files /tmp/wAOEMGTIxb/gluegen2-2.3.2/make/doc/javadoc/resources/x.png and /tmp/0VFCL5Le0L/gluegen2-2.4.0+dfsg/make/doc/javadoc/resources/x.png differ
diff -Nru gluegen2-2.3.2/make/doc/javadoc/stylesheet.css gluegen2-2.4.0+dfsg/make/doc/javadoc/stylesheet.css
--- gluegen2-2.3.2/make/doc/javadoc/stylesheet.css	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/doc/javadoc/stylesheet.css	2023-02-01 18:52:41.000000000 +0100
@@ -1,88 +1,116 @@
-/* Javadoc style sheet */
+/* 
+ * Javadoc style sheet
+ */
 /* Enhanced for JogAmp */
 /*
 Overall document style
     background-color:#c9e2ff;
 #menu a, #footer a, #footer {color: #3b4d4f}
 */
+
+ at import url('resources/fonts/dejavu.css');
+
+/*
+ * Styles for individual HTML elements.
+ *
+ * These are styles that are specific to individual HTML elements. Changing them affects the style of a particular
+ * HTML element throughout the page.
+ */
+
 body {
     background-color:#f5f5f5;
     color:#111111;
-    font-family:Arial, Helvetica, sans-serif;
-    font-size:80%;
+    font-family:'DejaVu Sans', Arial, Helvetica, sans-serif;
+    font-size:13px;
     line-height:1.4;
     margin:0;
+    padding:0;
+    height:100%;
+    width:100%;
+}
+iframe {
+    margin:0;
+    padding:0;
+    height:100%;
+    width:100%;
+    overflow-y:scroll;
+    border:none;
 }
 a:link, a:visited {
     text-decoration:none;
-    color:#4444aa;
+    color:#4A6782;
 }
-a:hover, a:focus {
+a[href]:hover, a[href]:focus {
     text-decoration:none;
     color:#bb7a2a;
 }
-a:active {
-    text-decoration:none;
-    color:#4444cc;
-}
 a[name] {
-    color:#4444cc;
+    color:#353833;
 }
-a[name]:hover {
-    text-decoration:none;
-    color:#4444cc;
+a[name]:before, a[name]:target, a[id]:before, a[id]:target {
+    content:"";
+    display:inline-block;
+    position:relative;
+    padding-top:129px;
+    margin-top:-129px;
 }
 pre {
-    font-size:1.3em;
+    font-family:'DejaVu Sans Mono', monospace;
+    font-size:13px;
 }
 h1 {
-    font-size:1.8em;
+    font-size:20px;
 }
 h2 {
-    font-size:1.5em;
+    font-size:18px;
 }
 h3 {
-    font-size:1.4em;
+    font-size:16px;
+    font-style:italic;
 }
 h4 {
-    font-size:1.3em;
+    font-size:13px;
 }
 h5 {
-    font-size:1.2em;
+    font-size:12px;
 }
 h6 {
-    font-size:1.1em;
-}
-ol {
-    list-style-type:decimal;
-    padding: 0em 0em 0em 1.2em;
+    font-size:11px;
 }
 ul {
     list-style-type:disc;
-    padding: 0em 0em 0em 1.2em;
-}
-ol li {
-    margin-bottom:0.5em;
-}
-ul li {
-    margin-bottom:0.5em;
 }
 code, tt {
-    font-size:1.2em;
+    font-family:'DejaVu Sans Mono', monospace;
+    font-size:13px;
+    padding-top:4px;
+    margin-top:8px;
+    line-height:1.4em;
 }
 dt code {
-    font-size:1.2em;
+    font-family:'DejaVu Sans Mono', monospace;
+    font-size:13px;
+    padding-top:4px;
 }
 table tr td dt code {
-    font-size:1.2em;
+    font-family:'DejaVu Sans Mono', monospace;
+    font-size:13px;
     vertical-align:top;
+    padding-top:4px;
 }
 sup {
-    font-size:.6em;
+    font-size:8px;
 }
+
 /*
-Document title and Copyright styles
-*/
+ * Styles for HTML generated by javadoc.
+ *
+ * These are style classes that are used by the standard doclet to generate HTML documentation.
+ */
+
+/*
+ * Styles for document title and copyright.
+ */
 .clear {
     clear:both;
     height:0px;
@@ -91,9 +119,9 @@
 .aboutLanguage {
     float:right;
     padding:0px 21px;
-    font-size:.8em;
+    font-size:11px;
     z-index:200;
-    margin-top:-7px;
+    margin-top:-9px;
 }
 .legalCopy {
     margin-left:.5em;
@@ -107,28 +135,34 @@
 }
 .tab {
     background-color:#0066FF;
-    background-image:url(resources/titlebar.gif);
-    background-position:left top;
-    background-repeat:no-repeat;
-    color:#f5f5f5;
+    color:#ffffff;
     padding:8px;
     width:5em;
     font-weight:bold;
 }
 /*
-Navigation bar styles
-*/
+ * Styles for navigation bar.
+ */
 .bar {
     background-color:#c9e2ff;
-    color:#3b4d4f;
+    color:#FFFFFF;
     padding:.8em .5em .4em .8em;
     height:auto;/*height:1.8em;*/
-    font-size:1em;
+    font-size:11px;
     margin:0;
 }
+.navPadding {
+    padding-top: 107px;
+}
+.fixedNav {
+    position:fixed;
+    width:100%;
+    z-index:999;
+    background-color:#ffffff;
+}
 .topNav {
     background-color:#c9e2ff;
-    color:#3b4d4f;
+    color:#FFFFFF;
     float:left;
     padding:0;
     width:100%;
@@ -136,11 +170,12 @@
     height:2.8em;
     padding-top:10px;
     overflow:hidden;
+    font-size:12px; 
 }
 .bottomNav {
     margin-top:10px;
     background-color:#c9e2ff;
-    color:#3b4d4f;
+    color:#FFFFFF;
     float:left;
     padding:0;
     width:100%;
@@ -148,18 +183,20 @@
     height:2.8em;
     padding-top:10px;
     overflow:hidden;
+    font-size:12px;
 }
 .subNav {
-    background-color:#eeeeee;
-    border-bottom:1px solid #9eadc0;
+    background-color:#dee3e9;
     float:left;
     width:100%;
     overflow:hidden;
+    font-size:12px;
 }
 .subNav div {
     clear:left;
     float:left;
     padding:0 0 5px 6px;
+    text-transform:uppercase;
 }
 ul.navList, ul.subNavList {
     float:left;
@@ -169,42 +206,74 @@
 ul.navList li{
     list-style:none;
     float:left;
-    padding:3px 6px;
+    padding: 5px 6px;
+    text-transform:uppercase;
+}
+ul.navListSearch {
+    float:right;
+    margin:0 0 0 0;
+    padding:0;
+}
+ul.navListSearch li {
+    list-style:none;
+    float:right;
+    padding: 5px 6px;
+    text-transform:uppercase;
 }
-ul.subNavList li{
+ul.navListSearch li label {
+    position:relative;
+    right:-16px;
+}
+ul.subNavList li {
     list-style:none;
     float:left;
-    font-size:90%;
 }
 .topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited {
-    color:#3b4d4f;
+    color:#FFFFFF;
     text-decoration:none;
+    text-transform:uppercase;
 }
 .topNav a:hover, .bottomNav a:hover {
     text-decoration:none;
-    color:#000000;
+    color:#bb7a2a;
+    text-transform:uppercase;
 }
 .navBarCell1Rev {
-    background-image:url(resources/tab.gif);
-    background-color:#a88834;
-    color:#FFFFFF;
+    background-color:#F8981D;
+    color:#253441;
     margin: auto 5px;
-    border:1px solid #c9aa44;
+}
+.skipNav {
+    position:absolute;
+    top:auto;
+    left:-9999px;
+    overflow:hidden;
 }
 /*
-Page header and footer styles
-*/
+ * Styles for page header and footer.
+ */
 .header, .footer {
     clear:both;
     margin:0 20px;
     padding:5px 0 0 0;
 }
-.indexHeader {
-    margin:10px;
+.indexNav {
     position:relative;
+    font-size:12px;
+    background-color:#dee3e9;
+}
+.indexNav ul {
+    margin-top:0;
+    padding:5px;
+}
+.indexNav ul li {
+    display:inline;
+    list-style-type:none;
+    padding-right:10px;
+    text-transform:uppercase;
 }
-.indexHeader h1 {
-    font-size:1.3em;
+.indexNav h1 {
+    font-size:13px;
 }
 .title {
     color:#2c4557;
@@ -214,30 +283,30 @@
     margin:5px 0 0 0;
 }
 .header ul {
-    margin:0.5em 0 0.5em 0;
+    margin:0 0 15px 0;
+    padding:0;
 }
 .footer ul {
-    margin:0.5em 0 0.5em 0;
+    margin:20px 0 5px 0;
 }
 .header ul li, .footer ul li {
-    margin:0.5em 0 0.5em 0;
+    list-style:none;
+    font-size:13px;
 }
 /*
-Heading styles
-*/
+ * Styles for headings.
+ */
 div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 {
     background-color:#dee3e9;
-    border-top:1px solid #9eadc0;
-    border-bottom:1px solid #9eadc0;
+    border:1px solid #d0d9e0;
     margin:0 0 6px -8px;
-    padding:2px 5px;
+    padding:7px 5px;
 }
 ul.blockList ul.blockList ul.blockList li.blockList h3 {
     background-color:#dee3e9;
-    border-top:1px solid #9eadc0;
-    border-bottom:1px solid #9eadc0;
+    border:1px solid #d0d9e0;
     margin:0 0 6px -8px;
-    padding:2px 5px;
+    padding:7px 5px;
 }
 ul.blockList ul.blockList li.blockList h3 {
     padding:0;
@@ -247,9 +316,10 @@
     padding:0px 0 20px 0;
 }
 /*
-Page layout container styles
-*/
-.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer {
+ * Styles for page layout containers.
+ */
+.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer,
+.allClassesContainer, .allPackagesContainer {
     clear:both;
     padding:10px 20px;
     position:relative;
@@ -257,10 +327,10 @@
 .indexContainer {
     margin:10px;
     position:relative;
-    font-size:1.0em;
+    font-size:12px;
 }
 .indexContainer h2 {
-    font-size:1.1em;
+    font-size:13px;
     padding:0 0 3px 0;
 }
 .indexContainer ul {
@@ -269,15 +339,18 @@
 }
 .indexContainer ul li {
     list-style:none;
+    padding-top:2px;
 }
 .contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt {
-    font-size:1.1em;
+    font-size:12px;
     font-weight:bold;
     margin:10px 0 0 0;
     color:#4E4E4E;
 }
 .contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd {
-    margin:10px 0 10px 20px;
+    margin:5px 0 10px 0px;
+    font-size:13px;
+    /* font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; */
 }
 .serializedFormContainer dl.nameValue dt {
     margin-left:1px;
@@ -291,8 +364,11 @@
     display:inline;
 }
 /*
-List styles
-*/
+ * Styles for lists.
+ */
+li.circle {
+    list-style:circle;
+}
 ul.horizontal li {
     display:inline;
     font-size:0.9em;
@@ -316,25 +392,24 @@
 }
 ul.blockList li.blockList, ul.blockListLast li.blockList {
     list-style:none;
-    margin-bottom:25px;
+    margin-bottom:15px;
+    line-height:1.4;
 }
 ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList {
     padding:0px 20px 5px 10px;
-    border:1px solid #9eadc0;
-    background-color:#f9f9f9;
+    border:1px solid #ededed; 
+    background-color:#f8f8f8;
 }
 ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList {
     padding:0 0 5px 8px;
-    background-color:#f5f5f5;
-    border:1px solid #9eadc0;
-    border-top:none;
+    background-color:#ffffff;
+    border:none;
 }
 ul.blockList ul.blockList ul.blockList ul.blockList li.blockList {
     margin-left:0;
     padding-left:0;
     padding-bottom:15px;
     border:none;
-    border-bottom:1px solid #9eadc0;
 }
 ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast {
     list-style:none;
@@ -346,113 +421,207 @@
     margin-bottom:1px;
 }
 /*
-Table styles
-*/
-.contentContainer table, .classUseContainer table, .constantValuesContainer table {
-    border-bottom:1px solid #9eadc0;
+ * Styles for tables.
+ */
+.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary,
+.requiresSummary, .packagesSummary, .providesSummary, .usesSummary {
     width:100%;
+    border-spacing:0;
+    border-left:1px solid #EEE; 
+    border-right:1px solid #EEE; 
+    border-bottom:1px solid #EEE; 
 }
-.contentContainer ul li table, .classUseContainer ul li table, .constantValuesContainer ul li table {
-    width:100%;
-}
-.contentContainer .description table, .contentContainer .details table {
-    border-bottom:none;
-}
-.contentContainer ul li table th.colOne, .contentContainer ul li table th.colFirst, .contentContainer ul li table th.colLast, .classUseContainer ul li table th, .constantValuesContainer ul li table th, .contentContainer ul li table td.colOne, .contentContainer ul li table td.colFirst, .contentContainer ul li table td.colLast, .classUseContainer ul li table td, .constantValuesContainer ul li table td{
-    vertical-align:top;
-    padding-right:20px;
-}
-.contentContainer ul li table th.colLast, .classUseContainer ul li table th.colLast,.constantValuesContainer ul li table th.colLast,
-.contentContainer ul li table td.colLast, .classUseContainer ul li table td.colLast,.constantValuesContainer ul li table td.colLast,
-.contentContainer ul li table th.colOne, .classUseContainer ul li table th.colOne,
-.contentContainer ul li table td.colOne, .classUseContainer ul li table td.colOne {
-    padding-right:3px;
+.overviewSummary, .memberSummary, .requiresSummary, .packagesSummary, .providesSummary, .usesSummary  {
+    padding:0px;
 }
-.overviewSummary caption, .packageSummary caption, .contentContainer ul.blockList li.blockList caption, .summary caption, .classUseContainer caption, .constantValuesContainer caption {
+.overviewSummary caption, .memberSummary caption, .typeSummary caption,
+.useSummary caption, .constantsSummary caption, .deprecatedSummary caption,
+.requiresSummary caption, .packagesSummary caption, .providesSummary caption, .usesSummary caption {
     position:relative;
     text-align:left;
     background-repeat:no-repeat;
-    color:#FFFFFF;
+    color:#253441;
     font-weight:bold;
     clear:none;
     overflow:hidden;
     padding:0px;
+    padding-top:10px;
+    padding-left:1px;
     margin:0px;
+    white-space:pre;
 }
-caption a:link, caption a:hover, caption a:active, caption a:visited {
+.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link,
+.constantsSummary caption a:link, .deprecatedSummary caption a:link,
+.requiresSummary caption a:link, .packagesSummary caption a:link, .providesSummary caption a:link,
+.usesSummary caption a:link,
+.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover,
+.constantsSummary caption a:hover, .deprecatedSummary caption a:hover,
+.requiresSummary caption a:hover, .packagesSummary caption a:hover, .providesSummary caption a:hover,
+.usesSummary caption a:hover,
+.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active,
+.constantsSummary caption a:active, .deprecatedSummary caption a:active,
+.requiresSummary caption a:active, .packagesSummary caption a:active, .providesSummary caption a:active,
+.usesSummary caption a:active,
+.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited,
+.constantsSummary caption a:visited, .deprecatedSummary caption a:visited,
+.requiresSummary caption a:visited, .packagesSummary caption a:visited, .providesSummary caption a:visited,
+.usesSummary caption a:visited {
     color:#FFFFFF;
 }
-.overviewSummary caption span, .packageSummary caption span, .contentContainer ul.blockList li.blockList caption span, .summary caption span, .classUseContainer caption span, .constantValuesContainer caption span {
+.useSummary caption a:link, .useSummary caption a:hover, .useSummary caption a:active,
+.useSummary caption a:visited {
+    color:#1f389c;
+}
+.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span,
+.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span,
+.requiresSummary caption span, .packagesSummary caption span, .providesSummary caption span,
+.usesSummary caption span {
     white-space:nowrap;
-    padding-top:8px;
-    padding-left:8px;
-    display:block;
+    padding-top:5px;
+    padding-left:12px;
+    padding-right:12px;
+    padding-bottom:7px;
+    display:inline-block;
     float:left;
-    background-image:url(resources/titlebar.gif);
-    height:18px;
+    background-color:#F8981D;
+    border: none;
+    height:16px;
 }
-.overviewSummary .tabEnd, .packageSummary .tabEnd, .contentContainer ul.blockList li.blockList .tabEnd, .summary .tabEnd, .classUseContainer .tabEnd, .constantValuesContainer .tabEnd {
-    width:10px;
-    background-image:url(resources/titlebar_end.gif);
-    background-repeat:no-repeat;
-    background-position:top right;
-    position:relative;
+.memberSummary caption span.activeTableTab span, .packagesSummary caption span.activeTableTab span,
+.overviewSummary caption span.activeTableTab span, .typeSummary caption span.activeTableTab span {
+    white-space:nowrap;
+    padding-top:5px;
+    padding-left:12px;
+    padding-right:12px;
+    margin-right:3px;
+    display:inline-block;
     float:left;
+    background-color:#F8981D;
+    height:16px;
 }
-ul.blockList ul.blockList li.blockList table {
-    margin:0 0 12px 0px;
-    width:100%;
+.memberSummary caption span.tableTab span, .packagesSummary caption span.tableTab span,
+.overviewSummary caption span.tableTab span, .typeSummary caption span.tableTab span {
+    white-space:nowrap;
+    padding-top:5px;
+    padding-left:12px;
+    padding-right:12px;
+    margin-right:3px;
+    display:inline-block;
+    float:left;
+    background-color:#c9e2ff;
+    height:16px;
 }
-.tableSubHeadingColor {
-    background-color: #EEEEFF;
+.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab,
+.packagesSummary caption span.tableTab, .packagesSummary caption span.activeTableTab,
+.overviewSummary caption span.tableTab, .overviewSummary caption span.activeTableTab,
+.typeSummary caption span.tableTab, .typeSummary caption span.activeTableTab {
+    padding-top:0px;
+    padding-left:0px;
+    padding-right:0px;
+    background-image:none;
+    float:none;
+    display:inline;
 }
-.altColor {
-    background-color:#eeeeef;
+.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd,
+.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd,
+.requiresSummary .tabEnd, .packagesSummary .tabEnd, .providesSummary .tabEnd, .usesSummary .tabEnd {
+    display:none;
+    width:5px;
+    position:relative;
+    float:left;
+    background-color:#F8981D;
 }
-.rowColor {
-    background-color:#f5f5f5;
+.memberSummary .activeTableTab .tabEnd, .packagesSummary .activeTableTab .tabEnd,
+.overviewSummary .activeTableTab .tabEnd, .typeSummary .activeTableTab .tabEnd {
+    display:none;
+    width:5px;
+    margin-right:3px;
+    position:relative; 
+    float:left;
+    background-color:#F8981D;
+}
+.memberSummary .tableTab .tabEnd, .packagesSummary .tableTab .tabEnd,
+.overviewSummary .tableTab .tabEnd, .typeSummary .tableTab .tabEnd {
+    display:none;
+    width:5px;
+    margin-right:3px;
+    position:relative;
+    background-color:#c9e2ff;
+    float:left;
+}
+.rowColor th, .altColor th {
+    font-weight:normal;
 }
-.overviewSummary td, .packageSummary td, .contentContainer ul.blockList li.blockList td, .summary td, .classUseContainer td, .constantValuesContainer td {
+.overviewSummary td, .memberSummary td, .typeSummary td,
+.useSummary td, .constantsSummary td, .deprecatedSummary td,
+.requiresSummary td, .packagesSummary td, .providesSummary td, .usesSummary td {
     text-align:left;
-    padding:3px 3px 3px 7px;
+    padding:0px 0px 12px 10px;
 }
-th.colFirst, th.colLast, th.colOne, .constantValuesContainer th {
+th.colFirst, th.colSecond, th.colLast, th.colConstructorName, th.colDeprecatedItemName, .useSummary th,
+.constantsSummary th, .packagesSummary th, td.colFirst, td.colSecond, td.colLast, .useSummary td,
+.constantsSummary td {
+    vertical-align:top;
+    padding-right:0px;
+    padding-top:8px;
+    padding-bottom:3px;
+}
+th.colFirst, th.colSecond, th.colLast, th.colConstructorName, th.colDeprecatedItemName, .constantsSummary th,
+.packagesSummary th {
     background:#dee3e9;
-    border-top:1px solid #9eadc0;
-    border-bottom:1px solid #9eadc0;
     text-align:left;
-    padding:3px 3px 3px 7px;
-}
-td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover {
-    font-weight:bold;
+    padding:8px 3px 3px 7px;
 }
 td.colFirst, th.colFirst {
-    border-left:1px solid #9eadc0;
-    white-space:nowrap;
+    font-size:13px;
 }
-td.colLast, th.colLast {
-    border-right:1px solid #9eadc0;
+td.colSecond, th.colSecond, td.colLast, th.colConstructorName, th.colDeprecatedItemName, th.colLast {
+    font-size:13px;
 }
-td.colOne, th.colOne {
-    border-right:1px solid #9eadc0;
-    border-left:1px solid #9eadc0;
+.constantsSummary th, .packagesSummary th {
+    font-size:13px;
 }
-table.overviewSummary  {
-    padding:0px;
-    margin-left:0px;
+.providesSummary th.colFirst, .providesSummary th.colLast, .providesSummary td.colFirst,
+.providesSummary td.colLast {
+    white-space:normal;
+    font-size:13px;
+}
+.overviewSummary td.colFirst, .overviewSummary th.colFirst,
+.requiresSummary td.colFirst, .requiresSummary th.colFirst,
+.packagesSummary td.colFirst, .packagesSummary td.colSecond, .packagesSummary th.colFirst, .packagesSummary th,
+.usesSummary td.colFirst, .usesSummary th.colFirst,
+.providesSummary td.colFirst, .providesSummary th.colFirst,
+.memberSummary td.colFirst, .memberSummary th.colFirst,
+.memberSummary td.colSecond, .memberSummary th.colSecond, .memberSummary th.colConstructorName,
+.typeSummary td.colFirst, .typeSummary th.colFirst {
+    vertical-align:top;
 }
-table.overviewSummary td.colFirst, table.overviewSummary th.colFirst,
-table.overviewSummary td.colOne, table.overviewSummary th.colOne {
-    width:25%;
-    vertical-align:middle;
+.packagesSummary th.colLast, .packagesSummary td.colLast {
+    white-space:normal;
 }
-table.packageSummary td.colFirst, table.overviewSummary th.colFirst {
-    width:25%;
-    vertical-align:middle;
+td.colFirst a:link, td.colFirst a:visited,
+td.colSecond a:link, td.colSecond a:visited,
+th.colFirst a:link, th.colFirst a:visited,
+th.colSecond a:link, th.colSecond a:visited,
+th.colConstructorName a:link, th.colConstructorName a:visited,
+th.colDeprecatedItemName a:link, th.colDeprecatedItemName a:visited, 
+.constantValuesContainer td a:link, .constantValuesContainer td a:visited, 
+.allClassesContainer td a:link, .allClassesContainer td a:visited, 
+.allPackagesContainer td a:link, .allPackagesContainer td a:visited {
+    font-weight:bold;
+}
+.tableSubHeadingColor {
+    background-color:#EEEEFF;
+}
+.altColor, .altColor th {
+    background-color:#FFFFFF;
+}
+.rowColor, .rowColor th {
+    background-color:#EEEEEF;
 }
 /*
-Content styles
-*/
+ * Styles for contents.
+ */
 .description pre {
     margin-top:0;
 }
@@ -463,9 +632,22 @@
 .docSummary {
     padding:0;
 }
+ul.blockList ul.blockList ul.blockList li.blockList h3 {
+    font-style:normal;
+}
+div.block {
+    font-size:13px;
+    /* font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; */
+}
+td.colLast div {
+    padding-top:0px;
+}
+td.colLast a {
+    padding-bottom:3px;
+}
 /*
-Formatting effect styles
-*/
+ * Styles for formatting effect.
+ */
 .sourceLineNo {
     color:green;
     padding:0 30px 0 0;
@@ -473,13 +655,259 @@
 h1.hidden {
     visibility:hidden;
     overflow:hidden;
-    font-size:.9em;
+    font-size:10px;
 }
 .block {
     display:block;
-    margin:3px 0 0 0;
+    margin:3px 10px 2px 0px;
+    color:#474747;
+}
+.deprecatedLabel, .descfrmTypeLabel, .implementationLabel, .memberNameLabel, .memberNameLink,
+.moduleLabelInPackage, .moduleLabelInType, .overrideSpecifyLabel, .packageLabelInType,
+.packageHierarchyLabel, .paramLabel, .returnLabel, .seeLabel, .simpleTagLabel,
+.throwsLabel, .typeNameLabel, .typeNameLink, .searchTagLink {
+    font-weight:bold;
+}
+.deprecationComment, .emphasizedPhrase, .interfaceName {
+    font-style:italic;
+}
+.deprecationBlock {
+    font-size:13px;
+    /* font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; */
+    border-style:solid;
+    border-width:thin;
+    border-radius:10px;
+    padding:10px;
+    margin-bottom:10px;
+    margin-right:10px;
+    display:inline-block;
+}
+div.block div.deprecationComment, div.block div.block span.emphasizedPhrase,
+div.block div.block span.interfaceName {
+    font-style:normal;
+}
+div.contentContainer ul.blockList li.blockList h2 {
+    padding-bottom:0px;
+}
+/*
+ * Styles for IFRAME.
+ */
+.mainContainer {
+    margin:0 auto; 
+    padding:0; 
+    height:100%; 
+    width:100%; 
+    position:fixed; 
+    top:0; 
+    left:0;
+}
+.leftContainer {
+    height:100%;
+    position:fixed;
+    width:320px;
+}
+.leftTop {
+    position:relative;
+    float:left;
+    width:315px;
+    top:0;
+    left:0;
+    height:30%;
+    border-right:6px solid #ccc;
+    border-bottom:6px solid #ccc;
+}
+.leftBottom {
+    position:relative;
+    float:left;
+    width:315px;
+    bottom:0;
+    left:0;
+    height:70%;
+    border-right:6px solid #ccc;
+    border-top:1px solid #000;
+}
+.rightContainer {
+    position:absolute;
+    left:320px;
+    top:0;
+    bottom:0;
+    height:100%;
+    right:0;
+    border-left:1px solid #000;
+}
+.rightIframe {
+    margin:0;
+    padding:0;
+    height:100%;
+    right:30px;
+    width:100%;
+    overflow:visible;
+    margin-bottom:30px;
+}
+/*
+ * Styles specific to HTML5 elements.
+ */
+main, nav, header, footer, section {
+    display:block;
 }
-.strong {
+/*
+ * Styles for javadoc search.
+ */
+.ui-autocomplete-category {
     font-weight:bold;
+    font-size:15px;
+    padding:7px 0 7px 3px;
+    background-color:#c9e2ff;
+    color:#FFFFFF;
+}
+.resultItem {
+    font-size:13px;
+}
+.ui-autocomplete {
+    max-height:85%;
+    max-width:65%;
+    overflow-y:scroll;
+    overflow-x:scroll;
+    white-space:nowrap;
+    box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
+}
+ul.ui-autocomplete {
+    position:fixed;
+    z-index:999999;
+}
+ul.ui-autocomplete  li {
+    float:left;
+    clear:both;
+    width:100%;
 }
+.resultHighlight {
+    font-weight:bold;
+}
+#search {
+    background-image:url('resources/glass.png');
+    background-size:13px;
+    background-repeat:no-repeat;
+    background-position:2px 3px;
+    padding-left:20px;
+    position:relative;
+    right:-18px;
+}
+#reset {
+    background-color: rgb(255,255,255);
+    background-image:url('resources/x.png');
+    background-position:center;
+    background-repeat:no-repeat;
+    background-size:12px;
+    border:0 none;
+    width:16px;
+    height:17px;
+    position:relative;
+    left:-4px;
+    top:-4px;
+    font-size:0px;
+}
+.watermark {
+    color:#545454;
+}
+.searchTagDescResult {
+    font-style:italic;
+    font-size:11px;
+}
+.searchTagHolderResult {
+    font-style:italic;
+    font-size:12px;
+}
+.searchTagResult:before, .searchTagResult:target {
+    color:red;
+}
+.moduleGraph span {
+    display:none;
+    position:absolute;
+}
+.moduleGraph:hover span {
+    display:block;
+    margin: -100px 0 0 100px;
+    z-index: 1;
+}
+.methodSignature {
+    white-space:normal;
+}
+
+/*
+ * Styles for user-provided tables.
+ *
+ * borderless:
+ *      No borders, vertical margins, styled caption.
+ *      This style is provided for use with existing doc comments.
+ *      In general, borderless tables should not be used for layout purposes.
+ *
+ * plain:
+ *      Plain borders around table and cells, vertical margins, styled caption.
+ *      Best for small tables or for complex tables for tables with cells that span
+ *      rows and columns, when the "striped" style does not work well.
+ *
+ * striped:
+ *      Borders around the table and vertical borders between cells, striped rows,
+ *      vertical margins, styled caption.
+ *      Best for tables that have a header row, and a body containing a series of simple rows.
+ */
 
+table.borderless,
+table.plain,
+table.striped {
+    margin-top: 10px;
+    margin-bottom: 10px;
+}
+table.borderless > caption,
+table.plain > caption,
+table.striped > caption {
+    font-weight: bold;
+    font-size: smaller;
+}
+table.borderless th, table.borderless td,
+table.plain th, table.plain td,
+table.striped th, table.striped td {
+    padding: 2px 5px;
+}
+table.borderless,
+table.borderless > thead > tr > th, table.borderless > tbody > tr > th, table.borderless > tr > th,
+table.borderless > thead > tr > td, table.borderless > tbody > tr > td, table.borderless > tr > td {
+    border: none;
+}
+table.borderless > thead > tr, table.borderless > tbody > tr, table.borderless > tr {
+    background-color: transparent;
+}
+table.plain {
+    border-collapse: collapse;
+    border: 1px solid black;
+}
+table.plain > thead > tr, table.plain > tbody tr, table.plain > tr {
+    background-color: transparent;
+}
+table.plain > thead > tr > th, table.plain > tbody > tr > th, table.plain > tr > th,
+table.plain > thead > tr > td, table.plain > tbody > tr > td, table.plain > tr > td {
+    border: 1px solid black;
+}
+table.striped {
+    border-collapse: collapse;
+    border: 1px solid black;
+}
+table.striped > thead {
+    background-color: #E3E3E3;
+}
+table.striped > thead > tr > th, table.striped > thead > tr > td {
+    border: 1px solid black;
+}
+table.striped > tbody > tr:nth-child(even) {
+    background-color: #EEE
+}
+table.striped > tbody > tr:nth-child(odd) {
+    background-color: #FFF
+}
+table.striped > tbody > tr > th, table.striped > tbody > tr > td {
+    border-left: 1px solid black;
+    border-right: 1px solid black;
+}
+table.striped > tbody > tr > th {
+    font-weight: normal;
+}
diff -Nru gluegen2-2.3.2/make/gluegen-cpptasks-base.xml gluegen2-2.4.0+dfsg/make/gluegen-cpptasks-base.xml
--- gluegen2-2.3.2/make/gluegen-cpptasks-base.xml	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/gluegen-cpptasks-base.xml	2023-02-01 18:52:41.000000000 +0100
@@ -35,6 +35,7 @@
    -   isAndroidARM64
    -   isAndroidARMv6Armel (set in gluegen.cpptasks.detected.os.2)
    -   isAndroidARMv6Armhf (set in gluegen.cpptasks.detected.os.2)
+   -   isAndroidX86
    -   isLinux
    -   isLinuxAMD64
    -   isLinuxIA64
@@ -48,11 +49,16 @@
    -   isLinuxMips
    -   isLinuxMipsel
    -   isLinuxPpc
+   -   isLinuxPpc64
+   -   isLinuxPpc64le
    -   isLinuxs390
    -   isLinuxs390x
    -   isLinuxSparc
    -   isOSX
    -   isOSXPPC
+   -   isIOS
+   -   isIOSAmd64
+   -   isIOSArm64
    -   isSolaris
    -   isSolaris32Bit
    -   isSolaris64Bit
@@ -67,15 +73,21 @@
    -   jvmDataModel32Bit
 
    -   jvmDataModel.arg  either one of [ "-d64", "-d32" or "-Djnlp.no.jvm.data.model.set=true" ]
+
+   -   build.dynamiclibs
+   -   build.staticlibs  (usually = !build.dynamiclibs)
+   -   output.lib.type
+
    -
-   - isX11 is set if: !isWindows && !isOSX && !noX11
+   - isX11 is set if: !isWindows && !isOSX !isIOS && !noX11
    - 
    - It also sets the following properties which are useful for
    - building native library jar files for Java Web Start and
    - understanding on what OS and architecture things are being built.
    -
    -   os.and.arch (i.e., "windows-i586")
-   -   native.library.suffix (i.e.., "so", "dll")
+   -   native.library.prefix (i.e.., "lib", "")
+   -   native.library.suffix (i.e.., "so", "dll", "dylib")
    - 
    - The gluegen.cpptasks.setup.compiler target is the preferred target
    - to depend upon in your build.xml. It depends on gluegen.cpptasks.detect.compiler
@@ -133,6 +145,8 @@
    -   compiler.cfg.linux.mips
    -   compiler.cfg.linux.mipsel
    -   compiler.cfg.linux.ppc
+   -   compiler.cfg.linux.ppc64
+   -   compiler.cfg.linux.ppc64le
    -   compiler.cfg.linux.s390
    -   compiler.cfg.linux.s390x
    -   compiler.cfg.linux.sparc
@@ -143,6 +157,8 @@
    -   compiler.cfg.win32.mingw
    -   compiler.cfg.win32.msvc
    -   compiler.cfg.macosx
+   -   compiler.cfg.ios.amd64
+   -   compiler.cfg.ios.arm64
    -   compiler.cfg.freebsd
    -   compiler.cfg.hpux
    -   linker.cfg.linux
@@ -155,6 +171,7 @@
    -   linker.cfg.linux.mips
    -   linker.cfg.linux.mipsel
    -   linker.cfg.linux.ppc
+   -   linker.cfg.linux.ppc64le
    -   linker.cfg.linux.s390
    -   linker.cfg.linux.s390x
    -   linker.cfg.linux.sparc
@@ -167,6 +184,8 @@
    -   linker.cfg.win32.mingw
    -   linker.cfg.win32.msvc
    -   linker.cfg.macosx
+   -   linker.cfg.ios.amd64
+   -   linker.cfg.ios.arm64
    -   linker.cfg.hpux
    - 
    - This project file also defines a macrodef called "msvc.manifest"
@@ -176,6 +195,7 @@
   -->
 <project name="GlueGen-cpptasks-base" basedir=".">
 
+  <import file="gluegen-properties.xml" />
   <target name="gluegen.cpptasks.initialize" depends="gluegen.properties.load.user">
     <echo message="os.name=${os.name}" />
     <echo message="os.version=${os.version}" />
@@ -200,15 +220,7 @@
     <!-- NOTE: the values of the macos<arch> attributes will not be overridden if already set externally -->
     <property name="macosppc"     value="false" /> 
     <property name="macosx64"     value="true" /> 
-    <!-- No 32bit binaries on OSX since Java7 -->
-    <condition property="macosx32" value="false" else="true">
-        <or>
-            <contains string="${ant.java.version}" substring="1.7" casesensitive="false" />
-            <contains string="${ant.java.version}" substring="1.8" casesensitive="false" />
-            <contains string="${ant.java.version}" substring="1.9" casesensitive="false" />
-            <contains string="${ant.java.version}" substring="2.0" casesensitive="false" />
-        </or>
-    </condition>
+    <property name="macosx32"     value="false" /> <!-- we disable 32bit on OSX for good now -->
 
     <!-- Need a way to be able to disable the macosx64 property specification in a build.xml -->
     <condition property="use.macosppc">
@@ -232,7 +244,7 @@
        by a custom file set in property 'gluegen-cpptasks.file' 
        or environment var 'GLUEGEN_CPPTASKS_FILE' 
 
-       See 'lib/gluegen-cpptasks-linux-armv6.xml' which sets OS and ARCH
+       See 'lib/gluegen-cpptasks-linux-armv6hf.xml' which sets OS and ARCH
        for crosscompilation.
     -->
   <target name="gluegen.cpptasks.detect.os.custom">
@@ -257,6 +269,8 @@
     <condition property="is64Bit">
       <or>
         <istrue value="${isAMD64}" />
+        <istrue value="${isIOSAmd64}"/> 
+        <istrue value="${isIOSArm64}"/> 
         <os arch="IA64" />
         <os arch="sparcv9" />
         <os arch="armv8a" />
@@ -264,10 +278,19 @@
       </or>
     </condition>
 
+    <condition property="isIOS">
+      <or>
+          <istrue value="${isIOSAmd64}"/> 
+          <istrue value="${isIOSArm64}"/> 
+      </or>
+    </condition>
     <condition property="isOSX">
       <and>
         <os family="mac"/>
         <os family="unix"/>
+        <not>
+          <istrue value="${isIOS}"/> 
+        </not>
       </and>
     </condition>
     <condition property="isUnix">
@@ -339,6 +362,12 @@
         </or>
       </and>
     </condition>
+    <condition property="isAndroidX86">
+      <and>
+        <istrue value="${isAndroid}" />
+        <os arch="x86" />
+      </and>
+    </condition>
     <condition property="isLinuxARMv6">
       <and>
         <istrue value="${isLinux}" />
@@ -417,6 +446,24 @@
     <condition property="ppc">
       <os arch="ppc" />
     </condition>
+    <condition property="isLinuxPpc64">
+      <and>
+        <istrue value="${isLinux}" />
+        <os arch="ppc64" />
+      </and>
+    </condition>
+    <condition property="ppc64">
+      <os arch="ppc64" />
+    </condition>
+    <condition property="isLinuxPpc64le">
+      <and>
+        <istrue value="${isLinux}" />
+        <os arch="ppc64le" />
+      </and>
+    </condition>
+    <condition property="ppc64le">
+      <os arch="ppc64le" />
+    </condition>
     <condition property="isLinuxs390">
       <and>
         <istrue value="${isLinux}" />
@@ -510,6 +557,7 @@
       <and>
         <isfalse value="${isWindows}" />
         <isfalse value="${isOSX}" />
+        <isfalse value="${isIOS}" />
         <isfalse value="${isAndroid}" />
         <isfalse value="${noX11}" />
       </and>
@@ -569,58 +617,6 @@
         <istrue value="${isLinuxARMv6}" />
       </and>
     </condition>
-
-    <echo message="isI386=${isI386}" />
-    <echo message="isAMD64=${isAMD64}" />
-    <echo message="is64Bit=${is64Bit}" />
-    <echo message="isAbiEabiGnuArmel=${isAbiEabiGnuArmel}" />
-    <echo message="isAbiEabiGnuArmhf=${isAbiEabiGnuArmhf}" />
-    <echo message="jvmDataModel32Bit=${jvmDataModel32Bit}" />
-    <echo message="jvmDataModel64Bit=${jvmDataModel64Bit}" />
-    <echo message="jvmDataModel.arg=${jvmDataModel.arg}" />
-    <echo message="FreeBSD=${isFreeBSD}" />
-    <echo message="FreeBSDX86=${isFreeBSDX86}" />
-    <echo message="FreeBSDAMD64=${isFreeBSDAMD64}" />
-    <echo message="HPUX=${isHPUX}" />
-    <echo message="IA64=${isIA64}" />
-    <echo message="Android=${isAndroid}" />
-    <echo message="AndroidARMv6=${isAndroidARMv6}" />
-    <echo message="AndroidARM64=${isAndroidARM64}" />
-    <echo message="AndroidARMv6Armel=${isAndroidARMv6Armel}" />
-    <echo message="AndroidARMv6Armhf=${isAndroidARMv6Armhf}" />
-    <echo message="Linux=${isLinux}" />
-    <echo message="LinuxAMD64=${isLinuxAMD64}" />
-    <echo message="LinuxIA64=${isLinuxIA64}" />
-    <echo message="LinuxX86=${isLinuxX86}" />
-    <echo message="LinuxARMv6=${isLinuxARMv6}" />
-    <echo message="LinuxARM64=${isLinuxARM64}" />
-    <echo message="LinuxARMv6Armel=${isLinuxARMv6Armel}" />
-    <echo message="LinuxARMv6Armhf=${isLinuxARMv6Armhf}" />
-    <echo message="LinuxAlpha=${isLinuxAlpha}" />
-    <echo message="LinuxHppa=${isLinuxHppa}" />
-    <echo message="LinuxMips=${isLinuxMips}" />
-    <echo message="LinuxMipsel=${isLinuxMipsel}" />
-    <echo message="LinuxPpc=${isLinuxPpc}" />
-    <echo message="Linuxs390=${isLinuxs390}" />
-    <echo message="Linuxs390x=${isLinuxs390x}" />
-    <echo message="LinuxSparc=${isLinuxSparc}" />
-    <echo message="OS X=${isOSX}" />
-    <echo message="OS X PPC=${use.macosppc}" />
-    <echo message="OS X x32=${use.macosx32}" />
-    <echo message="OS X x64=${use.macosx64}" />
-    <echo message="Solaris=${isSolaris}" />
-    <echo message="Solaris32Bit=${isSolaris32Bit}" />
-    <echo message="Solaris64Bit=${isSolaris64Bit}" />
-    <echo message="SolarisSparc=${isSolarisSparc}" />
-    <echo message="SolarisSparcv9=${isSolarisSparcv9}" />
-    <echo message="SolarisAMD64=${isSolarisAMD64}" />
-    <echo message="SolarisX86=${isSolarisX86}" />
-    <echo message="Unix=${isUnix}" />
-    <echo message="Windows=${isWindows}" />
-    <echo message="X11=${isX11}" />
-    <echo message="os=${os.name}" />
-    <echo message="os=${os.version}" />
-    <echo message="arch=${os.arch}" /> 
  </target>
 
  <!-- Consult jogamp.common.os.PlatformPropsImpl.getOSAndArch(..) to complete/sync mapping! -->
@@ -683,6 +679,14 @@
     <property name="os.and.arch" value="linux-ppc" />
   </target>
 
+  <target name="gluegen.cpptasks.detect.os.linux.ppc64" unless="gluegen.cpptasks.detected.os.2" if="isLinuxPpc64">
+    <property name="os.and.arch" value="linux-ppc64" />
+  </target>
+
+  <target name="gluegen.cpptasks.detect.os.linux.ppc64le" unless="gluegen.cpptasks.detected.os.2" if="isLinuxPpc64le">
+    <property name="os.and.arch" value="linux-ppc64le" />
+  </target>
+
   <target name="gluegen.cpptasks.detect.os.linux.s390" unless="gluegen.cpptasks.detected.os.2" if="isLinuxs390">
     <property name="os.and.arch" value="linux-s390" />
   </target>
@@ -707,13 +711,30 @@
     <property name="os.and.arch" value="android-aarch64" />
   </target>
 
-  <target name="gluegen.cpptasks.detect.os.linux" depends="gluegen.cpptasks.detect.os.linux.amd64,gluegen.cpptasks.detect.os.linux.ia64,gluegen.cpptasks.detect.os.linux.x86,gluegen.cpptasks.detect.os.linux.armv6.armel,gluegen.cpptasks.detect.os.linux.armv6.armhf,gluegen.cpptasks.detect.os.android.armv6.armel,gluegen.cpptasks.detect.os.linux.aarch64,gluegen.cpptasks.detect.os.android.armv6.armhf,gluegen.cpptasks.detect.os.android.aarch64,gluegen.cpptasks.detect.os.linux.alpha,gluegen.cpptasks.detect.os.linux.hppa,gluegen.cpptasks.detect.os.linux.mips,gluegen.cpptasks.detect.os.linux.mipsel,gluegen.cpptasks.detect.os.linux.ppc,gluegen.cpptasks.detect.os.linux.s390,gluegen.cpptasks.detect.os.linux.s390x,gluegen.cpptasks.detect.os.linux.sparc" unless="gluegen.cpptasks.detected.os.2" />
+  <target name="gluegen.cpptasks.detect.os.android.x86" unless="gluegen.cpptasks.detected.os.2" if="isAndroidX86">
+    <property name="os.and.arch" value="android-x86" />
+  </target>
+
+  <target name="gluegen.cpptasks.detect.os.linux" depends="gluegen.cpptasks.detect.os.linux.amd64,gluegen.cpptasks.detect.os.linux.ia64,gluegen.cpptasks.detect.os.linux.x86,gluegen.cpptasks.detect.os.linux.armv6.armel,gluegen.cpptasks.detect.os.linux.armv6.armhf,gluegen.cpptasks.detect.os.android.armv6.armel,gluegen.cpptasks.detect.os.linux.aarch64,gluegen.cpptasks.detect.os.android.armv6.armhf,gluegen.cpptasks.detect.os.android.aarch64,gluegen.cpptasks.detect.os.android.x86,gluegen.cpptasks.detect.os.linux.alpha,gluegen.cpptasks.detect.os.linux.hppa,gluegen.cpptasks.detect.os.linux.mips,gluegen.cpptasks.detect.os.linux.mipsel,gluegen.cpptasks.detect.os.linux.ppc,gluegen.cpptasks.detect.os.linux.ppc64,gluegen.cpptasks.detect.os.linux.ppc64le,gluegen.cpptasks.detect.os.linux.s390,gluegen.cpptasks.detect.os.linux.s390x,gluegen.cpptasks.detect.os.linux.sparc" unless="gluegen.cpptasks.detected.os.2" />
 
   <target name="gluegen.cpptasks.detect.os.osx" unless="gluegen.cpptasks.detected.os.2" if="isOSX">
-    <property name="native.library.suffix"     value="*lib" />
+    <property name="native.library.prefix"     value="lib" />
+    <property name="native.library.suffix"     value="dylib" />
     <property name="os.and.arch" value="macosx-universal" />
   </target>
 
+  <target name="gluegen.cpptasks.detect.os.ios.amd64" unless="gluegen.cpptasks.detected.os.2" if="isIOSAmd64">
+    <property name="native.library.prefix"     value="lib" />
+    <property name="native.library.suffix"     value="a" />
+    <property name="os.and.arch" value="ios-amd64" />
+  </target>
+
+  <target name="gluegen.cpptasks.detect.os.ios.arch64" unless="gluegen.cpptasks.detected.os.2" if="isIOSArm64">
+    <property name="native.library.prefix"     value="lib" />
+    <property name="native.library.suffix"     value="a" />
+    <property name="os.and.arch" value="ios-arm64" />
+  </target>
+
   <target name="gluegen.cpptasks.detect.os.solaris.sparc" unless="gluegen.cpptasks.detected.os.2" if="isSolarisSparc">
     <property name="os.and.arch" value="solaris-sparc" />
   </target>
@@ -733,6 +754,7 @@
   <target name="gluegen.cpptasks.detect.os.solaris" depends="gluegen.cpptasks.detect.os.solaris.sparc,gluegen.cpptasks.detect.os.solaris.sparcv9,gluegen.cpptasks.detect.os.solaris.amd64,gluegen.cpptasks.detect.os.solaris.x86" unless="gluegen.cpptasks.detected.os.2" />
 
   <target name="gluegen.cpptasks.detect.os.unix" unless="gluegen.cpptasks.detected.os.2" if="isUnix">
+    <property name="native.library.prefix"     value="lib" />
     <property name="native.library.suffix"     value="so" />
   </target>
 
@@ -745,10 +767,11 @@
   </target>
 
   <target name="gluegen.cpptasks.detect.os.windows" depends="gluegen.cpptasks.detect.os.windows.amd64,gluegen.cpptasks.detect.os.windows.x86" unless="gluegen.cpptasks.detected.os.2" if="isWindows">
+    <property name="native.library.prefix"     value="" />
     <property name="native.library.suffix"     value="dll" />
   </target>
 
-  <target name="gluegen.cpptasks.detect.os.2" depends="gluegen.cpptasks.detect.os.refine,gluegen.cpptasks.detect.os.freebsd,gluegen.cpptasks.detect.os.hpux,gluegen.cpptasks.detect.os.linux,gluegen.cpptasks.detect.os.osx,gluegen.cpptasks.detect.os.solaris,gluegen.cpptasks.detect.os.unix,gluegen.cpptasks.detect.os.windows"  unless="gluegen.cpptasks.detected.os.2">
+  <target name="gluegen.cpptasks.detect.os.2" depends="gluegen.cpptasks.detect.os.refine,gluegen.cpptasks.detect.os.freebsd,gluegen.cpptasks.detect.os.hpux,gluegen.cpptasks.detect.os.linux,gluegen.cpptasks.detect.os.osx,gluegen.cpptasks.detect.os.ios.amd64,gluegen.cpptasks.detect.os.ios.arch64,gluegen.cpptasks.detect.os.solaris,gluegen.cpptasks.detect.os.unix,gluegen.cpptasks.detect.os.windows"  unless="gluegen.cpptasks.detected.os.2">
     <propertyregex property="os.and.arch.dot"
                    input="${os.and.arch}"
                    regexp="-"
@@ -762,9 +785,13 @@
     <echo message="os and arch:       ${os.and.arch}" />
     <echo message="os and arch.dot:   ${os.and.arch.dot}" />
     <echo message="os and arch.slash: ${os.and.arch.slash}" />
+    <echo message="native library: prefix '${native.library.prefix}', suffix '${native.library.suffix}'" />
   </target>
 
   <target name="gluegen.cpptasks.detect.os" depends="gluegen.properties.load.user,gluegen.cpptasks.detect.os.custom,gluegen.cpptasks.detect.os.1,gluegen.cpptasks.detect.os.2">
+    <echo message="gluegen.cpptasks.detected.os=${gluegen.cpptasks.detected.os}" />
+    <echo message="gluegen.cpptasks.detected.os.2=${gluegen.cpptasks.detected.os.2}" />
+
     <property name="gluegen.cpptasks.detected.os" value="true" />
     <property name="gluegen.cpptasks.detected.os.2" value="true" />
 
@@ -774,6 +801,10 @@
       <isset property="isOSX"/> 
     </condition>
     <condition property="system.env.library.path"
+               value="DYLD_LIBRARY_PATH">
+      <isset property="isIOS"/> 
+    </condition>
+    <condition property="system.env.library.path"
                value="LD_LIBRARY_PATH">
       <isset property="isUnix"/> 
     </condition>
@@ -785,8 +816,76 @@
     <!-- NOTE: the value of the c.strip.tool and c.strip.args attribute will not be overridden if already set externally -->
     <property name="c.strip.tool"     value="strip" /> 
     <condition property="c.strip.args" value="-S -x"><isset property="isOSX"/></condition>
+    <condition property="c.strip.args" value="-S -x"><isset property="isIOS"/></condition>
     <property name="c.strip.args"     value="" /> 
 
+    <condition property="awk_executable" value="gawk" else="awk"><isset property="isWindows"/></condition>
+
+    <condition property="build.dynamiclibs" value="false" else="true"><istrue value="${isIOS}"/></condition>
+    <condition property="build.staticlibs" value="false" else="true"><istrue value="${build.dynamiclibs}"/></condition>
+    <condition property="output.lib.type" value="shared" else="static"><istrue value="${build.dynamiclibs}"/></condition>
+
+    <echo message="isCrosscompilation=${isCrosscompilation}" />
+    <echo message="isI386=${isI386}" />
+    <echo message="isAMD64=${isAMD64}" />
+    <echo message="is64Bit=${is64Bit}" />
+    <echo message="isAbiEabiGnuArmel=${isAbiEabiGnuArmel}" />
+    <echo message="isAbiEabiGnuArmhf=${isAbiEabiGnuArmhf}" />
+    <echo message="jvmDataModel32Bit=${jvmDataModel32Bit}" />
+    <echo message="jvmDataModel64Bit=${jvmDataModel64Bit}" />
+    <echo message="jvmDataModel.arg=${jvmDataModel.arg}" />
+    <echo message="FreeBSD=${isFreeBSD}" />
+    <echo message="FreeBSDX86=${isFreeBSDX86}" />
+    <echo message="FreeBSDAMD64=${isFreeBSDAMD64}" />
+    <echo message="HPUX=${isHPUX}" />
+    <echo message="IA64=${isIA64}" />
+    <echo message="Android=${isAndroid}" />
+    <echo message="AndroidARMv6=${isAndroidARMv6}" />
+    <echo message="AndroidARM64=${isAndroidARM64}" />
+    <echo message="AndroidARMv6Armel=${isAndroidARMv6Armel}" />
+    <echo message="AndroidARMv6Armhf=${isAndroidARMv6Armhf}" />
+    <echo message="AndroidX86=${isAndroidX86}" />
+    <echo message="Linux=${isLinux}" />
+    <echo message="LinuxAMD64=${isLinuxAMD64}" />
+    <echo message="LinuxIA64=${isLinuxIA64}" />
+    <echo message="LinuxX86=${isLinuxX86}" />
+    <echo message="LinuxARMv6=${isLinuxARMv6}" />
+    <echo message="LinuxARM64=${isLinuxARM64}" />
+    <echo message="LinuxARMv6Armel=${isLinuxARMv6Armel}" />
+    <echo message="LinuxARMv6Armhf=${isLinuxARMv6Armhf}" />
+    <echo message="LinuxAlpha=${isLinuxAlpha}" />
+    <echo message="LinuxHppa=${isLinuxHppa}" />
+    <echo message="LinuxMips=${isLinuxMips}" />
+    <echo message="LinuxMipsel=${isLinuxMipsel}" />
+    <echo message="LinuxPpc=${isLinuxPpc}" />
+    <echo message="LinuxPpc64=${isLinuxPpc64}" />
+    <echo message="LinuxPpc64le=${isLinuxPpc64le}" />
+    <echo message="Linuxs390=${isLinuxs390}" />
+    <echo message="Linuxs390x=${isLinuxs390x}" />
+    <echo message="LinuxSparc=${isLinuxSparc}" />
+    <echo message="OS X=${isOSX}" />
+    <echo message="OS X PPC=${use.macosppc}" />
+    <echo message="OS X x32=${use.macosx32}" />
+    <echo message="OS X x64=${use.macosx64}" />
+    <echo message="iOS=${isIOS}" />
+    <echo message="iOSAmd64=${isIOSAmd64}" />
+    <echo message="iOSArm64=${isIOSArm64}" />
+    <echo message="Solaris=${isSolaris}" />
+    <echo message="Solaris32Bit=${isSolaris32Bit}" />
+    <echo message="Solaris64Bit=${isSolaris64Bit}" />
+    <echo message="SolarisSparc=${isSolarisSparc}" />
+    <echo message="SolarisSparcv9=${isSolarisSparcv9}" />
+    <echo message="SolarisAMD64=${isSolarisAMD64}" />
+    <echo message="SolarisX86=${isSolarisX86}" />
+    <echo message="Unix=${isUnix}" />
+    <echo message="Windows=${isWindows}" />
+    <echo message="X11=${isX11}" />
+    <echo message="os=${os.name}" />
+    <echo message="os=${os.version}" />
+    <echo message="arch=${os.arch}" /> 
+    <echo message="build.dynamiclibs=${build.dynamiclibs}" /> 
+    <echo message="build.staticlibs=${build.staticlibs}" /> 
+    <echo message="output.lib.type=${output.lib.type}" /> 
   </target>
 
   <!-- Detect compiler setup, in particular on Windows; separated
@@ -917,22 +1016,22 @@
 
     <!-- ================================================================== -->
     <!-- 
-       - Set up java.home.dir appropriately on all platforms.
+       - Set up 'java.home.dir' appropriately on all platforms. 
+       - Used to be the directory above 'java.home' jre path, 
+       - since the <java-install-dir>'s underlying jre was selected for ANT's 'java.home'.
+       - JDK 9 and later's installation layout should no more contain '<java-install-dir>/jre',
+       - hence java.home.dir' should be equal to ANT's 'java.home'.
+       - However, we still probe for the traditional installation layout, to enable individual setups.
+       - Hence we still probe for '${java.home}/../jre' to define 'java.home.dir' 
+       - and also probe for '${java.home.dir}/jre/lib' to define 'java.lib.dir.platform' below.
       -->
-  <target name="setup.java.home.dir.nonmacosx" unless="isOSX">
-      <!-- java home dir is up one directory as java.home points to '<java-install-dir>/jre' -->
-      <property name="java.home.dir" value="${java.home}/.." />
-  </target>
-  <target name="setup.java.home.dir.macosx" if="isOSX">
-      <!-- Java7 std location -->
+  <target name="setup.java.home.dir">
+      <property name="java.home.dir" value="${java.home}" />
       <condition property="java.home.dir"
-                 value="${java.home}/..">
-                 <available file="${java.home}/../include/jni.h"/>
+                 value="${java.home}/.." 
+                 else="${java.home}" >
+                 <available file="${java.home}/../jre" type="dir" />
       </condition>
-      <!-- Fallback value Java6 -->
-      <property name="java.home.dir" value="/System/Library/Frameworks/JavaVM.framework/Home" />
-  </target>
-  <target name="setup.java.home.dir" depends="setup.java.home.dir.nonmacosx,setup.java.home.dir.macosx">
       <property name="java.includes.dir" value="${gluegen.root.abs-path}/make/stub_includes/jni" />
       <echo message="java.home.dir      ${java.home.dir}" />
       <echo message="java.includes.dir  ${java.includes.dir}" />
@@ -996,8 +1095,8 @@
     </compiler>
 
     <!-- Using default compiler settings - utilize:
-           - lib/gluegen-cpptasks-linux-armv6.xml   (armv5te + softfp), or 
            - lib/gluegen-cpptasks-linux-armv6hf.xml (armv6   + hardfp) 
+           - lib/gluegen-cpptasks-linux-aarch64.xml (armv8 64bit) 
          for official JogAmp builds! -->
     <compiler id="compiler.cfg.linux.armv6" name="${gcc.compat.compiler}">
       <defineset>
@@ -1012,6 +1111,10 @@
       <compilerarg value="${gluegen.root.abs-path}/make/stub_includes/platform/glibc-compat-symbols.h" />
     </compiler>
 
+    <!-- Using default compiler settings - utilize:
+           - lib/gluegen-cpptasks-linux-armv6hf.xml (armv6   + hardfp) 
+           - lib/gluegen-cpptasks-linux-aarch64.xml (armv8 64bit) 
+         for official JogAmp builds! -->
     <compiler id="compiler.cfg.linux.aarch64" name="${gcc.compat.compiler}">
       <defineset>
         <define name="__LP64__" />     <!-- default pre-defined macro for 64bit unix -->
@@ -1127,10 +1230,42 @@
       <compilerarg value="i386" if="use.macosx32"/>
       <compilerarg value="-arch" if="use.macosx64"/>
       <compilerarg value="x86_64" if="use.macosx64"/>
+      <compilerarg value="-arch" if="use.macosx64"/>
+      <compilerarg value="arm64" if="use.macosx64"/>
       <!-- Note: Apple doesn't seem to provide ppc64 binaries on Leopard -->
       <compilerarg value="-Wmost" />
       <compilerarg value="-ObjC" />
-      <compilerarg value="-mmacosx-version-min=10.5"/>
+      <compilerarg value="-mmacosx-version-min=11.0"/>
+      <!-- sysincludepath path="${macosx.sdkroot}" if="macosx.sdkroot"/ -->
+      <defineset>
+        <define name="_DEBUG"   if="c.compiler.use-debug"/>
+        <define name="DEBUG"    if="c.compiler.use-debug"/>
+        <define name="NDEBUG"   unless="c.compiler.use-debug"/>
+      </defineset>
+    </compiler>
+
+    <compiler id="compiler.cfg.ios.amd64" name="${gcc.compat.compiler}">
+      <!-- compilerarg value="-v"/ -->
+      <compilerarg value="-arch"/>
+      <compilerarg value="x86_64"/>
+      <compilerarg value="-Wmost" />
+      <compilerarg value="-ObjC" />
+      <compilerarg value="-miphoneos-version-min=11.0"/>
+      <!-- sysincludepath path="${macosx.sdkroot}" if="macosx.sdkroot"/ -->
+      <defineset>
+        <define name="_DEBUG"   if="c.compiler.use-debug"/>
+        <define name="DEBUG"    if="c.compiler.use-debug"/>
+        <define name="NDEBUG"   unless="c.compiler.use-debug"/>
+      </defineset>
+    </compiler>
+
+    <compiler id="compiler.cfg.ios.arm64" name="${gcc.compat.compiler}">
+      <!-- compilerarg value="-v"/ -->
+      <compilerarg value="-arch"/>
+      <compilerarg value="arm64"/>
+      <compilerarg value="-Wmost" />
+      <compilerarg value="-ObjC" />
+      <compilerarg value="-miphoneos-version-min=11.0"/>
       <!-- sysincludepath path="${macosx.sdkroot}" if="macosx.sdkroot"/ -->
       <defineset>
         <define name="_DEBUG"   if="c.compiler.use-debug"/>
@@ -1234,8 +1369,8 @@
     </linker>
 
     <!-- Using default compiler settings - utilize:
-           - lib/gluegen-cpptasks-linux-armv6.xml   (armv5te + softfp), or 
            - lib/gluegen-cpptasks-linux-armv6hf.xml (armv6   + hardfp) 
+           - lib/gluegen-cpptasks-linux-aarch64.xml (armv8 64bit) 
          for official JogAmp builds! -->
     <linker id="linker.cfg.linux.armv6" name="${gcc.compat.compiler}">
       <linkerarg value="-fpic" /> 
@@ -1245,6 +1380,10 @@
       <linkerarg value="-static-libstdc++" if="isGCC"/>
     </linker>
 
+    <!-- Using default compiler settings - utilize:
+           - lib/gluegen-cpptasks-linux-armv6hf.xml (armv6   + hardfp) 
+           - lib/gluegen-cpptasks-linux-aarch64.xml (armv8 64bit) 
+         for official JogAmp builds! -->
     <linker id="linker.cfg.linux.aarch64" name="${gcc.compat.compiler}">
       <linkerarg value="-fpic" /> 
       <linkerarg value="-nostdlib" />
@@ -1268,6 +1407,12 @@
     <linker id="linker.cfg.linux.ppc" name="${gcc.compat.compiler}">
     </linker>
 
+    <linker id="linker.cfg.linux.ppc64" name="${gcc.compat.compiler}">
+    </linker>
+
+    <linker id="linker.cfg.linux.ppc64le" name="${gcc.compat.compiler}">
+    </linker>
+
     <linker id="linker.cfg.linux.s390" name="${gcc.compat.compiler}">
     </linker>
 
@@ -1316,17 +1461,36 @@
     <!-- MacOSX linker configuration -->
 
     <linker id="linker.cfg.macosx" name="${gcc.compat.compiler}">
-      <!-- Note: Apple doesn't seem to provide ppc binaries on Snow Leopard -->
+      <!-- compilerarg value="-v"/ -->
       <linkerarg value="-arch" if="use.macosppc"/>
       <linkerarg value="ppc" if="use.macosppc"/>
       <linkerarg value="-arch" if="use.macosx32"/>
       <linkerarg value="i386" if="use.macosx32"/>
       <linkerarg value="-arch" if="use.macosx64"/>
       <linkerarg value="x86_64" if="use.macosx64"/>
-      <linkerarg value="-mmacosx-version-min=10.5"/>
+      <linkerarg value="-arch" if="use.macosx64"/>
+      <linkerarg value="arm64" if="use.macosx64"/>
+      <linkerarg value="-mmacosx-version-min=11.0"/>
+      <linkerarg value="-static-libgcc" if="isGCC"/>
+      <linkerarg value="-static-libstdc++" if="isGCC"/>
+    </linker>
+
+    <linker id="linker.cfg.ios.amd64" name="${gcc.compat.compiler}">
+      <!-- compilerarg value="-v"/ -->
+      <linkerarg value="-arch"/>
+      <linkerarg value="x86_64"/>
+      <linkerarg value="-miphoneos-version-min=11.0"/>
+      <linkerarg value="-static-libgcc" if="isGCC"/>
+      <linkerarg value="-static-libstdc++" if="isGCC"/>
+    </linker>
+
+    <linker id="linker.cfg.ios.arm64" name="${gcc.compat.compiler}">
+      <!-- compilerarg value="-v"/ -->
+      <linkerarg value="-arch"/>
+      <linkerarg value="arm64"/>
+      <linkerarg value="-miphoneos-version-min=11.0"/>
       <linkerarg value="-static-libgcc" if="isGCC"/>
       <linkerarg value="-static-libstdc++" if="isGCC"/>
-      <!-- Note: Apple doesn't seem to provide ppc64 binaries on Leopard -->
     </linker>
 
     <!-- Windows linker configuration -->
@@ -1382,8 +1546,8 @@
       -->
     <target name="gluegen.cpptasks.declare.compiler.environment" >
       <condition property="java.lib.dir.platform"
-                 value="${env.TARGET_JAVA_LIBS}" >
-                 <available file="${env.TARGET_JAVA_LIBS}" type="dir" />
+                 value="${TARGET_JAVA_LIBS}" >
+                 <available file="${TARGET_JAVA_LIBS}" type="dir" />
       </condition>
     </target>
 
@@ -1427,7 +1591,7 @@
       <echo message="Win64.MingW" />
       <property name="compiler.cfg.id.base"          value="compiler.cfg.win64.mingw" />
       <property name="linker.cfg.id.base"            value="linker.cfg.win64.mingw" />
-      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/bin" /> <!-- link against dll directly (not lib)-->
+      <property name="java.lib.dir.platform"         value="${java.home.dir}/bin" /> <!-- link against dll directly (not lib)-->
     </target>
 
     <target name="gluegen.cpptasks.declare.compiler.win32" depends="gluegen.cpptasks.declare.compiler.win32.vc6,gluegen.cpptasks.declare.compiler.win32.vc7,gluegen.cpptasks.declare.compiler.win32.vc8,gluegen.cpptasks.declare.compiler.win32.vc8_x64,gluegen.cpptasks.declare.compiler.win32.vc9,gluegen.cpptasks.declare.compiler.win32.mingw,gluegen.cpptasks.declare.compiler.win64.mingw" if="isWindows">
@@ -1439,94 +1603,168 @@
       <echo message="Linux.x86" />
       <property name="compiler.cfg.id.base"          value="compiler.cfg.linux.x86" /> 
       <property name="linker.cfg.id.base"            value="linker.cfg.linux.x86" /> 
-      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/i386" />
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/jre/lib/i386" 
+                                                      file="${java.home.dir}/jre/lib/i386/libjava.so"/>
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/lib/i386"     
+                                                      file="${java.home.dir}/lib/i386/libjava.so"/>
+      <property name="java.lib.dir.platform"         value="${java.home.dir}/lib"/> <!-- new default -->
     </target>
 
     <target name="gluegen.cpptasks.declare.compiler.linux.amd64" if="isLinuxAMD64">
       <echo message="Linux.AMD64" />
       <property name="compiler.cfg.id.base"          value="compiler.cfg.linux.amd64" /> 
       <property name="linker.cfg.id.base"            value="linker.cfg.linux.amd64" /> 
-      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/amd64" />
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/jre/lib/amd64" 
+                                                      file="${java.home.dir}/jre/lib/amd64/libjava.so"/>
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/lib/amd64"     
+                                                      file="${java.home.dir}/lib/amd64/libjava.so"/>
+      <property name="java.lib.dir.platform"         value="${java.home.dir}/lib"/> <!-- new default -->
     </target>
 
     <target name="gluegen.cpptasks.declare.compiler.linux.alpha" if="isLinuxAlpha">
       <echo message="Linux.alpha" />
       <property name="compiler.cfg.id.base"          value="compiler.cfg.linux.alpha" /> 
       <property name="linker.cfg.id.base"            value="linker.cfg.linux.alpha" /> 
-      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/alpha" />
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/jre/lib/alpha" 
+                                                      file="${java.home.dir}/jre/lib/alpha/libjava.so"/>
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/lib/alpha"     
+                                                      file="${java.home.dir}/lib/alpha/libjava.so"/>
+      <property name="java.lib.dir.platform"         value="${java.home.dir}/lib"/> <!-- new default -->
     </target>
 
     <target name="gluegen.cpptasks.declare.compiler.linux.armv6" if="isLinuxARMv6">
       <echo message="Linux.armv6" />
       <property name="compiler.cfg.id.base"          value="compiler.cfg.linux.armv6" /> 
       <property name="linker.cfg.id.base"            value="linker.cfg.linux.armv6" /> 
-      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/arm" />
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/jre/lib/arm" 
+                                                      file="${java.home.dir}/jre/lib/arm/libjava.so"/>
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/lib/arm"     
+                                                      file="${java.home.dir}/lib/arm/libjava.so"/>
+      <property name="java.lib.dir.platform"         value="${java.home.dir}/lib"/> <!-- new default -->
     </target>
 
     <target name="gluegen.cpptasks.declare.compiler.linux.aarch64" if="isLinuxARM64">
       <echo message="Linux.aarch64" />
       <property name="compiler.cfg.id.base"          value="compiler.cfg.linux.aarch64" /> 
       <property name="linker.cfg.id.base"            value="linker.cfg.linux.aarch64" /> 
-      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/arm" />
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/jre/lib/aarch64" 
+                                                      file="${java.home.dir}/jre/lib/aarch64/libjava.so"/>
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/lib/aarch64"     
+                                                      file="${java.home.dir}/lib/aarch64/libjava.so"/>
+      <property name="java.lib.dir.platform"         value="${java.home.dir}/lib"/> <!-- new default -->
     </target>
 
     <target name="gluegen.cpptasks.declare.compiler.linux.ia64" if="isLinuxIA64">
       <echo message="Linux.IA64" />
       <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" /> 
       <property name="linker.cfg.id.base"            value="linker.cfg.linux" /> 
-      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/ia64" />
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/jre/lib/ia64" 
+                                                      file="${java.home.dir}/jre/lib/ia64/libjava.so"/>
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/lib/ia64"     
+                                                      file="${java.home.dir}/lib/ia64/libjava.so"/>
+      <property name="java.lib.dir.platform"         value="${java.home.dir}/lib"/> <!-- new default -->
     </target>
 
     <target name="gluegen.cpptasks.declare.compiler.linux.hppa" if="isLinuxHppa">
       <echo message="Linux.hppa" />
       <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" /> 
       <property name="linker.cfg.id.base"            value="linker.cfg.linux" /> 
-      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/hppa" />
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/jre/lib/hppa" 
+                                                      file="${java.home.dir}/jre/lib/hppa/libjava.so"/>
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/lib/hppa"     
+                                                      file="${java.home.dir}/lib/hppa/libjava.so"/>
+      <property name="java.lib.dir.platform"         value="${java.home.dir}/lib"/> <!-- new default -->
     </target>
 
     <target name="gluegen.cpptasks.declare.compiler.linux.mips" if="isLinuxMips">
       <echo message="Linux.Mips" />
       <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" /> 
       <property name="linker.cfg.id.base"            value="linker.cfg.linux" /> 
-      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/mips" />
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/jre/lib/mips" 
+                                                      file="${java.home.dir}/jre/lib/mips/libjava.so"/>
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/lib/mips"     
+                                                      file="${java.home.dir}/lib/mips/libjava.so"/>
+      <property name="java.lib.dir.platform"         value="${java.home.dir}/lib"/> <!-- new default -->
     </target>
 
     <target name="gluegen.cpptasks.declare.compiler.linux.mipsel" if="isLinuxMipsel">
       <echo message="Linux.Mipsel" />
       <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" /> 
       <property name="linker.cfg.id.base"            value="linker.cfg.linux" /> 
-      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/mipsel" />
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/jre/lib/mipsel" 
+                                                      file="${java.home.dir}/jre/lib/mipsel/libjava.so"/>
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/lib/mipsel"     
+                                                      file="${java.home.dir}/lib/mipsel/libjava.so"/>
+      <property name="java.lib.dir.platform"         value="${java.home.dir}/lib"/> <!-- new default -->
     </target>
 
     <target name="gluegen.cpptasks.declare.compiler.linux.ppc" if="isLinuxPpc">
       <echo message="Linux.Ppc" />
       <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" /> 
       <property name="linker.cfg.id.base"            value="linker.cfg.linux" /> 
-      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/ppc" />
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/jre/lib/ppc" 
+                                                      file="${java.home.dir}/jre/lib/ppc/libjava.so"/>
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/lib/ppc"     
+                                                      file="${java.home.dir}/lib/ppc/libjava.so"/>
+      <property name="java.lib.dir.platform"         value="${java.home.dir}/lib"/> <!-- new default -->
+    </target>
+
+    <target name="gluegen.cpptasks.declare.compiler.linux.ppc64" if="isLinuxPpc64">
+      <echo message="Linux.Ppc64" />
+      <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" />
+      <property name="linker.cfg.id.base"            value="linker.cfg.linux" />
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/jre/lib/ppc64" 
+                                                      file="${java.home.dir}/jre/lib/ppc64/libjava.so"/>
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/lib/ppc64"     
+                                                      file="${java.home.dir}/lib/ppc64/libjava.so"/>
+      <property name="java.lib.dir.platform"         value="${java.home.dir}/lib"/> <!-- new default -->
+    </target>
+
+    <target name="gluegen.cpptasks.declare.compiler.linux.ppc64le" if="isLinuxPpc64le">
+      <echo message="Linux.Ppc64le" />
+      <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" />
+      <property name="linker.cfg.id.base"            value="linker.cfg.linux" />
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/jre/lib/ppc64le" 
+                                                      file="${java.home.dir}/jre/lib/ppc64le/libjava.so"/>
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/lib/ppc64le"     
+                                                      file="${java.home.dir}/lib/ppc64le/libjava.so"/>
+      <property name="java.lib.dir.platform"         value="${java.home.dir}/lib"/> <!-- new default -->
     </target>
 
     <target name="gluegen.cpptasks.declare.compiler.linux.s390" if="isLinuxs390">
       <echo message="Linux.s390" />
       <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" /> 
       <property name="linker.cfg.id.base"            value="linker.cfg.linux" /> 
-      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/s390" />
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/jre/lib/s390" 
+                                                      file="${java.home.dir}/jre/lib/s390/libjava.so"/>
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/lib/s390"     
+                                                      file="${java.home.dir}/lib/s390/libjava.so"/>
+      <property name="java.lib.dir.platform"         value="${java.home.dir}/lib"/> <!-- new default -->
     </target>
 
     <target name="gluegen.cpptasks.declare.compiler.linux.s390x" if="isLinuxs390x">
       <echo message="Linux.s390x" />
       <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" /> 
       <property name="linker.cfg.id.base"            value="linker.cfg.linux" /> 
-      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/s390x" />
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/jre/lib/s390x" 
+                                                      file="${java.home.dir}/jre/lib/s390x/libjava.so"/>
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/lib/s390x"     
+                                                      file="${java.home.dir}/lib/s390x/libjava.so"/>
+      <property name="java.lib.dir.platform"         value="${java.home.dir}/lib"/> <!-- new default -->
     </target>
 
     <target name="gluegen.cpptasks.declare.compiler.linux.sparc" if="isLinuxSparc">
       <echo message="Linux.Sparc" />
       <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" /> 
       <property name="linker.cfg.id.base"            value="linker.cfg.linux" /> 
-      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/sparc" />
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/jre/lib/sparc" 
+                                                      file="${java.home.dir}/jre/lib/sparc/libjava.so"/>
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/lib/sparc"     
+                                                      file="${java.home.dir}/lib/sparc/libjava.so"/>
+      <property name="java.lib.dir.platform"         value="${java.home.dir}/lib"/> <!-- new default -->
     </target>
 
-    <target name="gluegen.cpptasks.declare.compiler.linux" depends="gluegen.cpptasks.declare.compiler.linux.x86,gluegen.cpptasks.declare.compiler.linux.amd64,gluegen.cpptasks.declare.compiler.linux.ia64,gluegen.cpptasks.declare.compiler.linux.armv6,gluegen.cpptasks.declare.compiler.linux.aarch64,gluegen.cpptasks.declare.compiler.linux.alpha,gluegen.cpptasks.declare.compiler.linux.hppa,gluegen.cpptasks.declare.compiler.linux.mips,gluegen.cpptasks.declare.compiler.linux.mipsel,gluegen.cpptasks.declare.compiler.linux.ppc,gluegen.cpptasks.declare.compiler.linux.s390,gluegen.cpptasks.declare.compiler.linux.s390x,gluegen.cpptasks.declare.compiler.linux.sparc" if="isLinux">
+    <target name="gluegen.cpptasks.declare.compiler.linux" depends="gluegen.cpptasks.declare.compiler.linux.x86,gluegen.cpptasks.declare.compiler.linux.amd64,gluegen.cpptasks.declare.compiler.linux.ia64,gluegen.cpptasks.declare.compiler.linux.armv6,gluegen.cpptasks.declare.compiler.linux.aarch64,gluegen.cpptasks.declare.compiler.linux.alpha,gluegen.cpptasks.declare.compiler.linux.hppa,gluegen.cpptasks.declare.compiler.linux.mips,gluegen.cpptasks.declare.compiler.linux.mipsel,gluegen.cpptasks.declare.compiler.linux.ppc,gluegen.cpptasks.declare.compiler.linux.ppc64,gluegen.cpptasks.declare.compiler.linux.ppc64le,gluegen.cpptasks.declare.compiler.linux.s390,gluegen.cpptasks.declare.compiler.linux.s390x,gluegen.cpptasks.declare.compiler.linux.sparc" if="isLinux">
         <property name="java.includes.dir.platform" value="${java.includes.dir}/x11" />
     </target>
 
@@ -1550,7 +1788,11 @@
 
     <target name="gluegen.cpptasks.declare.compiler.solaris" depends="gluegen.cpptasks.declare.compiler.solaris32,gluegen.cpptasks.declare.compiler.solaris.sparcv9,gluegen.cpptasks.declare.compiler.solaris.amd64" if="isSolaris">
       <property name="java.includes.dir.platform"    value="${java.includes.dir}/x11" />
-      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/${solaris.cpu}" />
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/jre/lib/${solaris.cpu}" 
+                                                      file="${java.home.dir}/jre/lib/${solaris.cpu}/libjava.so"/>
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/lib/${solaris.cpu}"     
+                                                      file="${java.home.dir}/lib/${solaris.cpu}/libjava.so"/>
+      <property name="java.lib.dir.platform"         value="${java.home.dir}/lib"/> <!-- new default -->
     </target>
 
     <target name="gluegen.cpptasks.declare.compiler.macosx" if="isOSX">
@@ -1558,26 +1800,51 @@
       <property name="compiler.cfg.id.base"          value="compiler.cfg.macosx" /> 
       <property name="linker.cfg.id.base"            value="linker.cfg.macosx" /> 
       <property name="java.includes.dir.platform"    value="${java.includes.dir}/macosx" />
-      <condition property="java.lib.dir.platform"
-                 value="${java.home.dir}/jre/lib">
-                 <available file="${java.home.dir}/jre/lib/libjawt.dylib"/>
-      </condition>
-      <!-- Fallback value Java6 -->
-      <property name="java.lib.dir.platform"      value="/System/Library/Frameworks/JavaVM.framework/Libraries" />
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/jre/lib"
+                                                      file="${java.home.dir}/jre/lib/libjava.so"/>
+      <property name="java.lib.dir.platform"         value="${java.home.dir}/lib"/> <!-- new default -->
+    </target>
+
+    <target name="gluegen.cpptasks.declare.compiler.ios.amd64" if="isIOSAmd64">
+      <echo message="iOSAmd64" />
+      <property name="compiler.cfg.id.base"          value="compiler.cfg.ios.amd64" /> 
+      <property name="linker.cfg.id.base"            value="linker.cfg.ios.amd64" /> 
+      <property name="java.includes.dir.platform"    value="${java.includes.dir}/macosx" />
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/jre/lib"
+                                                      file="${java.home.dir}/jre/lib/libjava.a"/>
+      <property name="java.lib.dir.platform"         value="${java.home.dir}/lib"/> <!-- new default -->
+    </target>
+
+    <target name="gluegen.cpptasks.declare.compiler.ios.arm64" if="isIOSArm64">
+      <echo message="iOSArm64" />
+      <property name="compiler.cfg.id.base"          value="compiler.cfg.ios.arm64" /> 
+      <property name="linker.cfg.id.base"            value="linker.cfg.ios.arm64" /> 
+      <property name="java.includes.dir.platform"    value="${java.includes.dir}/macosx" />
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/jre/lib"
+                                                      file="${java.home.dir}/jre/lib/libjava.a"/>
+      <property name="java.lib.dir.platform"         value="${java.home.dir}/lib"/> <!-- new default -->
     </target>
 
     <target name="gluegen.cpptasks.declare.compiler.freebsd.x86" if="isFreeBSDX86">
       <echo message="FreeBSD" />
       <property name="compiler.cfg.id.base"          value="compiler.cfg.freebsd" />
       <property name="linker.cfg.id.base"            value="linker.cfg.freebsd.x86" />
-      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/i386" />
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/jre/lib/i386" 
+                                                      file="${java.home.dir}/jre/lib/i386/libjava.so"/>
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/lib/i386"     
+                                                      file="${java.home.dir}/lib/i386/libjava.so"/>
+      <property name="java.lib.dir.platform"         value="${java.home.dir}/lib"/> <!-- new default -->
     </target>
 
     <target name="gluegen.cpptasks.declare.compiler.freebsd.amd64" if="isFreeBSDAMD64">
       <echo message="FreeBSD" />
       <property name="compiler.cfg.id.base"          value="compiler.cfg.freebsd" />
       <property name="linker.cfg.id.base"            value="linker.cfg.freebsd.amd64" />
-      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/amd64" />
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/jre/lib/amd64" 
+                                                      file="${java.home.dir}/jre/lib/amd64/libjava.so"/>
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/lib/amd64"     
+                                                      file="${java.home.dir}/lib/amd64/libjava.so"/>
+      <property name="java.lib.dir.platform"         value="${java.home.dir}/lib"/> <!-- new default -->
     </target>
 
     <target name="gluegen.cpptasks.declare.compiler.freebsd" depends="gluegen.cpptasks.declare.compiler.freebsd.x86,gluegen.cpptasks.declare.compiler.freebsd.amd64" if="isFreeBSD">
@@ -1589,10 +1856,14 @@
       <property name="compiler.cfg.id.base"          value="compiler.cfg.hpux" />
       <property name="linker.cfg.id.base"            value="linker.cfg.hpux" />
       <property name="java.includes.dir.platform"    value="${java.includes.dir}/x11" />
-      <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/PA_RISC2.0" />
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/jre/lib/PA_RISC2.0" 
+                                                      file="${java.home.dir}/jre/lib/PA_RISC2.0/libjava.so"/>
+      <available property="java.lib.dir.platform"    value="${java.home.dir}/lib/PA_RISC2.0"     
+                                                      file="${java.home.dir}/lib/PA_RISC2.0/libjava.so"/>
+      <property name="java.lib.dir.platform"         value="${java.home.dir}/lib"/> <!-- new default -->
     </target>
 
-    <target name="gluegen.cpptasks.declare.compiler" depends="gluegen.cpptasks.declare.compiler.environment,gluegen.cpptasks.declare.compiler.win32,gluegen.cpptasks.declare.compiler.linux,gluegen.cpptasks.declare.compiler.solaris,gluegen.cpptasks.declare.compiler.macosx,gluegen.cpptasks.declare.compiler.freebsd,gluegen.cpptasks.declare.compiler.hpux" >
+    <target name="gluegen.cpptasks.declare.compiler" depends="gluegen.cpptasks.declare.compiler.environment,gluegen.cpptasks.declare.compiler.win32,gluegen.cpptasks.declare.compiler.linux,gluegen.cpptasks.declare.compiler.solaris,gluegen.cpptasks.declare.compiler.macosx,gluegen.cpptasks.declare.compiler.ios.amd64,gluegen.cpptasks.declare.compiler.ios.arm64,gluegen.cpptasks.declare.compiler.freebsd,gluegen.cpptasks.declare.compiler.hpux" >
       <echo message="java.home.dir                ${java.home.dir}" />
       <echo message="java.includes.dir            ${java.includes.dir}" />
       <echo message="java.includes.dir.platform   ${java.includes.dir.platform}" />
@@ -1614,7 +1885,6 @@
           <include name="**/*.so"/>     <!-- unix    -->
           <include name="**/*.dll"/>    <!-- windows -->
           <include name="**/*.dylib"/>  <!-- macosx  -->
-          <include name="**/*.jnilib"/> <!-- macosx  -->
         </fileset>
       </apply>
     </target>
@@ -1644,23 +1914,39 @@
       <attribute name="excludelibs" default="" />
       <sequential>
 
+      <echo message="native.tag.jar @{module} (attr) for @{nativejarfile} include @{includelibs} exclude @{excludelibs}"/>
       <var name="nativejarfile.basename" unset="true"/>
       <var name="nativejarfile.tmpdir" unset="true"/>
       <var name="nativejarfile.tmpdir.natives" unset="true"/>
+      <var name="nativejarfile.includelibs" unset="true"/>
+      <var name="nativejarfile.excludelibs" unset="true"/>
       <basename property="nativejarfile.basename" file="@{nativejarfile}"/>
       <property name="nativejarfile.tmpdir" value="@{objdir}/${nativejarfile.basename}.d" />
       <property name="nativejarfile.tmpdir.natives" value="${nativejarfile.tmpdir}/jar" />
       <!-- In case we like to switch to a natives subfolder 'natives/${os.and.arch}' use the following -->
       <!-- property name="nativejarfile.tmpdir.natives" value="${nativejarfile.tmpdir}/jar/natives/${os.and.arch}" /-->
 
+      <!-- enforce inclusion/exclusion of *.symbols depending on build.dynamiclibs -->
+      <condition property="nativejarfile.includelibs"
+                 value="@{includelibs}"
+                 else="@{includelibs} *.symbols">
+           <istrue value="${build.dynamiclibs}"/>
+      </condition>
+      <condition property="nativejarfile.excludelibs"
+                 value="@{excludelibs} *.symbols"
+                 else="@{excludelibs}">
+           <istrue value="${build.dynamiclibs}"/>
+      </condition>
+      <echo message="native.tag.jar @{module} (props) ${nativejarfile.basename} include ${nativejarfile.includelibs} exclude ${nativejarfile.excludelibs}"/>
+
       <mkdir dir="${nativejarfile.tmpdir}/java" />
       <mkdir dir="${nativejarfile.tmpdir.natives}" />
       <mkdir dir="${nativejarfile.tmpdir.natives}/natives" />
       <mkdir dir="${nativejarfile.tmpdir.natives}/natives/${os.and.arch}" />
       <copy todir="${nativejarfile.tmpdir.natives}/natives/${os.and.arch}">
         <fileset dir="@{objdir}"
-                 includes="@{includelibs}"
-                 excludes="@{excludelibs}"/>
+                 includes="${nativejarfile.includelibs}"
+                 excludes="${nativejarfile.excludelibs}"/>
       </copy>
       <echo message='package ${nativejartag.package}.@{module}.${os.and.arch.dot}; public final class TAG { }' file="${nativejarfile.tmpdir}/java/${nativejartag.prefix}/@{module}/${os.and.arch.slash}/TAG.java"/>
       <javac destdir="${nativejarfile.tmpdir}/jar"
@@ -1682,4 +1968,23 @@
       </delete>
       </sequential>
     </macrodef>  
+
+    <macrodef name="gluegen.make.libsymbols">
+      <attribute name="builddir" />
+      <attribute name="nativelib" />
+      <attribute name="symbolsfile" />
+      <sequential>
+      <!-- invoke nm in a most compatible way, tested on GNU/Linux and MacOS -->
+      <exec executable="nm" dir="@{builddir}" output="@{symbolsfile}.raw">
+        <arg value="--extern-only"/>
+        <arg value="--defined-only"/>
+        <arg value="@{nativelib}"/>
+      </exec>
+      <exec executable="${awk_executable}" dir="@{builddir}" output="@{symbolsfile}">
+        <arg value="{ print $3 }"/>
+        <arg value="@{symbolsfile}.raw"/>
+      </exec>
+      <delete file="@{symbolsfile}.raw" quiet="true" failonerror="false" />
+      </sequential>
+    </macrodef>  
 </project>
diff -Nru gluegen2-2.3.2/make/gluegen-cpptasks-custom.xml gluegen2-2.4.0+dfsg/make/gluegen-cpptasks-custom.xml
--- gluegen2-2.3.2/make/gluegen-cpptasks-custom.xml	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/gluegen-cpptasks-custom.xml	2023-02-01 18:52:41.000000000 +0100
@@ -41,8 +41,12 @@
   -->
   <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" /> 
   <property name="linker.cfg.id.base"            value="linker.cfg.linux" /> 
-  <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/i386" />
   <property name="java.includes.dir.platform"    value="${java.includes.dir}/linux" />
+  <available property="java.lib.dir.platform"    value="${java.home.dir}/jre/lib/i386" 
+                                                  file="${java.home.dir}/jre/lib/i386/libjava.so"/>
+  <available property="java.lib.dir.platform"    value="${java.home.dir}/lib/i386"     
+                                                  file="${java.home.dir}/lib/i386/libjava.so"/>
+  <property name="java.lib.dir.platform"         value="${java.home.dir}/lib"/> <!-- new default -->
 </target>
 
 </project>
diff -Nru gluegen2-2.3.2/make/gluegen-properties.xml gluegen2-2.4.0+dfsg/make/gluegen-properties.xml
--- gluegen2-2.3.2/make/gluegen-properties.xml	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/gluegen-properties.xml	2023-02-01 18:52:41.000000000 +0100
@@ -57,10 +57,9 @@
     <property name="ant-junit4.jar" value="${ant.home}/lib/ant-junit4.jar" />
     <property name="semver.jar" value="${gluegen.root}/make/lib/semantic-versioning/semver.jar" />
 
-    <property name="android.version" value="9" /> <!-- default - if not set by jogamp-env.xml:jogamp.env.init -->
-    <property name="android-min.jar" value="${gluegen.root}/make/lib/android-sdk/${android.version}/android.jar" />
-    <property name="android-015.jar" value="${gluegen.root}/make/lib/android-sdk/15/android.jar" />
-    <property name="android.jar"     value="${android-015.jar}" />
+    <property name="android.api.level" value="24" /> <!-- default - if not set by jogamp-env.xml:jogamp.env.init -->
+    <property name="android-min.jar"   value="${gluegen.root}/make/lib/android-sdk/${android.api.level}/android.jar" />
+    <property name="android.jar"       value="${android-min.jar}" />
     <condition property="android-jars.available">
         <and>
             <available file="${android-min.jar}"/>
@@ -88,10 +87,16 @@
     <!-- maybe overriden, e.g. with "clang" -->
     <echo message="Setting default gcc.compat.compiler" />
     <condition property="gcc.compat.compiler" value="xcode.clang"> <!-- default for OSX -->
-      <and>
-        <os family="mac"/>
-        <os family="unix"/>
-      </and>
+      <or>
+          <istrue value="${isOSX}"/> 
+          <istrue value="${isIOS}"/> 
+          <istrue value="${isIOSAmd64}"/> 
+          <istrue value="${isIOSArm64}"/> 
+          <and>
+            <os family="mac"/>
+            <os family="unix"/>
+          </and>
+      </or>
     </condition>
     <property name="gcc.compat.compiler" value="gcc"/>             <!-- default for all others .. -->
     <echo message="gcc.compat.compiler=${gcc.compat.compiler}" />
diff -Nru gluegen2-2.3.2/make/jogamp-androidtasks.xml gluegen2-2.4.0+dfsg/make/jogamp-androidtasks.xml
--- gluegen2-2.3.2/make/jogamp-androidtasks.xml	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/jogamp-androidtasks.xml	2023-02-01 18:52:41.000000000 +0100
@@ -28,7 +28,7 @@
             jarbuilddir="${build}"   // jar build location
             jarbasename="gluegen-rt" // jar base file name
             nativebuilddir="${gluegen.lib.dir}" // native library build location
-            nativebasename="gluegen-rt"         // native library base file name "*${nativebasename}*.${native.library.suffix}"
+            nativebasename="${output.lib.name}"         // native library base file name "*${nativebasename}*.${native.library.suffix}"
             androidmanifest.path="resources/android/AndroidManifest.xml"
             androidresources.path="resources/android/res"
             jarmanifest.path="${build}/Manifest-rt.temp" // optional
@@ -65,6 +65,7 @@
       <attribute name="keystore.alias" default="${android.keystore.alias}" />
       <attribute name="keystore.storepass" default="${android.keystore.storepass}" />
       <attribute name="keystore.keypass" default="${android.keystore.keypass}" />
+      <element name="d8-classpaths" implicit="no" optional="true" />
 
       <sequential>
         <var name="m.aapt.apkbasename0" unset="true"/>
@@ -158,6 +159,7 @@
 
         <echo>aapt.signed ${m.aapt.apkbasename}: compiling R.java...</echo>
         <javac encoding="${m.aapt.java.encoding}"
+            includeAntRuntime="false"
             source="${target.sourcelevel}" 
             target="${target.targetlevel}" 
             bootclasspath="${target.rt.jar}"
@@ -171,23 +173,36 @@
                  <pathelement path="${android.jar}"/>
             </classpath>
         </javac>
+        <zip destfile="${m.aapt.build.apk}/temp/classes.zip" level="0">
+            <fileset dir="${m.aapt.build.apk}/temp/classes"/>
+        </zip>
 
         <echo>aapt.signed ${m.aapt.apkbasename}: dex'ing</echo>
-        <exec dir="." executable="dx" logError="true" failonerror="true" failifexecutionfails="true">
-            <arg line="--dex"/>
-            <arg line="--output=${m.aapt.dex.file}"/>
+        <!-- exec dir="." executable="dx" logError="true" failonerror="true" failifexecutionfails="true">
+            <arg line="- -dex"/>
+            <arg line="- -output=${m.aapt.dex.file}"/>
+            <arg line="- -min-sdk-version=${android.api.level}"/>
             <arg line="@{jarbuilddir}/@{jarbasename}.jar"/>
             <arg line="${m.aapt.build.apk}/temp/classes"/>
+        </exec -->
+        <exec dir="." executable="d8" logError="true" failonerror="true" failifexecutionfails="true">
+            <arg line="--output ${m.aapt.build.apk}/image"/>
+
+            <arg line="--classpath ${android-min.jar}"/>
+            <arg line="--classpath ${target.rt.jar}"/>
+            <d8-classpaths/>
+
+            <arg line="--min-api ${android.api.level}"/>
+
+            <!-- arg line="- -no-desugaring"/ -->
+
+            <arg line="--release"/>
+            <!-- arg line="- -debug"/ -->
+
+            <arg line="@{jarbuilddir}/@{jarbasename}.jar"/>
+            <arg line="${m.aapt.build.apk}/temp/classes.zip"/>
         </exec>
         
-        <path id="android.antlibs">
-            <pathelement path="${env.ANDROID_HOME}/tools/lib/anttasks.jar" />
-            <pathelement path="${env.ANDROID_HOME}/tools/lib/sdklib.jar" />
-            <pathelement path="${env.ANDROID_HOME}/tools/lib/androidprefs.jar" />
-            <pathelement path="${env.ANDROID_HOME}/tools/lib/apkbuilder.jar" />
-            <pathelement path="${env.ANDROID_HOME}/tools/lib/jarutils.jar" />
-        </path>
-
         <echo>aapt.signed ${m.aapt.apkbasename}: packaging</echo>
         <exec dir="." executable="aapt" logError="true" failonerror="true" failifexecutionfails="true">
             <arg line="package"/>
@@ -223,11 +238,13 @@
 
             <!-- Be Java6 keytool/jarsigner compatible, and hence Android compatible -->
             <arg value="-sigalg"/>
-            <arg value="MD5withRSA"/>
+            <arg value="SHA256withRSA"/>
             <arg value="-keyalg"/>
             <arg value="RSA"/>
             <arg value="-keysize"/>
-            <arg value="1024"/>
+            <arg value="2048"/>
+            <arg value="-validity"/>
+            <arg value="365"/>
 
             <arg value="-keystore" />
             <arg value="${m.aapt.build.apk}/debug.keystore" />
@@ -248,8 +265,8 @@
         <!-- Be Java6 keytool/jarsigner compatible, and hence Android compatible -->
         <echo>aapt.signed ${m.aapt.apkbasename}: signing w/ key @{keystore.alias} @ ${m.aapt.keystore.file}</echo>
         <!-- signjar
-              sigalg="MD5withRSA"
-              digestalg="SHA1"
+              sigalg="SHA256withRSA"
+              digestalg="SHA256"
               jar="${m.aapt.unsigned.package.file.name}"
               signedjar="${m.aapt.signed.file.name}"
               keystore="${m.aapt.keystore.file}"
@@ -261,9 +278,9 @@
         <exec dir="." executable="jarsigner" failonerror="true">
             <!-- Be Java6 keytool/jarsigner compatible, and hence Android compatible -->
             <arg value="-sigalg"/>
-            <arg value="MD5withRSA"/>
+            <arg value="SHA256withRSA"/>
             <arg value="-digestalg"/>
-            <arg value="SHA1"/>
+            <arg value="SHA256"/>
 
             <arg value="-keystore" />
             <arg value="${m.aapt.keystore.file}" />
@@ -282,7 +299,7 @@
         </exec>
 
         <echo>aapt.signed ${m.aapt.apkbasename}: zip aligning</echo>
-        <exec dir="." executable="${env.ANDROID_HOME}/build-tools/${env.ANDROID_BUILD_TOOLS_VERSION}/zipalign" failonerror="true">
+        <exec dir="." executable="zipalign" failonerror="true">
             <arg line="-v" />
             <arg value="-f" />
             <arg value="4" />
diff -Nru gluegen2-2.3.2/make/jogamp-env.xml gluegen2-2.4.0+dfsg/make/jogamp-env.xml
--- gluegen2-2.3.2/make/jogamp-env.xml	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/jogamp-env.xml	2023-02-01 18:52:41.000000000 +0100
@@ -1,22 +1,51 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<!-- Current minimum requirements are:
-        - Java 1.6 (Level 6.0)
-        - Android SDK API Level 9 (Version 2.3 Gingerbread)
-
-     Official production builds are performed w/ Java 1.6.
-        - Java 1.6 (Level 6.0)
-        - Android SDK API Level 9 (Version 2.3 Gingerbread)
-
-     Android supports Java language level 6.0.
-     Nevertheless, it cannot be guaranteed whether the Android API
-     supports all classes and methods of Java 1.6.
-     It is required for JogAmp developers to validate Android compatibility
-     by an Android crosscompilation build.
-
-     Current GlueGen code utilizes some minor Java 1.6 features
-     which could be replaced, however it's not desired at this point
-     since we have no mode hard Java 1.5 constraints.
+<!-- Current runtime requirements are:
+        - Java 1.8 (Level 8.0)
+        - Android SDK API level 24 (Version 7.0 Nougat, released August 2016)
+
+     Official production builds are performed _for_ Java 1.8.
+        - Java 1.8 (Level 8.0)
+        - Android SDK API level 24 (Version 7.0 Nougat, released August 2016)
+
+     Official production builds are performed _on_ OpenJDK 11 or 17
+     and a Java JDK 11 or greater is required!
+
+     Target Java 8 baseline is chosen today, June 2019, 
+     since OpenJDK 1.8 is well supported on desktop, 
+     mobile support is given w/ OpenJDK 9 and 
+     Android also support these language features for almost 3 years.
+
+     +++
+     
+     Android 7.0 Nougat, API level 24 supports Java 1.8, 
+     see <https://developer.android.com/studio/write/java8-support>.
+
+     However, we need to set the APK's manifest SDK min version to 21 (Android 5)
+     and target version to 28 (Android 9), as required as of 2019-08-01
+     <https://support.google.com/googleplay/android-developer/answer/113469#targetsdk>
+
+         <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28"/>
+
+     Due to certain libc compatibility issues of Android API > 22,
+     we compile certain native libraries @ API 22,
+     see <https://github.com/android/ndk/issues/964>.
+     One example is OpenAL-Soft.
+
+     It is strongly recommended to test with the x86 emulator
+     using the latest API level. 
+     On 2019-12-25 we have tested using Android 10, API 29 on the x86 emulator.
+
+     Further testing should be performed from Android 5, API 21, to Android 9, API 28,
+     as well as on aarch64 and armv7a devices.
+
+     +++
+
+     For crosscompilation the following shall be set:
+     - TARGET_PLATFORM_SYSROOT Crosscompiler and system specified 'sysroot' (as in gcc \-\-print-sysroot)
+     - TARGET_PLATFORM_USRROOT Additional optional user headers and libraries for target
+     - TARGET_PLATFORM_USRLIBS Actual location of target user libraries within TARGET_PLATFORM_USRROOT
+     - TARGET_JAVA_LIBS Actual location of the Java libraries within TARGET_PLATFORM_USRROOT
   -->
 
 <project name="jogamp-env" basedir=".">
@@ -30,12 +59,12 @@
     <property name="jvmJava.exe" value="${java.home}/bin/java" /> <!-- the java jvm executable for unit tests -->
     <echo message="jvmJava.exe                ${jvmJava.exe}"/>
 
-    <condition property="jvmJava7.exe" value="${env.JAVA7_EXE}">
+    <condition property="jvmJava8.exe" value="${env.JAVA8_EXE}">
         <not>
-         <equals arg1="${env.JAVA7_EXE}" arg2="$${env.JAVA7_EXE}" casesensitive="true" />
+         <equals arg1="${env.JAVA8_EXE}" arg2="$${env.JAVA8_EXE}" casesensitive="true" />
         </not>
     </condition>
-    <echo message="jvmJava7.exe               ${jvmJava7.exe}"/> <!-- optional extra Java7 JVM for unit tests -->
+    <echo message="jvmJava8.exe               ${jvmJava8.exe}"/> <!-- optional extra Java8 JVM for unit tests -->
 
     <fail message="Please build using Ant 1.8.0 or higher.">
       <condition>
@@ -45,17 +74,65 @@
       </condition>
     </fail>
 
-    <fail message="Unsupported Java version: ${ant.java.version}. Make sure that the version of the Java compiler is 1.6 (6.0) or greater.">
+    <condition property="minJava21" value="true">
+        <or>
+            <equals arg1="${ant.java.version}" arg2="21"/>
+            <equals arg1="${ant.java.version}" arg2="22"/>
+            <equals arg1="${ant.java.version}" arg2="23"/>
+            <equals arg1="${ant.java.version}" arg2="24"/>
+            <equals arg1="${ant.java.version}" arg2="25"/>
+            <equals arg1="${ant.java.version}" arg2="26"/>
+            <equals arg1="${ant.java.version}" arg2="27"/>
+            <equals arg1="${ant.java.version}" arg2="28"/>
+        </or>
+    </condition>
+    <echo message="minJava21                  ${minJava21}"/> 
+
+    <condition property="minJava17" value="true">
+        <or>
+            <equals arg1="${ant.java.version}" arg2="17"/>
+            <equals arg1="${ant.java.version}" arg2="18"/>
+            <equals arg1="${ant.java.version}" arg2="19"/>
+            <equals arg1="${ant.java.version}" arg2="20"/>
+            <istrue value="${minJava21}"/>
+        </or>
+    </condition>
+    <echo message="minJava17                  ${minJava17}"/> 
+
+    <condition property="minJava11" value="true">
+        <or>
+            <equals arg1="${ant.java.version}" arg2="11"/>
+            <equals arg1="${ant.java.version}" arg2="12"/>
+            <equals arg1="${ant.java.version}" arg2="13"/>
+            <equals arg1="${ant.java.version}" arg2="14"/>
+            <equals arg1="${ant.java.version}" arg2="15"/>
+            <equals arg1="${ant.java.version}" arg2="16"/>
+            <istrue value="${minJava17}"/>
+        </or>
+    </condition>
+    <echo message="minJava11                  ${minJava11}"/> 
+
+    <condition property="minJava9" value="true">
+        <or>
+            <equals arg1="${ant.java.version}" arg2="9"/>
+            <istrue value="${minJava11}"/>
+        </or>
+    </condition>
+    <echo message="minJava9                   ${minJava9}"/> 
+
+    <condition property="minJava8" value="true">
+        <or>
+            <equals arg1="${ant.java.version}" arg2="1.8"/>
+            <istrue value="${minJava9}"/>
+        </or>
+    </condition>
+    <echo message="minJava8                   ${minJava8}"/> 
+
+    <!-- Only for junit runtime tests Java [8-10] is allowed, for building Java 11 is required. -->
+    <fail message="Unsupported Java version: ${ant.java.version}. Make sure that the version of Java is 1.8 or greater.">
         <condition>
             <not>
-                <or>
-                    <equals arg1="${ant.java.version}" arg2="1.6"/>
-                    <equals arg1="${ant.java.version}" arg2="1.7"/>
-                    <equals arg1="${ant.java.version}" arg2="1.8"/>
-                    <equals arg1="${ant.java.version}" arg2="1.9"/>
-                    <equals arg1="${ant.java.version}" arg2="2.0"/>
-                    <equals arg1="${ant.java.version}" arg2="2.1"/>
-                </or>
+                <istrue value="${minJava8}"/>
             </not>
         </condition>
     </fail>
@@ -70,12 +147,7 @@
     </tstamp>
 
     <condition property="javadoc.xarg1" value="-Xdoclint:none" else="-J-Ddummy=val">
-        <or>
-            <equals arg1="${ant.java.version}" arg2="1.8"/>
-            <equals arg1="${ant.java.version}" arg2="1.9"/>
-            <equals arg1="${ant.java.version}" arg2="2.0"/>
-            <equals arg1="${ant.java.version}" arg2="2.1"/>
-        </or>
+        <istrue value="${minJava8}"/>
     </condition>
     <echo message="javadoc.xarg1              ${javadoc.xarg1}"/>
 
@@ -88,8 +160,8 @@
     <echo message="jogamp.jar.codebase        ${jogamp.jar.codebase}"/>
 
     <property name="jogamp.version.major" value="2"/>
-    <property name="jogamp.version.minor" value="3"/>
-    <property name="jogamp.version.submi" value="2"/>
+    <property name="jogamp.version.minor" value="4"/>
+    <property name="jogamp.version.submi" value="0"/>
     <!-- property name="jogamp.version.devel" value="-rc-${version.timestamp}"/ --> <!-- Devel RC Tag -->
     <property name="jogamp.version.devel" value=""/> <!-- Release tag -->
     <property name="jogamp.version.base"  value="${jogamp.version.major}.${jogamp.version.minor}"/>
@@ -97,7 +169,7 @@
     <echo message="jogamp.version             ${jogamp.version}"/>
 
     <!-- This is the Android version: xxyyzzz, xx=API yy screen-from-to zzz app-version-->
-    <property name="jogamp.version.int"   value="0914019"/>
+    <property name="jogamp.version.int"   value="2414020"/>
     <echo message="jogamp.version.int         ${jogamp.version.int}"/>
 
     <!-- only set 'junit.is.disabled' if set in environment as 'true' to disable JUNIT tests -->
@@ -130,9 +202,9 @@
         </not>
     </condition>
 
-    <condition property="android.version" value="${env.ANDROID_VERSION}" else="9">
+    <condition property="android.api.level" value="${env.ANDROID_API_LEVEL}" else="24">
         <not>
-         <equals arg1="${env.ANDROID_VERSION}" arg2="$${env.ANDROID_VERSION}" casesensitive="true" />
+         <equals arg1="${env.ANDROID_API_LEVEL}" arg2="$${env.ANDROID_API_LEVEL}" casesensitive="true" />
         </not>
     </condition>
 
@@ -148,115 +220,69 @@
         </not>
     </condition>
 
+    <condition property="target.releaselevel" value="${env.RELEASE_LEVEL}">
+        <not>
+         <equals arg1="${env.RELEASE_LEVEL}" arg2="$${env.RELEASE_LEVEL}" casesensitive="true" />
+        </not>
+    </condition>
+
     <condition property="target.rt.jar" value="${env.TARGET_RT_JAR}">
         <not>
          <equals arg1="${env.TARGET_RT_JAR}" arg2="$${env.TARGET_RT_JAR}" casesensitive="true" />
         </not>
     </condition>
 
-    <fail message="You need to specify all properties 'target.sourcelevel', 'target.targetlevel' and 'target.rt.jar' or none at all.">
-      <condition>
-        <and>
-            <or>
-              <isset property="target.sourcelevel"/>
-              <isset property="target.targetlevel"/>
-              <isset property="target.rt.jar"/>
-            </or>
-            <not>
-              <and>
-                  <isset property="target.sourcelevel"/>
-                  <isset property="target.targetlevel"/>
-                  <isset property="target.rt.jar"/>
-              </and>
-            </not>
-        </and>
-      </condition>
-    </fail>
-
     <condition property="target.user.set" value="true">
           <and>
               <isset property="target.sourcelevel"/>
               <isset property="target.targetlevel"/>
+              <!-- isset property="target.releaselevel"/ -->
               <isset property="target.rt.jar"/>
           </and>
     </condition>
-
-    <property name="target.sourcelevel"       value="${ant.java.version}" />      <!-- default fallback values -->
-    <property name="target.targetlevel"       value="${ant.java.version}" />      <!-- default fallback values -->
-    <!-- Default value for std Java (incl. Java7 on OS X) -->
-    <condition property="target.rt.jar"
-               value="${java.home}/lib/rt.jar">
-               <available file="${java.home}/lib/rt.jar"/>
-    </condition>
-    <!-- Default fallback value for Java6 OS X -->
-    <condition property="target.rt.jar"
-               value="${java.home}/../Classes/classes.jar">
-               <available file="${java.home}/../Classes/classes.jar"/>
-    </condition>
-    <!-- Default fallback value on std Java -->
     <echo message="target.user.set            ${target.user.set}"/>
     <echo message="target.sourcelevel         ${target.sourcelevel}"/>
     <echo message="target.targetlevel         ${target.targetlevel}"/>
+    <echo message="target.releaselevel        ${target.releaselevel}"/>
     <echo message="target.rt.jar              ${target.rt.jar}"/>
-    <fail message="No target.rt.jar specified not found.">
-      <condition>
-        <not>
-          <isset property="target.rt.jar"/>
-        </not>
-      </condition>
-    </fail>
 
-    <property name="host.sourcelevel"         value="${ant.java.version}" />      <!-- default values for compile time components -->
-    <property name="host.targetlevel"         value="${ant.java.version}" />      <!-- default values for compile time components -->
-    <!-- Default value for std Java (incl. Java7 on OS X) -->
-    <condition property="host.rt.jar"
-               value="${java.home}/lib/rt.jar">
-               <available file="${java.home}/lib/rt.jar"/>
-    </condition>
-    <!-- Default fallback value for Java6 OS X -->
-    <condition property="host.rt.jar"
-               value="${java.home}/../Classes/classes.jar">
-               <available file="${java.home}/../Classes/classes.jar"/>
-    </condition>
-    <echo message="host.sourcelevel           ${host.sourcelevel}"/>
-    <echo message="host.targetlevel           ${host.targetlevel}"/>
-    <echo message="host.rt.jar                ${host.rt.jar}"/>
-    <fail message="No host.rt.jar specified not found.">
+    <fail message="You need to specify all properties 'target.sourcelevel', 'target.targetlevel' and 'target.rt.jar'.">
       <condition>
         <not>
-          <isset property="host.rt.jar"/>
+          <istrue value="${target.user.set}"/> 
         </not>
       </condition>
     </fail>
 
-    <fail message="Unsupported Target Java version (sourcelevel): ${target.sourcelevel}. Make sure that the version of the Java compiler is 1.6 (6.0) or greater.">
+    <fail message="Unsupported Target Java sourcelevel: ${target.sourcelevel}. Make sure that the sourcelevel is set to 1.8 (8.0).">
         <condition>
             <not>
                 <or>
-                    <contains string="${target.sourcelevel}" substring="1.6" casesensitive="false" />
-                    <contains string="${target.sourcelevel}" substring="1.7" casesensitive="false" />
                     <contains string="${target.sourcelevel}" substring="1.8" casesensitive="false" />
-                    <contains string="${target.sourcelevel}" substring="1.9" casesensitive="false" />
-                    <contains string="${target.sourcelevel}" substring="2.0" casesensitive="false" />
-                    <contains string="${target.sourcelevel}" substring="2.1" casesensitive="false" />
+                    <contains string="${target.sourcelevel}" substring="8" casesensitive="false" />
                 </or>
             </not>
         </condition>
     </fail>
-    <fail message="Unsupported Target Java version (targetlevel): ${target.targetlevel}. Make sure that the version of the Java compiler is 1.6 (6.0) or greater.">
+    <fail message="Unsupported Target Java targetlevel: ${target.targetlevel}. Make sure that the targetlevel is set to 1.8 (8.0).">
         <condition>
             <not>
                 <or>
-                    <contains string="${target.targetlevel}" substring="1.6" casesensitive="false" />
-                    <contains string="${target.targetlevel}" substring="1.7" casesensitive="false" />
                     <contains string="${target.targetlevel}" substring="1.8" casesensitive="false" />
-                    <contains string="${target.targetlevel}" substring="1.9" casesensitive="false" />
-                    <contains string="${target.targetlevel}" substring="2.0" casesensitive="false" />
-                    <contains string="${target.targetlevel}" substring="2.1" casesensitive="false" />
+                    <contains string="${target.targetlevel}" substring="8" casesensitive="false" />
                 </or>
             </not>
         </condition>
     </fail>
+    <!-- fail message="Unsupported Target Java releaselevel: ${target.releaselevel}. Make sure that the releaselevel is set to 8.">
+        <condition>
+            <not>
+                <or>
+                    <contains string="${target.releaselevel}" substring="8" casesensitive="false" />
+                </or>
+            </not>
+        </condition>
+    </fail -->
 
     <property name="javacdebug"       value="true" /> 
     <property name="javacdebuglevel"  value="source,lines" /> 
@@ -271,7 +297,7 @@
     <echo message="build.archiveon            ${build.archiveon}"/>
     <echo message="build.node.name            ${build.node.name}"/>
 
-    <echo message="android.version            ${android.version}"/>
+    <echo message="android.api.level          ${android.api.level}"/>
 
     <echo message="junit.run.arg0             ${junit.run.arg0}"/>
     <echo message="junit.run.arg1             ${junit.run.arg1}"/>
@@ -283,6 +309,30 @@
     </condition>
     <echo message="macosx.sdkroot             ${macosx.sdkroot}"/>
 
+    <condition property="TARGET_PLATFORM_SYSROOT" value="${env.TARGET_PLATFORM_SYSROOT}">
+        <not>
+         <equals arg1="${env.TARGET_PLATFORM_SYSROOT}" arg2="$${env.TARGET_PLATFORM_SYSROOT}" casesensitive="true" />
+        </not>
+    </condition>
+    <condition property="TARGET_PLATFORM_USRROOT" value="${env.TARGET_PLATFORM_USRROOT}">
+        <not>
+         <equals arg1="${env.TARGET_PLATFORM_USRROOT}" arg2="$${env.TARGET_PLATFORM_USRROOT}" casesensitive="true" />
+        </not>
+    </condition>
+    <condition property="TARGET_PLATFORM_USRLIBS" value="${env.TARGET_PLATFORM_USRLIBS}">
+        <not>
+         <equals arg1="${env.TARGET_PLATFORM_USRLIBS}" arg2="$${env.TARGET_PLATFORM_USRLIBS}" casesensitive="true" />
+        </not>
+    </condition>
+    <condition property="TARGET_JAVA_LIBS" value="${env.TARGET_JAVA_LIBS}">
+        <not>
+         <equals arg1="${env.TARGET_JAVA_LIBS}" arg2="$${env.TARGET_JAVA_LIBS}" casesensitive="true" />
+        </not>
+    </condition>
+    <echo message='TARGET_PLATFORM_SYSROOT ${TARGET_PLATFORM_SYSROOT}'/>
+    <echo message='TARGET_PLATFORM_USRROOT ${TARGET_PLATFORM_USRROOT}'/>
+    <echo message='TARGET_PLATFORM_USRLIBS ${TARGET_PLATFORM_USRLIBS}'/>
+    <echo message='TARGET_JAVA_LIBS ${TARGET_JAVA_LIBS}'/>
   </target>
 
 </project>
diff -Nru gluegen2-2.3.2/make/jogamp-fat.mf gluegen2-2.4.0+dfsg/make/jogamp-fat.mf
--- gluegen2-2.3.2/make/jogamp-fat.mf	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/jogamp-fat.mf	2023-02-01 18:52:41.000000000 +0100
@@ -12,7 +12,7 @@
 Implementation-URL: http://jogamp.org/
 Extension-Name: com.jogamp
 Implementation-Vendor-Id: com.jogamp
-Main-Class: jogamp.opengl.awt.VersionApplet
+Main-Class: com.jogamp.newt.opengl.GLWindow
 Trusted-Library: true
 Permissions: all-permissions
 Application-Library-Allowable-Codebase: *
diff -Nru gluegen2-2.3.2/make/Manifest gluegen2-2.4.0+dfsg/make/Manifest
--- gluegen2-2.3.2/make/Manifest	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/Manifest	2023-02-01 18:52:41.000000000 +0100
@@ -8,6 +8,11 @@
 Implementation-Build: @BUILD_VERSION@
 Implementation-Branch: @SCM_BRANCH@
 Implementation-Commit: @SCM_COMMIT@
+Implementation-SHA-Sources: @SHA_SOURCES@
+Implementation-SHA-Classes: @SHA_CLASSES@
+Implementation-SHA-Classes-this: @SHA_CLASSES_THIS@
+Implementation-SHA-Natives: @SHA_NATIVES@
+Implementation-SHA-Natives-this: @SHA_NATIVES_THIS@
 Implementation-Vendor: JogAmp Community
 Implementation-Vendor-Id: com.jogamp
 Implementation-URL: http://jogamp.org/
diff -Nru gluegen2-2.3.2/make/Manifest-android-launcher gluegen2-2.4.0+dfsg/make/Manifest-android-launcher
--- gluegen2-2.3.2/make/Manifest-android-launcher	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/Manifest-android-launcher	2023-02-01 18:52:41.000000000 +0100
@@ -8,6 +8,11 @@
 Implementation-Build: @BUILD_VERSION@
 Implementation-Branch: @SCM_BRANCH@
 Implementation-Commit: @SCM_COMMIT@
+Implementation-SHA-Sources: @SHA_SOURCES@
+Implementation-SHA-Classes: @SHA_CLASSES@
+Implementation-SHA-Classes-this: @SHA_CLASSES_THIS@
+Implementation-SHA-Natives: @SHA_NATIVES@
+Implementation-SHA-Natives-this: @SHA_NATIVES_THIS@
 Implementation-Vendor: JogAmp Community
 Implementation-Vendor-Id: com.jogamp
 Implementation-URL: http://jogamp.org/
@@ -17,6 +22,3 @@
 Application-Library-Allowable-Codebase: *
 @JAR_CODEBASE_TAG@
 
-Name: jogamp/android/launcher/
-Sealed: true
-
diff -Nru gluegen2-2.3.2/make/Manifest-rt gluegen2-2.4.0+dfsg/make/Manifest-rt
--- gluegen2-2.3.2/make/Manifest-rt	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/Manifest-rt	2023-02-01 18:52:41.000000000 +0100
@@ -8,6 +8,11 @@
 Implementation-Build: @BUILD_VERSION@
 Implementation-Branch: @SCM_BRANCH@
 Implementation-Commit: @SCM_COMMIT@
+Implementation-SHA-Sources: @SHA_SOURCES@
+Implementation-SHA-Classes: @SHA_CLASSES@
+Implementation-SHA-Classes-this: @SHA_CLASSES_THIS@
+Implementation-SHA-Natives: @SHA_NATIVES@
+Implementation-SHA-Natives-this: @SHA_NATIVES_THIS@
 Implementation-Vendor: JogAmp Community
 Implementation-Vendor-Id: com.jogamp
 Implementation-URL: http://jogamp.org/
diff -Nru gluegen2-2.3.2/make/Manifest-rt-alt gluegen2-2.4.0+dfsg/make/Manifest-rt-alt
--- gluegen2-2.3.2/make/Manifest-rt-alt	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/Manifest-rt-alt	2023-02-01 18:52:41.000000000 +0100
@@ -8,6 +8,11 @@
 Implementation-Build: @BUILD_VERSION@
 Implementation-Branch: @SCM_BRANCH@
 Implementation-Commit: @SCM_COMMIT@
+Implementation-SHA-Sources: @SHA_SOURCES@
+Implementation-SHA-Classes: @SHA_CLASSES@
+Implementation-SHA-Classes-this: @SHA_CLASSES_THIS@
+Implementation-SHA-Natives: @SHA_NATIVES@
+Implementation-SHA-Natives-this: @SHA_NATIVES_THIS@
 Implementation-Vendor: JogAmp Community
 Implementation-Vendor-Id: com.jogamp
 Implementation-URL: http://jogamp.org/
diff -Nru gluegen2-2.3.2/make/Manifest-rt-android gluegen2-2.4.0+dfsg/make/Manifest-rt-android
--- gluegen2-2.3.2/make/Manifest-rt-android	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/Manifest-rt-android	2023-02-01 18:52:41.000000000 +0100
@@ -8,6 +8,11 @@
 Implementation-Build: @BUILD_VERSION@
 Implementation-Branch: @SCM_BRANCH@
 Implementation-Commit: @SCM_COMMIT@
+Implementation-SHA-Sources: @SHA_SOURCES@
+Implementation-SHA-Classes: @SHA_CLASSES@
+Implementation-SHA-Classes-this: @SHA_CLASSES_THIS@
+Implementation-SHA-Natives: @SHA_NATIVES@
+Implementation-SHA-Natives-this: @SHA_NATIVES_THIS@
 Implementation-Vendor: JogAmp Community
 Implementation-Vendor-Id: com.jogamp
 Implementation-URL: http://jogamp.org/
@@ -17,9 +22,3 @@
 Application-Library-Allowable-Codebase: *
 @JAR_CODEBASE_TAG@
 
-Name: jogamp/common/
-Sealed: true
-
-Name: com/jogamp/common/
-Sealed: true
-
diff -Nru gluegen2-2.3.2/make/Manifest-rt.cdc gluegen2-2.4.0+dfsg/make/Manifest-rt.cdc
--- gluegen2-2.3.2/make/Manifest-rt.cdc	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/Manifest-rt.cdc	2023-02-01 18:52:41.000000000 +0100
@@ -8,6 +8,11 @@
 Implementation-Build: @BUILD_VERSION@
 Implementation-Branch: @SCM_BRANCH@
 Implementation-Commit: @SCM_COMMIT@
+Implementation-SHA-Sources: @SHA_SOURCES@
+Implementation-SHA-Classes: @SHA_CLASSES@
+Implementation-SHA-Classes-this: @SHA_CLASSES_THIS@
+Implementation-SHA-Natives: @SHA_NATIVES@
+Implementation-SHA-Natives-this: @SHA_NATIVES_THIS@
 Implementation-Vendor: JogAmp Community
 Implementation-Vendor-Id: com.jogamp
 Implementation-URL: http://jogamp.org/
diff -Nru gluegen2-2.3.2/make/Manifest-rt-natives gluegen2-2.4.0+dfsg/make/Manifest-rt-natives
--- gluegen2-2.3.2/make/Manifest-rt-natives	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/Manifest-rt-natives	2023-02-01 18:52:41.000000000 +0100
@@ -8,6 +8,11 @@
 Implementation-Build: @BUILD_VERSION@
 Implementation-Branch: @SCM_BRANCH@
 Implementation-Commit: @SCM_COMMIT@
+Implementation-SHA-Sources: @SHA_SOURCES@
+Implementation-SHA-Classes: @SHA_CLASSES@
+Implementation-SHA-Classes-this: @SHA_CLASSES_THIS@
+Implementation-SHA-Natives: @SHA_NATIVES@
+Implementation-SHA-Natives-this: @SHA_NATIVES_THIS@
 Implementation-Vendor: JogAmp Community
 Implementation-Vendor-Id: com.jogamp
 Implementation-URL: http://jogamp.org/
diff -Nru gluegen2-2.3.2/make/resources/android/AndroidManifest-Launcher.xml gluegen2-2.4.0+dfsg/make/resources/android/AndroidManifest-Launcher.xml
--- gluegen2-2.3.2/make/resources/android/AndroidManifest-Launcher.xml	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/resources/android/AndroidManifest-Launcher.xml	2023-02-01 18:52:41.000000000 +0100
@@ -11,7 +11,7 @@
     <!-- uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" / --> <!-- required for Android-Trace -->
     <uses-permission android:name="android.permission.CAMERA" />
 
-    <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="14"/>
+    <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28"/>
 
     <application android:icon="@drawable/icon" 
                  android:label="@string/app_launcher_name"
diff -Nru gluegen2-2.3.2/make/resources/android/AndroidManifest-Runtime.xml gluegen2-2.4.0+dfsg/make/resources/android/AndroidManifest-Runtime.xml
--- gluegen2-2.3.2/make/resources/android/AndroidManifest-Runtime.xml	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/resources/android/AndroidManifest-Runtime.xml	2023-02-01 18:52:41.000000000 +0100
@@ -6,7 +6,7 @@
     <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
     <!-- uses-feature android:name="android.hardware.camera" android:required="false" / --> <!-- not yet -->
 
-    <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="14"/>
+    <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28"/>
 
     <application android:icon="@drawable/icon" 
                  android:label="@string/app_runtime_name"
diff -Nru gluegen2-2.3.2/make/resources/android/AndroidManifest-Test.xml gluegen2-2.4.0+dfsg/make/resources/android/AndroidManifest-Test.xml
--- gluegen2-2.3.2/make/resources/android/AndroidManifest-Test.xml	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/resources/android/AndroidManifest-Test.xml	2023-02-01 18:52:41.000000000 +0100
@@ -9,7 +9,7 @@
 
     <uses-library android:name="com.jogamp.common" android:required="true" />
 
-    <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="14"/>
+    <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28"/>
 
     <application android:icon="@drawable/icon" 
                  android:label="@string/app_test_name"
diff -Nru gluegen2-2.3.2/make/scripts/adb-am-force-stop-all.sh gluegen2-2.4.0+dfsg/make/scripts/adb-am-force-stop-all.sh
--- gluegen2-2.3.2/make/scripts/adb-am-force-stop-all.sh	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/make/scripts/adb-am-force-stop-all.sh	2023-02-01 18:52:41.000000000 +0100
@@ -0,0 +1,14 @@
+#! /bin/sh
+
+echo jogamp process running
+adb $* shell ps | grep jogamp
+
+adb $* shell am force-stop jogamp.android.launcher
+adb $* shell am force-stop com.jogamp.common
+adb $* shell am force-stop com.jogamp.openal
+adb $* shell am force-stop com.jogamp.opengl
+adb $* shell am force-stop com.jogamp.opencl
+adb $* shell am force-stop com.jogamp.openal.test
+adb $* shell am force-stop com.jogamp.opengl.test
+adb $* shell am force-stop com.jogamp.opencl.test
+
diff -Nru gluegen2-2.3.2/make/scripts/adb-install-all-x86.sh gluegen2-2.4.0+dfsg/make/scripts/adb-install-all-x86.sh
--- gluegen2-2.3.2/make/scripts/adb-install-all-x86.sh	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/make/scripts/adb-install-all-x86.sh	2023-02-01 18:52:41.000000000 +0100
@@ -0,0 +1,2 @@
+adb $* install ../build-android-x86/jogamp-android-launcher.apk
+adb $* install ../build-android-x86/gluegen-rt-android-x86.apk
diff -Nru gluegen2-2.3.2/make/scripts/adb-launch-main.sh gluegen2-2.4.0+dfsg/make/scripts/adb-launch-main.sh
--- gluegen2-2.3.2/make/scripts/adb-launch-main.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/adb-launch-main.sh	2023-02-01 18:52:41.000000000 +0100
@@ -4,7 +4,7 @@
 # jogamp02 - 10.1.0.122
 export HOST_IP=10.1.0.122
 #export HOST_IP=10.1.0.52
-export HOST_RSYNC_ROOT=PROJECTS/JOGL
+export HOST_RSYNC_ROOT=PROJECTS/JogAmp
 
 export TARGET_UID=jogamp
 #export TARGET_IP=panda02
diff -Nru gluegen2-2.3.2/make/scripts/adb-pm-clear-all.sh gluegen2-2.4.0+dfsg/make/scripts/adb-pm-clear-all.sh
--- gluegen2-2.3.2/make/scripts/adb-pm-clear-all.sh	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/make/scripts/adb-pm-clear-all.sh	2023-02-01 18:52:41.000000000 +0100
@@ -0,0 +1,14 @@
+#! /bin/sh
+
+echo jogamp process running
+adb $* shell ps | grep jogamp
+
+adb $* shell pm clear jogamp.android.launcher
+adb $* shell pm clear com.jogamp.common
+adb $* shell pm clear com.jogamp.openal
+adb $* shell pm clear com.jogamp.opengl
+adb $* shell pm clear com.jogamp.opencl
+adb $* shell pm clear com.jogamp.openal.test
+adb $* shell pm clear com.jogamp.opengl.test
+adb $* shell pm clear com.jogamp.opencl.test
+
diff -Nru gluegen2-2.3.2/make/scripts/adb-reinstall-all-x86.sh gluegen2-2.4.0+dfsg/make/scripts/adb-reinstall-all-x86.sh
--- gluegen2-2.3.2/make/scripts/adb-reinstall-all-x86.sh	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/make/scripts/adb-reinstall-all-x86.sh	2023-02-01 18:52:41.000000000 +0100
@@ -0,0 +1,5 @@
+sdir=`dirname $0`
+
+$sdir/adb-uninstall-all.sh $*
+$sdir/adb-install-all-x86.sh $*
+
diff -Nru gluegen2-2.3.2/make/scripts/check-java-major-version.sh gluegen2-2.4.0+dfsg/make/scripts/check-java-major-version.sh
--- gluegen2-2.3.2/make/scripts/check-java-major-version.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/check-java-major-version.sh	2023-02-01 18:52:41.000000000 +0100
@@ -12,7 +12,7 @@
     #dump_version jogamp.common.Debug
     javap -v `find . -name '*.class'` | grep -e '^Classfile' -e 'major version'
     #for i in `find . -name '*.class'` ; do 
-    #  dump_version `echo $i | sed -e 's/\//./g' -e 's/\.class//g'`
+    #  dump_version `echo $i | sed -e 's/^\.\///g' -e 's/\//./g' -e 's/\.class//g'`
     #done
     cd $TDIR
 }
diff -Nru gluegen2-2.3.2/make/scripts/crosstest-java-android-armv6-rel.sh gluegen2-2.4.0+dfsg/make/scripts/crosstest-java-android-armv6-rel.sh
--- gluegen2-2.3.2/make/scripts/crosstest-java-android-armv6-rel.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/crosstest-java-android-armv6-rel.sh	2023-02-01 18:52:41.000000000 +0100
@@ -2,7 +2,7 @@
 
 export HOST_UID=jogamp
 export HOST_IP=10.1.0.122
-export HOST_RSYNC_ROOT=PROJECTS/JOGL
+export HOST_RSYNC_ROOT=PROJECTS/JogAmp
 
 export TARGET_UID=jogamp
 export TARGET_IP=jautab03
diff -Nru gluegen2-2.3.2/make/scripts/crosstest-java-linux-armv6hf-rel.sh gluegen2-2.4.0+dfsg/make/scripts/crosstest-java-linux-armv6hf-rel.sh
--- gluegen2-2.3.2/make/scripts/crosstest-java-linux-armv6hf-rel.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/crosstest-java-linux-armv6hf-rel.sh	2023-02-01 18:52:41.000000000 +0100
@@ -1,6 +1,6 @@
 export HOST_UID=sven
 export HOST_IP=jogamp02
-export HOST_RSYNC_ROOT=PROJECTS/JOGL
+export HOST_RSYNC_ROOT=PROJECTS/JogAmp
 
 export TARGET_UID=jogamp
 export TARGET_IP=panda02
diff -Nru gluegen2-2.3.2/make/scripts/crosstest-java-linux-armv6-rel.sh gluegen2-2.4.0+dfsg/make/scripts/crosstest-java-linux-armv6-rel.sh
--- gluegen2-2.3.2/make/scripts/crosstest-java-linux-armv6-rel.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/crosstest-java-linux-armv6-rel.sh	2023-02-01 18:52:41.000000000 +0100
@@ -1,6 +1,6 @@
 export HOST_UID=sven
 export HOST_IP=jogamp02
-export HOST_RSYNC_ROOT=PROJECTS/JOGL
+export HOST_RSYNC_ROOT=PROJECTS/JogAmp
 
 export TARGET_UID=jogamp
 export TARGET_IP=panda01
diff -Nru gluegen2-2.3.2/make/scripts/crosstest-junit-linux-armv7-rel.sh gluegen2-2.4.0+dfsg/make/scripts/crosstest-junit-linux-armv7-rel.sh
--- gluegen2-2.3.2/make/scripts/crosstest-junit-linux-armv7-rel.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/crosstest-junit-linux-armv7-rel.sh	2023-02-01 18:52:41.000000000 +0100
@@ -1,6 +1,6 @@
 export HOST_UID=sven
 export HOST_IP=192.168.0.52
-export HOST_RSYNC_ROOT=PROJECTS/JOGL
+export HOST_RSYNC_ROOT=PROJECTS/JogAmp
 
 export TARGET_UID=jogamp
 export TARGET_IP=beagle01
diff -Nru gluegen2-2.3.2/make/scripts/java-win32.bat gluegen2-2.4.0+dfsg/make/scripts/java-win32.bat
--- gluegen2-2.3.2/make/scripts/java-win32.bat	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/java-win32.bat	1970-01-01 01:00:00.000000000 +0100
@@ -1,24 +0,0 @@
-
-set BLD_SUB=build-win32
-set J2RE_HOME=c:\jre1.8.0_60_x32
-set JAVA_HOME=c:\jdk1.8.0_60_x32
-set ANT_PATH=C:\apache-ant-1.9.4
-
-set BLD_DIR=..\%BLD_SUB%
-REM set LIB_DIR=..\%BLD_SUB%\obj;..\%BLD_SUB%\test\build\natives
-REM set LIB_DIR=..\%BLD_SUB%\test\build\natives
-
-REM set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw\bin;%LIB_DIR%;%PATH%
-set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw\bin;%PATH%
-
-set CP_ALL=.;lib\junit.jar;%ANT_PATH%\lib\ant.jar;%ANT_PATH%\lib\ant-junit.jar;lib/semantic-versioning/semver.jar;%BLD_DIR%\gluegen-rt.jar;%BLD_DIR%\gluegen.jar;%BLD_DIR%\gluegen-test-util.jar;%BLD_DIR%\test\build\gluegen-test.jar
-
-echo CP_ALL %CP_ALL%
-
-set X_ARGS="-Drootrel.build=%BLD_SUB%" "-Dgluegen.root=.."
-REM set D_ARGS="-Djogamp.debug.Platform" "-Djogamp.debug.NativeLibrary"
-set D_ARGS="-Djogamp.debug.IOUtil" "-Djogamp.debug.IOUtil.Exe"
-REM set D_ARGS="-Djogamp.debug=all"
-
-REM %J2RE_HOME%\bin\java -classpath %CP_ALL% %X_ARGS% %D_ARGS% "-Djava.library.path=%LIB_DIR%" "-Dsun.java2d.noddraw=true" "-Dsun.awt.noerasebackground=true" %1 %2 %3 %4 %5 %6 %7 %8 %9 > java-win32.log 2>&1
-%J2RE_HOME%\bin\java -classpath %CP_ALL% %X_ARGS% %D_ARGS% "-Dsun.java2d.noddraw=true" "-Dsun.awt.noerasebackground=true" %1 %2 %3 %4 %5 %6 %7 %8 %9 > java-win32.log 2>&1
diff -Nru gluegen2-2.3.2/make/scripts/java-win64.bat gluegen2-2.4.0+dfsg/make/scripts/java-win64.bat
--- gluegen2-2.3.2/make/scripts/java-win64.bat	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/java-win64.bat	2023-02-01 18:52:41.000000000 +0100
@@ -1,15 +1,14 @@
 
 set BLD_SUB=build-win64
-set J2RE_HOME=c:\jre1.8.0_60_x64
-set JAVA_HOME=c:\jdk1.8.0_60_x64
-set ANT_PATH=C:\apache-ant-1.9.4
+
+set J2RE_HOME=c:\jdk-17
+set JAVA_HOME=c:\jdk-17
+set ANT_PATH=C:\apache-ant-1.10.5
 
 set BLD_DIR=..\%BLD_SUB%
-REM set LIB_DIR=..\%BLD_SUB%\obj;..\%BLD_SUB%\test\build\natives
-REM set LIB_DIR=..\%BLD_SUB%\test\build\natives
+set LIB_DIR=%cd%\..\%BLD_SUB%\test\build\natives
 
-REM set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw\bin;%LIB_DIR%;%PATH%
-set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw\bin;%PATH%
+set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw64\bin;%LIB_DIR%;%PATH%
 
 set CP_ALL=.;lib\junit.jar;%ANT_PATH%\lib\ant.jar;%ANT_PATH%\lib\ant-junit.jar;lib/semantic-versioning/semver.jar;lib\TestJarsInJar.jar;%BLD_DIR%\gluegen-rt.jar;%BLD_DIR%\gluegen.jar;%BLD_DIR%\gluegen-test-util.jar;%BLD_DIR%\test\build\gluegen-test.jar
 
@@ -17,10 +16,13 @@
 
 set X_ARGS="-Drootrel.build=%BLD_SUB%" "-Dgluegen.root=.."
 REM set D_ARGS="-Djogamp.debug.IOUtil" "-Djogamp.debug.JNILibLoader" "-Djogamp.debug.TempFileCache" "-Djogamp.debug.JarUtil" "-Djogamp.debug.TempJarCache"
+REM set D_ARGS="-Djogamp.debug.IOUtil" "-Djogamp.debug.NativeLibrary" "-Djogamp.debug.JNILibLoader" "-Djogamp.debug.TempFileCache" "-Djogamp.debug.JarUtil" "-Djogamp.debug.TempJarCache"
 REM set D_ARGS="-Djogamp.debug.Platform" "-Djogamp.debug.NativeLibrary" "-Djogamp.debug.IOUtil"
-set D_ARGS="-Djogamp.debug.IOUtil" "-Djogamp.debug.IOUtil.Exe" "-Djogamp.debug.IOUtil.Exe.NoStream"
+REM set D_ARGS="-Djogamp.debug.IOUtil" "-Djogamp.debug.IOUtil.Exe" "-Djogamp.debug.IOUtil.Exe.NoStream"
+REM set D_ARGS="-Djogamp.debug.IOUtil" "-Djogamp.debug.TempFileCache" "-Djogamp.debug.TempJarCache" "-Djogamp.debug.IOUtil.Exe" "-Djogamp.gluegen.UseNativeExeFile=true" "-Djava.io.tmpdir=c:\temp_noexec"
+REM set D_ARGS="-Djogamp.debug.IOUtil" "-Djogamp.debug.TempFileCache" "-Djogamp.debug.TempJarCache" "-Djava.io.tmpdir=c:\temp_noexec"
 REM set D_ARGS="-Djogamp.debug=all"
 
-REM %J2RE_HOME%\bin\java -classpath %CP_ALL% %X_ARGS% %D_ARGS% "-Djava.library.path=%LIB_DIR%" "-Dsun.java2d.noddraw=true" "-Dsun.awt.noerasebackground=true" %1 %2 %3 %4 %5 %6 %7 %8 %9 > java-win64.log 2>&1
-%J2RE_HOME%\bin\java -classpath %CP_ALL% %X_ARGS% %D_ARGS% "-Dsun.java2d.noddraw=true" "-Dsun.awt.noerasebackground=true" %1 %2 %3 %4 %5 %6 %7 %8 %9 > java-win64.log 2>&1
+%J2RE_HOME%\bin\java -classpath %CP_ALL% %X_ARGS% %D_ARGS% "-Djava.library.path=%LIB_DIR%" "-Dsun.java2d.noddraw=true" "-Dsun.awt.noerasebackground=true" %1 %2 %3 %4 %5 %6 %7 %8 %9 > java-win64.log 2>&1
+REM %J2RE_HOME%\bin\java -classpath %CP_ALL% %X_ARGS% %D_ARGS% "-Dsun.java2d.noddraw=true" "-Dsun.awt.noerasebackground=true" %1 %2 %3 %4 %5 %6 %7 %8 %9 > java-win64.log 2>&1
 
diff -Nru gluegen2-2.3.2/make/scripts/make.gluegen.all.android-aarch64-cross.sh gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.android-aarch64-cross.sh
--- gluegen2-2.3.2/make/scripts/make.gluegen.all.android-aarch64-cross.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.android-aarch64-cross.sh	2023-02-01 18:52:41.000000000 +0100
@@ -2,20 +2,36 @@
 
 SDIR=`dirname $0` 
 
-if [ -e $SDIR/setenv-build-jogl-x86_64.sh ] ; then
-    . $SDIR/setenv-build-jogl-x86_64.sh
+if [ -e ${SDIR}/setenv-build-jogamp-x86_64.sh ] ; then
+    . ${SDIR}/setenv-build-jogamp-x86_64.sh
 fi
 
-if [ -e $SDIR/setenv-android-tools.sh ] ; then
-    . $SDIR/setenv-android-tools.sh
+LOGF=make.gluegen.all.android-aarch64-cross.log
+rm -f ${LOGF}
+
+export ANDROID_HOME=/opt-linux-x86_64/android-sdk-linux_x86_64
+export ANDROID_API_LEVEL=24
+export ANDROID_HOST_TAG=linux-x86_64
+export ANDROID_ABI=arm64-v8a
+
+if [ -e ${SDIR}/setenv-android-tools.sh ] ; then
+    . ${SDIR}/setenv-android-tools.sh >> $LOGF 2>&1
+else
+    echo "${SDIR}/setenv-android-tools.sh doesn't exist!" 2>&1 | tee -a ${LOGF}
+    exit 1
 fi
 
+export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-android-aarch64.xml"
+export PATH=${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_NAME}/bin:${ANDROID_TOOLCHAIN_ROOT}/bin:${ANDROID_HOME}/platform-tools:${ANDROID_BUILDTOOLS_ROOT}:${PATH}
+echo PATH ${PATH} 2>&1 | tee -a ${LOGF}
+echo clang `which clang` 2>&1 | tee -a ${LOGF}
+
 export NODE_LABEL=.
 
 export HOST_UID=jogamp
 # jogamp02 - 10.1.0.122
 export HOST_IP=10.1.0.122
-export HOST_RSYNC_ROOT=PROJECTS/JOGL
+export HOST_RSYNC_ROOT=PROJECTS/JogAmp
 
 export TARGET_UID=jogamp
 export TARGET_IP=panda02
@@ -26,37 +42,18 @@
 export TARGET_ROOT=/data/projects
 export TARGET_ANT_HOME=/usr/share/ant
 
-export ANDROID_VERSION=21
-export SOURCE_LEVEL=1.6
-export TARGET_LEVEL=1.6
-export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar
-
-#export GCC_VERSION=4.4.3
-export GCC_VERSION=4.9
-HOST_ARCH=linux-x86_64
-export TARGET_TRIPLE=aarch64-linux-android
-
-export NDK_TOOLCHAIN_ROOT=$NDK_ROOT/toolchains/${TARGET_TRIPLE}-${GCC_VERSION}/prebuilt/${HOST_ARCH}
-export TARGET_PLATFORM_ROOT=${NDK_ROOT}/platforms/android-${ANDROID_VERSION}/arch-arm64
-
-# Need to add toolchain bins to the PATH. 
-# May need to create symbolic links within $NDK_TOOLCHAIN_ROOT/$TARGET_TRIPLE/bin
-#   cd $NDK_TOOLCHAIN_ROOT/$TARGET_TRIPLE/bin
-#   ln -s ../../bin/aarch64-linux-android-gcc gcc
-export PATH="$NDK_TOOLCHAIN_ROOT/$TARGET_TRIPLE/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/build-tools/$ANDROID_BUILD_TOOLS_VERSION:$PATH"
-
-export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-android-aarch64.xml"
+export SOURCE_LEVEL=1.8
+export TARGET_LEVEL=1.8
+export TARGET_RT_JAR=/opt-share/jre1.8.0_212/lib/rt.jar
 
 #export JUNIT_DISABLED="true"
 #export JUNIT_RUN_ARG0="-Dnewt.test.Screen.disableScreenMode"
 
-echo PATH $PATH 2>&1 | tee make.gluegen.all.android-aarch64-cross.log
-echo gcc `which gcc` 2>&1 | tee -a make.gluegen.all.android-aarch64-cross.log
-
 #export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"
 export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet"
 
 #BUILD_ARCHIVE=true \
 ant \
     -Drootrel.build=build-android-aarch64 \
-    $* 2>&1 | tee -a make.gluegen.all.android-aarch64-cross.log
+    -Dgcc.compat.compiler=clang \
+    $* 2>&1 | tee -a ${LOGF}
diff -Nru gluegen2-2.3.2/make/scripts/make.gluegen.all.android-armv6-cross.sh gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.android-armv6-cross.sh
--- gluegen2-2.3.2/make/scripts/make.gluegen.all.android-armv6-cross.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.android-armv6-cross.sh	2023-02-01 18:52:41.000000000 +0100
@@ -2,20 +2,36 @@
 
 SDIR=`dirname $0` 
 
-if [ -e $SDIR/setenv-build-jogl-x86_64.sh ] ; then
-    . $SDIR/setenv-build-jogl-x86_64.sh
+if [ -e ${SDIR}/setenv-build-jogamp-x86_64.sh ] ; then
+    . ${SDIR}/setenv-build-jogamp-x86_64.sh
 fi
 
-if [ -e $SDIR/setenv-android-tools.sh ] ; then
-    . $SDIR/setenv-android-tools.sh
+LOGF=make.gluegen.all.android-armv6-cross.log
+rm -f ${LOGF}
+
+export ANDROID_HOME=/opt-linux-x86_64/android-sdk-linux_x86_64
+export ANDROID_API_LEVEL=24
+export ANDROID_HOST_TAG=linux-x86_64
+export ANDROID_ABI=armeabi-v7a
+
+if [ -e ${SDIR}/setenv-android-tools.sh ] ; then
+    . ${SDIR}/setenv-android-tools.sh >> $LOGF 2>&1
+else
+    echo "${SDIR}/setenv-android-tools.sh doesn't exist!" 2>&1 | tee -a ${LOGF}
+    exit 1
 fi
 
+export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-android-armv6.xml"
+export PATH=${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_NAME}/bin:${ANDROID_TOOLCHAIN_ROOT}/bin:${ANDROID_HOME}/platform-tools:${ANDROID_BUILDTOOLS_ROOT}:${PATH}
+echo PATH ${PATH} 2>&1 | tee -a ${LOGF}
+echo clang `which clang` 2>&1 | tee -a ${LOGF}
+
 export NODE_LABEL=.
 
 export HOST_UID=jogamp
 # jogamp02 - 10.1.0.122
 export HOST_IP=10.1.0.122
-export HOST_RSYNC_ROOT=PROJECTS/JOGL
+export HOST_RSYNC_ROOT=PROJECTS/JogAmp
 
 export TARGET_UID=jogamp
 export TARGET_IP=panda02
@@ -26,33 +42,19 @@
 export TARGET_ROOT=/data/projects
 export TARGET_ANT_HOME=/usr/share/ant
 
-export ANDROID_VERSION=9
-export SOURCE_LEVEL=1.6
-export TARGET_LEVEL=1.6
-export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar
-
-#export GCC_VERSION=4.4.3
-export GCC_VERSION=4.8
-HOST_ARCH=linux-x86_64
-export TARGET_TRIPLE=arm-linux-androideabi
-
-export NDK_TOOLCHAIN_ROOT=$NDK_ROOT/toolchains/${TARGET_TRIPLE}-${GCC_VERSION}/prebuilt/${HOST_ARCH}
-export TARGET_PLATFORM_ROOT=${NDK_ROOT}/platforms/android-${ANDROID_VERSION}/arch-arm
-
-# Need to add toolchain bins to the PATH. 
-export PATH="$NDK_TOOLCHAIN_ROOT/$TARGET_TRIPLE/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/build-tools/$ANDROID_BUILD_TOOLS_VERSION:$PATH"
-
-export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-android-armv6.xml"
+export SOURCE_LEVEL=1.8
+export TARGET_LEVEL=1.8
+export TARGET_RT_JAR=/opt-share/jre1.8.0_212/lib/rt.jar
 
 #export JUNIT_DISABLED="true"
 #export JUNIT_RUN_ARG0="-Dnewt.test.Screen.disableScreenMode"
 
-which gcc 2>&1 | tee make.gluegen.all.android-armv6-cross.log
-
 #export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"
 export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet"
 
 #BUILD_ARCHIVE=true \
 ant \
     -Drootrel.build=build-android-armv6 \
-    $* 2>&1 | tee -a make.gluegen.all.android-armv6-cross.log
+    -Dgcc.compat.compiler=clang \
+    $* 2>&1 | tee -a ${LOGF}
+
diff -Nru gluegen2-2.3.2/make/scripts/make.gluegen.all.android-x86-cross.sh gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.android-x86-cross.sh
--- gluegen2-2.3.2/make/scripts/make.gluegen.all.android-x86-cross.sh	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.android-x86-cross.sh	2023-02-01 18:52:41.000000000 +0100
@@ -0,0 +1,60 @@
+#! /bin/sh
+
+SDIR=`dirname $0` 
+
+if [ -e ${SDIR}/setenv-build-jogamp-x86_64.sh ] ; then
+    . ${SDIR}/setenv-build-jogamp-x86_64.sh
+fi
+
+LOGF=make.gluegen.all.android-x86-cross.log
+rm -f ${LOGF}
+
+export ANDROID_HOME=/opt-linux-x86_64/android-sdk-linux_x86_64
+export ANDROID_API_LEVEL=24
+export ANDROID_HOST_TAG=linux-x86_64
+export ANDROID_ABI=x86
+
+if [ -e ${SDIR}/setenv-android-tools.sh ] ; then
+    . ${SDIR}/setenv-android-tools.sh >> $LOGF 2>&1
+else
+    echo "${SDIR}/setenv-android-tools.sh doesn't exist!" 2>&1 | tee -a ${LOGF}
+    exit 1
+fi
+
+export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-android-x86.xml"
+export PATH=${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_NAME}/bin:${ANDROID_TOOLCHAIN_ROOT}/bin:${ANDROID_HOME}/platform-tools:${ANDROID_BUILDTOOLS_ROOT}:${PATH}
+echo PATH ${PATH} 2>&1 | tee -a ${LOGF}
+echo clang `which clang` 2>&1 | tee -a ${LOGF}
+
+export NODE_LABEL=.
+
+export HOST_UID=jogamp
+# jogamp02 - 10.1.0.122
+export HOST_IP=10.1.0.122
+export HOST_RSYNC_ROOT=PROJECTS/JogAmp
+
+export TARGET_UID=jogamp
+export TARGET_IP=panda02
+#export TARGET_IP=jautab03
+#export TARGET_IP=jauphone04
+export TARGET_ADB_PORT=5555
+# needs executable bit (probably su)
+export TARGET_ROOT=/data/projects
+export TARGET_ANT_HOME=/usr/share/ant
+
+export SOURCE_LEVEL=1.8
+export TARGET_LEVEL=1.8
+export TARGET_RT_JAR=/opt-share/jre1.8.0_212/lib/rt.jar
+
+#export JUNIT_DISABLED="true"
+#export JUNIT_RUN_ARG0="-Dnewt.test.Screen.disableScreenMode"
+
+#export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"
+export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet"
+
+#BUILD_ARCHIVE=true \
+ant \
+    -Drootrel.build=build-android-x86 \
+    -Dgcc.compat.compiler=clang \
+    $* 2>&1 | tee -a ${LOGF}
+
diff -Nru gluegen2-2.3.2/make/scripts/make.gluegen.all.generic.sh gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.generic.sh
--- gluegen2-2.3.2/make/scripts/make.gluegen.all.generic.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.generic.sh	2023-02-01 18:52:41.000000000 +0100
@@ -14,9 +14,9 @@
 #    -Dc.compiler.debug=true  \
 #    -Djavacdebuglevel="source,lines,vars" \
 
-export SOURCE_LEVEL=1.6
-export TARGET_LEVEL=1.6
-export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar
+export SOURCE_LEVEL=1.8
+export TARGET_LEVEL=1.8
+export TARGET_RT_JAR=/opt-share/jre1.8.0_212/lib/rt.jar
 
 #export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"
 export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet"
diff -Nru gluegen2-2.3.2/make/scripts/make.gluegen.all-host-linux.sh gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all-host-linux.sh
--- gluegen2-2.3.2/make/scripts/make.gluegen.all-host-linux.sh	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all-host-linux.sh	2023-02-01 18:52:41.000000000 +0100
@@ -0,0 +1,20 @@
+#! /bin/sh
+
+SDIR=`dirname $0` 
+
+$SDIR/make.gluegen.all.android-aarch64-cross.sh && \
+$SDIR/make.gluegen.all.android-armv6-cross.sh && \
+$SDIR/make.gluegen.all.android-x86-cross.sh && \
+$SDIR/make.gluegen.all.linux-aarch64-cross.sh && \
+$SDIR/make.gluegen.all.linux-armv6hf-cross.sh && \
+$SDIR/make.gluegen.all.linux-x86.sh && \
+$SDIR/make.gluegen.all.linux-x86_64.sh
+
+# $SDIR/make.gluegen.all.macosx.sh
+# $SDIR/make.gluegen.all.ios.amd64.sh
+# $SDIR/make.gluegen.all.ios.arm64.sh
+# $SDIR/make.gluegen.all.win32.bat
+# $SDIR/make.gluegen.all.win64.bat
+# $SDIR/make.gluegen.all.linux-ppc64le.sh
+# $SDIR/make.gluegen.all.linux-armv6hf.sh
+# $SDIR/make.gluegen.all.linux-aarch64.sh
diff -Nru gluegen2-2.3.2/make/scripts/make.gluegen.all-host-macos.sh gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all-host-macos.sh
--- gluegen2-2.3.2/make/scripts/make.gluegen.all-host-macos.sh	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all-host-macos.sh	2023-02-01 18:52:41.000000000 +0100
@@ -0,0 +1,16 @@
+#! /bin/sh
+
+SDIR=`dirname $0` 
+
+$SDIR/make.gluegen.all.macosx.sh && \
+$SDIR/make.gluegen.all.ios.amd64.sh && \
+$SDIR/make.gluegen.all.ios.arm64.sh
+
+# $SDIR/make.gluegen.all.macosx.sh
+# $SDIR/make.gluegen.all.ios.amd64.sh
+# $SDIR/make.gluegen.all.ios.arm64.sh
+# $SDIR/make.gluegen.all.win32.bat
+# $SDIR/make.gluegen.all.win64.bat
+# $SDIR/make.gluegen.all.linux-ppc64le.sh
+# $SDIR/make.gluegen.all.linux-armv6hf.sh
+# $SDIR/make.gluegen.all.linux-aarch64.sh
diff -Nru gluegen2-2.3.2/make/scripts/make.gluegen.all.ios.amd64.sh gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.ios.amd64.sh
--- gluegen2-2.3.2/make/scripts/make.gluegen.all.ios.amd64.sh	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.ios.amd64.sh	2023-02-01 18:52:41.000000000 +0100
@@ -0,0 +1,36 @@
+#! /bin/sh
+
+if [ -e /usr/local/etc/profile.ant ] ; then
+    . /usr/local/etc/profile.ant
+fi
+
+#    -Dc.compiler.debug=true 
+#
+#    -Dtarget.sourcelevel=1.6 \
+#    -Dtarget.targetlevel=1.6 \
+#    -Dtarget.rt.jar=/opt-share/jre1.6.0_30/lib/rt.jar \
+
+# Force OSX SDK 10.6, if desired
+# export SDKROOT=macosx10.6
+
+export SDKROOT=iphonesimulator13.2
+xcrun --show-sdk-path
+
+JAVA_HOME=`/usr/libexec/java_home -version 17`
+PATH=$JAVA_HOME/bin:$PATH
+export JAVA_HOME PATH
+which java
+java -version 
+
+export SOURCE_LEVEL=1.8
+export TARGET_LEVEL=1.8
+export TARGET_RT_JAR=/usr/local/jre1.8.0_212/lib/rt.jar
+
+export GLUEGEN_CPPTASKS_FILE=make/lib/gluegen-cpptasks-ios-amd64.xml
+
+#export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"
+export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet"
+
+ant \
+    -Drootrel.build=build-ios-amd64 \
+    $* 2>&1 | tee make.gluegen.all.ios-amd64.log
diff -Nru gluegen2-2.3.2/make/scripts/make.gluegen.all.ios.arm64.sh gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.ios.arm64.sh
--- gluegen2-2.3.2/make/scripts/make.gluegen.all.ios.arm64.sh	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.ios.arm64.sh	2023-02-01 18:52:41.000000000 +0100
@@ -0,0 +1,36 @@
+#! /bin/sh
+
+if [ -e /usr/local/etc/profile.ant ] ; then
+    . /usr/local/etc/profile.ant
+fi
+
+#    -Dc.compiler.debug=true 
+#
+#    -Dtarget.sourcelevel=1.6 \
+#    -Dtarget.targetlevel=1.6 \
+#    -Dtarget.rt.jar=/opt-share/jre1.6.0_30/lib/rt.jar \
+
+# Force OSX SDK 10.6, if desired
+# export SDKROOT=macosx10.6
+
+export SDKROOT=iphoneos13.2
+xcrun --show-sdk-path
+
+JAVA_HOME=`/usr/libexec/java_home -version 17`
+PATH=$JAVA_HOME/bin:$PATH
+export JAVA_HOME PATH
+which java
+java -version 
+
+export SOURCE_LEVEL=1.8
+export TARGET_LEVEL=1.8
+export TARGET_RT_JAR=/usr/local/jre1.8.0_212/lib/rt.jar
+
+export GLUEGEN_CPPTASKS_FILE=make/lib/gluegen-cpptasks-ios-aarch64.xml
+
+#export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"
+export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet"
+
+ant \
+    -Drootrel.build=build-ios-arm64 \
+    $* 2>&1 | tee make.gluegen.all.ios-arm64.log
diff -Nru gluegen2-2.3.2/make/scripts/make.gluegen.all.linux-aarch64-cross.sh gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.linux-aarch64-cross.sh
--- gluegen2-2.3.2/make/scripts/make.gluegen.all.linux-aarch64-cross.sh	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.linux-aarch64-cross.sh	2023-02-01 18:52:41.000000000 +0100
@@ -0,0 +1,39 @@
+#! /bin/sh
+
+SDIR=`dirname $0` 
+
+if [ -e $SDIR/setenv-build-jogamp-x86_64.sh ] ; then
+    . $SDIR/setenv-build-jogamp-x86_64.sh
+fi
+
+# aarch64-linux-gnueabi == aarch64 triplet
+PATH=`pwd`/lib/toolchain/aarch64-linux-gnueabi/bin:$PATH
+export PATH
+
+#    -Dc.compiler.debug=true 
+#    -Dgluegen.cpptasks.detected.os=true \
+#    -DisUnix=true \
+#    -DisLinux=true \
+#    -DisLinuxARM64=true \
+#    -DisX11=true \
+
+export TARGET_PLATFORM_SYSROOT=`gcc --print-sysroot`
+export TARGET_PLATFORM_USRROOT=/opt-linux-arm64
+export TARGET_PLATFORM_USRLIBS=$TARGET_PLATFORM_USRROOT/usr/lib
+export TARGET_JAVA_LIBS=$TARGET_PLATFORM_USRROOT/jre/lib/aarch64
+
+export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-linux-aarch64.xml"
+
+#export JUNIT_DISABLED="true"
+export JUNIT_RUN_ARG0="-Dnewt.test.Screen.disableScreenMode"
+
+export SOURCE_LEVEL=1.8
+export TARGET_LEVEL=1.8
+export TARGET_RT_JAR=/opt-share/jre1.8.0_212/lib/rt.jar
+
+#export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"
+export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet"
+
+ant \
+    -Drootrel.build=build-linux-aarch64 \
+    $* 2>&1 | tee make.gluegen.all.linux-aarch64-cross.log
diff -Nru gluegen2-2.3.2/make/scripts/make.gluegen.all.linux-aarch64.sh gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.linux-aarch64.sh
--- gluegen2-2.3.2/make/scripts/make.gluegen.all.linux-aarch64.sh	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.linux-aarch64.sh	2023-02-01 18:52:41.000000000 +0100
@@ -0,0 +1,26 @@
+#! /bin/sh
+
+#    -Dc.compiler.debug=true 
+#    -Dgluegen.cpptasks.detected.os=true \
+#    -DisUnix=true \
+#    -DisLinux=true \
+#    -DisLinuxX86=true \
+#    -DisX11=true \
+
+# aarch64-linux-gnue == aarch64 triplet
+export TARGET_PLATFORM_USRROOT=
+export TARGET_PLATFORM_USRLIBS=$TARGET_PLATFORM_USRROOT/usr/lib/aarch64-linux-gnu
+export TARGET_JAVA_LIBS=$TARGET_PLATFORM_USRROOT/usr/lib/jvm/java-11-openjdk-aarch64/jre/lib/aarch64
+
+export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-linux-aarch64-ontarget.xml"
+
+export SOURCE_LEVEL=1.8
+export TARGET_LEVEL=1.8
+export TARGET_RT_JAR=/opt-share/jre1.8.0_212/lib/rt.jar
+
+#export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"
+export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet"
+
+ant \
+    -Drootrel.build=build-linux-aarch64 \
+    $* 2>&1 | tee make.gluegen.all.linux-aarch64.log
diff -Nru gluegen2-2.3.2/make/scripts/make.gluegen.all.linux-armv6-cross.sh gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.linux-armv6-cross.sh
--- gluegen2-2.3.2/make/scripts/make.gluegen.all.linux-armv6-cross.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.linux-armv6-cross.sh	1970-01-01 01:00:00.000000000 +0100
@@ -1,51 +0,0 @@
-#! /bin/sh
-
-SDIR=`dirname $0` 
-
-if [ -e $SDIR/setenv-build-jogl-x86_64.sh ] ; then
-    . $SDIR/setenv-build-jogl-x86_64.sh
-fi
-
-# arm-linux-gnueabi == armel triplet
-PATH=`pwd`/lib/toolchain/armsf-linux-gnueabi/bin:$PATH
-export PATH
-
-#    -Dc.compiler.debug=true 
-#    -Dgluegen.cpptasks.detected.os=true \
-#    -DisUnix=true \
-#    -DisLinux=true \
-#    -DisLinuxARMv6=true \
-#    -DisX11=false \
-
-export NODE_LABEL=.
-
-export HOST_UID=jogamp
-export HOST_IP=jogamp02
-export HOST_RSYNC_ROOT=PROJECTS/JOGL
-
-export TARGET_UID=jogamp
-export TARGET_IP=panda01
-export TARGET_ROOT=/home/jogamp/projects-cross
-export TARGET_ANT_HOME=/usr/share/ant
-
-export TARGET_PLATFORM_ROOT=/opt-linux-armv6-armel
-export TARGET_PLATFORM_LIBS=$TARGET_PLATFORM_ROOT/usr/lib
-export TARGET_JAVA_LIBS=$TARGET_PLATFORM_ROOT/jre/lib/arm
-
-export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-linux-armv6.xml"
-
-#export JUNIT_DISABLED="true"
-export JUNIT_RUN_ARG0="-Dnewt.test.Screen.disableScreenMode"
-
-export SOURCE_LEVEL=1.6
-export TARGET_LEVEL=1.6
-export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar
-
-#export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"
-export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet"
-
-ant \
-    -Drootrel.build=build-linux-armv6 \
-    $* 2>&1 | tee make.gluegen.all.linux-armv6-cross.log
-
-
diff -Nru gluegen2-2.3.2/make/scripts/make.gluegen.all.linux-armv6hf-cross.sh gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.linux-armv6hf-cross.sh
--- gluegen2-2.3.2/make/scripts/make.gluegen.all.linux-armv6hf-cross.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.linux-armv6hf-cross.sh	2023-02-01 18:52:41.000000000 +0100
@@ -2,8 +2,8 @@
 
 SDIR=`dirname $0` 
 
-if [ -e $SDIR/setenv-build-jogl-x86_64.sh ] ; then
-    . $SDIR/setenv-build-jogl-x86_64.sh
+if [ -e $SDIR/setenv-build-jogamp-x86_64.sh ] ; then
+    . $SDIR/setenv-build-jogamp-x86_64.sh
 fi
 
 # arm-linux-gnueabihf == armhf triplet
@@ -21,25 +21,26 @@
 
 export HOST_UID=jogamp
 export HOST_IP=jogamp02
-export HOST_RSYNC_ROOT=PROJECTS/JOGL
+export HOST_RSYNC_ROOT=PROJECTS/JogAmp
 
 export TARGET_UID=jogamp
 export TARGET_IP=panda02
 export TARGET_ROOT=/home/jogamp/projects-cross
 export TARGET_ANT_HOME=/usr/share/ant
 
-export TARGET_PLATFORM_ROOT=/opt-linux-armv6-armhf
-export TARGET_PLATFORM_LIBS=$TARGET_PLATFORM_ROOT/usr/lib
-export TARGET_JAVA_LIBS=$TARGET_PLATFORM_ROOT/jre/lib/arm
+export TARGET_PLATFORM_SYSROOT=`gcc --print-sysroot`
+export TARGET_PLATFORM_USRROOT=/opt-linux-armv6-armhf
+export TARGET_PLATFORM_USRLIBS=$TARGET_PLATFORM_USRROOT/usr/lib
+export TARGET_JAVA_LIBS=$TARGET_PLATFORM_USRROOT/jre/lib/arm
 
 export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-linux-armv6hf.xml"
 
 #export JUNIT_DISABLED="true"
 export JUNIT_RUN_ARG0="-Dnewt.test.Screen.disableScreenMode"
 
-export SOURCE_LEVEL=1.6
-export TARGET_LEVEL=1.6
-export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar
+export SOURCE_LEVEL=1.8
+export TARGET_LEVEL=1.8
+export TARGET_RT_JAR=/opt-share/jre1.8.0_212/lib/rt.jar
 
 #export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"
 export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet"
diff -Nru gluegen2-2.3.2/make/scripts/make.gluegen.all.linux-armv6hf.sh gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.linux-armv6hf.sh
--- gluegen2-2.3.2/make/scripts/make.gluegen.all.linux-armv6hf.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.linux-armv6hf.sh	2023-02-01 18:52:41.000000000 +0100
@@ -8,10 +8,15 @@
 #    -DisX11=true \
 
 # arm-linux-gnueabihf == armhf triplet
-export TARGET_PLATFORM_LIBS=/usr/lib/arm-linux-gnueabihf
-export TARGET_JAVA_LIBS=/usr/lib/jvm/java-6-openjdk-armhf/jre/lib/arm
+export TARGET_PLATFORM_USRROOT=
+export TARGET_PLATFORM_USRLIBS=$TARGET_PLATFORM_USRROOT/usr/lib/arm-linux-gnueabihf
+export TARGET_JAVA_LIBS=$TARGET_PLATFORM_USRROOT/usr/lib/jvm/java-11-openjdk-armhf/jre/lib/arm
 
-export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-linux-armv6hf.xml"
+export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-linux-armv6hf-ontarget.xml"
+
+export SOURCE_LEVEL=1.8
+export TARGET_LEVEL=1.8
+export TARGET_RT_JAR=/opt-share/jre1.8.0_212/lib/rt.jar
 
 #export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"
 export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet"
diff -Nru gluegen2-2.3.2/make/scripts/make.gluegen.all.linux-armv6.sh gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.linux-armv6.sh
--- gluegen2-2.3.2/make/scripts/make.gluegen.all.linux-armv6.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.linux-armv6.sh	1970-01-01 01:00:00.000000000 +0100
@@ -1,21 +0,0 @@
-#! /bin/sh
-
-#    -Dc.compiler.debug=true 
-#    -Dgluegen.cpptasks.detected.os=true \
-#    -DisUnix=true \
-#    -DisLinux=true \
-#    -DisLinuxX86=true \
-#    -DisX11=true \
-
-# arm-linux-gnueabi == armel triplet
-export TARGET_PLATFORM_LIBS=/usr/lib/arm-linux-gnueabi
-export TARGET_JAVA_LIBS=/usr/lib/jvm/default-java/jre/lib/arm
-
-export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-linux-armv6.xml"
-
-#export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"
-export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet"
-
-ant \
-    -Drootrel.build=build-linux-armv6 \
-    $* 2>&1 | tee make.gluegen.all.linux-armv6.log
diff -Nru gluegen2-2.3.2/make/scripts/make.gluegen.all.linux-ppc64le.sh gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.linux-ppc64le.sh
--- gluegen2-2.3.2/make/scripts/make.gluegen.all.linux-ppc64le.sh	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.linux-ppc64le.sh	2023-02-01 18:52:41.000000000 +0100
@@ -0,0 +1,28 @@
+#! /bin/sh
+
+#    -Dc.compiler.debug=true \
+#    -Dgluegen.cpptasks.detected.os=true \
+#    -DisUnix=true \
+#    -DisLinux=true \
+#    -DisLinuxX86=true \
+#    -DisX11=true \
+
+MACHINE=ppc64le
+ARCH=ppc64el
+TRIPLET=powerpc64le-linux-gnu
+
+export TARGET_PLATFORM_USRLIBS=/usr/lib/$TRIPLET
+export TARGET_JAVA_LIBS=/usr/lib/jvm/java-7-openjdk-$ARCH/jre/lib/$MACHINE
+
+export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-linux-$MACHINE.xml"
+
+export SOURCE_LEVEL=1.8
+export TARGET_LEVEL=1.8
+export TARGET_RT_JAR=/opt-share/jre1.8.0_212/lib/rt.jar
+
+#export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"
+export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet"
+
+ant \
+    -Drootrel.build=build-linux-$MACHINE \
+    $* 2>&1 | tee make.gluegen.all.linux-$MACHINE.log
diff -Nru gluegen2-2.3.2/make/scripts/make.gluegen.all.linux-x86_64-clang.sh gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.linux-x86_64-clang.sh
--- gluegen2-2.3.2/make/scripts/make.gluegen.all.linux-x86_64-clang.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.linux-x86_64-clang.sh	2023-02-01 18:52:41.000000000 +0100
@@ -2,8 +2,8 @@
 
 SDIR=`dirname $0` 
 
-if [ -e $SDIR/setenv-build-jogl-x86_64.sh ] ; then
-    . $SDIR/setenv-build-jogl-x86_64.sh
+if [ -e $SDIR/setenv-build-jogamp-x86_64.sh ] ; then
+    . $SDIR/setenv-build-jogamp-x86_64.sh
 fi
 
 #    -Dc.compiler.debug=true 
@@ -20,9 +20,9 @@
 #    -Dc.compiler.debug=true  \
 #    -Djavacdebuglevel="source,lines,vars" \
 
-export SOURCE_LEVEL=1.6
-export TARGET_LEVEL=1.6
-export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar
+export SOURCE_LEVEL=1.8
+export TARGET_LEVEL=1.8
+export TARGET_RT_JAR=/opt-share/jre1.8.0_212/lib/rt.jar
 
 export GLUEGEN_PROPERTIES_FILE="lib/gluegen-clang.properties"
 # or -Dgcc.compat.compiler=clang
diff -Nru gluegen2-2.3.2/make/scripts/make.gluegen.all.linux-x86_64.sh gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.linux-x86_64.sh
--- gluegen2-2.3.2/make/scripts/make.gluegen.all.linux-x86_64.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.linux-x86_64.sh	2023-02-01 18:52:41.000000000 +0100
@@ -2,8 +2,11 @@
 
 SDIR=`dirname $0` 
 
-if [ -e $SDIR/setenv-build-jogl-x86_64.sh ] ; then
-    . $SDIR/setenv-build-jogl-x86_64.sh
+# export J2RE_HOME=/usr/lib/jvm/java-11-openjdk-amd64
+# export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
+
+if [ -e $SDIR/setenv-build-jogamp-x86_64.sh ] ; then
+    . $SDIR/setenv-build-jogamp-x86_64.sh
 fi
 
 #    -Dc.compiler.debug=true 
@@ -13,16 +16,12 @@
 #    -DisLinuxAMD64=true \
 #    -DisX11=true \
 #
-#    -Dtarget.sourcelevel=1.6 \
-#    -Dtarget.targetlevel=1.6 \
-#    -Dtarget.rt.jar=/opt-share/jre1.6.0_30/lib/rt.jar \
-#
 #    -Dc.compiler.debug=true  \
 #    -Djavacdebuglevel="source,lines,vars" \
 
-export SOURCE_LEVEL=1.6
-export TARGET_LEVEL=1.6
-export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar
+export SOURCE_LEVEL=1.8
+export TARGET_LEVEL=1.8
+export TARGET_RT_JAR=/opt-share/jre1.8.0_212/lib/rt.jar
 
 #export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"
 export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet"
diff -Nru gluegen2-2.3.2/make/scripts/make.gluegen.all.linux-x86-clang.sh gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.linux-x86-clang.sh
--- gluegen2-2.3.2/make/scripts/make.gluegen.all.linux-x86-clang.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.linux-x86-clang.sh	2023-02-01 18:52:41.000000000 +0100
@@ -2,8 +2,8 @@
 
 SDIR=`dirname $0` 
 
-if [ -e $SDIR/setenv-build-jogl-x86.sh ] ; then
-    . $SDIR/setenv-build-jogl-x86.sh
+if [ -e $SDIR/setenv-build-jogamp-x86.sh ] ; then
+    . $SDIR/setenv-build-jogamp-x86.sh
 fi
 
 #    -Dc.compiler.debug=true 
@@ -15,9 +15,9 @@
 #    -Dgluegen-cpptasks.file=`pwd`/lib/gluegen-cpptasks-linux-32bit.xml \
 #
 
-export SOURCE_LEVEL=1.6
-export TARGET_LEVEL=1.6
-export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar
+export SOURCE_LEVEL=1.8
+export TARGET_LEVEL=1.8
+export TARGET_RT_JAR=/opt-share/jre1.8.0_212/lib/rt.jar
 
 export GLUEGEN_PROPERTIES_FILE="lib/gluegen-clang.properties"
 # or -Dgcc.compat.compiler=clang
diff -Nru gluegen2-2.3.2/make/scripts/make.gluegen.all.linux-x86.sh gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.linux-x86.sh
--- gluegen2-2.3.2/make/scripts/make.gluegen.all.linux-x86.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.linux-x86.sh	2023-02-01 18:52:41.000000000 +0100
@@ -2,8 +2,8 @@
 
 SDIR=`dirname $0` 
 
-if [ -e $SDIR/setenv-build-jogl-x86.sh ] ; then
-    . $SDIR/setenv-build-jogl-x86.sh
+if [ -e $SDIR/setenv-build-jogamp-x86.sh ] ; then
+    . $SDIR/setenv-build-jogamp-x86.sh
 fi
 
 #    -Dc.compiler.debug=true 
@@ -15,9 +15,9 @@
 #    -Dgluegen-cpptasks.file=`pwd`/lib/gluegen-cpptasks-linux-32bit.xml \
 #
 
-export SOURCE_LEVEL=1.6
-export TARGET_LEVEL=1.6
-export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar
+export SOURCE_LEVEL=1.8
+export TARGET_LEVEL=1.8
+export TARGET_RT_JAR=/opt-share/jre1.8.0_212/lib/rt.jar
 
 #export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"
 export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet"
diff -Nru gluegen2-2.3.2/make/scripts/make.gluegen.all.macosx-java6.sh gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.macosx-java6.sh
--- gluegen2-2.3.2/make/scripts/make.gluegen.all.macosx-java6.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.macosx-java6.sh	1970-01-01 01:00:00.000000000 +0100
@@ -1,29 +0,0 @@
-#! /bin/sh
-
-if [ -e /opt-share/etc/profile.ant ] ; then
-    . /opt-share/etc/profile.ant
-fi
-
-#    -Dc.compiler.debug=true 
-#
-#    -Dtarget.sourcelevel=1.6 \
-#    -Dtarget.targetlevel=1.6 \
-#    -Dtarget.rt.jar=/opt-share/jre1.6.0_30/lib/rt.jar \
-
-# Force OSX SDK 10.6, if desired
-# export SDKROOT=macosx10.6
-
-JAVA_HOME=`/usr/libexec/java_home -version 1.6`
-PATH=$JAVA_HOME/bin:$PATH
-export JAVA_HOME PATH
-
-export SOURCE_LEVEL=1.6
-export TARGET_LEVEL=1.6
-export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar
-
-#export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"
-export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet"
-
-ant \
-    -Drootrel.build=build-macosx-java6 \
-    $* 2>&1 | tee make.gluegen.all.macosx-java6.log
diff -Nru gluegen2-2.3.2/make/scripts/make.gluegen.all.macosx.sh gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.macosx.sh
--- gluegen2-2.3.2/make/scripts/make.gluegen.all.macosx.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.macosx.sh	2023-02-01 18:52:41.000000000 +0100
@@ -1,7 +1,7 @@
 #! /bin/sh
 
-if [ -e /opt-share/etc/profile.ant ] ; then
-    . /opt-share/etc/profile.ant
+if [ -e /usr/local/etc/profile.ant ] ; then
+    . /usr/local/etc/profile.ant
 fi
 
 #    -Dc.compiler.debug=true 
@@ -13,13 +13,13 @@
 # Force OSX SDK 10.6, if desired
 # export SDKROOT=macosx10.6
 
-JAVA_HOME=`/usr/libexec/java_home -version 1.8`
+JAVA_HOME=`/usr/libexec/java_home -version 17`
 PATH=$JAVA_HOME/bin:$PATH
 export JAVA_HOME PATH
 
-export SOURCE_LEVEL=1.6
-export TARGET_LEVEL=1.6
-export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar
+export SOURCE_LEVEL=1.8
+export TARGET_LEVEL=1.8
+export TARGET_RT_JAR=/usr/local/jre1.8.0_212/lib/rt.jar
 
 #export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"
 export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet"
diff -Nru gluegen2-2.3.2/make/scripts/make.gluegen.all.sh gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.sh
--- gluegen2-2.3.2/make/scripts/make.gluegen.all.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.sh	1970-01-01 01:00:00.000000000 +0100
@@ -1,9 +0,0 @@
-#! /bin/sh
-
-SDIR=`dirname $0` 
-
-$SDIR/make.gluegen.all.linux-armv6-cross.sh \
-&& $SDIR/make.gluegen.all.linux-armv6hf-cross.sh \
-&& $SDIR/make.gluegen.all.linux-x86_64.sh \
-&& $SDIR/make.gluegen.all.linux-x86.sh \
-&& $SDIR/make.gluegen.all.android-armv6-cross.sh \
diff -Nru gluegen2-2.3.2/make/scripts/make.gluegen.all.solaris-x86_64.sh gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.solaris-x86_64.sh
--- gluegen2-2.3.2/make/scripts/make.gluegen.all.solaris-x86_64.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.solaris-x86_64.sh	2023-02-01 18:52:41.000000000 +0100
@@ -2,8 +2,8 @@
 
 SDIR=`dirname $0` 
 
-if [ -e $SDIR/setenv-build-jogl-x86_64.sh ] ; then
-    . $SDIR/setenv-build-jogl-x86_64.sh
+if [ -e $SDIR/setenv-build-jogamp-x86_64.sh ] ; then
+    . $SDIR/setenv-build-jogamp-x86_64.sh
 fi
 
 #    -Dc.compiler.debug=true 
diff -Nru gluegen2-2.3.2/make/scripts/make.gluegen.all.solaris-x86.sh gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.solaris-x86.sh
--- gluegen2-2.3.2/make/scripts/make.gluegen.all.solaris-x86.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.solaris-x86.sh	2023-02-01 18:52:41.000000000 +0100
@@ -2,8 +2,8 @@
 
 SDIR=`dirname $0` 
 
-if [ -e $SDIR/setenv-build-jogl-x86.sh ] ; then
-    . $SDIR/setenv-build-jogl-x86.sh
+if [ -e $SDIR/setenv-build-jogamp-x86.sh ] ; then
+    . $SDIR/setenv-build-jogamp-x86.sh
 fi
 
 #    -Dc.compiler.debug=true 
diff -Nru gluegen2-2.3.2/make/scripts/make.gluegen.all.win32.bat gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.win32.bat
--- gluegen2-2.3.2/make/scripts/make.gluegen.all.win32.bat	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.win32.bat	1970-01-01 01:00:00.000000000 +0100
@@ -1,24 +0,0 @@
-set THISDIR="C:\JOGL"
-
-set J2RE_HOME=c:\jre1.8.0_60_x32
-set JAVA_HOME=c:\jdk1.8.0_60_x32
-set ANT_PATH=C:\apache-ant-1.9.4
-
-set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw\bin;%PATH%
-
-set LIB_GEN=%THISDIR%\lib
-set CLASSPATH=.;%THISDIR%\build-win32\classes
-REM    -Dc.compiler.debug=true 
-REM    -DuseOpenMAX=true 
-REM    -DuseKD=true
-REM    -Djogl.cg=1 -D-Dwindows.cg.lib=C:\Cg-2.2
-
-set SOURCE_LEVEL=1.6
-set TARGET_LEVEL=1.6
-set TARGET_RT_JAR=C:\jre1.6.0_30\lib\rt.jar
-
-REM set JOGAMP_JAR_CODEBASE=Codebase: *.jogamp.org
-set JOGAMP_JAR_CODEBASE=Codebase: *.goethel.localnet
-
-ant -Drootrel.build=build-win32 %1 %2 %3 %4 %5 %6 %7 %8 %9 > make.gluegen.all.win32.log 2>&1
-
diff -Nru gluegen2-2.3.2/make/scripts/make.gluegen.all.win64.bat gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.win64.bat
--- gluegen2-2.3.2/make/scripts/make.gluegen.all.win64.bat	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/make.gluegen.all.win64.bat	2023-02-01 18:52:41.000000000 +0100
@@ -1,10 +1,15 @@
-set THISDIR="C:\JOGL"
+set THISDIR="C:\JogAmp"
 
-set J2RE_HOME=c:\jre1.8.0_60_x64
-set JAVA_HOME=c:\jdk1.8.0_60_x64
-set ANT_PATH=C:\apache-ant-1.9.4
+set J2RE_HOME=c:\jdk-17
+set JAVA_HOME=c:\jdk-17
+set ANT_PATH=C:\apache-ant-1.10.5
+set GIT_PATH=C:\cygwin64\bin
+set SEVENZIP=C:\Program Files\7-Zip
 
-set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw64\bin;c:\mingw\bin;%PATH%
+set CMAKE_PATH=C:\cmake-3.25.1-windows-x64_64
+set CMAKE_C_COMPILER=c:\mingw64\bin\gcc
+
+set PATH=%J2RE_HOME%\bin;%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw64\bin;%CMAKE_PATH%\bin;%GIT_PATH%;%SEVENZIP%;%PATH%
 
 set LIB_GEN=%THISDIR%\lib
 set CLASSPATH=.;%THISDIR%\build-win64\classes
@@ -13,9 +18,9 @@
 REM    -DuseKD=true
 REM    -Djogl.cg=1 -D-Dwindows.cg.lib=C:\Cg-2.2
 
-set SOURCE_LEVEL=1.6
-set TARGET_LEVEL=1.6
-set TARGET_RT_JAR=C:\jre1.6.0_30\lib\rt.jar
+set SOURCE_LEVEL=1.8
+set TARGET_LEVEL=1.8
+set TARGET_RT_JAR=C:\jre1.8.0_212\lib\rt.jar
 
 REM set JOGAMP_JAR_CODEBASE=Codebase: *.jogamp.org
 set JOGAMP_JAR_CODEBASE=Codebase: *.goethel.localnet
diff -Nru gluegen2-2.3.2/make/scripts/make.macosx.jdk_lipo_libs.sh gluegen2-2.4.0+dfsg/make/scripts/make.macosx.jdk_lipo_libs.sh
--- gluegen2-2.3.2/make/scripts/make.macosx.jdk_lipo_libs.sh	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/make/scripts/make.macosx.jdk_lipo_libs.sh	2023-02-01 18:52:41.000000000 +0100
@@ -0,0 +1,17 @@
+#! /bin/sh
+
+amd64_dir=$HOME/temurin-17.jdk.amd64.lib
+arm64_dir=$HOME/temurin-17.jdk.arm64.lib
+fat_dir=$HOME/temurin-17.jdk.fat.lib
+
+rm -rf $fat_dir
+mkdir $fat_dir
+
+for i in $amd64_dir/*.dylib ; do
+    bname=`basename $i`
+    if [ -e $arm64_dir/$bname ] ; then
+        lipo -create $i $arm64_dir/$bname -output $fat_dir/$bname
+    else
+        echo missing $arm64_dir/$bname
+    fi
+done
diff -Nru gluegen2-2.3.2/make/scripts/runtest.sh gluegen2-2.4.0+dfsg/make/scripts/runtest.sh
--- gluegen2-2.3.2/make/scripts/runtest.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/runtest.sh	2023-02-01 18:52:41.000000000 +0100
@@ -50,7 +50,7 @@
 #D_ARGS="-Djogamp.debug.TempJarCache"
 #D_ARGS="-Djogamp.debug.TempFileCache"
 #D_ARGS="-Djogamp.debug.IOUtil -Djogamp.debug.JNILibLoader -Djogamp.debug.TempFileCache -Djogamp.debug.JarUtil -Djava.io.tmpdir=/run/tmp"
-#D_ARGS="-Djogamp.debug.IOUtil -Djogamp.debug.JNILibLoader -Djogamp.debug.TempFileCache -Djogamp.debug.JarUtil -Djogamp.debug.TempJarCache"
+#D_ARGS="-Djogamp.debug.IOUtil -Djogamp.debug.NativeLibrary -Djogamp.debug.JNILibLoader -Djogamp.debug.TempFileCache -Djogamp.debug.JarUtil -Djogamp.debug.TempJarCache"
 #D_ARGS="-Djogamp.debug.IOUtil -Djogamp.debug.JarUtil -Djogamp.debug.TempJarCache -Djogamp.debug.Uri -Djogamp.debug.Uri.ShowFix"
 #D_ARGS="-Djogamp.debug.Uri -Djogamp.debug.Uri.ShowFix"
 #D_ARGS="-Djogamp.debug.JNILibLoader -Djogamp.gluegen.UseTempJarCache=false"
@@ -61,8 +61,11 @@
 #D_ARGS="-Djogamp.debug.Lock -Djogamp.debug.Lock.TraceLock"
 #D_ARGS="-Djogamp.debug.Lock.TraceLock"
 #D_ARGS="-Djogamp.debug.IOUtil -Djogamp.debug.IOUtil.Exe -Djogamp.debug.IOUtil.Exe.NoStream"
-#D_ARGS="-Djogamp.debug.IOUtil -Djogamp.debug.IOUtil.Exe"
+#D_ARGS="-Djogamp.debug.IOUtil -Djogamp.debug.TempFileCache -Djogamp.debug.TempJarCache -Djogamp.debug.IOUtil.Exe"
+#D_ARGS="-Djogamp.debug.IOUtil -Djogamp.debug.TempFileCache -Djogamp.debug.TempJarCache -Djava.io.tmpdir=/run/501"
+#D_ARGS="-Djogamp.debug.IOUtil -Djogamp.debug.TempFileCache -Djogamp.debug.TempJarCache"
 #D_ARGS="-Djogamp.debug.ByteBufferInputStream"
+#D_ARGS="-Djogamp.debug.Buffers"
 #D_ARGS="-Djogamp.debug.Bitstream"
 #D_ARGS="-Djogamp.debug=all"
 #D_ARGS="-Djogamp.debug.Logging"
@@ -80,10 +83,10 @@
     echo LD_LIBRARY_PATH $LD_LIBRARY_PATH
     echo USE_CLASSPATH $USE_CLASSPATH
     which java
-    #echo java -cp $USE_CLASSPATH $X_ARGS $D_ARGS -Djava.library.path=$libspath $*
-    #java -cp $USE_CLASSPATH $X_ARGS $D_ARGS -Djava.library.path="$libspath" $*
-    echo java -cp "$USE_CLASSPATH" $X_ARGS $D_ARGS $*
-    java -cp "$USE_CLASSPATH" $X_ARGS $D_ARGS $*
+    echo java -cp "$USE_CLASSPATH" $X_ARGS $D_ARGS -Djava.library.path=$libspath $*
+    java -cp "$USE_CLASSPATH" $X_ARGS $D_ARGS -Djava.library.path="$libspath" $*
+    #echo java -cp "$USE_CLASSPATH" $X_ARGS $D_ARGS $*
+    #java -cp "$USE_CLASSPATH" $X_ARGS $D_ARGS $*
     #j3 -cp "$USE_CLASSPATH" $X_ARGS $D_ARGS $*
     echo
 }
@@ -108,7 +111,7 @@
 #onetest com.jogamp.common.util.LongIntHashMapTest 2>&1 | tee -a $LOG
 #onetest com.jogamp.common.util.TestPlatform01 2>&1 | tee -a $LOG
 #onetest com.jogamp.common.util.TestRunnableTask01 2>&1 | tee -a $LOG
-onetest com.jogamp.common.util.TestIOUtil01 2>&1 | tee -a $LOG
+#onetest com.jogamp.common.util.TestIOUtil01 2>&1 | tee -a $LOG
 #onetest com.jogamp.common.util.TestTempJarCache 2>&1 | tee -a $LOG
 #onetest com.jogamp.common.util.TestJarUtil 2>&1 | tee -a $LOG
 #onetest com.jogamp.common.util.TestValueConversion 2>&1 | tee -a $LOG
@@ -145,9 +148,10 @@
 #onetest com.jogamp.gluegen.jcpp.TokenPastingWhitespaceTest 2>&1 | tee -a $LOG
 #onetest com.jogamp.gluegen.jcpp.PreprocessorTest 2>&1 | tee -a $LOG
 
-#onetest com.jogamp.gluegen.test.junit.generation.Test1p1JavaEmitter 2>&1 | tee -a $LOG
+onetest com.jogamp.gluegen.test.junit.generation.Test1p1JavaEmitter 2>&1 | tee -a $LOG
 #onetest com.jogamp.gluegen.test.junit.generation.Test1p2ProcAddressEmitter 2>&1 | tee -a $LOG
 #onetest com.jogamp.gluegen.test.junit.generation.Test1p2LoadJNIAndImplLib 2>&1 | tee -a $LOG
+#onetest com.jogamp.gluegen.test.junit.generation.Test1p2DynamicLibraryBundle 2>&1 | tee -a $LOG
 #onetest com.jogamp.gluegen.test.junit.structgen.TestStructGen01 2>&1 | tee -a $LOG
 #onetest com.jogamp.gluegen.test.junit.structgen.TestStructGen02 2>&1 | tee -a $LOG
 
diff -Nru gluegen2-2.3.2/make/scripts/runtest-x32.bat gluegen2-2.4.0+dfsg/make/scripts/runtest-x32.bat
--- gluegen2-2.3.2/make/scripts/runtest-x32.bat	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/runtest-x32.bat	1970-01-01 01:00:00.000000000 +0100
@@ -1,16 +0,0 @@
-REM set TEMP=C:\Documents and Settings\jogamp\temp-exec
-REM set TMP=C:\Documents and Settings\jogamp\temp-exec
-REM set TEMP=C:\Users\jogamp\temp-exec
-REM set TMP=C:\Users\jogamp\temp-exec
-
-REM scripts\java-win32.bat com.jogamp.common.GlueGenVersion 
-REM scripts\java-win32.bat com.jogamp.common.util.TestVersionInfo
-REM scripts\java-win32.bat com.jogamp.gluegen.test.junit.generation.Test1p1JavaEmitter
-REM scripts\java-win32.bat com.jogamp.gluegen.test.junit.generation.Test1p2ProcAddressEmitter
-REM scripts\java-win32.bat com.jogamp.common.util.TestTempJarCache
-scripts\java-win32.bat com.jogamp.common.util.TestPlatform01
-REM scripts\java-win32.bat com.jogamp.common.os.TestElfReader01
-REM scripts\java-win32.bat com.jogamp.common.util.TestIOUtilURIHandling
-REM scripts\java-win32.bat com.jogamp.common.nio.TestByteBufferInputStream
-REM scripts\java-win32.bat com.jogamp.common.nio.TestByteBufferOutputStream
-
diff -Nru gluegen2-2.3.2/make/scripts/runtest-x64.bat gluegen2-2.4.0+dfsg/make/scripts/runtest-x64.bat
--- gluegen2-2.3.2/make/scripts/runtest-x64.bat	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/runtest-x64.bat	2023-02-01 18:52:41.000000000 +0100
@@ -8,11 +8,13 @@
 
 REM scripts\java-win64.bat com.jogamp.gluegen.jcpp.IncludeAbsoluteTest
 
-REM scripts\java-win64.bat com.jogamp.gluegen.test.junit.generation.Test1p1JavaEmitter
+scripts\java-win64.bat com.jogamp.gluegen.test.junit.generation.Test1p1JavaEmitter
 REM scripts\java-win64.bat com.jogamp.gluegen.test.junit.generation.Test1p2ProcAddressEmitter
+REM scripts\java-win64.bat com.jogamp.gluegen.test.junit.generation.Test1p2LoadJNIAndImplLib
+REM scripts\java-win64.bat com.jogamp.gluegen.test.junit.generation.Test1p2DynamicLibraryBundle
 REM scripts\java-win64.bat com.jogamp.common.util.TestTempJarCache
 REM scripts\java-win64.bat com.jogamp.common.os.TestElfReader01
-scripts\java-win64.bat com.jogamp.common.util.TestPlatform01
+REM scripts\java-win64.bat com.jogamp.common.util.TestPlatform01
 
 REM scripts\java-win64.bat com.jogamp.common.util.TestIOUtil01
 REM scripts\java-win64.bat com.jogamp.common.util.TestJarUtil
diff -Nru gluegen2-2.3.2/make/scripts/setenv-android-tools.sh gluegen2-2.4.0+dfsg/make/scripts/setenv-android-tools.sh
--- gluegen2-2.3.2/make/scripts/setenv-android-tools.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/setenv-android-tools.sh	2023-02-01 18:52:41.000000000 +0100
@@ -1,79 +1,373 @@
 #! /bin/sh
 
+# Aligned with Android SDK build-tools 29 and NDK 20 as of 2019-12-10
+#
+# As it is no more easily achievable to download the complete SDK 
+# separately, I used Android-Studio to fetch all parts incl. the NDK.
+# Thereafter I copied ~/Android/Sdk -> /opt-linux-x86_64/android-sdk-linux_x86_64
+# which I also use for the official crosscompilation.
+#
+# Variable names borrowed from ~/Android/Sdk/ndk/20.1.5948944/build/cmake/android.toolchain.cmake
+# We only use ANDROID_API_LEVEL instead of ANDROID_PLATFORM_LEVEL, as it describes the API level.
+#
+#
+# User should set environment variables:
+# ==========================================
+#
+# - ANDROID_HOME - defaults to one of
+#        ~/Android/Sdk
+#        /opt-linux-x86_64/android-sdk-linux_x86_64
+#        /opt/android-sdk-linux_x86_64
+#        /usr/local/android-sdk-linux_x86_64
+#
+# - ANDROID_API_LEVEL - defaults to 24
+#
+# - ANDROID_HOST_TAG - defaults to linux-x86_64
+#
+# - ANDROID_ABI - defaults to x86_64, one of
+#        armeabi-v7a (with NEON by default since NDK r21)
+#        arm64-v8a 
+#        x86_64
+#        x86
+#
+# Following environment variables will be set
+# ============================================
+#
+# - ANDROID_SYSROOT_ABI
+# - ANDROID_TOOLCHAIN_NAME
+# - ANDROID_LLVM_TRIPLE
+# - ANDROID_BUILD_TOOLS_VERSION
+# - ANDROID_NDK
+# - ANDROID_BUILDTOOLS_ROOT
+# - ANDROID_TOOLCHAIN_ROOT
+# - ANDROID_TOOLCHAIN_SYSROOT0
+# - ANDROID_TOOLCHAIN_SYSROOT0_LIB
+# - ANDROID_TOOLCHAIN_SYSROOT1
+# - ANDROID_TOOLCHAIN_SYSROOT1_INC
+# - ANDROID_TOOLCHAIN_SYSROOT1_INC_ARCH
+# - ANDROID_TOOLCHAIN_SYSROOT1_INC_STL
+# - ANDROID_TOOLCHAIN_SYSROOT1_LIB1
+# - ANDROID_TOOLCHAIN_SYSROOT1_LIB2
+#
+# Android Studio SDK + NDK Filesystem Layout (official)
+#
+# ~/Android/Sdk/
+# ~/Android/Sdk/build-tools/29.0.2/
+# ~/Android/Sdk/build-tools/29.0.2/zipalign (*)
+# ~/Android/Sdk/ndk/
+# ~/Android/Sdk/ndk/20.1.5948944/platforms/android-24/arch-arm64 (1)
+# ~/Android/Sdk/ndk/20.1.5948944/platforms/android-24/arch-arm64/usr/lib/libc.a (*)(1)
+# ~/Android/Sdk/ndk/20.1.5948944/sysroot/ (gcc)
+# ~/Android/Sdk/ndk/20.1.5948944/sysroot/usr/include/ (gcc)
+# ~/Android/Sdk/ndk/20.1.5948944/sysroot/usr/lib/aarch64-linux-android/libc.a (gcc)
+# ~/Android/Sdk/ndk/20.1.5948944/toolchains/
+# ~/Android/Sdk/ndk/20.1.5948944/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/aarch64-linux-android/bin/ld (gcc)
+# ~/Android/Sdk/ndk/20.1.5948944/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-ld (gcc)
+# ~/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/
+# ~/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-ld (*)
+# ~/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/aarch64-linux-android/bin/ld
+# ~/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/bin/clang (*)
+# ~/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/sysroot (2)
+# ~/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include
+# ~/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/aarch64-linux-android/asm/types.h (*) (2,3)
+# ~/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/libc.a (*)
+# ~/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/libc++_shared.so (*)
+# ~/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/24/libc.a (*) (2)
+# ~/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/complex (*) (4)
+#
+# (*) tested by this script
+#
+# (1) ANDROID_TOOLCHAIN_SYSROOT0 exposes all libs with standard FS layout usr/lib, but no include files
+#     -> ANDROID_TOOLCHAIN_SYSROOT0_LIB
+#
+# (2) ANDROID_TOOLCHAIN_SYSROOT1 exposes all libs but without standard FS layout, also exposes include files 
+#     -> ANDROID_TOOLCHAIN_SYSROOT1_INC
+#
+# (3) ANDROID_TOOLCHAIN_SYSROOT1 also exposes the arch dependent include files, i.e. asm/types.h etc
+#     -> ANDROID_TOOLCHAIN_SYSROOT1_INC_ARCH
+#
+# (4) ANDROID_TOOLCHAIN_SYSROOT1_INC_STL for LLVM's C++ STL lib (default since NDK r18)
+#     Using LLVM's c++_shared as of NDK r18: https://developer.android.com/ndk/guides/cpp-support.html
+#     LLVM's c++ headers must come before other system header!
+#     Also see https://github.com/android/ndk/issues/452 and https://gitlab.kitware.com/cmake/cmake/issues/17059
+#
+# Native libraries of (1) and (2) are identical
+#
+# Having
+#   ANDROID_HOME=~/Android/Sdk
+#   ANDROID_API_LEVEL 24
+#   ANDROID_HOST_TAG linux-x86_64
+#   ANDROID_ABI arm64-v8a
+# Using derived values of
+#   ANDROID_BUILD_TOOLS_VERSION=29.0.2
+#   ANDROID_NDK_VERSION=20.1.5948944
+#   ANDROID_TOOLCHAIN_NAME aarch64-linux-android
+#   ANDROID_TOOLCHAIN_PLATFORM_NAME=arm64
+#   ANDROID_SYSROOT_ABI=arm64
+
 echo $0
 
-echo Presets
-echo   NDK_ROOT $NDK_ROOT
-echo   ANDROID_HOME $ANDROID_HOME
-echo   ANDROID_BUILD_TOOLS_VERSION $ANDROID_BUILD_TOOLS_VERSION
+NDK_TOOLCHAIN_VERSION=clang
+echo "Setting NDK_TOOLCHAIN_VERSION to ${NDK_TOOLCHAIN_VERSION} default!"
 
-if [ -z "$NDK_ROOT" ] ; then
-    #
-    # Generic android-ndk
-    #
-    if [ -e /usr/local/android-ndk ] ; then
-        NDK_ROOT=/usr/local/android-ndk
-    elif [ -e /opt-linux-x86_64/android-ndk ] ; then
-        NDK_ROOT=/opt-linux-x86_64/android-ndk
-    elif [ -e /opt-linux-x86/android-ndk ] ; then
-        NDK_ROOT=/opt-linux-x86/android-ndk
-    elif [ -e /opt/android-ndk ] ; then
-        NDK_ROOT=/opt/android-ndk
-    #
-    # Specific android-ndk-r10d
-    #
-    elif [ -e /usr/local/android-ndk-r10d ] ; then
-        NDK_ROOT=/usr/local/android-ndk-r10d
-    elif [ -e /opt-linux-x86_64/android-ndk-r10d ] ; then
-        NDK_ROOT=/opt-linux-x86_64/android-ndk-r10d
-    elif [ -e /opt-linux-x86/android-ndk-r10d ] ; then
-        NDK_ROOT=/opt-linux-x86/android-ndk-r10d
-    elif [ -e /opt/android-ndk-r10d ] ; then
-        NDK_ROOT=/opt/android-ndk-r10d
-    else 
-        echo NDK_ROOT is not specified and does not exist in default locations
-        exit 1
-    fi
-elif [ ! -e $NDK_ROOT ] ; then
-    echo NDK_ROOT $NDK_ROOT does not exist
+if [ -z "${ANDROID_API_LEVEL}" ] ; then
+    ANDROID_API_LEVEL=24
+    echo "Setting undefined ANDROID_API_LEVEL to ${ANDROID_API_LEVEL} default!"
+fi
+if [ -z "${ANDROID_HOST_TAG}" ] ; then
+    ANDROID_HOST_TAG=linux-x86_64
+    echo "Setting undefined ANDROID_HOST_TAG to ${ANDROID_HOST_TAG} default!"
+fi
+
+if [ -z "${ANDROID_ABI}" ] ; then
+    ANDROID_ABI=x86_64
+    echo "Setting undefined ANDROID_ABI to ${ANDROID_ABI} default!"
+fi
+if [ "${ANDROID_ABI}" = "armeabi-v7a" ] ; then
+    # with NEON by default since NDK r21
+    ANDROID_SYSROOT_ABI=arm
+    #CMAKE_SYSTEM_PROCESSOR=armv7-a
+    ANDROID_TOOLCHAIN_NAME=arm-linux-androideabi
+    ANDROID_LLVM_TRIPLE=armv7-none-linux-androideabi
+elif [ "${ANDROID_ABI}" = "arm64-v8a" ] ; then
+    ANDROID_SYSROOT_ABI=arm64
+    #CMAKE_SYSTEM_PROCESSOR=aarch64
+    ANDROID_TOOLCHAIN_NAME=aarch64-linux-android
+    ANDROID_LLVM_TRIPLE=aarch64-none-linux-android
+elif [ "${ANDROID_ABI}" = "x86_64" ] ; then
+    ANDROID_SYSROOT_ABI=x86_64
+    #CMAKE_SYSTEM_PROCESSOR=x86_64
+    ANDROID_TOOLCHAIN_NAME=x86_64-linux-android
+    ANDROID_LLVM_TRIPLE=x86_64-none-linux-android
+elif [ "${ANDROID_ABI}" = "x86" ] ; then
+    ANDROID_SYSROOT_ABI=x86
+    #CMAKE_SYSTEM_PROCESSOR=i686
+    ANDROID_TOOLCHAIN_NAME=i686-linux-android
+    ANDROID_LLVM_TRIPLE=i686-none-linux-android
+else
+    echo "ANDROID_ABI is ${ANDROID_ABI} and not supported!"
     exit 1
 fi
-export NDK_ROOT
 
-if [ -z "$ANDROID_HOME" ] ; then
-    if [ -e /usr/local/android-sdk-linux_x86 ] ; then
-        ANDROID_HOME=/usr/local/android-sdk-linux_x86
-    elif [ -e /opt-linux-x86/android-sdk-linux_x86 ] ; then
-        ANDROID_HOME=/opt-linux-x86/android-sdk-linux_x86
-    elif [ -e /opt/android-sdk-linux_x86 ] ; then
-        ANDROID_HOME=/opt/android-sdk-linux_x86
+echo "Preset-0 (user)"
+echo   ANDROID_HOME ${ANDROID_HOME}
+echo   ANDROID_API_LEVEL ${ANDROID_API_LEVEL}
+echo   ANDROID_HOST_TAG ${ANDROID_HOST_TAG}
+echo   ANDROID_ABI ${ANDROID_ABI}
+echo
+echo Preset-1
+echo   NDK_TOOLCHAIN_VERSION ${NDK_TOOLCHAIN_VERSION}
+echo   ANDROID_SYSROOT_ABI ${ANDROID_SYSROOT_ABI}
+echo   ANDROID_TOOLCHAIN_NAME ${ANDROID_TOOLCHAIN_NAME}
+echo   "ANDROID_LLVM_TRIPLE ${ANDROID_LLVM_TRIPLE} (compiler target)"
+echo   ANDROID_BUILD_TOOLS_VERSION ${ANDROID_BUILD_TOOLS_VERSION}
+echo   ANDROID_NDK ${ANDROID_NDK}
+echo
+echo Preset-2
+echo   ANDROID_BUILDTOOLS_ROOT ${ANDROID_BUILDTOOLS_ROOT}
+echo   ANDROID_TOOLCHAIN_ROOT ${ANDROID_TOOLCHAIN_ROOT}
+echo   ANDROID_TOOLCHAIN_SYSROOT0 ${ANDROID_TOOLCHAIN_SYSROOT0}
+echo   ANDROID_TOOLCHAIN_SYSROOT0_LIB ${ANDROID_TOOLCHAIN_SYSROOT0_LIB}
+echo   ANDROID_TOOLCHAIN_SYSROOT1 ${ANDROID_TOOLCHAIN_SYSROOT1}
+echo   ANDROID_TOOLCHAIN_SYSROOT1_INC ${ANDROID_TOOLCHAIN_SYSROOT1_INC}
+echo   ANDROID_TOOLCHAIN_SYSROOT1_INC_ARCH ${ANDROID_TOOLCHAIN_SYSROOT1_INC_ARCH}
+echo   ANDROID_TOOLCHAIN_SYSROOT1_INC_STL ${ANDROID_TOOLCHAIN_SYSROOT1_INC_STL}
+echo   ANDROID_TOOLCHAIN_SYSROOT1_LIB1 ${ANDROID_TOOLCHAIN_SYSROOT1_LIB1}
+echo   ANDROID_TOOLCHAIN_SYSROOT1_LIB2 ${ANDROID_TOOLCHAIN_SYSROOT1_LIB2}
+echo
+
+check_exists() {
+    if [ ! -e "$1" ] ; then
+        echo "$1" does not exist
+        exit 1
+    fi
+    return 0
+}
+
+if [ -z "${ANDROID_HOME}" ] ; then
+    if [ -e ${HOME}/Android/Sdk ] ; then
+        ANDROID_HOME=${HOME}/Android/Sdk
+    elif [ -e /opt-linux-x86_64/android-sdk-linux_x86_64 ] ; then
+        ANDROID_HOME=/opt-linux-x86_64/android-sdk-linux_x86_64
+    elif [ -e /opt/android-sdk-linux_x86_64 ] ; then
+        ANDROID_HOME=/opt/android-sdk-linux_x86_64
+    elif [ -e /usr/local/android-sdk-linux_x86_64 ] ; then
+        ANDROID_HOME=/usr/local/android-sdk-linux_x86_64
     else 
         echo ANDROID_HOME is not specified and does not exist in default locations
         exit 1
     fi
-elif [ ! -e $ANDROID_HOME ] ; then
-    echo ANDROID_HOME $ANDROID_HOME does not exist
+elif [ ! -e ${ANDROID_HOME} ] ; then
+    echo ANDROID_HOME ${ANDROID_HOME} does not exist
     exit 1
 fi
-export ANDROID_HOME
 
-if [ -z "$ANDROID_BUILD_TOOLS_VERSION" ] ; then
-    if [ -e $ANDROID_HOME/build-tools/21.1.2/zipalign ] ; then
-        ANDROID_BUILD_TOOLS_VERSION=21.1.2
-    elif [ -e $ANDROID_HOME/build-tools/20.0.0/zipalign ] ; then
-        ANDROID_BUILD_TOOLS_VERSION=20.0.0
-    else 
-        echo ANDROID_BUILD_TOOLS_VERSION $ANDROID_HOME/build-tools/ANDROID_BUILD_TOOLS_VERSION/zipalign does not exist in default locations
+unset ANDROID_BUILD_TOOLS_VERSION
+if [ -z "${ANDROID_BUILD_TOOLS_VERSION}" ] ; then
+    # basename $(dirname `find /home/sven/Android/Sdk/build-tools -name zipalign | sort -u | tail -n1`)
+    fzipalign=`find ${ANDROID_HOME}/build-tools -name zipalign | sort -u | tail -n1`
+    if [ ! -z "${fzipalign}" ] ; then
+        dzipalign=`dirname ${fzipalign}`
+        vzipalign=`basename ${dzipalign}`
+        if [ -e ${ANDROID_HOME}/build-tools/${vzipalign}/zipalign ] ; then
+            ANDROID_BUILD_TOOLS_VERSION=${vzipalign}
+        fi
+    fi
+    if [ -z "${ANDROID_BUILD_TOOLS_VERSION}" ] ; then
+        echo ANDROID_BUILD_TOOLS_VERSION ${ANDROID_HOME}/build-tools/ANDROID_BUILD_TOOLS_VERSION/zipalign does not exist
         exit 1
     fi
-elif [ ! -e $ANDROID_HOME/build-tools/$ANDROID_BUILD_TOOLS_VERSION/zipalign ] ; then
-    echo ANDROID_BUILD_TOOLS_VERSION $ANDROID_HOME/build-tools/$ANDROID_BUILD_TOOLS_VERSION/zipalign does not exist
+fi
+
+if [ -z "${ANDROID_NDK}" ] ; then
+    #
+    # Generic android-ndk
+    #
+    if [ -e ${ANDROID_HOME}/ndk ] ; then
+        # basename $(dirname `find ndk -name toolchains -a -type d | sort -u | tail -n1`)
+        d2toolchains=`find ${ANDROID_HOME}/ndk -name toolchains -a -type d | sort -u | tail -n1`
+        if [ ! -z "${d2toolchains}" ] ; then
+            dtoolchains=`dirname ${d2toolchains}`
+            vtoolchains=`basename ${dtoolchains}`
+            # ~/Android/Sdk/ndk/20.1.5948944/sysroot/usr/lib/aarch64-linux-android/libc.a (*)
+            if [ -e ${ANDROID_HOME}/ndk/${vtoolchains}/sysroot/usr/lib/aarch64-linux-android/libc.a ] ; then
+                ANDROID_NDK_VERSION=${vtoolchains}
+            fi
+        fi
+        if [ -z "${ANDROID_NDK_VERSION}" ] ; then
+            echo ANDROID_NDK_VERSION ${ANDROID_HOME}/ndk/ANDROID_NDK_VERSION/sysroot/usr/lib/aarch64-linux-android/libc.a does not exist
+        else
+            ANDROID_NDK=${ANDROID_HOME}/ndk/${vtoolchains}
+        fi
+    fi
+    if [ -z "${ANDROID_NDK}" ] ; then
+        if [ -e /usr/local/android-ndk ] ; then
+            ANDROID_NDK=/usr/local/android-ndk
+        elif [ -e /opt-linux-x86_64/android-ndk ] ; then
+            ANDROID_NDK=/opt-linux-x86_64/android-ndk
+        elif [ -e /opt/android-ndk ] ; then
+            ANDROID_NDK=/opt/android-ndk
+        fi
+    fi
+    if [ -z "${ANDROID_NDK}" ] ; then
+        echo ANDROID_NDK is not specified and does not exist in default locations
+        exit 1
+    fi
+fi
+if [ ! -e "${ANDROID_NDK}" ] ; then
+    echo ANDROID_NDK ${ANDROID_NDK} does not exist
     exit 1
 fi
+
+ANDROID_BUILDTOOLS_ROOT=${ANDROID_HOME}/build-tools/${ANDROID_BUILD_TOOLS_VERSION}
+ANDROID_TOOLCHAIN_ROOT=${ANDROID_NDK}/toolchains/llvm/prebuilt/${ANDROID_HOST_TAG}
+
+ANDROID_TOOLCHAIN_SYSROOT0=${ANDROID_NDK}/platforms/android-${ANDROID_API_LEVEL}/arch-${ANDROID_SYSROOT_ABI}
+ANDROID_TOOLCHAIN_SYSROOT0_LIB=${ANDROID_TOOLCHAIN_SYSROOT0}/usr/lib
+
+ANDROID_TOOLCHAIN_SYSROOT1=${ANDROID_TOOLCHAIN_ROOT}/sysroot
+ANDROID_TOOLCHAIN_SYSROOT1_INC=${ANDROID_TOOLCHAIN_SYSROOT1}/usr/include
+ANDROID_TOOLCHAIN_SYSROOT1_INC_ARCH=${ANDROID_TOOLCHAIN_SYSROOT1_INC}/${ANDROID_TOOLCHAIN_NAME}
+ANDROID_TOOLCHAIN_SYSROOT1_INC_STL=${ANDROID_TOOLCHAIN_SYSROOT1_INC}/c++/v1
+ANDROID_TOOLCHAIN_SYSROOT1_LIB1=${ANDROID_TOOLCHAIN_SYSROOT1}/usr/lib/${ANDROID_TOOLCHAIN_NAME}/${ANDROID_API_LEVEL}
+ANDROID_TOOLCHAIN_SYSROOT1_LIB2=${ANDROID_TOOLCHAIN_SYSROOT1}/usr/lib/${ANDROID_TOOLCHAIN_NAME}
+
+# ~/Android/Sdk/build-tools/29.0.2/zipalign (*)
+check_exists ${ANDROID_BUILDTOOLS_ROOT}/zipalign
+
+# ~/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-ld (*)
+check_exists ${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_NAME}-ld
+
+# ~/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/bin/clang (*)
+check_exists ${ANDROID_TOOLCHAIN_ROOT}/bin/clang
+
+# ~/Android/Sdk/ndk/20.1.5948944/platforms/android-24/arch-arm64/usr/lib/libc.a (*)
+check_exists ${ANDROID_TOOLCHAIN_SYSROOT0_LIB}/libc.a
+
+# ~/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/aarch64-linux-android/asm/types.h (*) (2)
+check_exists ${ANDROID_TOOLCHAIN_SYSROOT1_INC_ARCH}/asm/types.h
+
+# ~/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/complex (*) (4)
+check_exists ${ANDROID_TOOLCHAIN_SYSROOT1_INC_STL}/complex
+
+# ~/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/24/libc.a (*)
+check_exists ${ANDROID_TOOLCHAIN_SYSROOT1_LIB1}/libc.a
+
+# ~/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/libc.a (*)
+# ~/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/libc++_shared.so (*)
+check_exists ${ANDROID_TOOLCHAIN_SYSROOT1_LIB2}/libc.a
+check_exists ${ANDROID_TOOLCHAIN_SYSROOT1_LIB2}/libc++_shared.so
+
+export ANDROID_HOME
+export ANDROID_API_LEVEL
+export ANDROID_HOST_TAG
+export ANDROID_ABI
+
+export NDK_TOOLCHAIN_VERSION
+export ANDROID_SYSROOT_ABI
+export ANDROID_TOOLCHAIN_NAME
+export ANDROID_LLVM_TRIPLE
 export ANDROID_BUILD_TOOLS_VERSION
+export ANDROID_NDK
+
+export ANDROID_BUILDTOOLS_ROOT
+export ANDROID_TOOLCHAIN_ROOT
+export ANDROID_TOOLCHAIN_SYSROOT0
+export ANDROID_TOOLCHAIN_SYSROOT0_LIB
+export ANDROID_TOOLCHAIN_SYSROOT1
+export ANDROID_TOOLCHAIN_SYSROOT1_INC
+export ANDROID_TOOLCHAIN_SYSROOT1_INC_ARCH
+export ANDROID_TOOLCHAIN_SYSROOT1_INC_STL
+export ANDROID_TOOLCHAIN_SYSROOT1_LIB1
+export ANDROID_TOOLCHAIN_SYSROOT1_LIB2
+
+echo "Postset-0 (user)"
+echo   ANDROID_HOME ${ANDROID_HOME}
+echo   ANDROID_API_LEVEL ${ANDROID_API_LEVEL}
+echo   ANDROID_HOST_TAG ${ANDROID_HOST_TAG}
+echo   ANDROID_ABI ${ANDROID_ABI}
+echo
+echo Postset-1
+echo   NDK_TOOLCHAIN_VERSION ${NDK_TOOLCHAIN_VERSION}
+echo   ANDROID_SYSROOT_ABI ${ANDROID_SYSROOT_ABI}
+echo   ANDROID_TOOLCHAIN_NAME ${ANDROID_TOOLCHAIN_NAME}
+echo   "ANDROID_LLVM_TRIPLE ${ANDROID_LLVM_TRIPLE} (compiler target)"
+echo   ANDROID_BUILD_TOOLS_VERSION ${ANDROID_BUILD_TOOLS_VERSION}
+echo   ANDROID_NDK ${ANDROID_NDK}
+echo
+echo Postset-2
+echo   ANDROID_BUILDTOOLS_ROOT ${ANDROID_BUILDTOOLS_ROOT}
+echo   ANDROID_TOOLCHAIN_ROOT ${ANDROID_TOOLCHAIN_ROOT}
+echo   ANDROID_TOOLCHAIN_SYSROOT0 ${ANDROID_TOOLCHAIN_SYSROOT0}
+echo   ANDROID_TOOLCHAIN_SYSROOT0_LIB ${ANDROID_TOOLCHAIN_SYSROOT0_LIB}
+echo   ANDROID_TOOLCHAIN_SYSROOT1 ${ANDROID_TOOLCHAIN_SYSROOT1}
+echo   ANDROID_TOOLCHAIN_SYSROOT1_INC ${ANDROID_TOOLCHAIN_SYSROOT1_INC}
+echo   ANDROID_TOOLCHAIN_SYSROOT1_INC_ARCH ${ANDROID_TOOLCHAIN_SYSROOT1_INC_ARCH}
+echo   ANDROID_TOOLCHAIN_SYSROOT1_INC_STL ${ANDROID_TOOLCHAIN_SYSROOT1_INC_STL}
+echo   ANDROID_TOOLCHAIN_SYSROOT1_LIB1 ${ANDROID_TOOLCHAIN_SYSROOT1_LIB1}
+echo   ANDROID_TOOLCHAIN_SYSROOT1_LIB2 ${ANDROID_TOOLCHAIN_SYSROOT1_LIB2}
+echo
+
+export -p | grep ANDROID
 
-echo Set
-echo   NDK_ROOT $NDK_ROOT
-echo   ANDROID_HOME $ANDROID_HOME
-echo   ANDROID_BUILD_TOOLS_VERSION $ANDROID_BUILD_TOOLS_VERSION
+#
+# CC="$ANDROID_NDK/toolchains/llvm/prebuilt/$ANDROID_HOST_TAG/bin/clang -target $ANDROID_LLVM_TRIPLE"
+#
+## Generic flags.
+##list(APPEND ANDROID_COMPILER_FLAGS
+#  -g
+#  -DANDROID
+#  -fdata-sections
+#  -ffunction-sections
+#  -funwind-tables
+#  -fstack-protector-strong
+#  -no-canonical-prefixes)
+#list(APPEND ANDROID_LINKER_FLAGS
+#  -Wl,--build-id
+#  -Wl,--warn-shared-textrel
+#  -Wl,--fatal-warnings)
+#list(APPEND ANDROID_LINKER_FLAGS_EXE -Wl,--gc-sections)
+#
+#list(APPEND ANDROID_COMPILER_FLAGS_RELEASE -O2)
+#
 
diff -Nru gluegen2-2.3.2/make/scripts/setenv-build-jogamp-x86_64.sh gluegen2-2.4.0+dfsg/make/scripts/setenv-build-jogamp-x86_64.sh
--- gluegen2-2.3.2/make/scripts/setenv-build-jogamp-x86_64.sh	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/make/scripts/setenv-build-jogamp-x86_64.sh	2023-02-01 18:52:41.000000000 +0100
@@ -0,0 +1,106 @@
+#! /bin/sh
+
+echo $0
+
+if [ -e /opt-share/apache-ant ] ; then
+    ANT_PATH=/opt-share/apache-ant
+    PATH=$ANT_PATH/bin:$PATH
+    export ANT_PATH
+fi
+if [ -z "$ANT_PATH" ] ; then
+    if [ -e /usr/share/ant/bin/ant -a -e /usr/share/ant/lib/ant.jar ] ; then
+        ANT_PATH=/usr/share/ant
+        export ANT_PATH
+        echo autosetting ANT_PATH to $ANT_PATH
+    fi
+fi
+if [ -z "$ANT_PATH" ] ; then
+    echo ANT_PATH does not exist, set it
+    exit
+fi
+
+if [ ! -z "$J2RE_HOME" -a ! -z "$JAVA_HOME" ] ; then
+    if [ -e $J2RE_HOME -a -e $JAVA_HOME ] ; then
+        PATH=$J2RE_HOME/bin:$JAVA_HOME/bin:$PATH
+        export J2RE_HOME JAVA_HOME
+        FOUND_JAVA=1
+    fi 
+fi 
+
+if [ -z "$FOUND_JAVA" ] ; then
+    if [ -e /usr/lib/jvm/java-17-openjdk-amd64 ] ; then
+        J2RE_HOME=/usr/lib/jvm/java-17-openjdk-amd64
+        JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
+        PATH=$JAVA_HOME/bin:$PATH
+        export J2RE_HOME JAVA_HOME
+        FOUND_JAVA=1
+    fi 
+fi 
+
+if [ -z "$FOUND_JAVA" ] ; then
+    if [ -e /usr/lib/jvm/java-11-openjdk-amd64 ] ; then
+        J2RE_HOME=/usr/lib/jvm/java-11-openjdk-amd64
+        JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
+        PATH=$JAVA_HOME/bin:$PATH
+        export J2RE_HOME JAVA_HOME
+        FOUND_JAVA=1
+    fi 
+fi 
+
+if [ -z "$FOUND_JAVA" ] ; then
+    if [ -e /opt-linux-x86_64/jre11 -a -e /opt-linux-x86_64/jdk11 ] ; then
+        J2RE_HOME=/opt-linux-x86_64/jre11
+        JAVA_HOME=/opt-linux-x86_64/jdk11
+        PATH=$J2RE_HOME/bin:$JAVA_HOME/bin:$PATH
+        export J2RE_HOME JAVA_HOME
+        FOUND_JAVA=1
+    fi 
+fi 
+
+if [ -z "$FOUND_JAVA" ] ; then
+    if [ -e /usr/java/jre/bin/amd64 -a -e /usr/java/bin/amd64 ] ; then
+        # make a symbolic link: /usr/java/bin/amd64/bin$ ln -s . bin
+        # since ant looks for $JAVA_HOME/bin/java and we need to force the 64bit JVM
+        J2RE_HOME=/usr/java/jre
+        JAVA_HOME=/usr/java
+        PATH=$J2RE_HOME/bin/amd64:$JAVA_HOME/bin/amd64:$PATH
+        JAVACMD=$JAVA_HOME/bin/amd64/java
+        ANT_OPTS="-d64 -DjvmJava.exe=$J2RE_HOME/bin/amd64/java"
+        export J2RE_HOME JAVA_HOME JAVACMD ANT_OPTS
+        FOUND_JAVA=1
+    fi
+fi
+if [ -z "$FOUND_JAVA" ] ; then
+    if [ -e /opt-solaris-x86_64/jre11 -a -e /opt-solaris-x86_64/jdk11 ] ; then
+        # make a symbolic link: /opt-solaris-x86_64/jre7/bin/amd64/bin$ ln -s . bin
+        # since ant looks for $JAVA_HOME/bin/java and we need to force the 64bit JVM
+        J2RE_HOME=/opt-solaris-x86_64/jre11/bin/amd64
+        JAVA_HOME=/opt-solaris-x86_64/jdk11/bin/amd64
+        PATH=$J2RE_HOME:$JAVA_HOME:$PATH
+        export J2RE_HOME JAVA_HOME
+        FOUND_JAVA=1
+    fi
+fi
+
+if [ -z "$FOUND_JAVA" ] ; then
+    # make a symbolic link, e.g. OpenJDK:
+    # /usr/lib/jvm/java-7-openjdk-amd64 -> /usr/lib/jvm/java-amd64
+    if [ -e /usr/lib/jvm/java-amd64 ] ; then
+        J2RE_HOME=/usr/lib/jvm/java-amd64/jre
+        JAVA_HOME=/usr/lib/jvm/java-amd64
+        PATH=$J2RE_HOME/bin:$JAVA_HOME/bin:$PATH
+        export J2RE_HOME JAVA_HOME
+        FOUND_JAVA=1
+    fi 
+fi 
+
+
+export PATH
+
+echo FOUND_JAVA $FOUND_JAVA
+echo J2RE_HOME $J2RE_HOME
+echo JAVA_HOME $JAVA_HOME
+echo PATH $PATH
+which java
+java -version
+
diff -Nru gluegen2-2.3.2/make/scripts/setenv-build-jogamp-x86.sh gluegen2-2.4.0+dfsg/make/scripts/setenv-build-jogamp-x86.sh
--- gluegen2-2.3.2/make/scripts/setenv-build-jogamp-x86.sh	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/make/scripts/setenv-build-jogamp-x86.sh	2023-02-01 18:52:41.000000000 +0100
@@ -0,0 +1,101 @@
+#! /bin/sh
+
+echo $0
+
+if [ -e /opt-share/apache-ant ] ; then
+    ANT_PATH=/opt-share/apache-ant
+    PATH=$ANT_PATH/bin:$PATH
+    export ANT_PATH
+fi
+if [ -z "$ANT_PATH" ] ; then
+    if [ -e /usr/share/ant/bin/ant -a -e /usr/share/ant/lib/ant.jar ] ; then
+        ANT_PATH=/usr/share/ant
+        export ANT_PATH
+        echo autosetting ANT_PATH to $ANT_PATH
+    fi
+fi
+if [ -z "$ANT_PATH" ] ; then
+    echo ANT_PATH does not exist, set it
+    exit
+fi
+
+if [ ! -z "$J2RE_HOME" -a ! -z "$JAVA_HOME" ] ; then
+    if [ -e $J2RE_HOME -a -e $JAVA_HOME ] ; then
+        PATH=$J2RE_HOME/bin:$JAVA_HOME/bin:$PATH
+        export J2RE_HOME JAVA_HOME
+        FOUND_JAVA=1
+    fi 
+fi 
+
+if [ -z "$FOUND_JAVA" ] ; then
+    if [ -e /usr/lib/jvm/java-17-openjdk-i386 ] ; then
+        J2RE_HOME=/usr/lib/jvm/java-17-openjdk-i386
+        JAVA_HOME=/usr/lib/jvm/java-17-openjdk-i386
+        PATH=$JAVA_HOME/bin:$PATH
+        export J2RE_HOME JAVA_HOME
+        FOUND_JAVA=1
+    fi 
+fi 
+
+if [ -z "$FOUND_JAVA" ] ; then
+    if [ -e /usr/lib/jvm/java-11-openjdk-i386 ] ; then
+        J2RE_HOME=/usr/lib/jvm/java-11-openjdk-i386
+        JAVA_HOME=/usr/lib/jvm/java-11-openjdk-i386
+        PATH=$JAVA_HOME/bin:$PATH
+        export J2RE_HOME JAVA_HOME
+        FOUND_JAVA=1
+    fi 
+fi 
+
+if [ -z "$FOUND_JAVA" ] ; then
+    if [ -e /opt-linux-x86/jre11 -a -e /opt-linux-x86/jdk11 ] ; then
+        J2RE_HOME=/opt-linux-x86/jre11
+        JAVA_HOME=/opt-linux-x86/jdk11
+        PATH=$J2RE_HOME/bin:$JAVA_HOME/bin:$PATH
+        export J2RE_HOME JAVA_HOME
+        FOUND_JAVA=1
+    fi 
+fi 
+
+if [ -z "$FOUND_JAVA" ] ; then
+    if [ -e /usr/java/jre/bin -a -e /usr/java/bin ] ; then
+        # make a symbolic link: /usr/java/bin/amd64/bin$ ln -s . bin
+        # since ant looks for $JAVA_HOME/bin/java and we need to force the 64bit JVM
+        J2RE_HOME=/usr/java/jre
+        JAVA_HOME=/usr/java
+        PATH=$J2RE_HOME/bin:$JAVA_HOME/bin:$PATH
+        export J2RE_HOME JAVA_HOME
+        FOUND_JAVA=1
+    fi
+fi
+if [ -z "$FOUND_JAVA" ] ; then
+    if [ -e /opt-solaris-x86/jre11 -a -e /opt-solaris-x86/jdk11 ] ; then
+        J2RE_HOME=/opt-solaris-x86/jre11
+        JAVA_HOME=/opt-solaris-x86/jdk11
+        PATH=$J2RE_HOME/bin:$JAVA_HOME/bin:$PATH
+        export J2RE_HOME JAVA_HOME
+        FOUND_JAVA=1
+    fi
+fi
+
+if [ -z "$FOUND_JAVA" ] ; then
+    # make a symbolic link, e.g. OpenJDK:
+    # /usr/lib/jvm/java-7-openjdk-i386 -> /usr/lib/jvm/java-i386
+    if [ -e /usr/lib/jvm/java-i386 ] ; then
+        J2RE_HOME=/usr/lib/jvm/java-i386/jre
+        JAVA_HOME=/usr/lib/jvm/java-i386
+        PATH=$J2RE_HOME/bin:$JAVA_HOME/bin:$PATH
+        export J2RE_HOME JAVA_HOME
+        FOUND_JAVA=1
+    fi 
+fi 
+
+export PATH
+
+echo FOUND_JAVA $FOUND_JAVA
+echo J2RE_HOME $J2RE_HOME
+echo JAVA_HOME $JAVA_HOME
+echo PATH $PATH
+which java
+java -version
+
diff -Nru gluegen2-2.3.2/make/scripts/setenv-build-jogl-x86_64.sh gluegen2-2.4.0+dfsg/make/scripts/setenv-build-jogl-x86_64.sh
--- gluegen2-2.3.2/make/scripts/setenv-build-jogl-x86_64.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/setenv-build-jogl-x86_64.sh	1970-01-01 01:00:00.000000000 +0100
@@ -1,106 +0,0 @@
-#! /bin/sh
-
-echo $0
-
-if [ -e /opt-share/apache-ant ] ; then
-    ANT_PATH=/opt-share/apache-ant
-    PATH=$ANT_PATH/bin:$PATH
-    export ANT_PATH
-fi
-if [ -z "$ANT_PATH" ] ; then
-    if [ -e /usr/share/ant/bin/ant -a -e /usr/share/ant/lib/ant.jar ] ; then
-        ANT_PATH=/usr/share/ant
-        export ANT_PATH
-        echo autosetting ANT_PATH to $ANT_PATH
-    fi
-fi
-if [ -z "$ANT_PATH" ] ; then
-    echo ANT_PATH does not exist, set it
-    exit
-fi
-
-if [ ! -z "$J2RE_HOME" -a ! -z "$JAVA_HOME" ] ; then
-    if [ -e $J2RE_HOME -a -e $JAVA_HOME ] ; then
-        PATH=$J2RE_HOME/bin:$JAVA_HOME/bin:$PATH
-        export J2RE_HOME JAVA_HOME
-        FOUND_JAVA=1
-    fi 
-fi 
-
-if [ -z "$FOUND_JAVA" ] ; then
-    if [ -e /opt-linux-x86_64/jre8 -a -e /opt-linux-x86_64/j2se8 ] ; then
-        J2RE_HOME=/opt-linux-x86_64/jre8
-        JAVA_HOME=/opt-linux-x86_64/j2se8
-        PATH=$J2RE_HOME/bin:$JAVA_HOME/bin:$PATH
-        export J2RE_HOME JAVA_HOME
-        FOUND_JAVA=1
-    fi 
-fi 
-
-if [ -z "$FOUND_JAVA" ] ; then
-    if [ -e /opt-linux-x86_64/jre7 -a -e /opt-linux-x86_64/j2se7 ] ; then
-        J2RE_HOME=/opt-linux-x86_64/jre7
-        JAVA_HOME=/opt-linux-x86_64/j2se7
-        PATH=$J2RE_HOME/bin:$JAVA_HOME/bin:$PATH
-        export J2RE_HOME JAVA_HOME
-        FOUND_JAVA=1
-    fi 
-fi 
-
-if [ -z "$FOUND_JAVA" ] ; then
-    if [ -e /opt-linux-x86_64/jre6 -a -e /opt-linux-x86_64/j2se6 ] ; then
-        J2RE_HOME=/opt-linux-x86_64/jre6
-        JAVA_HOME=/opt-linux-x86_64/j2se6
-        PATH=$J2RE_HOME/bin:$JAVA_HOME/bin:$PATH
-        export J2RE_HOME JAVA_HOME
-        FOUND_JAVA=1
-    fi 
-fi 
-
-if [ -z "$FOUND_JAVA" ] ; then
-    if [ -e /usr/java/jre/bin/amd64 -a -e /usr/java/bin/amd64 ] ; then
-        # make a symbolic link: /usr/java/bin/amd64/bin$ ln -s . bin
-        # since ant looks for $JAVA_HOME/bin/java and we need to force the 64bit JVM
-        J2RE_HOME=/usr/java/jre
-        JAVA_HOME=/usr/java
-        PATH=$J2RE_HOME/bin/amd64:$JAVA_HOME/bin/amd64:$PATH
-        JAVACMD=$JAVA_HOME/bin/amd64/java
-        ANT_OPTS="-d64 -DjvmJava.exe=$J2RE_HOME/bin/amd64/java"
-        export J2RE_HOME JAVA_HOME JAVACMD ANT_OPTS
-        FOUND_JAVA=1
-    fi
-fi
-if [ -z "$FOUND_JAVA" ] ; then
-    if [ -e /opt-solaris-x86_64/jre7 -a -e /opt-solaris-x86_64/j2se7 ] ; then
-        # make a symbolic link: /opt-solaris-x86_64/jre7/bin/amd64/bin$ ln -s . bin
-        # since ant looks for $JAVA_HOME/bin/java and we need to force the 64bit JVM
-        J2RE_HOME=/opt-solaris-x86_64/jre7/bin/amd64
-        JAVA_HOME=/opt-solaris-x86_64/j2se7/bin/amd64
-        PATH=$J2RE_HOME:$JAVA_HOME:$PATH
-        export J2RE_HOME JAVA_HOME
-        FOUND_JAVA=1
-    fi
-fi
-
-if [ -z "$FOUND_JAVA" ] ; then
-    # make a symbolic link, e.g. OpenJDK:
-    # /usr/lib/jvm/java-7-openjdk-amd64 -> /usr/lib/jvm/java-amd64
-    if [ -e /usr/lib/jvm/java-amd64 ] ; then
-        J2RE_HOME=/usr/lib/jvm/java-amd64/jre
-        JAVA_HOME=/usr/lib/jvm/java-amd64
-        PATH=$J2RE_HOME/bin:$JAVA_HOME/bin:$PATH
-        export J2RE_HOME JAVA_HOME
-        FOUND_JAVA=1
-    fi 
-fi 
-
-
-export PATH
-
-echo FOUND_JAVA $FOUND_JAVA
-echo J2RE_HOME $J2RE_HOME
-echo JAVA_HOME $JAVA_HOME
-echo PATH $PATH
-which java
-java -version
-
diff -Nru gluegen2-2.3.2/make/scripts/setenv-build-jogl-x86.sh gluegen2-2.4.0+dfsg/make/scripts/setenv-build-jogl-x86.sh
--- gluegen2-2.3.2/make/scripts/setenv-build-jogl-x86.sh	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/setenv-build-jogl-x86.sh	1970-01-01 01:00:00.000000000 +0100
@@ -1,111 +0,0 @@
-#! /bin/sh
-
-echo $0
-
-if [ -e /opt-share/apache-ant ] ; then
-    ANT_PATH=/opt-share/apache-ant
-    PATH=$ANT_PATH/bin:$PATH
-    export ANT_PATH
-fi
-if [ -z "$ANT_PATH" ] ; then
-    if [ -e /usr/share/ant/bin/ant -a -e /usr/share/ant/lib/ant.jar ] ; then
-        ANT_PATH=/usr/share/ant
-        export ANT_PATH
-        echo autosetting ANT_PATH to $ANT_PATH
-    fi
-fi
-if [ -z "$ANT_PATH" ] ; then
-    echo ANT_PATH does not exist, set it
-    exit
-fi
-
-if [ ! -z "$J2RE_HOME" -a ! -z "$JAVA_HOME" ] ; then
-    if [ -e $J2RE_HOME -a -e $JAVA_HOME ] ; then
-        PATH=$J2RE_HOME/bin:$JAVA_HOME/bin:$PATH
-        export J2RE_HOME JAVA_HOME
-        FOUND_JAVA=1
-    fi 
-fi 
-
-if [ -z "$FOUND_JAVA" ] ; then
-    if [ -e /opt-linux-x86/jre8 -a -e /opt-linux-x86/j2se8 ] ; then
-        J2RE_HOME=/opt-linux-x86/jre8
-        JAVA_HOME=/opt-linux-x86/j2se8
-        PATH=$J2RE_HOME/bin:$JAVA_HOME/bin:$PATH
-        export J2RE_HOME JAVA_HOME
-        FOUND_JAVA=1
-    fi 
-fi 
-
-if [ -z "$FOUND_JAVA" ] ; then
-    if [ -e /opt-linux-x86/jre7 -a -e /opt-linux-x86/j2se7 ] ; then
-        J2RE_HOME=/opt-linux-x86/jre7
-        JAVA_HOME=/opt-linux-x86/j2se7
-        PATH=$J2RE_HOME/bin:$JAVA_HOME/bin:$PATH
-        export J2RE_HOME JAVA_HOME
-        FOUND_JAVA=1
-    fi 
-fi 
-
-if [ -z "$FOUND_JAVA" ] ; then
-    if [ -e /opt-linux-x86/jre6 -a -e /opt-linux-x86/j2se6 ] ; then
-        J2RE_HOME=/opt-linux-x86/jre6
-        JAVA_HOME=/opt-linux-x86/j2se6
-        PATH=$J2RE_HOME/bin:$JAVA_HOME/bin:$PATH
-        export J2RE_HOME JAVA_HOME
-        FOUND_JAVA=1
-    fi 
-fi 
-
-if [ -z "$FOUND_JAVA" ] ; then
-    if [ -e /usr/java/jre/bin -a -e /usr/java/bin ] ; then
-        # make a symbolic link: /usr/java/bin/amd64/bin$ ln -s . bin
-        # since ant looks for $JAVA_HOME/bin/java and we need to force the 64bit JVM
-        J2RE_HOME=/usr/java/jre
-        JAVA_HOME=/usr/java
-        PATH=$J2RE_HOME/bin:$JAVA_HOME/bin:$PATH
-        export J2RE_HOME JAVA_HOME
-        FOUND_JAVA=1
-    fi
-fi
-if [ -z "$FOUND_JAVA" ] ; then
-    if [ -e /opt-solaris-x86/jre7 -a -e /opt-solaris-x86/j2se7 ] ; then
-        J2RE_HOME=/opt-solaris-x86/jre7
-        JAVA_HOME=/opt-solaris-x86/j2se7
-        PATH=$J2RE_HOME/bin:$JAVA_HOME/bin:$PATH
-        export J2RE_HOME JAVA_HOME
-        FOUND_JAVA=1
-    fi
-fi
-
-if [ -z "$FOUND_JAVA" ] ; then
-    if [ -e /opt-solaris-x86/jre6 -a -e /opt-solaris-x86/j2se6 ] ; then
-        J2RE_HOME=/opt-solaris-x86/jre6
-        JAVA_HOME=/opt-solaris-x86/j2se6
-        PATH=$J2RE_HOME/bin:$JAVA_HOME/bin:$PATH
-        export J2RE_HOME JAVA_HOME
-        FOUND_JAVA=1
-    fi
-fi
-
-if [ -z "$FOUND_JAVA" ] ; then
-    # make a symbolic link, e.g. OpenJDK:
-    # /usr/lib/jvm/java-7-openjdk-i386 -> /usr/lib/jvm/java-i386
-    if [ -e /usr/lib/jvm/java-i386 ] ; then
-        J2RE_HOME=/usr/lib/jvm/java-i386/jre
-        JAVA_HOME=/usr/lib/jvm/java-i386
-        PATH=$J2RE_HOME/bin:$JAVA_HOME/bin:$PATH
-        export J2RE_HOME JAVA_HOME
-        FOUND_JAVA=1
-    fi 
-fi 
-
-export PATH
-
-echo FOUND_JAVA $FOUND_JAVA
-echo J2RE_HOME $J2RE_HOME
-echo JAVA_HOME $JAVA_HOME
-echo PATH $PATH
-which java
-java -version
-
diff -Nru gluegen2-2.3.2/make/scripts/test-win32-smb_share.bat gluegen2-2.4.0+dfsg/make/scripts/test-win32-smb_share.bat
--- gluegen2-2.3.2/make/scripts/test-win32-smb_share.bat	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/scripts/test-win32-smb_share.bat	1970-01-01 01:00:00.000000000 +0100
@@ -1,24 +0,0 @@
-
-set SMB_ROOT=\\risa.goethel.localnet\deployment\test\jogamp
-
-set BLD_SUB=build-win32
-set J2RE_HOME=c:\jre1.8.0_60_x32
-set JAVA_HOME=c:\jdk1.8.0_60_x32
-set ANT_PATH=C:\apache-ant-1.9.4
-
-set PROJECT_ROOT=%SMB_ROOT%\gluegen
-set BLD_DIR=%PROJECT_ROOT%\%BLD_SUB%
-
-set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;%PATH%
-
-set D_ARGS="-Djogamp.debug=all"
-
-set LIB_DIR=
-
-set CP_ALL=.;%BLD_DIR%\gluegen-rt.jar;%PROJECT_ROOT%\make\lib\junit.jar;%ANT_PATH%\lib\ant.jar;%ANT_PATH%\lib\ant-junit.jar
-
-echo CP_ALL %CP_ALL%
-
-%J2RE_HOME%\bin\java -classpath %CP_ALL% %D_ARGS% %X_ARGS% com.jogamp.common.GlueGenVersion > java-win.log 2>&1
-tail java-win.log
-
diff -Nru gluegen2-2.3.2/make/stub_includes/jni/jawt.h gluegen2-2.4.0+dfsg/make/stub_includes/jni/jawt.h
--- gluegen2-2.3.2/make/stub_includes/jni/jawt.h	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/stub_includes/jni/jawt.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,106 +0,0 @@
-/*
- * @(#)jawt.h	1.11 05/11/17
- *
- * This C header file is derived from Sun Microsystem's Java SDK provided C header file
- * with the following copyright notice:
- *
- *   Copyright 2006 Sun Microsystems, Inc. All rights reserved.
- *   SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- *
- * This version has complex comments removed and does not contain inlined algorithms etc, if any existed.
- * 
- * The original C header file was included to JOGL on Sat Jun 21 02:10:30 2008
- * (commit cbc45e816f4ee81031bffce19a99550681462a24) by Sun Microsystem's staff and were approved. 
- *
- * This C header file is included due to ensure compatibility with - and invocation of the JAWT protocol.
- * They are processed by GlueGen to create a Java binding for JAWT invocation only.
- * 
- * http://ftp.resource.org/courts.gov/c/F3/387/387.F3d.522.03-5400.html (36)
- * "Atari Games Corp. v. Nintendo of Am., Inc., Nos. 88-4805 & 89-0027, 1993 WL 207548, at *1 (N.D.Cal. May 18, 1993) ("Atari III") 
- * ("Program code that is strictly necessary to achieve current compatibility presents a merger problem, almost by definition, 
- * and is thus excluded from the scope of any copyright.")."
- *
- * http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2009:111:0016:0022:EN:PDF
- * L 111/17 (10) and (15)
- */
-
-#ifndef _JAVASOFT_JAWT_H_
-#define _JAVASOFT_JAWT_H_
-
-#include "jni.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * AWT native interface (new in JDK 1.3)
- */
-
-typedef struct jawt_Rectangle {
-    jint x;
-    jint y;
-    jint width;
-    jint height;
-} JAWT_Rectangle;
-
-struct jawt_DrawingSurface;
-
-typedef struct jawt_DrawingSurfaceInfo {
-    void* platformInfo;
-    struct jawt_DrawingSurface* ds;
-    JAWT_Rectangle bounds;
-    jint clipSize;
-    JAWT_Rectangle* clip;
-} JAWT_DrawingSurfaceInfo;
-
-#define JAWT_LOCK_ERROR                 0x00000001
-#define JAWT_LOCK_CLIP_CHANGED          0x00000002
-#define JAWT_LOCK_BOUNDS_CHANGED        0x00000004
-#define JAWT_LOCK_SURFACE_CHANGED       0x00000008
-
-typedef struct jawt_DrawingSurface {
-    JNIEnv* env;
-    jobject target;
-    jint (JNICALL *Lock)
-        (struct jawt_DrawingSurface* ds);
-    JAWT_DrawingSurfaceInfo* (JNICALL *GetDrawingSurfaceInfo)
-        (struct jawt_DrawingSurface* ds);
-    void (JNICALL *FreeDrawingSurfaceInfo)
-        (JAWT_DrawingSurfaceInfo* dsi);
-    void (JNICALL *Unlock)
-        (struct jawt_DrawingSurface* ds);
-} JAWT_DrawingSurface;
-
-typedef struct jawt {
-    jint version;
-    JAWT_DrawingSurface* (JNICALL *GetDrawingSurface)
-        (JNIEnv* env, jobject target);
-    void (JNICALL *FreeDrawingSurface)
-        (JAWT_DrawingSurface* ds);
-    /*
-     * Since 1.4
-     */
-    void (JNICALL *Lock)(JNIEnv* env);
-    /*
-     * Since 1.4
-     */
-    void (JNICALL *Unlock)(JNIEnv* env);
-    /*
-     * Since 1.4
-     */
-    jobject (JNICALL *GetComponent)(JNIEnv* env, void* platformInfo);
-
-} JAWT;
-
-_JNI_IMPORT_OR_EXPORT_
-jboolean JNICALL JAWT_GetAWT(JNIEnv* env, JAWT* awt);
-
-#define JAWT_VERSION_1_3 0x00010003
-#define JAWT_VERSION_1_4 0x00010004
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* !_JAVASOFT_JAWT_H_ */
diff -Nru gluegen2-2.3.2/make/stub_includes/jni/jni.h gluegen2-2.4.0+dfsg/make/stub_includes/jni/jni.h
--- gluegen2-2.3.2/make/stub_includes/jni/jni.h	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/stub_includes/jni/jni.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,1934 +0,0 @@
-/*
- * @(#)jni.h	1.62 06/02/02
- *
- * This C header file is derived from Sun Microsystem's Java SDK provided C header file
- * with the following copyright notice:
- *
- *   Copyright 2006 Sun Microsystems, Inc. All rights reserved.
- *   SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- *
- * This version has complex comments removed and does not contain inlined algorithms etc, if any existed.
- * 
- * The original C header file was included to JOGL on Sat Jun 21 02:10:30 2008
- * (commit cbc45e816f4ee81031bffce19a99550681462a24) by Sun Microsystem's staff and were approved. 
- *
- * This C header file is included due to ensure compatibility with - and invocation of the JAWT protocol.
- * They are processed by GlueGen to create a Java binding for JAWT invocation only.
- * 
- * http://ftp.resource.org/courts.gov/c/F3/387/387.F3d.522.03-5400.html (36)
- * "Atari Games Corp. v. Nintendo of Am., Inc., Nos. 88-4805 & 89-0027, 1993 WL 207548, at *1 (N.D.Cal. May 18, 1993) ("Atari III") 
- * ("Program code that is strictly necessary to achieve current compatibility presents a merger problem, almost by definition, 
- * and is thus excluded from the scope of any copyright.")."
- *
- * http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2009:111:0016:0022:EN:PDF
- * L 111/17 (10) and (15)
- */
-
-/*
- * We used part of Netscape's Java Runtime Interface (JRI) as the starting
- * point of our design and implementation.
- */
-
-/******************************************************************************
- * Java Runtime Interface
- * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved.
- *****************************************************************************/
-
-#ifndef _JAVASOFT_JNI_H_
-#define _JAVASOFT_JNI_H_
-
-#include <stdio.h>
-#include <stdarg.h>
-#include <gluegen_stdint.h>
-
-#include "jni_md.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H
-
-typedef uint8_t  jboolean;
-typedef uint16_t jchar;
-typedef int16_t  jshort;
-typedef float    jfloat;
-typedef double   jdouble;
-
-typedef jint     jsize;
-
-#ifdef __cplusplus
-
-class _jobject {};
-class _jclass : public _jobject {};
-class _jthrowable : public _jobject {};
-class _jstring : public _jobject {};
-class _jarray : public _jobject {};
-class _jbooleanArray : public _jarray {};
-class _jbyteArray : public _jarray {};
-class _jcharArray : public _jarray {};
-class _jshortArray : public _jarray {};
-class _jintArray : public _jarray {};
-class _jlongArray : public _jarray {};
-class _jfloatArray : public _jarray {};
-class _jdoubleArray : public _jarray {};
-class _jobjectArray : public _jarray {};
-
-typedef _jobject *jobject;
-typedef _jclass *jclass;
-typedef _jthrowable *jthrowable;
-typedef _jstring *jstring;
-typedef _jarray *jarray;
-typedef _jbooleanArray *jbooleanArray;
-typedef _jbyteArray *jbyteArray;
-typedef _jcharArray *jcharArray;
-typedef _jshortArray *jshortArray;
-typedef _jintArray *jintArray;
-typedef _jlongArray *jlongArray;
-typedef _jfloatArray *jfloatArray;
-typedef _jdoubleArray *jdoubleArray;
-typedef _jobjectArray *jobjectArray;
-
-#else
-
-struct _jobject;
-
-typedef struct _jobject *jobject;
-typedef jobject jclass;
-typedef jobject jthrowable;
-typedef jobject jstring;
-typedef jobject jarray;
-typedef jarray jbooleanArray;
-typedef jarray jbyteArray;
-typedef jarray jcharArray;
-typedef jarray jshortArray;
-typedef jarray jintArray;
-typedef jarray jlongArray;
-typedef jarray jfloatArray;
-typedef jarray jdoubleArray;
-typedef jarray jobjectArray;
-
-#endif
-
-typedef jobject jweak;
-
-typedef union jvalue {
-    jboolean z;
-    jbyte    b;
-    jchar    c;
-    jshort   s;
-    jint     i;
-    jlong    j;
-    jfloat   f;
-    jdouble  d;
-    jobject  l;
-} jvalue;
-
-struct _jfieldID;
-typedef struct _jfieldID *jfieldID;
-
-struct _jmethodID;
-typedef struct _jmethodID *jmethodID;
-
-typedef enum _jobjectType {
-     JNIInvalidRefType    = 0,
-     JNILocalRefType      = 1,
-     JNIGlobalRefType     = 2,
-     JNIWeakGlobalRefType = 3 
-} jobjectRefType;
-
-
-#endif /* JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H */
-
-#define JNI_FALSE 0
-#define JNI_TRUE 1
-
-#define JNI_OK           0                 /* success */
-#define JNI_ERR          (-1)              /* unknown error */
-#define JNI_EDETACHED    (-2)              /* thread detached from the VM */
-#define JNI_EVERSION     (-3)              /* JNI version error */
-#define JNI_ENOMEM       (-4)              /* not enough memory */
-#define JNI_EEXIST       (-5)              /* VM already created */
-#define JNI_EINVAL       (-6)              /* invalid arguments */
-
-#define JNI_COMMIT 1
-#define JNI_ABORT 2
-
-#ifdef __GLUEGEN__
-
-// GlueGen 'shortcut': We don't want to create bindings for JNI invocations!
-// Hence dropping the JNI details, use-case: jawt.h
-
-/** Special opaque GlueGen handling of JNIEnv */
-typedef long JNIEnv;
-
-#define JDK1_2
-#define JDK1_4
-
-#define _JNI_IMPORT_OR_EXPORT_ JNIIMPORT
-
-#define JNI_VERSION_1_1 0x00010001
-#define JNI_VERSION_1_2 0x00010002
-#define JNI_VERSION_1_4 0x00010004
-#define JNI_VERSION_1_6 0x00010006
-
-#else /*  __GLUEGEN__ */
-
-typedef struct {
-    char *name;
-    char *signature;
-    void *fnPtr;
-} JNINativeMethod;
-
-struct JNINativeInterface_;
-
-struct JNIEnv_;
-
-#ifdef __cplusplus
-typedef JNIEnv_ JNIEnv;
-#else
-typedef const struct JNINativeInterface_ *JNIEnv;
-#endif
-
-struct JNIInvokeInterface_;
-
-struct JavaVM_;
-
-#ifdef __cplusplus
-typedef JavaVM_ JavaVM;
-#else
-typedef const struct JNIInvokeInterface_ *JavaVM;
-#endif
-
-struct JNINativeInterface_ {
-    void *reserved0;
-    void *reserved1;
-    void *reserved2;
-
-    void *reserved3;
-    jint (JNICALL *GetVersion)(JNIEnv *env);
-
-    jclass (JNICALL *DefineClass)
-      (JNIEnv *env, const char *name, jobject loader, const jbyte *buf,
-       jsize len);
-    jclass (JNICALL *FindClass)
-      (JNIEnv *env, const char *name);
-
-    jmethodID (JNICALL *FromReflectedMethod)
-      (JNIEnv *env, jobject method);
-    jfieldID (JNICALL *FromReflectedField)
-      (JNIEnv *env, jobject field);
-
-    jobject (JNICALL *ToReflectedMethod)
-      (JNIEnv *env, jclass cls, jmethodID methodID, jboolean isStatic);
-
-    jclass (JNICALL *GetSuperclass)
-      (JNIEnv *env, jclass sub);
-    jboolean (JNICALL *IsAssignableFrom)
-      (JNIEnv *env, jclass sub, jclass sup);
-
-    jobject (JNICALL *ToReflectedField)
-      (JNIEnv *env, jclass cls, jfieldID fieldID, jboolean isStatic);
-
-    jint (JNICALL *Throw)
-      (JNIEnv *env, jthrowable obj);
-    jint (JNICALL *ThrowNew)
-      (JNIEnv *env, jclass clazz, const char *msg);
-    jthrowable (JNICALL *ExceptionOccurred)
-      (JNIEnv *env);
-    void (JNICALL *ExceptionDescribe)
-      (JNIEnv *env);
-    void (JNICALL *ExceptionClear)
-      (JNIEnv *env);
-    void (JNICALL *FatalError)
-      (JNIEnv *env, const char *msg);
-
-    jint (JNICALL *PushLocalFrame)
-      (JNIEnv *env, jint capacity);
-    jobject (JNICALL *PopLocalFrame)
-      (JNIEnv *env, jobject result);
-
-    jobject (JNICALL *NewGlobalRef)
-      (JNIEnv *env, jobject lobj);
-    void (JNICALL *DeleteGlobalRef)
-      (JNIEnv *env, jobject gref);
-    void (JNICALL *DeleteLocalRef)
-      (JNIEnv *env, jobject obj);
-    jboolean (JNICALL *IsSameObject)
-      (JNIEnv *env, jobject obj1, jobject obj2);
-    jobject (JNICALL *NewLocalRef)
-      (JNIEnv *env, jobject ref);
-    jint (JNICALL *EnsureLocalCapacity)
-      (JNIEnv *env, jint capacity);
-
-    jobject (JNICALL *AllocObject)
-      (JNIEnv *env, jclass clazz);
-    jobject (JNICALL *NewObject)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
-    jobject (JNICALL *NewObjectV)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
-    jobject (JNICALL *NewObjectA)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
-    jclass (JNICALL *GetObjectClass)
-      (JNIEnv *env, jobject obj);
-    jboolean (JNICALL *IsInstanceOf)
-      (JNIEnv *env, jobject obj, jclass clazz);
-
-    jmethodID (JNICALL *GetMethodID)
-      (JNIEnv *env, jclass clazz, const char *name, const char *sig);
-
-    jobject (JNICALL *CallObjectMethod)
-      (JNIEnv *env, jobject obj, jmethodID methodID, ...);
-    jobject (JNICALL *CallObjectMethodV)
-      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
-    jobject (JNICALL *CallObjectMethodA)
-      (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args);
-
-    jboolean (JNICALL *CallBooleanMethod)
-      (JNIEnv *env, jobject obj, jmethodID methodID, ...);
-    jboolean (JNICALL *CallBooleanMethodV)
-      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
-    jboolean (JNICALL *CallBooleanMethodA)
-      (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args);
-
-    jbyte (JNICALL *CallByteMethod)
-      (JNIEnv *env, jobject obj, jmethodID methodID, ...);
-    jbyte (JNICALL *CallByteMethodV)
-      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
-    jbyte (JNICALL *CallByteMethodA)
-      (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
-
-    jchar (JNICALL *CallCharMethod)
-      (JNIEnv *env, jobject obj, jmethodID methodID, ...);
-    jchar (JNICALL *CallCharMethodV)
-      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
-    jchar (JNICALL *CallCharMethodA)
-      (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
-
-    jshort (JNICALL *CallShortMethod)
-      (JNIEnv *env, jobject obj, jmethodID methodID, ...);
-    jshort (JNICALL *CallShortMethodV)
-      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
-    jshort (JNICALL *CallShortMethodA)
-      (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
-
-    jint (JNICALL *CallIntMethod)
-      (JNIEnv *env, jobject obj, jmethodID methodID, ...);
-    jint (JNICALL *CallIntMethodV)
-      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
-    jint (JNICALL *CallIntMethodA)
-      (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
-
-    jlong (JNICALL *CallLongMethod)
-      (JNIEnv *env, jobject obj, jmethodID methodID, ...);
-    jlong (JNICALL *CallLongMethodV)
-      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
-    jlong (JNICALL *CallLongMethodA)
-      (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
-
-    jfloat (JNICALL *CallFloatMethod)
-      (JNIEnv *env, jobject obj, jmethodID methodID, ...);
-    jfloat (JNICALL *CallFloatMethodV)
-      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
-    jfloat (JNICALL *CallFloatMethodA)
-      (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
-
-    jdouble (JNICALL *CallDoubleMethod)
-      (JNIEnv *env, jobject obj, jmethodID methodID, ...);
-    jdouble (JNICALL *CallDoubleMethodV)
-      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
-    jdouble (JNICALL *CallDoubleMethodA)
-      (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
-
-    void (JNICALL *CallVoidMethod)
-      (JNIEnv *env, jobject obj, jmethodID methodID, ...);
-    void (JNICALL *CallVoidMethodV)
-      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
-    void (JNICALL *CallVoidMethodA)
-      (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args);
-
-    jobject (JNICALL *CallNonvirtualObjectMethod)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
-    jobject (JNICALL *CallNonvirtualObjectMethodV)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       va_list args);
-    jobject (JNICALL *CallNonvirtualObjectMethodA)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       const jvalue * args);
-
-    jboolean (JNICALL *CallNonvirtualBooleanMethod)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
-    jboolean (JNICALL *CallNonvirtualBooleanMethodV)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       va_list args);
-    jboolean (JNICALL *CallNonvirtualBooleanMethodA)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       const jvalue * args);
-
-    jbyte (JNICALL *CallNonvirtualByteMethod)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
-    jbyte (JNICALL *CallNonvirtualByteMethodV)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       va_list args);
-    jbyte (JNICALL *CallNonvirtualByteMethodA)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       const jvalue *args);
-
-    jchar (JNICALL *CallNonvirtualCharMethod)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
-    jchar (JNICALL *CallNonvirtualCharMethodV)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       va_list args);
-    jchar (JNICALL *CallNonvirtualCharMethodA)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       const jvalue *args);
-
-    jshort (JNICALL *CallNonvirtualShortMethod)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
-    jshort (JNICALL *CallNonvirtualShortMethodV)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       va_list args);
-    jshort (JNICALL *CallNonvirtualShortMethodA)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       const jvalue *args);
-
-    jint (JNICALL *CallNonvirtualIntMethod)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
-    jint (JNICALL *CallNonvirtualIntMethodV)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       va_list args);
-    jint (JNICALL *CallNonvirtualIntMethodA)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       const jvalue *args);
-
-    jlong (JNICALL *CallNonvirtualLongMethod)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
-    jlong (JNICALL *CallNonvirtualLongMethodV)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       va_list args);
-    jlong (JNICALL *CallNonvirtualLongMethodA)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       const jvalue *args);
-
-    jfloat (JNICALL *CallNonvirtualFloatMethod)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
-    jfloat (JNICALL *CallNonvirtualFloatMethodV)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       va_list args);
-    jfloat (JNICALL *CallNonvirtualFloatMethodA)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       const jvalue *args);
-
-    jdouble (JNICALL *CallNonvirtualDoubleMethod)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
-    jdouble (JNICALL *CallNonvirtualDoubleMethodV)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       va_list args);
-    jdouble (JNICALL *CallNonvirtualDoubleMethodA)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       const jvalue *args);
-
-    void (JNICALL *CallNonvirtualVoidMethod)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
-    void (JNICALL *CallNonvirtualVoidMethodV)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       va_list args);
-    void (JNICALL *CallNonvirtualVoidMethodA)
-      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
-       const jvalue * args);
-
-    jfieldID (JNICALL *GetFieldID)
-      (JNIEnv *env, jclass clazz, const char *name, const char *sig);
-
-    jobject (JNICALL *GetObjectField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID);
-    jboolean (JNICALL *GetBooleanField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID);
-    jbyte (JNICALL *GetByteField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID);
-    jchar (JNICALL *GetCharField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID);
-    jshort (JNICALL *GetShortField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID);
-    jint (JNICALL *GetIntField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID);
-    jlong (JNICALL *GetLongField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID);
-    jfloat (JNICALL *GetFloatField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID);
-    jdouble (JNICALL *GetDoubleField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID);
-
-    void (JNICALL *SetObjectField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID, jobject val);
-    void (JNICALL *SetBooleanField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID, jboolean val);
-    void (JNICALL *SetByteField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID, jbyte val);
-    void (JNICALL *SetCharField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID, jchar val);
-    void (JNICALL *SetShortField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID, jshort val);
-    void (JNICALL *SetIntField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID, jint val);
-    void (JNICALL *SetLongField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID, jlong val);
-    void (JNICALL *SetFloatField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID, jfloat val);
-    void (JNICALL *SetDoubleField)
-      (JNIEnv *env, jobject obj, jfieldID fieldID, jdouble val);
-
-    jmethodID (JNICALL *GetStaticMethodID)
-      (JNIEnv *env, jclass clazz, const char *name, const char *sig);
-
-    jobject (JNICALL *CallStaticObjectMethod)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
-    jobject (JNICALL *CallStaticObjectMethodV)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
-    jobject (JNICALL *CallStaticObjectMethodA)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
-    jboolean (JNICALL *CallStaticBooleanMethod)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
-    jboolean (JNICALL *CallStaticBooleanMethodV)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
-    jboolean (JNICALL *CallStaticBooleanMethodA)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
-    jbyte (JNICALL *CallStaticByteMethod)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
-    jbyte (JNICALL *CallStaticByteMethodV)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
-    jbyte (JNICALL *CallStaticByteMethodA)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
-    jchar (JNICALL *CallStaticCharMethod)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
-    jchar (JNICALL *CallStaticCharMethodV)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
-    jchar (JNICALL *CallStaticCharMethodA)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
-    jshort (JNICALL *CallStaticShortMethod)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
-    jshort (JNICALL *CallStaticShortMethodV)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
-    jshort (JNICALL *CallStaticShortMethodA)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
-    jint (JNICALL *CallStaticIntMethod)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
-    jint (JNICALL *CallStaticIntMethodV)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
-    jint (JNICALL *CallStaticIntMethodA)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
-    jlong (JNICALL *CallStaticLongMethod)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
-    jlong (JNICALL *CallStaticLongMethodV)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
-    jlong (JNICALL *CallStaticLongMethodA)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
-    jfloat (JNICALL *CallStaticFloatMethod)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
-    jfloat (JNICALL *CallStaticFloatMethodV)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
-    jfloat (JNICALL *CallStaticFloatMethodA)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
-    jdouble (JNICALL *CallStaticDoubleMethod)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
-    jdouble (JNICALL *CallStaticDoubleMethodV)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
-    jdouble (JNICALL *CallStaticDoubleMethodA)
-      (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
-
-    void (JNICALL *CallStaticVoidMethod)
-      (JNIEnv *env, jclass cls, jmethodID methodID, ...);
-    void (JNICALL *CallStaticVoidMethodV)
-      (JNIEnv *env, jclass cls, jmethodID methodID, va_list args);
-    void (JNICALL *CallStaticVoidMethodA)
-      (JNIEnv *env, jclass cls, jmethodID methodID, const jvalue * args);
-
-    jfieldID (JNICALL *GetStaticFieldID)
-      (JNIEnv *env, jclass clazz, const char *name, const char *sig);
-    jobject (JNICALL *GetStaticObjectField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID);
-    jboolean (JNICALL *GetStaticBooleanField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID);
-    jbyte (JNICALL *GetStaticByteField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID);
-    jchar (JNICALL *GetStaticCharField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID);
-    jshort (JNICALL *GetStaticShortField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID);
-    jint (JNICALL *GetStaticIntField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID);
-    jlong (JNICALL *GetStaticLongField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID);
-    jfloat (JNICALL *GetStaticFloatField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID);
-    jdouble (JNICALL *GetStaticDoubleField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID);
-
-    void (JNICALL *SetStaticObjectField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value);
-    void (JNICALL *SetStaticBooleanField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value);
-    void (JNICALL *SetStaticByteField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID, jbyte value);
-    void (JNICALL *SetStaticCharField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID, jchar value);
-    void (JNICALL *SetStaticShortField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value);
-    void (JNICALL *SetStaticIntField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID, jint value);
-    void (JNICALL *SetStaticLongField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID, jlong value);
-    void (JNICALL *SetStaticFloatField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value);
-    void (JNICALL *SetStaticDoubleField)
-      (JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value);
-
-    jstring (JNICALL *NewString)
-      (JNIEnv *env, const jchar *unicode, jsize len);
-    jsize (JNICALL *GetStringLength)
-      (JNIEnv *env, jstring str);
-    const jchar *(JNICALL *GetStringChars)
-      (JNIEnv *env, jstring str, jboolean *isCopy);
-    void (JNICALL *ReleaseStringChars)
-      (JNIEnv *env, jstring str, const jchar *chars);
-
-    jstring (JNICALL *NewStringUTF)
-      (JNIEnv *env, const char *utf);
-    jsize (JNICALL *GetStringUTFLength)
-      (JNIEnv *env, jstring str);
-    const char* (JNICALL *GetStringUTFChars)
-      (JNIEnv *env, jstring str, jboolean *isCopy);
-    void (JNICALL *ReleaseStringUTFChars)
-      (JNIEnv *env, jstring str, const char* chars);
-
-
-    jsize (JNICALL *GetArrayLength)
-      (JNIEnv *env, jarray array);
-
-    jobjectArray (JNICALL *NewObjectArray)
-      (JNIEnv *env, jsize len, jclass clazz, jobject init);
-    jobject (JNICALL *GetObjectArrayElement)
-      (JNIEnv *env, jobjectArray array, jsize index);
-    void (JNICALL *SetObjectArrayElement)
-      (JNIEnv *env, jobjectArray array, jsize index, jobject val);
-
-    jbooleanArray (JNICALL *NewBooleanArray)
-      (JNIEnv *env, jsize len);
-    jbyteArray (JNICALL *NewByteArray)
-      (JNIEnv *env, jsize len);
-    jcharArray (JNICALL *NewCharArray)
-      (JNIEnv *env, jsize len);
-    jshortArray (JNICALL *NewShortArray)
-      (JNIEnv *env, jsize len);
-    jintArray (JNICALL *NewIntArray)
-      (JNIEnv *env, jsize len);
-    jlongArray (JNICALL *NewLongArray)
-      (JNIEnv *env, jsize len);
-    jfloatArray (JNICALL *NewFloatArray)
-      (JNIEnv *env, jsize len);
-    jdoubleArray (JNICALL *NewDoubleArray)
-      (JNIEnv *env, jsize len);
-
-    jboolean * (JNICALL *GetBooleanArrayElements)
-      (JNIEnv *env, jbooleanArray array, jboolean *isCopy);
-    jbyte * (JNICALL *GetByteArrayElements)
-      (JNIEnv *env, jbyteArray array, jboolean *isCopy);
-    jchar * (JNICALL *GetCharArrayElements)
-      (JNIEnv *env, jcharArray array, jboolean *isCopy);
-    jshort * (JNICALL *GetShortArrayElements)
-      (JNIEnv *env, jshortArray array, jboolean *isCopy);
-    jint * (JNICALL *GetIntArrayElements)
-      (JNIEnv *env, jintArray array, jboolean *isCopy);
-    jlong * (JNICALL *GetLongArrayElements)
-      (JNIEnv *env, jlongArray array, jboolean *isCopy);
-    jfloat * (JNICALL *GetFloatArrayElements)
-      (JNIEnv *env, jfloatArray array, jboolean *isCopy);
-    jdouble * (JNICALL *GetDoubleArrayElements)
-      (JNIEnv *env, jdoubleArray array, jboolean *isCopy);
-
-    void (JNICALL *ReleaseBooleanArrayElements)
-      (JNIEnv *env, jbooleanArray array, jboolean *elems, jint mode);
-    void (JNICALL *ReleaseByteArrayElements)
-      (JNIEnv *env, jbyteArray array, jbyte *elems, jint mode);
-    void (JNICALL *ReleaseCharArrayElements)
-      (JNIEnv *env, jcharArray array, jchar *elems, jint mode);
-    void (JNICALL *ReleaseShortArrayElements)
-      (JNIEnv *env, jshortArray array, jshort *elems, jint mode);
-    void (JNICALL *ReleaseIntArrayElements)
-      (JNIEnv *env, jintArray array, jint *elems, jint mode);
-    void (JNICALL *ReleaseLongArrayElements)
-      (JNIEnv *env, jlongArray array, jlong *elems, jint mode);
-    void (JNICALL *ReleaseFloatArrayElements)
-      (JNIEnv *env, jfloatArray array, jfloat *elems, jint mode);
-    void (JNICALL *ReleaseDoubleArrayElements)
-      (JNIEnv *env, jdoubleArray array, jdouble *elems, jint mode);
-
-    void (JNICALL *GetBooleanArrayRegion)
-      (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf);
-    void (JNICALL *GetByteArrayRegion)
-      (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf);
-    void (JNICALL *GetCharArrayRegion)
-      (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf);
-    void (JNICALL *GetShortArrayRegion)
-      (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf);
-    void (JNICALL *GetIntArrayRegion)
-      (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf);
-    void (JNICALL *GetLongArrayRegion)
-      (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf);
-    void (JNICALL *GetFloatArrayRegion)
-      (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf);
-    void (JNICALL *GetDoubleArrayRegion)
-      (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf);
-
-    void (JNICALL *SetBooleanArrayRegion)
-      (JNIEnv *env, jbooleanArray array, jsize start, jsize l, const jboolean *buf);
-    void (JNICALL *SetByteArrayRegion)
-      (JNIEnv *env, jbyteArray array, jsize start, jsize len, const jbyte *buf);
-    void (JNICALL *SetCharArrayRegion)
-      (JNIEnv *env, jcharArray array, jsize start, jsize len, const jchar *buf);
-    void (JNICALL *SetShortArrayRegion)
-      (JNIEnv *env, jshortArray array, jsize start, jsize len, const jshort *buf);
-    void (JNICALL *SetIntArrayRegion)
-      (JNIEnv *env, jintArray array, jsize start, jsize len, const jint *buf);
-    void (JNICALL *SetLongArrayRegion)
-      (JNIEnv *env, jlongArray array, jsize start, jsize len, const jlong *buf);
-    void (JNICALL *SetFloatArrayRegion)
-      (JNIEnv *env, jfloatArray array, jsize start, jsize len, const jfloat *buf);
-    void (JNICALL *SetDoubleArrayRegion)
-      (JNIEnv *env, jdoubleArray array, jsize start, jsize len, const jdouble *buf);
-
-    jint (JNICALL *RegisterNatives)
-      (JNIEnv *env, jclass clazz, const JNINativeMethod *methods,
-       jint nMethods);
-    jint (JNICALL *UnregisterNatives)
-      (JNIEnv *env, jclass clazz);
-
-    jint (JNICALL *MonitorEnter)
-      (JNIEnv *env, jobject obj);
-    jint (JNICALL *MonitorExit)
-      (JNIEnv *env, jobject obj);
-
-    jint (JNICALL *GetJavaVM)
-      (JNIEnv *env, JavaVM **vm);
-
-    void (JNICALL *GetStringRegion)
-      (JNIEnv *env, jstring str, jsize start, jsize len, jchar *buf);
-    void (JNICALL *GetStringUTFRegion)
-      (JNIEnv *env, jstring str, jsize start, jsize len, char *buf);
-
-    void * (JNICALL *GetPrimitiveArrayCritical)
-      (JNIEnv *env, jarray array, jboolean *isCopy);
-    void (JNICALL *ReleasePrimitiveArrayCritical)
-      (JNIEnv *env, jarray array, void *carray, jint mode);
-
-    const jchar * (JNICALL *GetStringCritical)
-      (JNIEnv *env, jstring string, jboolean *isCopy);
-    void (JNICALL *ReleaseStringCritical)
-      (JNIEnv *env, jstring string, const jchar *cstring);
-
-    jweak (JNICALL *NewWeakGlobalRef)
-       (JNIEnv *env, jobject obj);
-    void (JNICALL *DeleteWeakGlobalRef)
-       (JNIEnv *env, jweak ref);
-
-    jboolean (JNICALL *ExceptionCheck)
-       (JNIEnv *env);
-
-    jobject (JNICALL *NewDirectByteBuffer)
-       (JNIEnv* env, void* address, jlong capacity);
-    void* (JNICALL *GetDirectBufferAddress)
-       (JNIEnv* env, jobject buf);
-    jlong (JNICALL *GetDirectBufferCapacity)
-       (JNIEnv* env, jobject buf);
-
-    /* New JNI 1.6 Features */
-
-    jobjectRefType (JNICALL *GetObjectRefType)
-        (JNIEnv* env, jobject obj);
-};
-
-struct JNIEnv_ {
-    const struct JNINativeInterface_ *functions;
-#ifdef __cplusplus
-
-    jint GetVersion() {
-        return functions->GetVersion(this);
-    }
-    jclass DefineClass(const char *name, jobject loader, const jbyte *buf,
-		       jsize len) {
-        return functions->DefineClass(this, name, loader, buf, len);
-    }
-    jclass FindClass(const char *name) {
-        return functions->FindClass(this, name);
-    }
-    jmethodID FromReflectedMethod(jobject method) {
-        return functions->FromReflectedMethod(this,method);
-    }
-    jfieldID FromReflectedField(jobject field) {
-        return functions->FromReflectedField(this,field);
-    }
-
-    jobject ToReflectedMethod(jclass cls, jmethodID methodID, jboolean isStatic) {
-        return functions->ToReflectedMethod(this, cls, methodID, isStatic);
-    }
-
-    jclass GetSuperclass(jclass sub) {
-        return functions->GetSuperclass(this, sub);
-    }
-    jboolean IsAssignableFrom(jclass sub, jclass sup) {
-        return functions->IsAssignableFrom(this, sub, sup);
-    }
-
-    jobject ToReflectedField(jclass cls, jfieldID fieldID, jboolean isStatic) {
-        return functions->ToReflectedField(this,cls,fieldID,isStatic);
-    }
-
-    jint Throw(jthrowable obj) {
-        return functions->Throw(this, obj);
-    }
-    jint ThrowNew(jclass clazz, const char *msg) {
-        return functions->ThrowNew(this, clazz, msg);
-    }
-    jthrowable ExceptionOccurred() {
-        return functions->ExceptionOccurred(this);
-    }
-    void ExceptionDescribe() {
-        functions->ExceptionDescribe(this);
-    }
-    void ExceptionClear() {
-        functions->ExceptionClear(this);
-    }
-    void FatalError(const char *msg) {
-        functions->FatalError(this, msg);
-    }
-
-    jint PushLocalFrame(jint capacity) {
-        return functions->PushLocalFrame(this,capacity);
-    }
-    jobject PopLocalFrame(jobject result) {
-        return functions->PopLocalFrame(this,result);
-    }
-
-    jobject NewGlobalRef(jobject lobj) {
-        return functions->NewGlobalRef(this,lobj);
-    }
-    void DeleteGlobalRef(jobject gref) {
-        functions->DeleteGlobalRef(this,gref);
-    }
-    void DeleteLocalRef(jobject obj) {
-        functions->DeleteLocalRef(this, obj);
-    }
-
-    jboolean IsSameObject(jobject obj1, jobject obj2) {
-        return functions->IsSameObject(this,obj1,obj2);
-    }
-
-    jobject NewLocalRef(jobject ref) {
-        return functions->NewLocalRef(this,ref);
-    }
-    jint EnsureLocalCapacity(jint capacity) {
-        return functions->EnsureLocalCapacity(this,capacity);
-    }
-
-    jobject AllocObject(jclass clazz) {
-        return functions->AllocObject(this,clazz);
-    }
-    jobject NewObject(jclass clazz, jmethodID methodID, ...) {
-        va_list args;
-	jobject result;
-	va_start(args, methodID);
-        result = functions->NewObjectV(this,clazz,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jobject NewObjectV(jclass clazz, jmethodID methodID,
-		       va_list args) {
-        return functions->NewObjectV(this,clazz,methodID,args);
-    }
-    jobject NewObjectA(jclass clazz, jmethodID methodID,
-		       const jvalue *args) {
-        return functions->NewObjectA(this,clazz,methodID,args);
-    }
-
-    jclass GetObjectClass(jobject obj) {
-        return functions->GetObjectClass(this,obj);
-    }
-    jboolean IsInstanceOf(jobject obj, jclass clazz) {
-        return functions->IsInstanceOf(this,obj,clazz);
-    }
-
-    jmethodID GetMethodID(jclass clazz, const char *name,
-			  const char *sig) {
-        return functions->GetMethodID(this,clazz,name,sig);
-    }
-
-    jobject CallObjectMethod(jobject obj, jmethodID methodID, ...) {
-        va_list args;
-	jobject result;
-	va_start(args,methodID);
-	result = functions->CallObjectMethodV(this,obj,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jobject CallObjectMethodV(jobject obj, jmethodID methodID,
-			va_list args) {
-        return functions->CallObjectMethodV(this,obj,methodID,args);
-    }
-    jobject CallObjectMethodA(jobject obj, jmethodID methodID,
-			const jvalue * args) {
-        return functions->CallObjectMethodA(this,obj,methodID,args);
-    }
-
-    jboolean CallBooleanMethod(jobject obj,
-			       jmethodID methodID, ...) {
-        va_list args;
-	jboolean result;
-	va_start(args,methodID);
-	result = functions->CallBooleanMethodV(this,obj,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jboolean CallBooleanMethodV(jobject obj, jmethodID methodID,
-				va_list args) {
-        return functions->CallBooleanMethodV(this,obj,methodID,args);
-    }
-    jboolean CallBooleanMethodA(jobject obj, jmethodID methodID,
-				const jvalue * args) {
-        return functions->CallBooleanMethodA(this,obj,methodID, args);
-    }
-
-    jbyte CallByteMethod(jobject obj, jmethodID methodID, ...) {
-        va_list args;
-	jbyte result;
-	va_start(args,methodID);
-	result = functions->CallByteMethodV(this,obj,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jbyte CallByteMethodV(jobject obj, jmethodID methodID,
-			  va_list args) {
-        return functions->CallByteMethodV(this,obj,methodID,args);
-    }
-    jbyte CallByteMethodA(jobject obj, jmethodID methodID,
-			  const jvalue * args) {
-        return functions->CallByteMethodA(this,obj,methodID,args);
-    }
-
-    jchar CallCharMethod(jobject obj, jmethodID methodID, ...) {
-        va_list args;
-	jchar result;
-	va_start(args,methodID);
-	result = functions->CallCharMethodV(this,obj,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jchar CallCharMethodV(jobject obj, jmethodID methodID,
-			  va_list args) {
-        return functions->CallCharMethodV(this,obj,methodID,args);
-    }
-    jchar CallCharMethodA(jobject obj, jmethodID methodID,
-			  const jvalue * args) {
-        return functions->CallCharMethodA(this,obj,methodID,args);
-    }
-
-    jshort CallShortMethod(jobject obj, jmethodID methodID, ...) {
-        va_list args;
-	jshort result;
-	va_start(args,methodID);
-	result = functions->CallShortMethodV(this,obj,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jshort CallShortMethodV(jobject obj, jmethodID methodID,
-			    va_list args) {
-        return functions->CallShortMethodV(this,obj,methodID,args);
-    }
-    jshort CallShortMethodA(jobject obj, jmethodID methodID,
-			    const jvalue * args) {
-        return functions->CallShortMethodA(this,obj,methodID,args);
-    }
-
-    jint CallIntMethod(jobject obj, jmethodID methodID, ...) {
-        va_list args;
-	jint result;
-	va_start(args,methodID);
-	result = functions->CallIntMethodV(this,obj,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jint CallIntMethodV(jobject obj, jmethodID methodID,
-			va_list args) {
-        return functions->CallIntMethodV(this,obj,methodID,args);
-    }
-    jint CallIntMethodA(jobject obj, jmethodID methodID,
-			const jvalue * args) {
-        return functions->CallIntMethodA(this,obj,methodID,args);
-    }
-
-    jlong CallLongMethod(jobject obj, jmethodID methodID, ...) {
-        va_list args;
-	jlong result;
-	va_start(args,methodID);
-	result = functions->CallLongMethodV(this,obj,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jlong CallLongMethodV(jobject obj, jmethodID methodID,
-			  va_list args) {
-        return functions->CallLongMethodV(this,obj,methodID,args);
-    }
-    jlong CallLongMethodA(jobject obj, jmethodID methodID,
-			  const jvalue * args) {
-        return functions->CallLongMethodA(this,obj,methodID,args);
-    }
-
-    jfloat CallFloatMethod(jobject obj, jmethodID methodID, ...) {
-        va_list args;
-	jfloat result;
-	va_start(args,methodID);
-	result = functions->CallFloatMethodV(this,obj,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jfloat CallFloatMethodV(jobject obj, jmethodID methodID,
-			    va_list args) {
-        return functions->CallFloatMethodV(this,obj,methodID,args);
-    }
-    jfloat CallFloatMethodA(jobject obj, jmethodID methodID,
-			    const jvalue * args) {
-        return functions->CallFloatMethodA(this,obj,methodID,args);
-    }
-
-    jdouble CallDoubleMethod(jobject obj, jmethodID methodID, ...) {
-        va_list args;
-	jdouble result;
-	va_start(args,methodID);
-	result = functions->CallDoubleMethodV(this,obj,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jdouble CallDoubleMethodV(jobject obj, jmethodID methodID,
-			va_list args) {
-        return functions->CallDoubleMethodV(this,obj,methodID,args);
-    }
-    jdouble CallDoubleMethodA(jobject obj, jmethodID methodID,
-			const jvalue * args) {
-        return functions->CallDoubleMethodA(this,obj,methodID,args);
-    }
-
-    void CallVoidMethod(jobject obj, jmethodID methodID, ...) {
-        va_list args;
-	va_start(args,methodID);
-	functions->CallVoidMethodV(this,obj,methodID,args);
-	va_end(args);
-    }
-    void CallVoidMethodV(jobject obj, jmethodID methodID,
-			 va_list args) {
-        functions->CallVoidMethodV(this,obj,methodID,args);
-    }
-    void CallVoidMethodA(jobject obj, jmethodID methodID,
-			 const jvalue * args) {
-        functions->CallVoidMethodA(this,obj,methodID,args);
-    }
-
-    jobject CallNonvirtualObjectMethod(jobject obj, jclass clazz,
-				       jmethodID methodID, ...) {
-        va_list args;
-	jobject result;
-	va_start(args,methodID);
-	result = functions->CallNonvirtualObjectMethodV(this,obj,clazz,
-							methodID,args);
-	va_end(args);
-	return result;
-    }
-    jobject CallNonvirtualObjectMethodV(jobject obj, jclass clazz,
-					jmethodID methodID, va_list args) {
-        return functions->CallNonvirtualObjectMethodV(this,obj,clazz,
-						      methodID,args);
-    }
-    jobject CallNonvirtualObjectMethodA(jobject obj, jclass clazz,
-					jmethodID methodID, const jvalue * args) {
-        return functions->CallNonvirtualObjectMethodA(this,obj,clazz,
-						      methodID,args);
-    }
-
-    jboolean CallNonvirtualBooleanMethod(jobject obj, jclass clazz,
-					 jmethodID methodID, ...) {
-        va_list args;
-	jboolean result;
-	va_start(args,methodID);
-	result = functions->CallNonvirtualBooleanMethodV(this,obj,clazz,
-							 methodID,args);
-	va_end(args);
-	return result;
-    }
-    jboolean CallNonvirtualBooleanMethodV(jobject obj, jclass clazz,
-					  jmethodID methodID, va_list args) {
-        return functions->CallNonvirtualBooleanMethodV(this,obj,clazz,
-						       methodID,args);
-    }
-    jboolean CallNonvirtualBooleanMethodA(jobject obj, jclass clazz,
-					  jmethodID methodID, const jvalue * args) {
-        return functions->CallNonvirtualBooleanMethodA(this,obj,clazz,
-						       methodID, args);
-    }
-
-    jbyte CallNonvirtualByteMethod(jobject obj, jclass clazz,
-				   jmethodID methodID, ...) {
-        va_list args;
-	jbyte result;
-	va_start(args,methodID);
-	result = functions->CallNonvirtualByteMethodV(this,obj,clazz,
-						      methodID,args);
-	va_end(args);
-	return result;
-    }
-    jbyte CallNonvirtualByteMethodV(jobject obj, jclass clazz,
-				    jmethodID methodID, va_list args) {
-        return functions->CallNonvirtualByteMethodV(this,obj,clazz,
-						    methodID,args);
-    }
-    jbyte CallNonvirtualByteMethodA(jobject obj, jclass clazz,
-				    jmethodID methodID, const jvalue * args) {
-        return functions->CallNonvirtualByteMethodA(this,obj,clazz,
-						    methodID,args);
-    }
-
-    jchar CallNonvirtualCharMethod(jobject obj, jclass clazz,
-				   jmethodID methodID, ...) {
-        va_list args;
-	jchar result;
-	va_start(args,methodID);
-	result = functions->CallNonvirtualCharMethodV(this,obj,clazz,
-						      methodID,args);
-	va_end(args);
-	return result;
-    }
-    jchar CallNonvirtualCharMethodV(jobject obj, jclass clazz,
-				    jmethodID methodID, va_list args) {
-        return functions->CallNonvirtualCharMethodV(this,obj,clazz,
-						    methodID,args);
-    }
-    jchar CallNonvirtualCharMethodA(jobject obj, jclass clazz,
-				    jmethodID methodID, const jvalue * args) {
-        return functions->CallNonvirtualCharMethodA(this,obj,clazz,
-						    methodID,args);
-    }
-
-    jshort CallNonvirtualShortMethod(jobject obj, jclass clazz,
-				     jmethodID methodID, ...) {
-        va_list args;
-	jshort result;
-	va_start(args,methodID);
-	result = functions->CallNonvirtualShortMethodV(this,obj,clazz,
-						       methodID,args);
-	va_end(args);
-	return result;
-    }
-    jshort CallNonvirtualShortMethodV(jobject obj, jclass clazz,
-				      jmethodID methodID, va_list args) {
-        return functions->CallNonvirtualShortMethodV(this,obj,clazz,
-						     methodID,args);
-    }
-    jshort CallNonvirtualShortMethodA(jobject obj, jclass clazz,
-				      jmethodID methodID, const jvalue * args) {
-        return functions->CallNonvirtualShortMethodA(this,obj,clazz,
-						     methodID,args);
-    }
-
-    jint CallNonvirtualIntMethod(jobject obj, jclass clazz,
-				 jmethodID methodID, ...) {
-        va_list args;
-	jint result;
-	va_start(args,methodID);
-	result = functions->CallNonvirtualIntMethodV(this,obj,clazz,
-						     methodID,args);
-	va_end(args);
-	return result;
-    }
-    jint CallNonvirtualIntMethodV(jobject obj, jclass clazz,
-				  jmethodID methodID, va_list args) {
-        return functions->CallNonvirtualIntMethodV(this,obj,clazz,
-						   methodID,args);
-    }
-    jint CallNonvirtualIntMethodA(jobject obj, jclass clazz,
-				  jmethodID methodID, const jvalue * args) {
-        return functions->CallNonvirtualIntMethodA(this,obj,clazz,
-						   methodID,args);
-    }
-
-    jlong CallNonvirtualLongMethod(jobject obj, jclass clazz,
-				   jmethodID methodID, ...) {
-        va_list args;
-	jlong result;
-	va_start(args,methodID);
-	result = functions->CallNonvirtualLongMethodV(this,obj,clazz,
-						      methodID,args);
-	va_end(args);
-	return result;
-    }
-    jlong CallNonvirtualLongMethodV(jobject obj, jclass clazz,
-				    jmethodID methodID, va_list args) {
-        return functions->CallNonvirtualLongMethodV(this,obj,clazz,
-						    methodID,args);
-    }
-    jlong CallNonvirtualLongMethodA(jobject obj, jclass clazz,
-				    jmethodID methodID, const jvalue * args) {
-        return functions->CallNonvirtualLongMethodA(this,obj,clazz,
-						    methodID,args);
-    }
-
-    jfloat CallNonvirtualFloatMethod(jobject obj, jclass clazz,
-				     jmethodID methodID, ...) {
-        va_list args;
-	jfloat result;
-	va_start(args,methodID);
-	result = functions->CallNonvirtualFloatMethodV(this,obj,clazz,
-						       methodID,args);
-	va_end(args);
-	return result;
-    }
-    jfloat CallNonvirtualFloatMethodV(jobject obj, jclass clazz,
-				      jmethodID methodID,
-				      va_list args) {
-        return functions->CallNonvirtualFloatMethodV(this,obj,clazz,
-						     methodID,args);
-    }
-    jfloat CallNonvirtualFloatMethodA(jobject obj, jclass clazz,
-				      jmethodID methodID,
-				      const jvalue * args) {
-        return functions->CallNonvirtualFloatMethodA(this,obj,clazz,
-						     methodID,args);
-    }
-
-    jdouble CallNonvirtualDoubleMethod(jobject obj, jclass clazz,
-				       jmethodID methodID, ...) {
-        va_list args;
-	jdouble result;
-	va_start(args,methodID);
-	result = functions->CallNonvirtualDoubleMethodV(this,obj,clazz,
-							methodID,args);
-	va_end(args);
-	return result;
-    }
-    jdouble CallNonvirtualDoubleMethodV(jobject obj, jclass clazz,
-					jmethodID methodID,
-					va_list args) {
-        return functions->CallNonvirtualDoubleMethodV(this,obj,clazz,
-						      methodID,args);
-    }
-    jdouble CallNonvirtualDoubleMethodA(jobject obj, jclass clazz,
-					jmethodID methodID,
-					const jvalue * args) {
-        return functions->CallNonvirtualDoubleMethodA(this,obj,clazz,
-						      methodID,args);
-    }
-
-    void CallNonvirtualVoidMethod(jobject obj, jclass clazz,
-				  jmethodID methodID, ...) {
-        va_list args;
-	va_start(args,methodID);
-	functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args);
-	va_end(args);
-    }
-    void CallNonvirtualVoidMethodV(jobject obj, jclass clazz,
-				   jmethodID methodID,
-				   va_list args) {
-        functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args);
-    }
-    void CallNonvirtualVoidMethodA(jobject obj, jclass clazz,
-				   jmethodID methodID,
-				   const jvalue * args) {
-        functions->CallNonvirtualVoidMethodA(this,obj,clazz,methodID,args);
-    }
-
-    jfieldID GetFieldID(jclass clazz, const char *name,
-			const char *sig) {
-        return functions->GetFieldID(this,clazz,name,sig);
-    }
-
-    jobject GetObjectField(jobject obj, jfieldID fieldID) {
-        return functions->GetObjectField(this,obj,fieldID);
-    }
-    jboolean GetBooleanField(jobject obj, jfieldID fieldID) {
-        return functions->GetBooleanField(this,obj,fieldID);
-    }
-    jbyte GetByteField(jobject obj, jfieldID fieldID) {
-        return functions->GetByteField(this,obj,fieldID);
-    }
-    jchar GetCharField(jobject obj, jfieldID fieldID) {
-        return functions->GetCharField(this,obj,fieldID);
-    }
-    jshort GetShortField(jobject obj, jfieldID fieldID) {
-        return functions->GetShortField(this,obj,fieldID);
-    }
-    jint GetIntField(jobject obj, jfieldID fieldID) {
-        return functions->GetIntField(this,obj,fieldID);
-    }
-    jlong GetLongField(jobject obj, jfieldID fieldID) {
-        return functions->GetLongField(this,obj,fieldID);
-    }
-    jfloat GetFloatField(jobject obj, jfieldID fieldID) {
-        return functions->GetFloatField(this,obj,fieldID);
-    }
-    jdouble GetDoubleField(jobject obj, jfieldID fieldID) {
-        return functions->GetDoubleField(this,obj,fieldID);
-    }
-
-    void SetObjectField(jobject obj, jfieldID fieldID, jobject val) {
-        functions->SetObjectField(this,obj,fieldID,val);
-    }
-    void SetBooleanField(jobject obj, jfieldID fieldID,
-			 jboolean val) {
-        functions->SetBooleanField(this,obj,fieldID,val);
-    }
-    void SetByteField(jobject obj, jfieldID fieldID,
-		      jbyte val) {
-        functions->SetByteField(this,obj,fieldID,val);
-    }
-    void SetCharField(jobject obj, jfieldID fieldID,
-		      jchar val) {
-        functions->SetCharField(this,obj,fieldID,val);
-    }
-    void SetShortField(jobject obj, jfieldID fieldID,
-		       jshort val) {
-        functions->SetShortField(this,obj,fieldID,val);
-    }
-    void SetIntField(jobject obj, jfieldID fieldID,
-		     jint val) {
-        functions->SetIntField(this,obj,fieldID,val);
-    }
-    void SetLongField(jobject obj, jfieldID fieldID,
-		      jlong val) {
-        functions->SetLongField(this,obj,fieldID,val);
-    }
-    void SetFloatField(jobject obj, jfieldID fieldID,
-		       jfloat val) {
-        functions->SetFloatField(this,obj,fieldID,val);
-    }
-    void SetDoubleField(jobject obj, jfieldID fieldID,
-			jdouble val) {
-        functions->SetDoubleField(this,obj,fieldID,val);
-    }
-
-    jmethodID GetStaticMethodID(jclass clazz, const char *name,
-				const char *sig) {
-        return functions->GetStaticMethodID(this,clazz,name,sig);
-    }
-
-    jobject CallStaticObjectMethod(jclass clazz, jmethodID methodID,
-			     ...) {
-        va_list args;
-	jobject result;
-	va_start(args,methodID);
-	result = functions->CallStaticObjectMethodV(this,clazz,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jobject CallStaticObjectMethodV(jclass clazz, jmethodID methodID,
-			      va_list args) {
-        return functions->CallStaticObjectMethodV(this,clazz,methodID,args);
-    }
-    jobject CallStaticObjectMethodA(jclass clazz, jmethodID methodID,
-			      const jvalue *args) {
-        return functions->CallStaticObjectMethodA(this,clazz,methodID,args);
-    }
-
-    jboolean CallStaticBooleanMethod(jclass clazz,
-				     jmethodID methodID, ...) {
-        va_list args;
-	jboolean result;
-	va_start(args,methodID);
-	result = functions->CallStaticBooleanMethodV(this,clazz,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jboolean CallStaticBooleanMethodV(jclass clazz,
-				      jmethodID methodID, va_list args) {
-        return functions->CallStaticBooleanMethodV(this,clazz,methodID,args);
-    }
-    jboolean CallStaticBooleanMethodA(jclass clazz,
-				      jmethodID methodID, const jvalue *args) {
-        return functions->CallStaticBooleanMethodA(this,clazz,methodID,args);
-    }
-
-    jbyte CallStaticByteMethod(jclass clazz,
-			       jmethodID methodID, ...) {
-        va_list args;
-	jbyte result;
-	va_start(args,methodID);
-	result = functions->CallStaticByteMethodV(this,clazz,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jbyte CallStaticByteMethodV(jclass clazz,
-				jmethodID methodID, va_list args) {
-        return functions->CallStaticByteMethodV(this,clazz,methodID,args);
-    }
-    jbyte CallStaticByteMethodA(jclass clazz,
-				jmethodID methodID, const jvalue *args) {
-        return functions->CallStaticByteMethodA(this,clazz,methodID,args);
-    }
-
-    jchar CallStaticCharMethod(jclass clazz,
-			       jmethodID methodID, ...) {
-        va_list args;
-	jchar result;
-	va_start(args,methodID);
-	result = functions->CallStaticCharMethodV(this,clazz,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jchar CallStaticCharMethodV(jclass clazz,
-				jmethodID methodID, va_list args) {
-        return functions->CallStaticCharMethodV(this,clazz,methodID,args);
-    }
-    jchar CallStaticCharMethodA(jclass clazz,
-				jmethodID methodID, const jvalue *args) {
-        return functions->CallStaticCharMethodA(this,clazz,methodID,args);
-    }
-
-    jshort CallStaticShortMethod(jclass clazz,
-				 jmethodID methodID, ...) {
-        va_list args;
-	jshort result;
-	va_start(args,methodID);
-	result = functions->CallStaticShortMethodV(this,clazz,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jshort CallStaticShortMethodV(jclass clazz,
-				  jmethodID methodID, va_list args) {
-        return functions->CallStaticShortMethodV(this,clazz,methodID,args);
-    }
-    jshort CallStaticShortMethodA(jclass clazz,
-				  jmethodID methodID, const jvalue *args) {
-        return functions->CallStaticShortMethodA(this,clazz,methodID,args);
-    }
-
-    jint CallStaticIntMethod(jclass clazz,
-			     jmethodID methodID, ...) {
-        va_list args;
-	jint result;
-	va_start(args,methodID);
-	result = functions->CallStaticIntMethodV(this,clazz,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jint CallStaticIntMethodV(jclass clazz,
-			      jmethodID methodID, va_list args) {
-        return functions->CallStaticIntMethodV(this,clazz,methodID,args);
-    }
-    jint CallStaticIntMethodA(jclass clazz,
-			      jmethodID methodID, const jvalue *args) {
-        return functions->CallStaticIntMethodA(this,clazz,methodID,args);
-    }
-
-    jlong CallStaticLongMethod(jclass clazz,
-			       jmethodID methodID, ...) {
-        va_list args;
-	jlong result;
-	va_start(args,methodID);
-	result = functions->CallStaticLongMethodV(this,clazz,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jlong CallStaticLongMethodV(jclass clazz,
-				jmethodID methodID, va_list args) {
-        return functions->CallStaticLongMethodV(this,clazz,methodID,args);
-    }
-    jlong CallStaticLongMethodA(jclass clazz,
-				jmethodID methodID, const jvalue *args) {
-        return functions->CallStaticLongMethodA(this,clazz,methodID,args);
-    }
-
-    jfloat CallStaticFloatMethod(jclass clazz,
-				 jmethodID methodID, ...) {
-        va_list args;
-	jfloat result;
-	va_start(args,methodID);
-	result = functions->CallStaticFloatMethodV(this,clazz,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jfloat CallStaticFloatMethodV(jclass clazz,
-				  jmethodID methodID, va_list args) {
-        return functions->CallStaticFloatMethodV(this,clazz,methodID,args);
-    }
-    jfloat CallStaticFloatMethodA(jclass clazz,
-				  jmethodID methodID, const jvalue *args) {
-        return functions->CallStaticFloatMethodA(this,clazz,methodID,args);
-    }
-
-    jdouble CallStaticDoubleMethod(jclass clazz,
-				   jmethodID methodID, ...) {
-        va_list args;
-	jdouble result;
-	va_start(args,methodID);
-	result = functions->CallStaticDoubleMethodV(this,clazz,methodID,args);
-	va_end(args);
-	return result;
-    }
-    jdouble CallStaticDoubleMethodV(jclass clazz,
-				    jmethodID methodID, va_list args) {
-        return functions->CallStaticDoubleMethodV(this,clazz,methodID,args);
-    }
-    jdouble CallStaticDoubleMethodA(jclass clazz,
-				    jmethodID methodID, const jvalue *args) {
-        return functions->CallStaticDoubleMethodA(this,clazz,methodID,args);
-    }
-
-    void CallStaticVoidMethod(jclass cls, jmethodID methodID, ...) {
-        va_list args;
-	va_start(args,methodID);
-	functions->CallStaticVoidMethodV(this,cls,methodID,args);
-	va_end(args);
-    }
-    void CallStaticVoidMethodV(jclass cls, jmethodID methodID,
-			       va_list args) {
-        functions->CallStaticVoidMethodV(this,cls,methodID,args);
-    }
-    void CallStaticVoidMethodA(jclass cls, jmethodID methodID,
-			       const jvalue * args) {
-        functions->CallStaticVoidMethodA(this,cls,methodID,args);
-    }
-
-    jfieldID GetStaticFieldID(jclass clazz, const char *name,
-			      const char *sig) {
-        return functions->GetStaticFieldID(this,clazz,name,sig);
-    }
-    jobject GetStaticObjectField(jclass clazz, jfieldID fieldID) {
-        return functions->GetStaticObjectField(this,clazz,fieldID);
-    }
-    jboolean GetStaticBooleanField(jclass clazz, jfieldID fieldID) {
-        return functions->GetStaticBooleanField(this,clazz,fieldID);
-    }
-    jbyte GetStaticByteField(jclass clazz, jfieldID fieldID) {
-        return functions->GetStaticByteField(this,clazz,fieldID);
-    }
-    jchar GetStaticCharField(jclass clazz, jfieldID fieldID) {
-        return functions->GetStaticCharField(this,clazz,fieldID);
-    }
-    jshort GetStaticShortField(jclass clazz, jfieldID fieldID) {
-        return functions->GetStaticShortField(this,clazz,fieldID);
-    }
-    jint GetStaticIntField(jclass clazz, jfieldID fieldID) {
-        return functions->GetStaticIntField(this,clazz,fieldID);
-    }
-    jlong GetStaticLongField(jclass clazz, jfieldID fieldID) {
-        return functions->GetStaticLongField(this,clazz,fieldID);
-    }
-    jfloat GetStaticFloatField(jclass clazz, jfieldID fieldID) {
-        return functions->GetStaticFloatField(this,clazz,fieldID);
-    }
-    jdouble GetStaticDoubleField(jclass clazz, jfieldID fieldID) {
-        return functions->GetStaticDoubleField(this,clazz,fieldID);
-    }
-
-    void SetStaticObjectField(jclass clazz, jfieldID fieldID,
-			jobject value) {
-      functions->SetStaticObjectField(this,clazz,fieldID,value);
-    }
-    void SetStaticBooleanField(jclass clazz, jfieldID fieldID,
-			jboolean value) {
-      functions->SetStaticBooleanField(this,clazz,fieldID,value);
-    }
-    void SetStaticByteField(jclass clazz, jfieldID fieldID,
-			jbyte value) {
-      functions->SetStaticByteField(this,clazz,fieldID,value);
-    }
-    void SetStaticCharField(jclass clazz, jfieldID fieldID,
-			jchar value) {
-      functions->SetStaticCharField(this,clazz,fieldID,value);
-    }
-    void SetStaticShortField(jclass clazz, jfieldID fieldID,
-			jshort value) {
-      functions->SetStaticShortField(this,clazz,fieldID,value);
-    }
-    void SetStaticIntField(jclass clazz, jfieldID fieldID,
-			jint value) {
-      functions->SetStaticIntField(this,clazz,fieldID,value);
-    }
-    void SetStaticLongField(jclass clazz, jfieldID fieldID,
-			jlong value) {
-      functions->SetStaticLongField(this,clazz,fieldID,value);
-    }
-    void SetStaticFloatField(jclass clazz, jfieldID fieldID,
-			jfloat value) {
-      functions->SetStaticFloatField(this,clazz,fieldID,value);
-    }
-    void SetStaticDoubleField(jclass clazz, jfieldID fieldID,
-			jdouble value) {
-      functions->SetStaticDoubleField(this,clazz,fieldID,value);
-    }
-
-    jstring NewString(const jchar *unicode, jsize len) {
-        return functions->NewString(this,unicode,len);
-    }
-    jsize GetStringLength(jstring str) {
-        return functions->GetStringLength(this,str);
-    }
-    const jchar *GetStringChars(jstring str, jboolean *isCopy) {
-        return functions->GetStringChars(this,str,isCopy);
-    }
-    void ReleaseStringChars(jstring str, const jchar *chars) {
-        functions->ReleaseStringChars(this,str,chars);
-    }
-
-    jstring NewStringUTF(const char *utf) {
-        return functions->NewStringUTF(this,utf);
-    }
-    jsize GetStringUTFLength(jstring str) {
-        return functions->GetStringUTFLength(this,str);
-    }
-    const char* GetStringUTFChars(jstring str, jboolean *isCopy) {
-        return functions->GetStringUTFChars(this,str,isCopy);
-    }
-    void ReleaseStringUTFChars(jstring str, const char* chars) {
-        functions->ReleaseStringUTFChars(this,str,chars);
-    }
-
-    jsize GetArrayLength(jarray array) {
-        return functions->GetArrayLength(this,array);
-    }
-
-    jobjectArray NewObjectArray(jsize len, jclass clazz,
-				jobject init) {
-        return functions->NewObjectArray(this,len,clazz,init);
-    }
-    jobject GetObjectArrayElement(jobjectArray array, jsize index) {
-        return functions->GetObjectArrayElement(this,array,index);
-    }
-    void SetObjectArrayElement(jobjectArray array, jsize index,
-			       jobject val) {
-        functions->SetObjectArrayElement(this,array,index,val);
-    }
-
-    jbooleanArray NewBooleanArray(jsize len) {
-        return functions->NewBooleanArray(this,len);
-    }
-    jbyteArray NewByteArray(jsize len) {
-        return functions->NewByteArray(this,len);
-    }
-    jcharArray NewCharArray(jsize len) {
-        return functions->NewCharArray(this,len);
-    }
-    jshortArray NewShortArray(jsize len) {
-        return functions->NewShortArray(this,len);
-    }
-    jintArray NewIntArray(jsize len) {
-        return functions->NewIntArray(this,len);
-    }
-    jlongArray NewLongArray(jsize len) {
-        return functions->NewLongArray(this,len);
-    }
-    jfloatArray NewFloatArray(jsize len) {
-        return functions->NewFloatArray(this,len);
-    }
-    jdoubleArray NewDoubleArray(jsize len) {
-        return functions->NewDoubleArray(this,len);
-    }
-
-    jboolean * GetBooleanArrayElements(jbooleanArray array, jboolean *isCopy) {
-        return functions->GetBooleanArrayElements(this,array,isCopy);
-    }
-    jbyte * GetByteArrayElements(jbyteArray array, jboolean *isCopy) {
-        return functions->GetByteArrayElements(this,array,isCopy);
-    }
-    jchar * GetCharArrayElements(jcharArray array, jboolean *isCopy) {
-        return functions->GetCharArrayElements(this,array,isCopy);
-    }
-    jshort * GetShortArrayElements(jshortArray array, jboolean *isCopy) {
-        return functions->GetShortArrayElements(this,array,isCopy);
-    }
-    jint * GetIntArrayElements(jintArray array, jboolean *isCopy) {
-        return functions->GetIntArrayElements(this,array,isCopy);
-    }
-    jlong * GetLongArrayElements(jlongArray array, jboolean *isCopy) {
-        return functions->GetLongArrayElements(this,array,isCopy);
-    }
-    jfloat * GetFloatArrayElements(jfloatArray array, jboolean *isCopy) {
-        return functions->GetFloatArrayElements(this,array,isCopy);
-    }
-    jdouble * GetDoubleArrayElements(jdoubleArray array, jboolean *isCopy) {
-        return functions->GetDoubleArrayElements(this,array,isCopy);
-    }
-
-    void ReleaseBooleanArrayElements(jbooleanArray array,
-				     jboolean *elems,
-				     jint mode) {
-        functions->ReleaseBooleanArrayElements(this,array,elems,mode);
-    }
-    void ReleaseByteArrayElements(jbyteArray array,
-				  jbyte *elems,
-				  jint mode) {
-        functions->ReleaseByteArrayElements(this,array,elems,mode);
-    }
-    void ReleaseCharArrayElements(jcharArray array,
-				  jchar *elems,
-				  jint mode) {
-        functions->ReleaseCharArrayElements(this,array,elems,mode);
-    }
-    void ReleaseShortArrayElements(jshortArray array,
-				   jshort *elems,
-				   jint mode) {
-        functions->ReleaseShortArrayElements(this,array,elems,mode);
-    }
-    void ReleaseIntArrayElements(jintArray array,
-				 jint *elems,
-				 jint mode) {
-        functions->ReleaseIntArrayElements(this,array,elems,mode);
-    }
-    void ReleaseLongArrayElements(jlongArray array,
-				  jlong *elems,
-				  jint mode) {
-        functions->ReleaseLongArrayElements(this,array,elems,mode);
-    }
-    void ReleaseFloatArrayElements(jfloatArray array,
-				   jfloat *elems,
-				   jint mode) {
-        functions->ReleaseFloatArrayElements(this,array,elems,mode);
-    }
-    void ReleaseDoubleArrayElements(jdoubleArray array,
-				    jdouble *elems,
-				    jint mode) {
-        functions->ReleaseDoubleArrayElements(this,array,elems,mode);
-    }
-
-    void GetBooleanArrayRegion(jbooleanArray array,
-			       jsize start, jsize len, jboolean *buf) {
-        functions->GetBooleanArrayRegion(this,array,start,len,buf);
-    }
-    void GetByteArrayRegion(jbyteArray array,
-			    jsize start, jsize len, jbyte *buf) {
-        functions->GetByteArrayRegion(this,array,start,len,buf);
-    }
-    void GetCharArrayRegion(jcharArray array,
-			    jsize start, jsize len, jchar *buf) {
-        functions->GetCharArrayRegion(this,array,start,len,buf);
-    }
-    void GetShortArrayRegion(jshortArray array,
-			     jsize start, jsize len, jshort *buf) {
-        functions->GetShortArrayRegion(this,array,start,len,buf);
-    }
-    void GetIntArrayRegion(jintArray array,
-			   jsize start, jsize len, jint *buf) {
-        functions->GetIntArrayRegion(this,array,start,len,buf);
-    }
-    void GetLongArrayRegion(jlongArray array,
-			    jsize start, jsize len, jlong *buf) {
-        functions->GetLongArrayRegion(this,array,start,len,buf);
-    }
-    void GetFloatArrayRegion(jfloatArray array,
-			     jsize start, jsize len, jfloat *buf) {
-        functions->GetFloatArrayRegion(this,array,start,len,buf);
-    }
-    void GetDoubleArrayRegion(jdoubleArray array,
-			      jsize start, jsize len, jdouble *buf) {
-        functions->GetDoubleArrayRegion(this,array,start,len,buf);
-    }
-
-    void SetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len,
-			       const jboolean *buf) {
-        functions->SetBooleanArrayRegion(this,array,start,len,buf);
-    }
-    void SetByteArrayRegion(jbyteArray array, jsize start, jsize len,
-			    const jbyte *buf) {
-        functions->SetByteArrayRegion(this,array,start,len,buf);
-    }
-    void SetCharArrayRegion(jcharArray array, jsize start, jsize len,
-			    const jchar *buf) {
-        functions->SetCharArrayRegion(this,array,start,len,buf);
-    }
-    void SetShortArrayRegion(jshortArray array, jsize start, jsize len,
-			     const jshort *buf) {
-        functions->SetShortArrayRegion(this,array,start,len,buf);
-    }
-    void SetIntArrayRegion(jintArray array, jsize start, jsize len,
-			   const jint *buf) {
-        functions->SetIntArrayRegion(this,array,start,len,buf);
-    }
-    void SetLongArrayRegion(jlongArray array, jsize start, jsize len,
-			    const jlong *buf) {
-        functions->SetLongArrayRegion(this,array,start,len,buf);
-    }
-    void SetFloatArrayRegion(jfloatArray array, jsize start, jsize len,
-			     const jfloat *buf) {
-        functions->SetFloatArrayRegion(this,array,start,len,buf);
-    }
-    void SetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len,
-			      const jdouble *buf) {
-        functions->SetDoubleArrayRegion(this,array,start,len,buf);
-    }
-
-    jint RegisterNatives(jclass clazz, const JNINativeMethod *methods,
-			 jint nMethods) {
-        return functions->RegisterNatives(this,clazz,methods,nMethods);
-    }
-    jint UnregisterNatives(jclass clazz) {
-        return functions->UnregisterNatives(this,clazz);
-    }
-
-    jint MonitorEnter(jobject obj) {
-        return functions->MonitorEnter(this,obj);
-    }
-    jint MonitorExit(jobject obj) {
-        return functions->MonitorExit(this,obj);
-    }
-
-    jint GetJavaVM(JavaVM **vm) {
-        return functions->GetJavaVM(this,vm);
-    }
-
-    void GetStringRegion(jstring str, jsize start, jsize len, jchar *buf) {
-        functions->GetStringRegion(this,str,start,len,buf);
-    }
-    void GetStringUTFRegion(jstring str, jsize start, jsize len, char *buf) {
-        functions->GetStringUTFRegion(this,str,start,len,buf);
-    }
-
-    void * GetPrimitiveArrayCritical(jarray array, jboolean *isCopy) {
-        return functions->GetPrimitiveArrayCritical(this,array,isCopy);
-    }
-    void ReleasePrimitiveArrayCritical(jarray array, void *carray, jint mode) {
-        functions->ReleasePrimitiveArrayCritical(this,array,carray,mode);
-    }
-
-    const jchar * GetStringCritical(jstring string, jboolean *isCopy) {
-        return functions->GetStringCritical(this,string,isCopy);
-    }
-    void ReleaseStringCritical(jstring string, const jchar *cstring) {
-        functions->ReleaseStringCritical(this,string,cstring);
-    }
-
-    jweak NewWeakGlobalRef(jobject obj) {
-        return functions->NewWeakGlobalRef(this,obj);
-    }
-    void DeleteWeakGlobalRef(jweak ref) {
-        functions->DeleteWeakGlobalRef(this,ref);
-    }
-
-    jboolean ExceptionCheck() {
-	return functions->ExceptionCheck(this);
-    }
-
-    jobject NewDirectByteBuffer(void* address, jlong capacity) {
-        return functions->NewDirectByteBuffer(this, address, capacity);
-    }
-    void* GetDirectBufferAddress(jobject buf) {
-        return functions->GetDirectBufferAddress(this, buf);
-    }
-    jlong GetDirectBufferCapacity(jobject buf) {
-        return functions->GetDirectBufferCapacity(this, buf);
-    }
-    jobjectRefType GetObjectRefType(jobject obj) {
-        return functions->GetObjectRefType(this, obj);
-    }
-
-#endif /* __cplusplus */
-};
-
-typedef struct JavaVMOption {
-    char *optionString;
-    void *extraInfo;
-} JavaVMOption;
-
-typedef struct JavaVMInitArgs {
-    jint version;
-
-    jint nOptions;
-    JavaVMOption *options;
-    jboolean ignoreUnrecognized;
-} JavaVMInitArgs;
-
-typedef struct JavaVMAttachArgs {
-    jint version;
-
-    char *name;
-    jobject group;
-} JavaVMAttachArgs;
-
-#define JDK1_2
-#define JDK1_4
-
-struct JNIInvokeInterface_ {
-    void *reserved0;
-    void *reserved1;
-    void *reserved2;
-
-    jint (JNICALL *DestroyJavaVM)(JavaVM *vm);
-
-    jint (JNICALL *AttachCurrentThread)(JavaVM *vm, void **penv, void *args);
-
-    jint (JNICALL *DetachCurrentThread)(JavaVM *vm);
-
-    jint (JNICALL *GetEnv)(JavaVM *vm, void **penv, jint version);
-
-    jint (JNICALL *AttachCurrentThreadAsDaemon)(JavaVM *vm, void **penv, void *args);
-};
-
-struct JavaVM_ {
-    const struct JNIInvokeInterface_ *functions;
-#ifdef __cplusplus
-
-    jint DestroyJavaVM() {
-        return functions->DestroyJavaVM(this);
-    }
-    jint AttachCurrentThread(void **penv, void *args) {
-        return functions->AttachCurrentThread(this, penv, args);
-    }
-    jint DetachCurrentThread() {
-        return functions->DetachCurrentThread(this);
-    }
-
-    jint GetEnv(void **penv, jint version) {
-        return functions->GetEnv(this, penv, version);
-    }
-    jint AttachCurrentThreadAsDaemon(void **penv, void *args) {
-        return functions->AttachCurrentThreadAsDaemon(this, penv, args);
-    }
-#endif
-};
-
-#ifdef _JNI_IMPLEMENTATION_
-#define _JNI_IMPORT_OR_EXPORT_ JNIEXPORT
-#else
-#define _JNI_IMPORT_OR_EXPORT_ JNIIMPORT
-#endif
-_JNI_IMPORT_OR_EXPORT_ jint JNICALL
-JNI_GetDefaultJavaVMInitArgs(void *args);
-
-_JNI_IMPORT_OR_EXPORT_ jint JNICALL
-JNI_CreateJavaVM(JavaVM **pvm, void **penv, void *args);
-
-_JNI_IMPORT_OR_EXPORT_ jint JNICALL
-JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *);
-
-JNIEXPORT jint JNICALL
-JNI_OnLoad(JavaVM *vm, void *reserved);
-
-JNIEXPORT void JNICALL
-JNI_OnUnload(JavaVM *vm, void *reserved);
-
-#define JNI_VERSION_1_1 0x00010001
-#define JNI_VERSION_1_2 0x00010002
-#define JNI_VERSION_1_4 0x00010004
-#define JNI_VERSION_1_6 0x00010006
-
-#endif /*  __GLUEGEN__ */
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif /* __cplusplus */
-
-#endif /* !_JAVASOFT_JNI_H_ */
-
diff -Nru gluegen2-2.3.2/make/stub_includes/jni/macosx/jawt_md.h gluegen2-2.4.0+dfsg/make/stub_includes/jni/macosx/jawt_md.h
--- gluegen2-2.3.2/make/stub_includes/jni/macosx/jawt_md.h	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/stub_includes/jni/macosx/jawt_md.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,63 +0,0 @@
-/**
- * This C header file is derived from Apple's Java SDK provided C header file
- * with the following copyright notice:
- *
- *   Copyright (c) 2002 Apple computer Inc. All rights reserved.
- * 
- * This version has complex comments removed and does not contain inlined algorithms etc, if any existed.
- *
- * The original C header file was included to JOGL on Mon Jun 15 22:57:38 2009
- * (commit cbc45e816f4ee81031bffce19a99550681462a24) by Sun Microsystem's staff and were approved. 
- *
- * This C header file is included due to ensure compatibility with - and invocation of the JAWT protocol.
- * They are processed by GlueGen to create a Java binding for JAWT invocation only.
- * 
- * http://ftp.resource.org/courts.gov/c/F3/387/387.F3d.522.03-5400.html (36)
- * "Atari Games Corp. v. Nintendo of Am., Inc., Nos. 88-4805 & 89-0027, 1993 WL 207548, at *1 (N.D.Cal. May 18, 1993) ("Atari III") 
- * ("Program code that is strictly necessary to achieve current compatibility presents a merger problem, almost by definition, 
- * and is thus excluded from the scope of any copyright.")."
- *
- * http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2009:111:0016:0022:EN:PDF
- * L 111/17 (10) and (15)
- */
-
-#ifndef _JAVASOFT_JAWT_MD_H_
-#define _JAVASOFT_JAWT_MD_H_
-
-#include <jawt.h>
-#include <AppKit/NSView.h>
-#include <QuartzCore/CALayer.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/** 
- * JAWT_DrawingSurfaceInfo.getPlatformInfo()
- *
- * Only if not JAWT_SurfaceLayers, see below!
- */
-typedef struct JAWT_MacOSXDrawingSurfaceInfo
-{
-    /** the view is guaranteed to be valid only for the duration of Component.paint method */
-    NSView *cocoaViewRef; 
-}
-JAWT_MacOSXDrawingSurfaceInfo;
-
-#ifndef __GLUEGEN__
-
-    #define JAWT_MACOSX_USE_CALAYER 0x80000000
-
-    /** Java7 and Java6 (OSX >= 10.6.4) CALayer surface if provided (Bit JAWT_MACOSX_USE_CALAYER set in the JAWT version) */
-    @protocol JAWT_SurfaceLayers
-    @property (readwrite, retain) CALayer *layer;
-    @property (readonly) CALayer *windowLayer;
-    @end
-
-#endif /* __GLUEGEN__ */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !_JAVASOFT_JAWT_MD_H_ */
diff -Nru gluegen2-2.3.2/make/stub_includes/jni/macosx/jni_md.h gluegen2-2.4.0+dfsg/make/stub_includes/jni/macosx/jni_md.h
--- gluegen2-2.3.2/make/stub_includes/jni/macosx/jni_md.h	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/stub_includes/jni/macosx/jni_md.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,46 +0,0 @@
-/*
- * @(#)jni_md.h	1.18 03/12/19
- *
- * This C header file is derived from Sun Microsystem's Java SDK provided C header file
- * with the following copyright notice:
- *
- *   Copyright 2006 Sun Microsystems, Inc. All rights reserved.
- *   SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- *
- * This version has complex comments removed and does not contain inlined algorithms etc, if any existed.
- * 
- * The original C header file was included to JOGL on Sat Jun 21 02:10:30 2008
- * (commit cbc45e816f4ee81031bffce19a99550681462a24) by Sun Microsystem's staff and were approved. 
- *
- * This C header file is included due to ensure compatibility with - and invocation of the JAWT protocol.
- * They are processed by GlueGen to create a Java binding for JAWT invocation only.
- * 
- * http://ftp.resource.org/courts.gov/c/F3/387/387.F3d.522.03-5400.html (36)
- * "Atari Games Corp. v. Nintendo of Am., Inc., Nos. 88-4805 & 89-0027, 1993 WL 207548, at *1 (N.D.Cal. May 18, 1993) ("Atari III") 
- * ("Program code that is strictly necessary to achieve current compatibility presents a merger problem, almost by definition, 
- * and is thus excluded from the scope of any copyright.")."
- *
- * http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2009:111:0016:0022:EN:PDF
- * L 111/17 (10) and (15)
- */
-
-#ifndef _JAVASOFT_JNI_MD_H_
-#define _JAVASOFT_JNI_MD_H_
-
-#include <gluegen_stdint.h>
-
-#ifdef __GLUEGEN__
-    #define JNIEXPORT
-    #define JNIIMPORT
-    #define JNICALL
-#else /* __GLUEGEN__ */
-    #define JNIEXPORT __attribute__((visibility("default")))
-    #define JNIIMPORT __attribute__((visibility("default")))
-    #define JNICALL
-#endif /* __GLUEGEN__ */
-
-typedef int8_t  jbyte;
-typedef int32_t jint;
-typedef int64_t jlong;
-
-#endif /* !_JAVASOFT_JNI_MD_H_ */
diff -Nru gluegen2-2.3.2/make/stub_includes/jni/win32/jawt_md.h gluegen2-2.4.0+dfsg/make/stub_includes/jni/win32/jawt_md.h
--- gluegen2-2.3.2/make/stub_includes/jni/win32/jawt_md.h	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/stub_includes/jni/win32/jawt_md.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,54 +0,0 @@
-/*
- * @(#)jawt_md.h	1.8 05/11/17
- *
- * This C header file is derived from Sun Microsystem's Java SDK provided C header file
- * with the following copyright notice:
- *
- *   Copyright 2006 Sun Microsystems, Inc. All rights reserved.
- *   SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- *
- * This version has complex comments removed and does not contain inlined algorithms etc, if any existed.
- * 
- * The original C header file was included to JOGL on Sat Jun 21 02:10:30 2008
- * (commit cbc45e816f4ee81031bffce19a99550681462a24) by Sun Microsystem's staff and were approved. 
- *
- * This C header file is included due to ensure compatibility with - and invocation of the JAWT protocol.
- * They are processed by GlueGen to create a Java binding for JAWT invocation only.
- * 
- * http://ftp.resource.org/courts.gov/c/F3/387/387.F3d.522.03-5400.html (36)
- * "Atari Games Corp. v. Nintendo of Am., Inc., Nos. 88-4805 & 89-0027, 1993 WL 207548, at *1 (N.D.Cal. May 18, 1993) ("Atari III") 
- * ("Program code that is strictly necessary to achieve current compatibility presents a merger problem, almost by definition, 
- * and is thus excluded from the scope of any copyright.")."
- *
- * http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2009:111:0016:0022:EN:PDF
- * L 111/17 (10) and (15)
- */
-
-#ifndef _JAVASOFT_JAWT_MD_H_
-#define _JAVASOFT_JAWT_MD_H_
-
-#include <windows.h>
-#include "jawt.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct jawt_Win32DrawingSurfaceInfo {
-    /**
-    union {
-        HWND hwnd;
-        HBITMAP hbitmap;
-        void* pbits;
-    }; */
-    HWND handle;
-
-    HDC hdc;
-    HPALETTE hpalette;
-} JAWT_Win32DrawingSurfaceInfo;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !_JAVASOFT_JAWT_MD_H_ */
diff -Nru gluegen2-2.3.2/make/stub_includes/jni/win32/jni_md.h gluegen2-2.4.0+dfsg/make/stub_includes/jni/win32/jni_md.h
--- gluegen2-2.3.2/make/stub_includes/jni/win32/jni_md.h	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/stub_includes/jni/win32/jni_md.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,46 +0,0 @@
-/*
- * @(#)jni_md.h	1.15 05/11/17
- *
- * This C header file is derived from Sun Microsystem's Java SDK provided C header file
- * with the following copyright notice:
- *
- *   Copyright 2006 Sun Microsystems, Inc. All rights reserved.
- *   SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- *
- * This version has complex comments removed and does not contain inlined algorithms etc, if any existed.
- * 
- * The original C header file was included to JOGL on Sat Jun 21 02:10:30 2008
- * (commit cbc45e816f4ee81031bffce19a99550681462a24) by Sun Microsystem's staff and were approved. 
- *
- * This C header file is included due to ensure compatibility with - and invocation of the JAWT protocol.
- * They are processed by GlueGen to create a Java binding for JAWT invocation only.
- * 
- * http://ftp.resource.org/courts.gov/c/F3/387/387.F3d.522.03-5400.html (36)
- * "Atari Games Corp. v. Nintendo of Am., Inc., Nos. 88-4805 & 89-0027, 1993 WL 207548, at *1 (N.D.Cal. May 18, 1993) ("Atari III") 
- * ("Program code that is strictly necessary to achieve current compatibility presents a merger problem, almost by definition, 
- * and is thus excluded from the scope of any copyright.")."
- *
- * http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2009:111:0016:0022:EN:PDF
- * L 111/17 (10) and (15)
- */
-
-#ifndef _JAVASOFT_JNI_MD_H_
-#define _JAVASOFT_JNI_MD_H_
-
-#include <gluegen_stdint.h>
-
-#ifdef __GLUEGEN__
-    #define JNIEXPORT
-    #define JNIIMPORT
-    #define JNICALL
-#else /* __GLUEGEN__ */
-    #define JNIEXPORT __declspec(dllexport)
-    #define JNIIMPORT __declspec(dllimport)
-    #define JNICALL __stdcall
-#endif /* __GLUEGEN__ */
-
-typedef int8_t  jbyte;
-typedef int32_t jint;
-typedef int64_t jlong;
-
-#endif /* !_JAVASOFT_JNI_MD_H_ */
diff -Nru gluegen2-2.3.2/make/stub_includes/jni/x11/jawt_md.h gluegen2-2.4.0+dfsg/make/stub_includes/jni/x11/jawt_md.h
--- gluegen2-2.3.2/make/stub_includes/jni/x11/jawt_md.h	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/stub_includes/jni/x11/jawt_md.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,56 +0,0 @@
-/*
- * @(#)jawt_md.h	1.12 05/11/17
- *
- * This C header file is derived from Sun Microsystem's Java SDK provided C header file
- * with the following copyright notice:
- *
- *   Copyright 2006 Sun Microsystems, Inc. All rights reserved.
- *   SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- *
- * This version has complex comments removed and does not contain inlined algorithms etc, if any existed.
- * 
- * The original C header file was included to JOGL on Sat Jun 21 02:10:30 2008
- * (commit cbc45e816f4ee81031bffce19a99550681462a24) by Sun Microsystem's staff and were approved. 
- *
- * This C header file is included due to ensure compatibility with - and invocation of the JAWT protocol.
- * They are processed by GlueGen to create a Java binding for JAWT invocation only.
- * 
- * http://ftp.resource.org/courts.gov/c/F3/387/387.F3d.522.03-5400.html (36)
- * "Atari Games Corp. v. Nintendo of Am., Inc., Nos. 88-4805 & 89-0027, 1993 WL 207548, at *1 (N.D.Cal. May 18, 1993) ("Atari III") 
- * ("Program code that is strictly necessary to achieve current compatibility presents a merger problem, almost by definition, 
- * and is thus excluded from the scope of any copyright.")."
- *
- * http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2009:111:0016:0022:EN:PDF
- * L 111/17 (10) and (15)
- */
-
-#ifndef _JAVASOFT_JAWT_MD_H_
-#define _JAVASOFT_JAWT_MD_H_
-
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Intrinsic.h>
-#include "jawt.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct jawt_X11DrawingSurfaceInfo {
-    Drawable drawable;
-    Display* display;
-    VisualID visualID;
-    Colormap colormapID;
-    int depth;
-    /*
-     * Since 1.4
-     */
-    int (JNICALL *GetAWTColor)(JAWT_DrawingSurface* ds,
-        int r, int g, int b);
-} JAWT_X11DrawingSurfaceInfo;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !_JAVASOFT_JAWT_MD_H_ */
diff -Nru gluegen2-2.3.2/make/stub_includes/jni/x11/jni_md.h gluegen2-2.4.0+dfsg/make/stub_includes/jni/x11/jni_md.h
--- gluegen2-2.3.2/make/stub_includes/jni/x11/jni_md.h	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/stub_includes/jni/x11/jni_md.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,40 +0,0 @@
-/*
- * @(#)jni_md.h	1.19 05/11/17
- *
- * This C header file is derived from Sun Microsystem's Java SDK provided C header file
- * with the following copyright notice:
- *
- *   Copyright 2006 Sun Microsystems, Inc. All rights reserved.
- *   SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- *
- * This version has complex comments removed and does not contain inlined algorithms etc, if any existed.
- * 
- * The original C header file was included to JOGL on Sat Jun 21 02:10:30 2008
- * (commit cbc45e816f4ee81031bffce19a99550681462a24) by Sun Microsystem's staff and were approved. 
- *
- * This C header file is included due to ensure compatibility with - and invocation of the JAWT protocol.
- * They are processed by GlueGen to create a Java binding for JAWT invocation only.
- * 
- * http://ftp.resource.org/courts.gov/c/F3/387/387.F3d.522.03-5400.html (36)
- * "Atari Games Corp. v. Nintendo of Am., Inc., Nos. 88-4805 & 89-0027, 1993 WL 207548, at *1 (N.D.Cal. May 18, 1993) ("Atari III") 
- * ("Program code that is strictly necessary to achieve current compatibility presents a merger problem, almost by definition, 
- * and is thus excluded from the scope of any copyright.")."
- *
- * http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2009:111:0016:0022:EN:PDF
- * L 111/17 (10) and (15)
- */
-
-#ifndef _JAVASOFT_JNI_MD_H_
-#define _JAVASOFT_JNI_MD_H_
-
-#include <gluegen_stdint.h>
-
-#define JNIEXPORT 
-#define JNIIMPORT
-#define JNICALL
-
-typedef int8_t  jbyte;
-typedef int32_t jint;
-typedef int64_t jlong;
-
-#endif /* !_JAVASOFT_JNI_MD_H_ */
diff -Nru gluegen2-2.3.2/make/stub_includes/platform/glibc-compat-symbols.h gluegen2-2.4.0+dfsg/make/stub_includes/platform/glibc-compat-symbols.h
--- gluegen2-2.3.2/make/stub_includes/platform/glibc-compat-symbols.h	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/make/stub_includes/platform/glibc-compat-symbols.h	2023-02-01 18:52:41.000000000 +0100
@@ -18,9 +18,14 @@
 #if defined(__linux__) /* Actually we like to test whether we link against GLIBC .. */
     #if defined(__GNUC__)
         #if defined(__aarch64__)
-           #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.4");
+           /* glibc 2.17 is the first glibc version that support aarch64
+              however memcpy is not versioned for aarch64 */
+           #define GLIBC_COMPAT_SYMBOL(FFF)
         #elif defined(__arm__)
+           /** On recent toolchain memcpy is no more versioned for arm 
            #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.4");
+            */
+           #define GLIBC_COMPAT_SYMBOL(FFF)
         #elif defined(__amd64__)
            #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.2.5");
         #else
@@ -28,9 +33,14 @@
         #endif /*__amd64__*/
     #elif defined(__clang__)
         #if defined(__aarch64__)
-           #define GLIBC_COMPAT_SYMBOL(FFF) asm(".symver " #FFF "," #FFF "@GLIBC_2.4");
+           /* glibc 2.17 is the first glibc version that support aarch64
+              however memcpy is not versioned for aarch64 */
+           #define GLIBC_COMPAT_SYMBOL(FFF)
         #elif defined(__arm__)
-           #define GLIBC_COMPAT_SYMBOL(FFF) asm(".symver " #FFF "," #FFF "@GLIBC_2.4");
+           /** On recent toolchain memcpy is no more versioned for arm 
+           #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.4");
+            */
+           #define GLIBC_COMPAT_SYMBOL(FFF)
         #elif defined(__amd64__)
            #define GLIBC_COMPAT_SYMBOL(FFF) asm(".symver " #FFF "," #FFF "@GLIBC_2.2.5");
         #else
diff -Nru gluegen2-2.3.2/nbproject/ide-file-targets.xml gluegen2-2.4.0+dfsg/nbproject/ide-file-targets.xml
--- gluegen2-2.3.2/nbproject/ide-file-targets.xml	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/nbproject/ide-file-targets.xml	2023-02-01 18:52:41.000000000 +0100
@@ -5,21 +5,21 @@
     <target name="compile-test">
         <mkdir dir="build/test/build/classes"/>
         <javac debug="true" debuglevel="lines,vars,source" destdir="build/test/build/classes" failonerror="false" source="1.5" srcdir="test/junit">
-            <classpath path="build/test/build/classes:build/classes:build/test/gensrc/java:lib/antlr-3.2.jar:make/lib/junit.jar:${jdk.home}/lib/tools.jar:${ant.core.lib}"/>
+            <classpath path="build/test/build/classes:build/classes:build/test/gensrc/java:lib/antlr-3.2.jar:make/lib/junit.jar:${ant.core.lib}"/>
         </javac>
     </target>
     <target name="compile-selected-files-in-junit">
         <fail unless="files">Must set property 'files'</fail>
         <mkdir dir="build/test/build/classes"/>
         <javac debug="true" debuglevel="lines,vars,source" destdir="build/test/build/classes" includes="${files}" source="1.5" srcdir="test/junit">
-            <classpath path="build/test/build/classes:build/classes:build/test/gensrc/java:lib/antlr-3.2.jar:make/lib/junit.jar:${jdk.home}/lib/tools.jar:${ant.core.lib}"/>
+            <classpath path="build/test/build/classes:build/classes:build/test/gensrc/java:lib/antlr-3.2.jar:make/lib/junit.jar:${ant.core.lib}"/>
         </javac>
     </target>
     <target depends="compile-test" name="run-selected-file-in-junit">
         <fail unless="run.class">Must set property 'run.class'</fail>
         <java classname="${run.class}" failonerror="true" fork="true">
             <classpath>
-                <path path="build/test/build/classes:build/classes:lib/antlr-3.2.jar:make/lib/junit.jar:${jdk.home}/lib/tools.jar:${ant.core.lib}"/>
+                <path path="build/test/build/classes:build/classes:lib/antlr-3.2.jar:make/lib/junit.jar:${ant.core.lib}"/>
             </classpath>
         </java>
     </target>
@@ -29,7 +29,7 @@
             <test name="${run.class}"/>
             <jvmarg value="-Djava.library.path=${basedir}/build/test/build/natives:${basedir}/build/obj"/>
             <classpath>
-                <path path="build/test/build/classes:build/test/gensrc/java:build/classes:lib/antlr-3.2.jar:make/lib/junit.jar:${jdk.home}/lib/tools.jar:${ant.core.lib}"/>
+                <path path="build/test/build/classes:build/test/gensrc/java:build/classes:lib/antlr-3.2.jar:make/lib/junit.jar:${ant.core.lib}"/>
             </classpath>
             <formatter type="brief" usefile="false"/>
         </junit>
@@ -37,7 +37,7 @@
     <target depends="compile-test" name="debug-selected-file-in-junit">
         <fail unless="run.class">Must set property 'debug.class'</fail>
         <path id="cp">
-            <path path="build/test/build/classes:build/test/gensrc/java:build/classes:lib/antlr-3.2.jar:make/lib/junit.jar:${jdk.home}/lib/tools.jar:${ant.core.lib}"/>
+            <path path="build/test/build/classes:build/test/gensrc/java:build/classes:lib/antlr-3.2.jar:make/lib/junit.jar:${ant.core.lib}"/>
         </path>
         <nbjpdastart addressproperty="jpda.address" name="GlueGen" transport="dt_socket">
             <classpath refid="cp"/>
@@ -57,7 +57,7 @@
         <fail unless="run.class">Must set property 'run.class'</fail>
         <java classname="${run.class}" failonerror="true" fork="true">
             <classpath>
-                <pathelement path="build/classes:${jdk.home}/lib/tools.jar:/lib/antlr-3.2.jar"/>
+                <pathelement path="build/classes:/lib/antlr-3.2.jar"/>
                 <pathelement location="build/classes"/>
             </classpath>
         </java>
@@ -68,7 +68,7 @@
         <fail unless="files">Must set property 'files'</fail>
         <mkdir dir="build/classes"/>
         <javac destdir="build/classes" includes="${files}" source="1.5" srcdir="src/java">
-            <classpath path="build/classes:${jdk.home}/lib/tools.jar:${ant.core.lib}:lib/antlr-3.2.jar"/>
+            <classpath path="build/classes:${ant.core.lib}:lib/antlr-3.2.jar"/>
         </javac>
     </target>
 </project>
diff -Nru gluegen2-2.3.2/nbproject/project.xml gluegen2-2.4.0+dfsg/nbproject/project.xml
--- gluegen2-2.3.2/nbproject/project.xml	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/nbproject/project.xml	2023-02-01 18:52:41.000000000 +0100
@@ -224,20 +224,20 @@
         <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2">
             <compilation-unit>
                 <package-root>src/java</package-root>
-                <classpath mode="compile">build/classes:${jdk.home}/lib/tools.jar:/usr/share/ant/lib/ant.jar:/home/mbien/netbeans68/java3/ant/lib/ant.jar:make/lib/antlr.jar</classpath>
+                <classpath mode="compile">build/classes:/usr/share/ant/lib/ant.jar:/home/mbien/netbeans68/java3/ant/lib/ant.jar:make/lib/antlr.jar</classpath>
                 <built-to>build/classes</built-to>
                 <source-level>1.5</source-level>
             </compilation-unit>
             <compilation-unit>
                 <package-root>build/gensrc/java</package-root>
-                <classpath mode="compile">build/classes:make/lib/antlr.jar:${jdk.home}/lib/tools.jar:${ant.core.lib}</classpath>
+                <classpath mode="compile">build/classes:make/lib/antlr.jar:${ant.core.lib}</classpath>
                 <built-to>build/classes</built-to>
                 <source-level>1.5</source-level>
             </compilation-unit>
             <compilation-unit>
                 <package-root>test/junit</package-root>
                 <unit-tests/>
-                <classpath mode="compile">build/classes:build/test/build/classes:make/lib/antlr.jar:${jdk.home}/lib/tools.jar:${ant.core.lib}:make/lib/junit.jar</classpath>
+                <classpath mode="compile">build/classes:build/test/build/classes:make/lib/antlr.jar:${ant.core.lib}:make/lib/junit.jar</classpath>
                 <built-to>build/classes</built-to>
                 <source-level>1.5</source-level>
             </compilation-unit>
@@ -253,7 +253,7 @@
             <compilation-unit>
                 <package-root>src/junit</package-root>
                 <unit-tests/>
-                <classpath mode="compile">build/classes:build/test/build/classes:make/lib/antlr.jar:${jdk.home}/lib/tools.jar:${ant.core.lib}:make/lib/junit.jar</classpath>
+                <classpath mode="compile">build/classes:build/test/build/classes:make/lib/antlr.jar:${ant.core.lib}:make/lib/junit.jar</classpath>
                 <source-level>1.5</source-level>
             </compilation-unit>
         </java-data>
diff -Nru gluegen2-2.3.2/.settings/org.eclipse.jdt.core.prefs gluegen2-2.4.0+dfsg/.settings/org.eclipse.jdt.core.prefs
--- gluegen2-2.3.2/.settings/org.eclipse.jdt.core.prefs	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/.settings/org.eclipse.jdt.core.prefs	2023-02-01 18:52:41.000000000 +0100
@@ -0,0 +1,15 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=1.8
diff -Nru gluegen2-2.3.2/.settings/org.eclipse.jdt.ui.prefs gluegen2-2.4.0+dfsg/.settings/org.eclipse.jdt.ui.prefs
--- gluegen2-2.3.2/.settings/org.eclipse.jdt.ui.prefs	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/.settings/org.eclipse.jdt.ui.prefs	2023-02-01 18:52:41.000000000 +0100
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.ui.text.custom_code_templates=
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/GlueGenVersion.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/GlueGenVersion.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/GlueGenVersion.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/GlueGenVersion.java	2023-02-01 18:52:41.000000000 +0100
@@ -29,8 +29,17 @@
 package com.jogamp.common;
 
 import com.jogamp.common.util.JogampVersion;
+import com.jogamp.common.util.SHASum;
 import com.jogamp.common.util.VersionUtil;
+
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.ArrayList;
+import java.util.List;
 import java.util.jar.Manifest;
+import java.util.regex.Pattern;
 
 public class GlueGenVersion extends JogampVersion {
 
@@ -59,6 +68,40 @@
         return jogampCommonVersionInfo;
     }
 
+    /**
+     * {@code gluegen-rt.jar} definition of {@link SHASum.TempJarSHASum}'s specialization of {@link SHASum}.
+     * <p>
+     * Implementation uses {@link com.jogamp.common.util.cache.TempJarCache}.
+     * </p>
+     * <p>
+     * Constructor defines the includes and excludes as used for {@code gluegen-rt.jar} {@link SHASum} computation.
+     * </p>
+     */
+    public static class GluGenRTJarSHASum extends SHASum.TempJarSHASum {
+        /**
+         * See {@link GluGenRTJarSHASum}
+         * @throws SecurityException
+         * @throws IllegalArgumentException
+         * @throws NoSuchAlgorithmException
+         * @throws IOException
+         * @throws URISyntaxException
+         */
+        public GluGenRTJarSHASum()
+                throws SecurityException, IllegalArgumentException, NoSuchAlgorithmException, IOException, URISyntaxException
+        {
+            super(MessageDigest.getInstance("SHA-256"), GlueGenVersion.class, new ArrayList<Pattern>(), new ArrayList<Pattern>());
+            final List<Pattern> excludes = getExcludes();
+            final List<Pattern> includes = getIncludes();
+            final String origin = getOrigin();
+            excludes.add(Pattern.compile(origin+"/jogamp/android/launcher"));
+            excludes.add(Pattern.compile(origin+"/jogamp/common/os/android"));
+            excludes.add(Pattern.compile(origin+"/com/jogamp/gluegen/jcpp"));
+            includes.add(Pattern.compile(origin+"/com/jogamp/gluegen/runtime/.*\\.class"));
+            includes.add(Pattern.compile(origin+"/com/jogamp/common/.*"));
+            includes.add(Pattern.compile(origin+"/jogamp/common/.*"));
+        }
+    }
+
     public static void main(final String args[]) {
         System.err.println(VersionUtil.getPlatformInfo());
         System.err.println(GlueGenVersion.getInstance());
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/jvm/JNILibLoaderBase.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/jvm/JNILibLoaderBase.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/jvm/JNILibLoaderBase.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/jvm/JNILibLoaderBase.java	2023-02-01 18:52:41.000000000 +0100
@@ -44,17 +44,18 @@
 import java.lang.reflect.Method;
 import java.net.URISyntaxException;
 import java.net.URL;
-import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.Arrays;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 
 import com.jogamp.common.net.Uri;
 import com.jogamp.common.os.NativeLibrary;
 import com.jogamp.common.util.JarUtil;
 import com.jogamp.common.util.PropertyAccess;
+import com.jogamp.common.util.SecurityUtil;
 import com.jogamp.common.util.cache.TempJarCache;
 
 import jogamp.common.Debug;
@@ -203,7 +204,7 @@
         System.err.printf("JNILibLoaderBase: addNativeJarLibsImpl: initial: %s -> %s%n", jarSubURI, jarSubUriRoot);
     }
 
-    final String nativeLibraryPath = String.format("natives/%s/", PlatformPropsImpl.os_and_arch);
+    final String nativeLibraryPath = String.format((Locale)null, "natives/%s/", PlatformPropsImpl.os_and_arch);
     if (DEBUG) {
         System.err.printf("JNILibLoaderBase: addNativeJarLibsImpl: nativeLibraryPath: %s%n", nativeLibraryPath);
     }
@@ -404,7 +405,7 @@
     }
 
     boolean ok = false;
-    if (TempJarCache.isInitialized()) {
+    if ( TempJarCache.isInitialized(true) ) {
         ok = addNativeJarLibsWithTempJarCache(classesFromJavaJars, singleJarMarker);
     } else if(DEBUG) {
         System.err.println("JNILibLoaderBase: addNativeJarLibs0: disabled due to uninitialized TempJarCache");
@@ -451,7 +452,7 @@
               }
 
               final Uri.Encoded nativeJarBasename =
-                      Uri.Encoded.cast( String.format("%s-natives-%s.jar", jarBasename.get(), PlatformPropsImpl.os_and_arch) );
+                      Uri.Encoded.cast( String.format((Locale)null, "%s-natives-%s.jar", jarBasename.get(), PlatformPropsImpl.os_and_arch) );
 
               ok = JNILibLoaderBase.addNativeJarLibsImpl(c, classJarURI, jarName, nativeJarBasename);
               if (ok) {
@@ -511,7 +512,7 @@
     final String sunAppletLauncherProperty = "sun.jnlp.applet.launcher";
     final String sunAppletLauncherClassName = "org.jdesktop.applet.util.JNLPAppletLauncher";
 
-    final Method loadLibraryMethod = AccessController.doPrivileged(new PrivilegedAction<Method>() {
+    final Method loadLibraryMethod = SecurityUtil.doPrivileged(new PrivilegedAction<Method>() {
         @Override
         public Method run() {
             // FIXME: remove
@@ -604,14 +605,14 @@
               mode = 2;
           } else {
               if(DEBUG) {
-                  System.err.println("JNILibLoaderBase: System.loadLibrary("+libraryName+") - mode 3");
+                  System.err.println("JNILibLoaderBase: System.loadLibrary("+libraryName+") - mode 3: SystemEnvLibraryPaths: "+NativeLibrary.getSystemEnvLibraryPaths());
               }
               try {
                   System.loadLibrary(libraryName);
                   mode = 3;
               } catch (final UnsatisfiedLinkError ex1) {
                   if(DEBUG) {
-                      System.err.println("ERROR (retry w/ enumLibPath) - "+ex1.getMessage());
+                      System.err.println("ERROR mode 3 - "+ex1.getMessage());
                   }
                   final List<String> possiblePaths = NativeLibrary.enumerateLibraryPaths(libraryName, libraryName, libraryName, cl);
                   // Iterate down these and see which one if any we can actually find.
@@ -628,7 +629,10 @@
                               System.err.println("n/a - "+ex2.getMessage());
                           }
                           if(!iter.hasNext()) {
-                              throw ex2;
+                              // Avoid misleading final exception, use our own
+                              throw new UnsatisfiedLinkError("Couldn't load library '"+libraryName+
+                                      "' generically including "+NativeLibrary.getSystemEnvLibraryPaths()+ // mode 3
+                                      ", nor as "+possiblePaths); // mode 4
                           }
                       }
                   }
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/net/GenericURLStreamHandlerFactory.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/net/GenericURLStreamHandlerFactory.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/net/GenericURLStreamHandlerFactory.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/net/GenericURLStreamHandlerFactory.java	2023-02-01 18:52:41.000000000 +0100
@@ -3,11 +3,12 @@
 import java.net.URL;
 import java.net.URLStreamHandler;
 import java.net.URLStreamHandlerFactory;
-import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.HashMap;
 import java.util.Map;
 
+import com.jogamp.common.util.SecurityUtil;
+
 public class GenericURLStreamHandlerFactory implements URLStreamHandlerFactory {
     private static GenericURLStreamHandlerFactory factory = null;
 
@@ -48,7 +49,7 @@
      */
     public synchronized static GenericURLStreamHandlerFactory register() {
         if(null == factory) {
-            factory = AccessController.doPrivileged(new PrivilegedAction<GenericURLStreamHandlerFactory>() {
+            factory = SecurityUtil.doPrivileged(new PrivilegedAction<GenericURLStreamHandlerFactory>() {
                 @Override
                 public GenericURLStreamHandlerFactory run() {
                     boolean ok = false;
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/nio/AbstractBuffer.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/nio/AbstractBuffer.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/nio/AbstractBuffer.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/nio/AbstractBuffer.java	2023-02-01 18:52:41.000000000 +0100
@@ -48,7 +48,7 @@
     protected int position;
 
     static {
-        Platform.initSingleton(); // loads native gluegen-rt library
+        Platform.initSingleton(); // loads native gluegen_rt library
     }
 
     /**
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/nio/Buffers.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/nio/Buffers.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/nio/Buffers.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/nio/Buffers.java	2023-02-01 18:52:41.000000000 +0100
@@ -39,6 +39,8 @@
  */
 package com.jogamp.common.nio;
 
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
 import java.nio.Buffer;
 import java.nio.ByteBuffer;
 import java.nio.ByteOrder;
@@ -48,9 +50,17 @@
 import java.nio.IntBuffer;
 import java.nio.LongBuffer;
 import java.nio.ShortBuffer;
+import java.security.PrivilegedAction;
 
+import com.jogamp.common.ExceptionUtils;
+import com.jogamp.common.util.ReflectionUtil;
+import com.jogamp.common.util.SecurityUtil;
+import com.jogamp.common.util.UnsafeUtil;
 import com.jogamp.common.util.ValueConv;
 
+import jogamp.common.Debug;
+import jogamp.common.os.PlatformPropsImpl;
+
 /**
  * Utility methods allowing easy {@link java.nio.Buffer} manipulations.
  *
@@ -60,6 +70,11 @@
  */
 public class Buffers {
 
+    static final boolean DEBUG;
+    static {
+        DEBUG = Debug.debug("Buffers");
+    }
+
     public static final int SIZEOF_BYTE     = 1;
     public static final int SIZEOF_SHORT    = 2;
     public static final int SIZEOF_CHAR     = 2;
@@ -1150,4 +1165,82 @@
         return sb;
     }
 
+    /**
+     * Access to NIO {@link sun.misc.Cleaner}, allowing caller to deterministically clean a given {@link sun.nio.ch.DirectBuffer}.
+     */
+    public static class Cleaner {
+        private static final Method mbbCleaner;
+        private static final Method cClean;
+        /** OK to be lazy on thread synchronization, just for early out **/
+        private static volatile boolean cleanerError;
+        static {
+            final Method[] _mbbCleaner = { null };
+            final Method[] _cClean = { null };
+            final boolean hasCleaner;
+            if( SecurityUtil.doPrivileged(new PrivilegedAction<Boolean>() {
+                @Override
+                public Boolean run() {
+                    try {
+                        if( PlatformPropsImpl.JAVA_9 ) {
+                            return UnsafeUtil.hasInvokeCleaner();
+                        } else {
+                            _mbbCleaner[0] = ReflectionUtil.getMethod("sun.nio.ch.DirectBuffer", "cleaner", null, Buffers.class.getClassLoader());
+                            _mbbCleaner[0].setAccessible(true);
+                            final Class<?> cleanerType = _mbbCleaner[0].getReturnType();
+                            // Java >= 9: jdk.internal.ref.Cleaner (NOT accessible!)
+                            //            "Unable to make public void jdk.internal.ref.Cleaner.clean() accessible:
+                            //             module java.base does not "exports jdk.internal.ref" to unnamed module"
+                            // Java <= 8: sun.misc.Cleaner OK
+                            _cClean[0] = cleanerType.getMethod("clean");
+                            _cClean[0].setAccessible(true);
+                            return Boolean.TRUE;
+                        }
+                    } catch(final Throwable t) {
+                        if( DEBUG ) {
+                            ExceptionUtils.dumpThrowable("Buffers", t);
+                        }
+                        return Boolean.FALSE;
+                    } } } ).booleanValue() ) {
+                mbbCleaner = _mbbCleaner[0];
+                cClean = _cClean[0];
+                hasCleaner = PlatformPropsImpl.JAVA_9 || ( null != mbbCleaner && null != cClean );
+            } else {
+                mbbCleaner = null;
+                cClean = null;
+                hasCleaner = false;
+            }
+            cleanerError = !hasCleaner;
+            if( DEBUG ) {
+                System.err.print("Buffers.Cleaner.init: hasCleaner: "+hasCleaner+", cleanerError "+cleanerError);
+                if( null != mbbCleaner ) {
+                    System.err.print(", using Cleaner class: "+mbbCleaner.getReturnType().getName());
+                }
+                System.err.println();
+            }
+        }
+        /**
+         * If {@code b} is an direct NIO buffer, i.e {@link sun.nio.ch.DirectBuffer},
+         * calls it's {@link sun.misc.Cleaner} instance {@code clean()} method once.
+         * @return {@code true} if successful, otherwise {@code false}.
+         */
+        public static boolean clean(final ByteBuffer bb) {
+            if( cleanerError || !bb.isDirect() ) {
+                return false;
+            }
+            try {
+                if( PlatformPropsImpl.JAVA_9 ) {
+                    UnsafeUtil.invokeCleaner(bb);
+                } else {
+                    cClean.invoke(mbbCleaner.invoke(bb));
+                }
+                return true;
+            } catch(final Throwable t) {
+                cleanerError = true;
+                if( DEBUG ) {
+                    ExceptionUtils.dumpThrowable("Buffers", t);
+                }
+                return false;
+            }
+        }
+    }
 }
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/nio/MappedByteBufferInputStream.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/nio/MappedByteBufferInputStream.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/nio/MappedByteBufferInputStream.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/nio/MappedByteBufferInputStream.java	2023-02-01 18:52:41.000000000 +0100
@@ -33,17 +33,15 @@
 import java.io.PrintStream;
 import java.io.RandomAccessFile;
 import java.lang.ref.WeakReference;
-import java.lang.reflect.Method;
 import java.nio.ByteBuffer;
 import java.nio.MappedByteBuffer;
 import java.nio.channels.FileChannel;
 import java.nio.channels.FileChannel.MapMode;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
 
-import jogamp.common.Debug;
+import com.jogamp.common.os.Platform.OSType;
 
-import com.jogamp.common.os.Platform;
+import jogamp.common.Debug;
+import jogamp.common.os.PlatformPropsImpl;
 
 /**
  * An {@link InputStream} implementation based on an underlying {@link FileChannel}'s memory mapped {@link ByteBuffer},
@@ -139,8 +137,7 @@
     static final boolean DEBUG;
 
     static {
-        Platform.initSingleton();
-        if( Platform.is32Bit() ) {
+        if( PlatformPropsImpl.CPU_ARCH.is32Bit ) {
             DEFAULT_SLICE_SHIFT = 29;
         } else {
             DEFAULT_SLICE_SHIFT = 30;
@@ -163,10 +160,6 @@
 
     private int refCount;
 
-    private Method mbbCleaner;
-    private Method cClean;
-    private boolean cleanerInit;
-    private boolean hasCleaner;
     private CacheMode cmode;
 
     private int sliceIdx;
@@ -191,10 +184,12 @@
             }
         }
         long fcSz = 0, pos = 0, rem = 0;
-        try {
-            fcSz = fc.size();
-        } catch (final IOException e) {
-            e.printStackTrace();
+        if( fc.isOpen() ) {
+            try {
+                fcSz = fc.size();
+            } catch (final IOException e) {
+                e.printStackTrace();
+            }
         }
         if( 0 < refCount ) {
             try {
@@ -229,14 +224,16 @@
         notifyLengthChange( totalSize );
 
         this.refCount = 1;
-        this.cleanerInit = false;
-        this.hasCleaner = false;
         this.cmode = cmode;
 
         this.sliceIdx = currSliceIdx;
         this.mark = -1;
 
         currentSlice().position(0);
+
+        if( MappedByteBufferInputStream.DEBUG ) {
+            this.dbgDump("CTOR", System.err);
+        }
     }
 
     /**
@@ -330,6 +327,9 @@
                 }
             }
         }
+        if( MappedByteBufferInputStream.DEBUG ) {
+            this.dbgDump("Close", System.err);
+        }
     }
 
     final FileChannel.MapMode getMapMode() { return mmode; }
@@ -366,7 +366,7 @@
             currentPosition = -1L;
         }
         if( fc.size() != newTotalSize ) {
-            if( Platform.OSType.WINDOWS == Platform.getOSType() ) {
+            if( OSType.WINDOWS == PlatformPropsImpl.OS_TYPE ) {
                 // On Windows, we have to close all mapped slices.
                 // Otherwise we will receive:
                 // java.io.IOException: The requested operation cannot be performed on a file with a user-mapped section open
@@ -441,10 +441,9 @@
             }
             position2( Math.min(prePosition, newTotalSize) ); // -> clipped position (set currSlice and re-map/-pos buffer)
         }
-        /* if( DEBUG ) {
-            System.err.println("notifyLengthChange.X: "+slices[currSlice]);
-            dbgDump("notifyLengthChange.X:", System.err);
-        } */
+        if( MappedByteBufferInputStream.DEBUG ) {
+            this.dbgDump("NotifyLengthChange", System.err);
+        }
     }
 
     /**
@@ -551,6 +550,21 @@
         }
     }
 
+    /**
+     * Releases the mapped {@link ByteBuffer} slices.
+     * @throws IOException if a buffer slice operation failed.
+     */
+    public final synchronized void flushSlices() throws IOException {
+        if( null != slices ) {
+            for(int i=0; i<sliceCount; i++) {
+                flushSlice(i, synchronous);
+            }
+        }
+        if( MappedByteBufferInputStream.DEBUG ) {
+            this.dbgDump("FlushSlices", System.err);
+        }
+    }
+
     synchronized void syncSlice(final ByteBuffer s) throws IOException {
         syncSlice(s, synchronous);
     }
@@ -630,58 +644,16 @@
         }
     }
     private synchronized boolean cleanBuffer(final ByteBuffer mbb, final boolean syncBuffer) throws IOException {
-        if( !cleanerInit ) {
-            initCleaner(mbb);
-        }
         syncSlice(mbb, syncBuffer);
         if( !mbb.isDirect() ) {
             return false;
         }
-        boolean res = false;
-        if ( hasCleaner ) {
-            try {
-                cClean.invoke(mbbCleaner.invoke(mbb));
-                res = true;
-            } catch(final Throwable t) {
-                hasCleaner = false;
-                if( DEBUG ) {
-                    System.err.println("Caught "+t.getMessage());
-                    t.printStackTrace();
-                }
-            }
-        }
-        if( !res && CacheMode.FLUSH_PRE_HARD == cmode ) {
+        if( !Buffers.Cleaner.clean(mbb) && CacheMode.FLUSH_PRE_HARD == cmode ) {
             cmode = CacheMode.FLUSH_PRE_SOFT;
+            return false;
+        } else {
+            return true;
         }
-        return res;
-    }
-    private synchronized void initCleaner(final ByteBuffer bb) {
-        final Method[] _mbbCleaner = { null };
-        final Method[] _cClean = { null };
-        AccessController.doPrivileged(new PrivilegedAction<Object>() {
-            @Override
-            public Object run() {
-                try {
-                    _mbbCleaner[0] = bb.getClass().getMethod("cleaner");
-                    _mbbCleaner[0].setAccessible(true);
-                    _cClean[0] = Class.forName("sun.misc.Cleaner").getMethod("clean");
-                    _cClean[0].setAccessible(true);
-                } catch(final Throwable t) {
-                    if( DEBUG ) {
-                        System.err.println("Caught "+t.getMessage());
-                        t.printStackTrace();
-                    }
-                }
-                return null;
-            } } );
-        mbbCleaner = _mbbCleaner[0];
-        cClean = _cClean[0];
-        final boolean res = null != mbbCleaner && null != cClean;
-        if( DEBUG ) {
-            System.err.println("initCleaner: Has cleaner: "+res+", mbbCleaner "+mbbCleaner+", cClean "+cClean);
-        }
-        hasCleaner = res;
-        cleanerInit = true;
     }
 
     /**
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/nio/PointerBuffer.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/nio/PointerBuffer.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/nio/PointerBuffer.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/nio/PointerBuffer.java	2023-02-01 18:52:41.000000000 +0100
@@ -53,7 +53,7 @@
     protected LongObjectHashMap dataMap = null;
 
     static {
-        Platform.initSingleton(); // loads native gluegen-rt library
+        Platform.initSingleton(); // loads native gluegen_rt library
     }
 
     /** no backup array, use for direct usage only */
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/os/AndroidVersion.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/os/AndroidVersion.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/os/AndroidVersion.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/os/AndroidVersion.java	2023-02-01 18:52:41.000000000 +0100
@@ -74,15 +74,20 @@
         Object abvObject= null;
         Class<?> abvcClass = null;
         Object abvcObject= null;
-        try {
-            abClass = ReflectionUtil.getClass(androidBuild, true, cl);
-            abObject = abClass.newInstance();
-            abvClass = ReflectionUtil.getClass(androidBuildVersion, true, cl);
-            abvObject = abvClass.newInstance();
-            abvcClass = ReflectionUtil.getClass(androidBuildVersionCodes, true, cl);
-            abvcObject = abvcClass.newInstance();
-        } catch (final Exception e) { /* n/a */ }
-        isAvailable = null != abObject && null != abvObject;
+
+        final boolean isDalvikVm = "Dalvik".equals(System.getProperty("java.vm.name"));
+
+        if (isDalvikVm) {
+          try {
+              abClass = ReflectionUtil.getClass(androidBuild, true, cl);
+              abObject = abClass.newInstance();
+              abvClass = ReflectionUtil.getClass(androidBuildVersion, true, cl);
+              abvObject = abvClass.newInstance();
+              abvcClass = ReflectionUtil.getClass(androidBuildVersionCodes, true, cl);
+              abvcObject = abvcClass.newInstance();
+          } catch (final Exception e) { /* n/a */ }
+        }
+        isAvailable = isDalvikVm && null != abObject && null != abvObject;
         if(isAvailable) {
             CPU_ABI = getString(abClass, abObject, "CPU_ABI", true);
             CPU_ABI2 = getString(abClass, abObject, "CPU_ABI2", true);
@@ -106,6 +111,7 @@
              * <pre>
              *  lib/armeabi/libfoo.so
              *  lib/armeabi-v7a/libfoo.so
+             *  lib/arm64-v8a/libfoo.so
              *  lib/x86/libfoo.so
              *  lib/mips/libfoo.so
              * </pre>
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/os/DynamicLibraryBundleInfo.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/os/DynamicLibraryBundleInfo.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/os/DynamicLibraryBundleInfo.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/os/DynamicLibraryBundleInfo.java	2023-02-01 18:52:41.000000000 +0100
@@ -37,6 +37,21 @@
     public static final boolean DEBUG = DynamicLibraryBundle.DEBUG;
 
     /**
+     * Returns {@code true} if tool libraries shall be searched in the system path <i>(default)</i>, otherwise {@code false}.
+     * @since 2.4.0
+     */
+    public boolean searchToolLibInSystemPath();
+
+    /**
+     * Returns {@code true} if system path shall be searched <i>first</i> <i>(default)</i>, rather than searching it last.
+     * <p>
+     * If {@link #searchToolLibInSystemPath()} is {@code false} the return value is ignored.
+     * </p>
+     * @since 2.4.0
+     */
+    public boolean searchToolLibSystemPathFirst();
+
+    /**
      * If a {@link SecurityManager} is installed, user needs link permissions
      * for the named libraries.
      *
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/os/DynamicLibraryBundle.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/os/DynamicLibraryBundle.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/os/DynamicLibraryBundle.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/os/DynamicLibraryBundle.java	2023-02-01 18:52:41.000000000 +0100
@@ -249,9 +249,12 @@
         return aptr;
     }
 
-    protected static final NativeLibrary loadFirstAvailable(final List<String> libNames, final ClassLoader loader, final boolean global) throws SecurityException {
+    protected static final NativeLibrary loadFirstAvailable(final List<String> libNames,
+                                                            final boolean searchSystemPath,
+                                                            final boolean searchSystemPathFirst,
+                                                            final ClassLoader loader, final boolean global) throws SecurityException {
         for (int i=0; i < libNames.size(); i++) {
-            final NativeLibrary lib = NativeLibrary.open(libNames.get(i), loader, global);
+            final NativeLibrary lib = NativeLibrary.open(libNames.get(i), searchSystemPath, searchSystemPathFirst, loader, global);
             if (lib != null) {
                 return lib;
             }
@@ -269,14 +272,17 @@
         for (i=0; i < toolLibNames.size(); i++) {
             final List<String> libNames = toolLibNames.get(i);
             if( null != libNames && libNames.size() > 0 ) {
-                lib = loadFirstAvailable(libNames, cl, info.shallLinkGlobal());
+                lib = loadFirstAvailable(libNames,
+                                         info.searchToolLibInSystemPath(),
+                                         info.searchToolLibSystemPathFirst(),
+                                         cl, info.shallLinkGlobal());
                 if ( null == lib ) {
                     if(DEBUG) {
                         System.err.println("Unable to load any Tool library of: "+libNames);
                     }
                 } else {
                     if( null == dynLinkGlobal ) {
-                        dynLinkGlobal = lib.getDynamicLinker();
+                        dynLinkGlobal = lib.dynamicLinker();
                     }
                     nativeLibraries.add(lib);
                     toolLibLoaded[i]=true;
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/os/MachineDataInfo.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/os/MachineDataInfo.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/os/MachineDataInfo.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/os/MachineDataInfo.java	2023-02-01 18:52:41.000000000 +0100
@@ -58,12 +58,14 @@
   /*                              arch   os          int, long, float, doubl, ldoubl,  ptr,   page */
   private final static int[] size_arm_mips_32     =  { 4,    4,     4,     8,      8,    4,   4096 };
   private final static int[] size_x86_32_unix     =  { 4,    4,     4,     8,     12,    4,   4096 };
+  private final static int[] size_x86_32_android  =  { 4,    4,     4,     8,      8,    4,   4096 };
   private final static int[] size_x86_32_macos    =  { 4,    4,     4,     8,     16,    4,   4096 };
   private final static int[] size_ppc_32_unix     =  { 4,    4,     4,     8,     16,    4,   4096 };
   private final static int[] size_sparc_32_sunos  =  { 4,    4,     4,     8,     16,    4,   8192 };
   private final static int[] size_x86_32_windows  =  { 4,    4,     4,     8,     12,    4,   4096 };
   private final static int[] size_lp64_unix       =  { 4,    8,     4,     8,     16,    8,   4096 };
   private final static int[] size_x86_64_windows  =  { 4,    4,     4,     8,     16,    8,   4096 };
+  private final static int[] size_arm64_ios       =  { 4,    8,     4,     8,      8,    8,   8192 };
 
   /*                               arch   os          i8, i16, i32, i64, int, long, float, doubl, ldoubl, ptr */
   private final static int[] align_arm_mips_32    =  { 1,   2,   4,   8,   4,    4,     4,     8,      8,   4 };
@@ -74,11 +76,12 @@
   private final static int[] align_x86_32_windows =  { 1,   2,   4,   8,   4,    4,     4,     8,      4,   4 };
   private final static int[] align_lp64_unix      =  { 1,   2,   4,   8,   4,    8,     4,     8,     16,   8 };
   private final static int[] align_x86_64_windows =  { 1,   2,   4,   8,   4,    4,     4,     8,     16,   8 };
+  private final static int[] align_arm64_ios      =  { 1,   2,   4,   8,   4,    8,     4,     8,      8,   8 };
 
   /**
    * Static enumeration of {@link MachineDataInfo} instances
    * used for high performance data size and alignment lookups,
-   * e.g. for generated structures.
+   * e.g. for generated structures using the {@link MachineDataInfo.StaticConfig} index.
    * <p>
    * The value {@link MachineDataInfo#pageSizeInBytes} shall be ignored
    * for static instances!
@@ -98,6 +101,8 @@
       ARM_MIPS_32(     size_arm_mips_32,   align_arm_mips_32),
       /** {@link Platform.CPUType#X86_32} Unix */
       X86_32_UNIX(    size_x86_32_unix,    align_x86_32_unix),
+      /** {@link Platform.CPUType#X86_32} Android/Bionic */
+      X86_32_ANDROID( size_x86_32_android, align_x86_32_unix),
       /** {@link Platform.CPUType#X86_32} MacOS (Special case gcc4/OSX) */
       X86_32_MACOS(   size_x86_32_macos,   align_x86_32_macos),
       /** {@link Platform.CPUType#PPC} Unix */
@@ -109,8 +114,10 @@
       /** LP64 Unix, e.g.: {@link Platform.CPUType#X86_64} Unix, {@link Platform.CPUType#ARM64} EABI, {@link Platform.CPUType#PPC64} Unix, .. */
       LP64_UNIX(      size_lp64_unix,    align_lp64_unix),
       /** {@link Platform.CPUType#X86_64} Windows */
-      X86_64_WINDOWS( size_x86_64_windows, align_x86_64_windows);
-      // 8
+      X86_64_WINDOWS( size_x86_64_windows, align_x86_64_windows),
+      /** {@link Platform.CPUType#ARM64 } iOS */
+      ARM64_IOS( size_arm64_ios, align_arm64_ios);
+      // 9
 
       public final MachineDataInfo md;
 
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/os/NativeLibrary.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/os/NativeLibrary.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/os/NativeLibrary.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/os/NativeLibrary.java	2023-02-01 18:52:41.000000000 +0100
@@ -41,11 +41,12 @@
 package com.jogamp.common.os;
 
 import java.io.File;
+import java.io.IOException;
 import java.lang.reflect.Method;
 import java.net.URISyntaxException;
-import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Iterator;
 import java.util.List;
 import java.util.StringTokenizer;
@@ -59,6 +60,7 @@
 
 import com.jogamp.common.ExceptionUtils;
 import com.jogamp.common.util.IOUtil;
+import com.jogamp.common.util.SecurityUtil;
 import com.jogamp.common.util.cache.TempJarCache;
 
 /** Provides low-level, relatively platform-independent access to
@@ -78,6 +80,7 @@
   private static final String[] prefixes;
   private static final String[] suffixes;
   private static final boolean isOSX;
+  private static String sys_env_lib_path_varname;
 
   static {
     // Instantiate dynamic linker implementation
@@ -85,12 +88,15 @@
       case WINDOWS:
         prefixes = new String[] { "" };
         suffixes = new String[] { ".dll" };
+        sys_env_lib_path_varname = "PATH";
         isOSX = false;
         break;
 
       case MACOS:
+      case IOS:
         prefixes = new String[] { "lib" };
-        suffixes = new String[] { ".dylib", ".jnilib" };
+        suffixes = new String[] { ".dylib" };
+        sys_env_lib_path_varname = "DYLD_LIBRARY_PATH";
         isOSX = true;
         break;
 
@@ -104,6 +110,7 @@
       default:
         prefixes = new String[] { "lib" };
         suffixes = new String[] { ".so" };
+        sys_env_lib_path_varname = "LD_LIBRARY_PATH";
         isOSX = false;
         break;
     }
@@ -137,24 +144,61 @@
     return "NativeLibrary[" + dynLink.getClass().getSimpleName() + ", " + libraryPath + ", 0x" + Long.toHexString(libraryHandle) + ", global " + global + "]";
   }
 
-  /** Opens the given native library, assuming it has the same base
-      name on all platforms, looking first in the system's search
-      path, and in the context of the specified ClassLoader, which is
-      used to help find the library in the case of e.g. Java Web Start.
-   * @throws SecurityException if user is not granted access for the named library.
+  /**
+   * Returns the system's environment variable name used for the dynamic linker to resolve library locations, e.g.
+   * - Windows: PATH
+   * - MacOS: DYLD_LIBRARY_PATH
+   * - Unix: LD_LIBRARY_PATH
    */
-  public static final NativeLibrary open(final String libName, final ClassLoader loader) throws SecurityException {
-    return open(libName, libName, libName, true, loader, true);
+  public static final String getSystemEnvLibraryPathVarname() { return sys_env_lib_path_varname; }
+
+  /**
+   * Returns a list of system paths, from the {@link #getSystemEnvLibraryPathVarname()} variable.
+   */
+  public static final List<String> getSystemEnvLibraryPaths() {
+      final String paths =
+              SecurityUtil.doPrivileged(new PrivilegedAction<String>() {
+                  @Override
+                  public String run() {
+                      return System.getenv(getSystemEnvLibraryPathVarname());
+                  }
+              });
+      final List<String> res = new ArrayList<String>();
+      if( null != paths && paths.length() > 0 ) {
+          final StringTokenizer st = new StringTokenizer(paths, File.pathSeparator);
+          while (st.hasMoreTokens()) {
+              res.add(st.nextToken());
+          }
+      }
+      return res;
   }
 
   /** Opens the given native library, assuming it has the same base
-      name on all platforms, looking first in the system's search
-      path, and in the context of the specified ClassLoader, which is
-      used to help find the library in the case of e.g. Java Web Start.
+      name on all platforms.
+      <p>
+      The {@code searchSystemPath} argument changes the behavior to
+      either use the default system path or not at all.
+      </p>
+      <p>
+      Assuming {@code searchSystemPath} is {@code true},
+      the {@code searchSystemPathFirst} argument changes the behavior to first
+      search the default system path rather than searching it last.
+      </p>
+   * @param libName library name, with or without prefix and suffix
+   * @param searchSystemPath if {@code true} library shall be searched in the system path <i>(default)</i>, otherwise {@code false}.
+   * @param searchSystemPathFirst if {@code true} system path shall be searched <i>first</i> <i>(default)</i>, rather than searching it last.
+   *                              if {@code searchSystemPath} is {@code false} this argument is ignored.
+   * @param loader {@link ClassLoader} to locate the library
+   * @param global if {@code true} allows system wide access of the loaded library, otherwise access is restricted to the process.
+   * @return {@link NativeLibrary} instance or {@code null} if library could not be loaded.
    * @throws SecurityException if user is not granted access for the named library.
+   * @since 2.4.0
    */
-  public static final NativeLibrary open(final String libName, final ClassLoader loader, final boolean global) throws SecurityException {
-    return open(libName, libName, libName, true, loader, global);
+  public static final NativeLibrary open(final String libName,
+                                         final boolean searchSystemPath,
+                                         final boolean searchSystemPathFirst,
+                                         final ClassLoader loader, final boolean global) throws SecurityException {
+    return open(libName, libName, libName, searchSystemPath, searchSystemPathFirst, loader, global);
   }
 
   /** Opens the given native library, assuming it has the given base
@@ -163,7 +207,12 @@
       context of the specified ClassLoader, which is used to help find
       the library in the case of e.g. Java Web Start.
       <p>
-      The {@code searchSystemPathFirst} argument changes the behavior to first
+      The {@code searchSystemPath} argument changes the behavior to
+      either use the default system path or not at all.
+      </p>
+      <p>
+      Assuming {@code searchSystemPath} is {@code true},
+      the {@code searchSystemPathFirst} argument changes the behavior to first
       search the default system path rather than searching it last.
       </p>
       Note that we do not currently handle DSO versioning on Unix.
@@ -173,54 +222,31 @@
       ending in .so, for example .so.0), and in general if this
       dynamic loading facility is used correctly the version number
       will be irrelevant.
+   * @param windowsLibName windows library name, with or without prefix and suffix
+   * @param unixLibName unix library name, with or without prefix and suffix
+   * @param macOSXLibName mac-osx library name, with or without prefix and suffix
+   * @param searchSystemPath if {@code true} library shall be searched in the system path <i>(default)</i>, otherwise {@code false}.
+   * @param searchSystemPathFirst if {@code true} system path shall be searched <i>first</i> <i>(default)</i>, rather than searching it last.
+   *                              if {@code searchSystemPath} is {@code false} this argument is ignored.
+   * @param loader {@link ClassLoader} to locate the library
+   * @param global if {@code true} allows system wide access of the loaded library, otherwise access is restricted to the process.
+   * @return {@link NativeLibrary} instance or {@code null} if library could not be loaded.
    * @throws SecurityException if user is not granted access for the named library.
    */
   public static final NativeLibrary open(final String windowsLibName,
                                          final String unixLibName,
                                          final String macOSXLibName,
+                                         final boolean searchSystemPath,
                                          final boolean searchSystemPathFirst,
-                                         final ClassLoader loader) throws SecurityException {
-    return open(windowsLibName, unixLibName, macOSXLibName, searchSystemPathFirst, loader, true);
-  }
-
-  /**
-   * @throws SecurityException if user is not granted access for the named library.
-   */
-  public static final NativeLibrary open(final String windowsLibName,
-                                         final String unixLibName,
-                                         final String macOSXLibName,
-                                         final boolean searchSystemPathFirst,
-                                         final ClassLoader loader,
-                                         final boolean global) throws SecurityException {
+                                         final ClassLoader loader, final boolean global) throws SecurityException {
     final List<String> possiblePaths = enumerateLibraryPaths(windowsLibName,
                                                        unixLibName,
                                                        macOSXLibName,
-                                                       searchSystemPathFirst,
+                                                       searchSystemPath, searchSystemPathFirst,
                                                        loader);
-    Platform.initSingleton(); // loads native gluegen-rt library
-
-    final DynamicLinker dynLink;
-    switch (PlatformPropsImpl.OS_TYPE) {
-      case WINDOWS:
-        dynLink = new WindowsDynamicLinkerImpl();
-        break;
-
-      case MACOS:
-        dynLink = new MacOSXDynamicLinkerImpl();
-        break;
-
-      case ANDROID:
-        if( PlatformPropsImpl.CPU_ARCH.is32Bit ) {
-            dynLink = new BionicDynamicLinker32bitImpl();
-        } else {
-            dynLink = new BionicDynamicLinker64BitImpl();
-        }
-        break;
+    Platform.initSingleton(); // loads native gluegen_rt library
 
-      default:
-        dynLink = new PosixDynamicLinkerImpl();
-        break;
-    }
+    final DynamicLinker dynLink = getDynamicLinker();
 
     // Iterate down these and see which one if any we can actually find.
     for (final Iterator<String> iter = possiblePaths.iterator(); iter.hasNext(); ) {
@@ -299,7 +325,34 @@
     return dynLink.lookupSymbolGlobal(funcName);
   }
 
-  /* pp */ final DynamicLinker getDynamicLinker() { return dynLink; }
+  /* pp */ final DynamicLinker dynamicLinker() { return dynLink; }
+
+  /* pp */ static DynamicLinker getDynamicLinker() {
+      final DynamicLinker dynLink;
+      switch (PlatformPropsImpl.OS_TYPE) {
+          case WINDOWS:
+              dynLink = new WindowsDynamicLinkerImpl();
+              break;
+
+          case MACOS:
+          case IOS:
+              dynLink = new MacOSXDynamicLinkerImpl();
+              break;
+
+          case ANDROID:
+              if( PlatformPropsImpl.CPU_ARCH.is32Bit ) {
+                  dynLink = new BionicDynamicLinker32bitImpl();
+              } else {
+                  dynLink = new BionicDynamicLinker64BitImpl();
+              }
+              break;
+
+          default:
+              dynLink = new PosixDynamicLinkerImpl();
+              break;
+      }
+      return dynLink;
+  }
 
   /** Retrieves the low-level library handle from this NativeLibrary
       object. On the Windows platform this is an HMODULE, and on Unix
@@ -400,29 +453,44 @@
     final List<String> paths = new ArrayList<String>();
     final String libName = selectName(windowsLibName, unixLibName, macOSXLibName);
     if (libName == null) {
-      return paths;
+        if (DEBUG) {
+            System.err.println("NativeLibrary.enumerateLibraryPaths: empty, no libName selected");
+        }
+        return paths;
+    }
+    if (DEBUG) {
+        System.err.println("NativeLibrary.enumerateLibraryPaths: libName '"+libName+"'");
     }
 
     // Allow user's full path specification to override our building of paths
     final File file = new File(libName);
     if (file.isAbsolute()) {
         paths.add(libName);
+        if (DEBUG) {
+            System.err.println("NativeLibrary.enumerateLibraryPaths: done, absolute path found '"+libName+"'");
+        }
         return paths;
     }
 
     final String[] baseNames = buildNames(libName);
+    if (DEBUG) {
+        System.err.println("NativeLibrary.enumerateLibraryPaths: baseNames: "+Arrays.toString(baseNames));
+    }
 
     if( searchSystemPath && searchSystemPathFirst ) {
         // Add just the library names to use the OS's search algorithm
         for (int i = 0; i < baseNames.length; i++) {
+            if (DEBUG) {
+                System.err.println("NativeLibrary.enumerateLibraryPaths: add.ssp_1st: "+baseNames[i]);
+            }
             paths.add(baseNames[i]);
         }
         // Add probable Mac OS X-specific paths
         if ( isOSX ) {
             // Add historical location
-            addPaths("/Library/Frameworks/" + libName + ".Framework", baseNames, paths);
+            addAbsPaths("add.ssp_1st_macos_old", "/Library/Frameworks/" + libName + ".framework", baseNames, paths);
             // Add current location
-            addPaths("/System/Library/Frameworks/" + libName + ".Framework", baseNames, paths);
+            addAbsPaths("add.ssp_1st_macos_cur", "/System/Library/Frameworks/" + libName + ".framework", baseNames, paths);
         }
     }
 
@@ -430,12 +498,15 @@
     // from the LWJGL library
     final String clPath = findLibrary(libName, loader);
     if (clPath != null) {
-      paths.add(clPath);
+        if (DEBUG) {
+            System.err.println("NativeLibrary.enumerateLibraryPaths: add.clp: "+clPath);
+        }
+        paths.add(clPath);
     }
 
     // Add entries from java.library.path
     final String[] javaLibraryPaths =
-      AccessController.doPrivileged(new PrivilegedAction<String[]>() {
+      SecurityUtil.doPrivileged(new PrivilegedAction<String[]>() {
           @Override
           public String[] run() {
             int count = 0;
@@ -470,39 +541,44 @@
         for( int i=0; i < javaLibraryPaths.length; i++ ) {
             final StringTokenizer tokenizer = new StringTokenizer(javaLibraryPaths[i], File.pathSeparator);
             while (tokenizer.hasMoreTokens()) {
-                addPaths(tokenizer.nextToken(), baseNames, paths);
+                addRelPaths("add.java.library.path", tokenizer.nextToken(), baseNames, paths);
             }
         }
     }
 
     // Add current working directory
     final String userDir =
-      AccessController.doPrivileged(new PrivilegedAction<String>() {
+      SecurityUtil.doPrivileged(new PrivilegedAction<String>() {
           @Override
           public String run() {
             return System.getProperty("user.dir");
           }
         });
-    addPaths(userDir, baseNames, paths);
+    addAbsPaths("add.user.dir.std", userDir, baseNames, paths);
 
     // Add current working directory + natives/os-arch/ + library names
     // to handle Bug 1145 cc1 using an unpacked fat-jar
-    addPaths(userDir+File.separator+"natives"+File.separator+PlatformPropsImpl.os_and_arch+File.separator, baseNames, paths);
+    addAbsPaths("add.user.dir.fat", userDir+File.separator+"natives"+File.separator+PlatformPropsImpl.os_and_arch, baseNames, paths);
 
     if( searchSystemPath && !searchSystemPathFirst ) {
         // Add just the library names to use the OS's search algorithm
         for (int i = 0; i < baseNames.length; i++) {
+            if (DEBUG) {
+                System.err.println("NativeLibrary.enumerateLibraryPaths: add.ssp_lst: "+baseNames[i]);
+            }
             paths.add(baseNames[i]);
         }
         // Add probable Mac OS X-specific paths
         if ( isOSX ) {
             // Add historical location
-            addPaths("/Library/Frameworks/" + libName + ".Framework", baseNames, paths);
+            addAbsPaths("add.ssp_lst_macos_old", "/Library/Frameworks/" + libName + ".Framework", baseNames, paths);
             // Add current location
-            addPaths("/System/Library/Frameworks/" + libName + ".Framework", baseNames, paths);
+            addAbsPaths("add.ssp_lst_macos_cur", "/System/Library/Frameworks/" + libName + ".Framework", baseNames, paths);
         }
     }
-
+    if (DEBUG) {
+        System.err.println("NativeLibrary.enumerateLibraryPaths: done: "+paths.toString());
+    }
     return paths;
   }
 
@@ -515,6 +591,7 @@
         return windowsLibName;
 
       case MACOS:
+      case IOS:
         return macOSXLibName;
 
       default:
@@ -581,20 +658,40 @@
       return res;
   }
 
-  private static final void addPaths(final String path, final String[] baseNames, final List<String> paths) {
-    for (int j = 0; j < baseNames.length; j++) {
-      paths.add(path + File.separator + baseNames[j]);
-    }
+  private static final void addRelPaths(final String cause, final String path, final String[] baseNames, final List<String> paths) {
+      final String abs_path;
+      try {
+          final File fpath = new File(path);
+          abs_path = fpath.getCanonicalPath();
+      } catch( final IOException ioe ) {
+          if (DEBUG) {
+              System.err.println("NativeLibrary.enumerateLibraryPaths: "+cause+": Exception "+ioe.getMessage()+", from path "+path);
+          }
+          return;
+      }
+      addAbsPaths(cause, abs_path, baseNames, paths);
+  }
+  private static final void addAbsPaths(final String cause, final String abs_path, final String[] baseNames, final List<String> paths) {
+      for (int j = 0; j < baseNames.length; j++) {
+          final String p = abs_path + File.separator + baseNames[j];
+          if (DEBUG) {
+              System.err.println("NativeLibrary.enumerateLibraryPaths: "+cause+": "+p+", from path "+abs_path);
+          }
+          paths.add(p);
+      }
   }
 
   private static boolean initializedFindLibraryMethod = false;
   private static Method  findLibraryMethod = null;
   private static final String findLibraryImpl(final String libName, final ClassLoader loader) {
+    if( PlatformPropsImpl.JAVA_9 ) {
+        return null;
+    }
     if (loader == null) {
-      return null;
+        return null;
     }
     if (!initializedFindLibraryMethod) {
-      AccessController.doPrivileged(new PrivilegedAction<Object>() {
+      SecurityUtil.doPrivileged(new PrivilegedAction<Object>() {
           @Override
           public Object run() {
             try {
@@ -611,7 +708,7 @@
     }
     if (findLibraryMethod != null) {
       try {
-        return AccessController.doPrivileged(new PrivilegedAction<String>() {
+        return SecurityUtil.doPrivileged(new PrivilegedAction<String>() {
             @Override
             public String run() {
               try {
@@ -632,7 +729,7 @@
   }
   public static final String findLibrary(final String libName, final ClassLoader loader) {
     String res = null;
-    if(TempJarCache.isInitialized()) {
+    if( TempJarCache.isInitialized(true) ) {
         res = TempJarCache.findLibrary(libName);
         if (DEBUG) {
           System.err.println("NativeLibrary.findLibrary(<"+libName+">) (TempJarCache): "+res);
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/os/Platform.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/os/Platform.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/os/Platform.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/os/Platform.java	2023-02-01 18:52:41.000000000 +0100
@@ -28,7 +28,6 @@
 
 package com.jogamp.common.os;
 
-import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.concurrent.TimeUnit;
 
@@ -37,6 +36,7 @@
 import com.jogamp.common.util.JarUtil;
 import com.jogamp.common.util.PropertyAccess;
 import com.jogamp.common.util.ReflectionUtil;
+import com.jogamp.common.util.SecurityUtil;
 import com.jogamp.common.util.VersionNumber;
 import com.jogamp.common.util.cache.TempJarCache;
 
@@ -58,7 +58,7 @@
 public class Platform extends PlatformPropsImpl {
 
     public enum OSType {
-        LINUX, FREEBSD, ANDROID, MACOS, SUNOS, HPUX, WINDOWS, OPENKODE;
+        LINUX, FREEBSD, ANDROID, MACOS, SUNOS, HPUX, WINDOWS, OPENKODE, IOS;
     }
 
     public enum CPUFamily {
@@ -255,8 +255,11 @@
 
     private static final String useTempJarCachePropName = "jogamp.gluegen.UseTempJarCache";
 
-    /** fixed basename of JAR file and native library */
-    private static final String libBaseName = "gluegen-rt";
+    /**
+     * Fixed basename of JAR file and native library.
+     * Dash replaced by underscore to allow static linkage via JEP 178.
+     */
+    private static final String libBaseName = "gluegen_rt";
 
     //
     // static initialization order:
@@ -284,7 +287,7 @@
         final boolean[] _USE_TEMP_JAR_CACHE = new boolean[] { false };
         final boolean[] _AWT_AVAILABLE = new boolean[] { false };
 
-        AccessController.doPrivileged(new PrivilegedAction<Object>() {
+        SecurityUtil.doPrivileged(new PrivilegedAction<Object>() {
             @Override
             public Object run() {
 
@@ -302,11 +305,12 @@
                 }
                 _isRunningFromJarURL[0] = null != platformClassJarURI;
 
-                _USE_TEMP_JAR_CACHE[0] = ( OS_TYPE != OSType.ANDROID ) && ( null != platformClassJarURI ) &&
+                _USE_TEMP_JAR_CACHE[0] = ( OS_TYPE != OSType.ANDROID ) && ( OS_TYPE != OSType.IOS ) &&
+                                         ( null != platformClassJarURI ) &&
                                          PropertyAccess.getBooleanProperty(useTempJarCachePropName, true, true);
 
                 // load GluegenRT native library
-                if(_USE_TEMP_JAR_CACHE[0] && TempJarCache.initSingleton()) {
+                if(_USE_TEMP_JAR_CACHE[0] && TempJarCache.initSingleton() && TempJarCache.isInitialized(true) ) {
                     try {
                         JNILibLoaderBase.addNativeJarLibs(new Class<?>[] { jogamp.common.Debug.class }, null);
                     } catch (final Exception e0) {
@@ -317,7 +321,7 @@
                 DynamicLibraryBundle.GlueJNILibLoader.loadLibrary(libBaseName, false, cl);
 
                 // JVM bug workaround
-                JVMUtil.initSingleton(); // requires gluegen-rt, one-time init.
+                JVMUtil.initSingleton(); // requires gluegen_rt, one-time init.
 
                 // AWT Headless determination
                 if( !PropertyAccess.getBooleanProperty("java.awt.headless", true) &&
@@ -350,7 +354,7 @@
     }
 
     /**
-     * kick off static initialization of <i>platform property information</i> and <i>native gluegen-rt lib loading</i>
+     * kick off static initialization of <i>platform property information</i> and <i>native gluegen_rt lib loading</i>
      */
     public static void initSingleton() { }
 
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/util/ArrayHashSet.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/ArrayHashSet.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/util/ArrayHashSet.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/ArrayHashSet.java	2023-02-01 18:52:41.000000000 +0100
@@ -82,30 +82,6 @@
     private final boolean supportNullValue;
 
     /**
-     * @deprecated Use {@link #ArrayHashSet(boolean, int, float)}
-     */
-    public ArrayHashSet() {
-        this(true, DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR);
-    }
-
-    /**
-     * @param initialCapacity
-     * @deprecated Use {@link #ArrayHashSet(boolean, int, float)}
-     */
-    public ArrayHashSet(final int initialCapacity) {
-        this(true, initialCapacity, DEFAULT_LOAD_FACTOR);
-    }
-
-    /**
-     * @param initialCapacity
-     * @param loadFactor
-     * @deprecated Use {@link #ArrayHashSet(boolean, int, float)}
-     */
-    public ArrayHashSet(final int initialCapacity, final float loadFactor) {
-        this(true, initialCapacity, loadFactor);
-    }
-
-    /**
      *
      * @param supportNullValue Use {@code true} for default behavior, i.e. {@code null} can be a valid value.
      *                         Use {@code false} if {@code null} is not a valid value,
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/util/awt/AWTEDTExecutor.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/awt/AWTEDTExecutor.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/util/awt/AWTEDTExecutor.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/awt/AWTEDTExecutor.java	2023-02-01 18:52:41.000000000 +0100
@@ -48,17 +48,17 @@
         if(EventQueue.isDispatchThread()) {
             r.run();
         } else {
-          try {
-            if(wait) {
-                EventQueue.invokeAndWait(r);
-            } else {
-                EventQueue.invokeLater(r);
+            try {
+                if(wait) {
+                    EventQueue.invokeAndWait(r);
+                } else {
+                    EventQueue.invokeLater(r);
+                }
+            } catch (final InvocationTargetException e) {
+                throw new RuntimeException(e.getTargetException());
+            } catch (final InterruptedException e) {
+                throw new RuntimeException(e);
             }
-          } catch (final InvocationTargetException e) {
-            throw new RuntimeException(e.getTargetException());
-          } catch (final InterruptedException e) {
-            throw new RuntimeException(e);
-          }
         }
     }
 
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/util/Bitfield.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/Bitfield.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/util/Bitfield.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/Bitfield.java	2023-02-01 18:52:41.000000000 +0100
@@ -42,6 +42,14 @@
      */
     public static class Util {
         /**
+         * Maximum 32bit integer value being of {@link #isPowerOf2(int)}.
+         * <p>
+         * We rely on the JVM spec {@link Integer#SIZE} == 32.
+         * </p>
+         */
+        public static final int MAX_POWER_OF_2 = 1 << ( Integer.SIZE - 2 );
+
+        /**
          * Returns the 32 bit mask of n-bits, i.e. n low order 1?s.
          * <p>
          * Implementation handles n == 32.
@@ -67,6 +75,9 @@
          *   http://tekpool.wordpress.com/category/bit-count/
          *   http://www.hackersdelight.org/
          * </pre>
+         * <p>
+         * We rely on the JVM spec {@link Integer#SIZE} == 32.
+         * </p>
          */
         public static final int bitCount(int n) {
             // Note: Original used 'unsigned int',
@@ -87,6 +98,47 @@
             n = n + (n >>> 16);
             return n & 0x3f;
         }
+
+        /**
+         * Returns {@code true} if the given integer is a power of 2
+         * <p>
+         * Source: bithacks: http://www.graphics.stanford.edu/~seander/bithacks.html#DetermineIfPowerOf2
+         * </p>
+         */
+        public static final boolean isPowerOf2(final int n) {
+            return 0<n && 0 == (n & (n - 1));
+        }
+        /**
+         * Returns the next higher power of 2 of 32-bit of given {@code n}
+         * <p>
+         * Source: bithacks: http://www.graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2
+         * </p>
+         * <p>
+         * We rely on the JVM spec {@link Integer#SIZE} == 32.
+         * </p>
+         */
+        public static final int nextPowerOf2(int n) {
+            n--;
+            n |= n >>> 1;
+            n |= n >>> 2;
+            n |= n >>> 4;
+            n |= n >>> 8;
+            n |= n >>> 16;
+            return (n < 0) ? 1 : n + 1; // avoid edge case where n is 0, it would return 0, which isn't a power of 2
+        }
+        /**
+         * If the given {@code n} is not {@link #isPowerOf2(int)} return {@link #nextPowerOf2(int)},
+         * otherwise return {@code n} unchanged.
+         * <pre>
+         * return isPowerOf2(n) ? n : nextPowerOf2(n);
+         * </pre>
+         * <p>
+         * We rely on the JVM spec {@link Integer#SIZE} == 32.
+         * </p>
+         */
+        public static final int roundToPowerOf2(final int n) {
+            return isPowerOf2(n) ? n : nextPowerOf2(n);
+        }
     }
     /**
      * Simple {@link Bitfield} factory for returning the efficient implementation.
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/util/Bitstream.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/Bitstream.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/util/Bitstream.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/Bitstream.java	2023-02-01 18:52:41.000000000 +0100
@@ -33,6 +33,7 @@
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.nio.ByteBuffer;
+import java.util.Locale;
 
 import jogamp.common.Debug;
 
@@ -1507,7 +1508,7 @@
             mode = outputMode ? "output" : "input";
             bpos = bytes.position();
         }
-        return String.format("%s, pos %d [byteP %d, bitCnt %d], bitbuf %s",
+        return String.format((Locale)null, "%s, pos %d [byteP %d, bitCnt %d], bitbuf %s",
                 mode, position(), bpos, bitCount, toHexBinString(true, bitBuffer, 8));
     }
 
@@ -1531,7 +1532,7 @@
     }
     public static String toHexBinString(final boolean msbFirst, final int v, final int bitCount) {
         final int nibbles = 0 == bitCount ? 2 : ( bitCount + 3 ) / 4;
-        return String.format("[0x%0"+nibbles+"X, msbFirst %b, %s]", v, msbFirst, toBinString(msbFirst, v, bitCount));
+        return String.format((Locale)null, "[0x%0"+nibbles+"X, msbFirst %b, %s]", v, msbFirst, toBinString(msbFirst, v, bitCount));
     }
     public static final String toHexBinString(final boolean msbFirst, final byte[] data, final int offset, final int len) {
         final StringBuilder sb = new StringBuilder();
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/util/cache/TempCacheReg.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/cache/TempCacheReg.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/util/cache/TempCacheReg.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/cache/TempCacheReg.java	2023-02-01 18:52:41.000000000 +0100
@@ -31,7 +31,11 @@
     public static boolean isTempFileCacheUsed() {
         return null != System.getProperty(TempFileCache.tmpRootPropName);
     }
-    public static boolean isTempJarCacheUsed() {
-        return TempJarCache.isInitialized();
+    /**
+     * @param forExecutables if {@code true}, method also tests whether {@link TempJarCache}'s underlying cache is suitable to load native libraries or launch executables
+     * @return true if {@link TempJarCache} has been properly initialized, ie. is in use. Otherwise returns false.
+     */
+    public static boolean isTempJarCacheUsed(final boolean forExecutables) {
+        return TempJarCache.isInitialized(forExecutables);
     }
 }
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/util/cache/TempFileCache.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/cache/TempFileCache.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/util/cache/TempFileCache.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/cache/TempFileCache.java	2023-02-01 18:52:41.000000000 +0100
@@ -45,6 +45,9 @@
     // Flag indicating that we got a fatal error in the static initializer.
     private static boolean staticInitError = false;
 
+    // Flag indicating that the temp root folder can be used for executable files
+    private static boolean staticTempIsExecutable = true;
+
     private static final String tmpDirPrefix = "file_cache";
 
     // Lifecycle: For one user's JVMs, ClassLoader and time.
@@ -80,10 +83,19 @@
             try {
                 _tmpBaseDir = new File(IOUtil.getTempDir(true /* executable */), tmpDirPrefix);
                 _tmpBaseDir = IOUtil.testDir(_tmpBaseDir, true /* create */, false /* executable */); // executable already checked
+                staticTempIsExecutable = true;
             } catch (final Exception ex) {
                 System.err.println("Warning: Caught Exception while retrieving executable temp base directory:");
                 ex.printStackTrace();
-                staticInitError = true;
+                staticTempIsExecutable = false;
+                try {
+                    _tmpBaseDir = new File(IOUtil.getTempDir(false /* executable */), tmpDirPrefix);
+                    _tmpBaseDir = IOUtil.testDir(_tmpBaseDir, true /* create */, false /* executable */);
+                } catch (final Exception ex2) {
+                    System.err.println("Warning: Caught Exception while retrieving non-executable temp base directory:");
+                    ex2.printStackTrace();
+                    staticInitError = true;
+                }
             }
             tmpBaseDir = _tmpBaseDir;
 
@@ -92,7 +104,7 @@
                 System.err.println("TempFileCache: Static Initialization ---------------------------------------------- OK: "+(!staticInitError));
                 System.err.println("TempFileCache: Thread: "+Thread.currentThread().getName()+
                         ", CL 0x"+Integer.toHexString(TempFileCache.class.getClassLoader().hashCode())+
-                        ", tempBaseDir "+tmpBaseDirAbsPath);
+                        ", tempBaseDir "+tmpBaseDirAbsPath+", executable "+staticTempIsExecutable);
             }
 
             if(!staticInitError) {
@@ -102,6 +114,7 @@
                     System.err.println("Warning: Caught Exception due to initializing TmpRoot:");
                     ex.printStackTrace();
                     staticInitError = true;
+                    staticTempIsExecutable = false;
                 }
             }
             if (DEBUG) {
@@ -414,7 +427,7 @@
         path.delete();
     }
 
-    /** Create the <code>individualTmpDir</code>. */
+    /** Create the {@link #getTempDir()} */
     public TempFileCache () {
         if (DEBUG) {
             System.err.println("TempFileCache: new TempFileCache() --------------------- (static ok: "+(!staticInitError)+")");
@@ -434,7 +447,7 @@
         }
     }
 
-    /** Delete the <code>individualTmpDir</code> recursively and remove it's reference. */
+    /** Delete the {@link #getTempDir()} recursively and remove it's reference. */
     public void destroy() {
         if (DEBUG) {
             System.err.println("TempFileCache: destroy() --------------------- (static ok: "+(!staticInitError)+")");
@@ -454,15 +467,20 @@
     }
 
     /**
-     * @return true is static and object initialization was successful
+     * @param forExecutables if {@code true}, method also tests whether the underlying {@link #getBaseDir()} is suitable to load native libraries or launch executables
+     * @return true if static and object initialization was successful
+     * @see #isTempExecutable()
+     * @see #isValid()
      */
-    public boolean isValid() { return !staticInitError && !initError; }
+    public boolean isValid(final boolean forExecutables) {
+        return !staticInitError && !initError && ( !forExecutables || staticTempIsExecutable );
+    }
 
     /**
-     * Base temp directory used by TempFileCache.
+     * Base temp directory used by {@link TempFileCache}.
      *
      * <p>
-     * Lifecycle: For one user's JVMs, ClassLoader and time.
+     * Lifecycle: For one user's concurrently running JVMs and ClassLoader
      * </p>
      *
      * This is set to:
@@ -472,11 +490,14 @@
      *
      * @return
      */
-    public File getBaseDir() { return tmpBaseDir; }
+    public static File getBaseDir() { return tmpBaseDir; }
 
     /**
      * Root temp directory for this JVM instance. Used to store individual
      * directories.
+     * <p>
+     * This directory is a sub-folder to {@link #getBaseDir()}.
+     * </p>
      *
      * <p>
      * Lifecycle: For one user's concurrently running JVMs and ClassLoader
@@ -498,15 +519,19 @@
      *
      * @return
      */
-    public File getRootDir() { return tmpRootDir; }
+    public static File getRootDir() { return tmpRootDir; }
 
     /**
      * Temporary directory for individual files (eg. native libraries of one ClassLoader instance).
-     * The directory name is:
+     * <p>
+     * This directory is a sub-folder to {@link #getRootDir()}.
+     * </p>
      *
      * <p>
-     * Lifecycle: Within each JVM .. use case dependent, ie. per ClassLoader
+     * Lifecycle: Within each JVM .. use case dependent, ie. per ClassLoader <b>and</b> per {@link TempFileCache} instance!
      * </p>
+     * <p>
+     * The directory name is:
      *
      * <pre>
      *   tmpRootDir/jlnMMMMM
@@ -514,7 +539,7 @@
      *
      * where jlnMMMMM is the unique filename created by File.createTempFile()
      * without the ".tmp" extension.
-     *
+     * </p>
      *
      * @return
      */
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/util/cache/TempJarCache.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/cache/TempJarCache.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/util/cache/TempJarCache.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/cache/TempJarCache.java	2023-02-01 18:52:41.000000000 +0100
@@ -37,11 +37,18 @@
 
 import jogamp.common.Debug;
 
+import com.jogamp.common.JogampRuntimeException;
 import com.jogamp.common.net.Uri;
 import com.jogamp.common.os.NativeLibrary;
 import com.jogamp.common.util.JarUtil;
 import com.jogamp.common.util.SecurityUtil;
 
+/**
+ * Static Jar file cache handler using an underlying instance of {@link TempFileCache}, see {@link #getTempFileCache()}.
+ * <p>
+ * Lifecycle: Concurrently running JVMs and ClassLoader
+ * </p>
+ */
 public class TempJarCache {
     private static final boolean DEBUG = Debug.debug("TempJarCache");
 
@@ -74,6 +81,7 @@
     private static TempFileCache tmpFileCache;
 
     private static volatile boolean staticInitError = false;
+    private static volatile boolean staticTempIsExecutable = true;
     private static volatile boolean isInit = false;
 
     /**
@@ -89,7 +97,8 @@
 
                     if(!staticInitError) {
                         tmpFileCache = new TempFileCache();
-                        staticInitError = !tmpFileCache.isValid();
+                        staticInitError = !tmpFileCache.isValid(false);
+                        staticTempIsExecutable = tmpFileCache.isValid(true);
                     }
 
                     if(!staticInitError) {
@@ -102,7 +111,7 @@
                     if(DEBUG) {
                         final File tempDir = null != tmpFileCache ? tmpFileCache.getTempDir() : null;
                         final String tempDirAbsPath = null != tempDir ? tempDir.getAbsolutePath() : null;
-                        System.err.println("TempJarCache.initSingleton(): ok "+(false==staticInitError)+", "+ tempDirAbsPath);
+                        System.err.println("TempJarCache.initSingleton(): ok "+(false==staticInitError)+", "+ tempDirAbsPath+", executable "+staticTempIsExecutable);
                     }
                     isInit = true;
                 }
@@ -163,44 +172,77 @@
     }
 
     /**
-     * @return true if this class has been properly initialized, ie. is in use, otherwise false.
+     * @param forExecutables if {@code true}, method also tests whether the underlying cache is suitable to load native libraries or launch executables
+     * @return true if this class has been properly initialized, ie. is in use. Otherwise returns false.
      */
-    public static boolean isInitialized() {
-        return isInitializedImpl() && !staticInitError;
+    public static boolean isInitialized(final boolean forExecutables) {
+        return isInitializedImpl() && !staticInitError && ( !forExecutables || staticTempIsExecutable );
     }
 
-    /* package */ static void checkInitialized() {
+    /**
+     * @param forExecutables if {@code true}, method also tests whether the underlying cache is suitable to load native libraries or launch executables
+     */
+    /* package */ static void checkInitialized(final boolean forExecutables) {
         if(!isInitializedImpl()) {
-            throw new RuntimeException("initSingleton() has to be called first.");
+            throw new JogampRuntimeException("initSingleton() has to be called first.");
         }
         if(staticInitError) {
-            throw new RuntimeException("initSingleton() failed.");
+            throw new JogampRuntimeException("initSingleton() failed.");
+        }
+        if( forExecutables && !staticTempIsExecutable ) {
+            throw new JogampRuntimeException("TempJarCache folder not suitable for executables");
         }
     }
 
+    /**
+     * @return the underlying {@link TempFileCache}
+     * @throws JogampRuntimeException if not {@link #isInitialized(boolean) isInitialized(false)}
+     */
     public static TempFileCache getTempFileCache() {
-        checkInitialized();
+        checkInitialized(false);
         return tmpFileCache;
     }
 
+    /**
+     * @param jarUri
+     * @param exp
+     * @return
+     * @throws IOException
+     * @throws JogampRuntimeException if not {@link #isInitialized(boolean) isInitialized(false)}
+     */
     public synchronized static boolean checkNativeLibs(final Uri jarUri, final LoadState exp) throws IOException {
-        checkInitialized();
+        checkInitialized(false);
         if(null == jarUri) {
             throw new IllegalArgumentException("jarUri is null");
         }
         return testLoadState(nativeLibJars.get(jarUri), exp);
     }
 
+    /**
+     * @param jarUri
+     * @param exp
+     * @return
+     * @throws IOException
+     * @throws JogampRuntimeException if not {@link #isInitialized(boolean) isInitialized(false)}
+     */
     public synchronized static boolean checkClasses(final Uri jarUri, final LoadState exp) throws IOException {
-        checkInitialized();
+        checkInitialized(false);
         if(null == jarUri) {
             throw new IllegalArgumentException("jarUri is null");
         }
         return testLoadState(classFileJars.get(jarUri), exp);
     }
 
+    /**
+     *
+     * @param jarUri
+     * @param exp
+     * @return
+     * @throws IOException
+     * @throws JogampRuntimeException if not {@link #isInitialized(boolean) isInitialized(false)}
+     */
     public synchronized static boolean checkResources(final Uri jarUri, final LoadState exp) throws IOException {
-        checkInitialized();
+        checkInitialized(false);
         if(null == jarUri) {
             throw new IllegalArgumentException("jarUri is null");
         }
@@ -218,9 +260,10 @@
      * @throws SecurityException
      * @throws URISyntaxException
      * @throws IllegalArgumentException
+     * @throws JogampRuntimeException if not {@link #isInitialized(boolean) isInitialized(true)}
      */
     public synchronized static final boolean addNativeLibs(final Class<?> certClass, final Uri jarUri, final String nativeLibraryPath) throws IOException, SecurityException, IllegalArgumentException, URISyntaxException {
-        checkInitialized();
+        checkInitialized(true);
         final LoadState nativeLibJarsLS = nativeLibJars.get(jarUri);
         if( !testLoadState(nativeLibJarsLS, LoadState.LOOKED_UP) ) {
             nativeLibJars.put(jarUri, LoadState.LOOKED_UP);
@@ -253,9 +296,10 @@
      * @throws SecurityException
      * @throws URISyntaxException
      * @throws IllegalArgumentException
+     * @throws JogampRuntimeException if not {@link #isInitialized(boolean) isInitialized(false)}
      */
     public synchronized static final void addClasses(final Class<?> certClass, final Uri jarUri) throws IOException, SecurityException, IllegalArgumentException, URISyntaxException {
-        checkInitialized();
+        checkInitialized(false);
         final LoadState classFileJarsLS = classFileJars.get(jarUri);
         if( !testLoadState(classFileJarsLS, LoadState.LOOKED_UP) ) {
             classFileJars.put(jarUri, LoadState.LOOKED_UP);
@@ -273,19 +317,6 @@
     }
 
     /**
-     * See {@link #addResources(Class, Uri)}
-     * @param certClass
-     * @param jarURI
-     * @throws IOException
-     * @throws SecurityException
-     * @throws IllegalArgumentException
-     * @throws URISyntaxException
-     * @deprecated Use {@link #addResources(Class, Uri)}
-     */
-    public synchronized static final void addResources(final Class<?> certClass, final java.net.URI jarURI) throws IOException, SecurityException, IllegalArgumentException, URISyntaxException {
-        addResources(certClass, Uri.valueOf(jarURI));
-    }
-    /**
      * Adds native resources, if not yet added.
      *
      * @param certClass if class is certified, the JarFile entries needs to have the same certificate
@@ -295,9 +326,10 @@
      * @throws SecurityException
      * @throws URISyntaxException
      * @throws IllegalArgumentException
+     * @throws JogampRuntimeException if not {@link #isInitialized(boolean) isInitialized(false)}
      */
     public synchronized static final void addResources(final Class<?> certClass, final Uri jarUri) throws IOException, SecurityException, IllegalArgumentException, URISyntaxException {
-        checkInitialized();
+        checkInitialized(false);
         final LoadState resourceFileJarsLS = resourceFileJars.get(jarUri);
         if( !testLoadState(resourceFileJarsLS, LoadState.LOOKED_UP) ) {
             resourceFileJars.put(jarUri, LoadState.LOOKED_UP);
@@ -327,9 +359,10 @@
      * @throws SecurityException
      * @throws URISyntaxException
      * @throws IllegalArgumentException
+     * @throws JogampRuntimeException if not {@link #isInitialized(boolean) isInitialized(false)}
      */
     public synchronized static final void addAll(final Class<?> certClass, final Uri jarUri) throws IOException, SecurityException, IllegalArgumentException, URISyntaxException {
-        checkInitialized();
+        checkInitialized(false);
         if(null == jarUri) {
             throw new IllegalArgumentException("jarUri is null");
         }
@@ -340,7 +373,7 @@
             !testLoadState(classFileJarsLS, LoadState.LOOKED_UP) ||
             !testLoadState(resourceFileJarsLS, LoadState.LOOKED_UP) ) {
 
-            final boolean extractNativeLibraries = !testLoadState(nativeLibJarsLS, LoadState.LOADED);
+            final boolean extractNativeLibraries = staticTempIsExecutable && !testLoadState(nativeLibJarsLS, LoadState.LOADED);
             final boolean extractClassFiles = !testLoadState(classFileJarsLS, LoadState.LOADED);
             final boolean extractOtherFiles = !testLoadState(resourceFileJarsLS, LoadState.LOOKED_UP);
 
@@ -380,8 +413,18 @@
         }
     }
 
+    /**
+     * If {@link #isInitialized(boolean) isInitialized(true)} is false due to lack of executable support only,
+     * this method always returns false.
+     * @param libName
+     * @return the found native library path within this cache or null if not found
+     * @throws JogampRuntimeException if not {@link #isInitialized(boolean) isInitialized(false)}
+     */
     public synchronized static final String findLibrary(final String libName) {
-        checkInitialized();
+        checkInitialized(false);
+        if( !staticTempIsExecutable ) {
+            return null;
+        }
         // try with mapped library basename first
         String path = nativeLibMap.get(libName);
         if(null == path) {
@@ -411,9 +454,14 @@
         return null;
     } */
 
-    /** Similar to {@link ClassLoader#getResource(String)}. */
+    /**
+     * Similar to {@link ClassLoader#getResource(String)}.
+     * @param name
+     * @return
+     * @throws JogampRuntimeException if not {@link #isInitialized(boolean) isInitialized(false)}
+     */
     public synchronized static final String findResource(final String name) {
-        checkInitialized();
+        checkInitialized(false);
         final File f = new File(tmpFileCache.getTempDir(), name);
         if(f.exists()) {
             return f.getAbsolutePath();
@@ -422,16 +470,14 @@
     }
 
     /**
-     * See {@link #getResourceUri(String)}
-     * @deprecated Use {@link #getResourceUri(String)}
+     * Similar to {@link ClassLoader#getResource(String)}.
+     * @param name
+     * @return
+     * @throws URISyntaxException
+     * @throws JogampRuntimeException if not {@link #isInitialized(boolean) isInitialized(false)}
      */
-    public synchronized static final java.net.URI getResource(final String name) throws URISyntaxException {
-        return getResourceUri(name).toURI();
-    }
-
-    /** Similar to {@link ClassLoader#getResource(String)}. */
     public synchronized static final Uri getResourceUri(final String name) throws URISyntaxException {
-        checkInitialized();
+        checkInitialized(false);
         final File f = new File(tmpFileCache.getTempDir(), name);
         if(f.exists()) {
             return Uri.valueOf(f);
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/util/FunctionTask.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/FunctionTask.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/util/FunctionTask.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/FunctionTask.java	2023-02-01 18:52:41.000000000 +0100
@@ -42,10 +42,21 @@
     protected A[] args;
 
     /**
-     * @deprecated Simply invoke {@link Function#eval(Object...)}
+     * Invokes <code>func</code> on the current {@link Thread}.
+     * <p>
+     * The result can be retrieved via {@link FunctionTask#getResult()},
+     * using the returned instance.
+     * </p>
+     * @param func the {@link Function} to execute.
+     * @param args the {@link Function} arguments
+     * @return the newly created and invoked {@link FunctionTask}
+     * @since 2.4.0
      */
-    public static <U,V> U invoke(final boolean waitUntilDone, final Function<U,V> func, final V... args) {
-        return func.eval(args);
+    public static <U,V> FunctionTask<U,V> invokeOnCurrentThread(final Function<U,V> func, final V... args) {
+        final FunctionTask<U,V> rt = new FunctionTask<U,V>( func, null, false, null);
+        rt.args = args;
+        rt.run();
+        return rt;
     }
 
     /**
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/util/IntBitfield.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/IntBitfield.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/util/IntBitfield.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/IntBitfield.java	1970-01-01 01:00:00.000000000 +0100
@@ -1,162 +0,0 @@
-/**
- * Copyright 2012 JogAmp Community. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- *    1. Redistributions of source code must retain the above copyright notice, this list of
- *       conditions and the following disclaimer.
- *
- *    2. Redistributions in binary form must reproduce the above copyright notice, this list
- *       of conditions and the following disclaimer in the documentation and/or other materials
- *       provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * The views and conclusions contained in the software and documentation are those of the
- * authors and should not be interpreted as representing official policies, either expressed
- * or implied, of JogAmp Community.
- */
-package com.jogamp.common.util;
-
-/**
- * @deprecated Use {@link Bitfield} implementations via {@link Bitfield.Factory#create(int)}.
- * <p>
- * Simple bitfield holder class using an int[] storage.
- * </p>
- * <p>
- * IntBitfield allows convenient access of a wide field of transient bits using efficient storage in O(1).
- * </p>
- * <p>
- * It can be used e.g. to map key-codes to pressed-state etc.
- * </p>
- */
-public class IntBitfield {
-    /** Unit size in bits, here 32 bits for one int unit. */
-    public static final int UNIT_SIZE = 32;
-
-    private static final long UNIT_SHIFT_L = 5L;
-    private static final int UNIT_SHIFT_I = 5;
-
-    private final int[] storage;
-    private final long bitsCountL;
-    private final int bitsCountI;
-
-    /**
-     * @param bitCount
-     */
-    public IntBitfield(final long bitCount) {
-        final int units = (int) Math.max(1L, ( bitCount + 31L ) >>> UNIT_SHIFT_L);
-        this.storage = new int[units];
-        this.bitsCountL = (long)units << UNIT_SHIFT_L ;
-        this.bitsCountI = bitsCountL > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int)bitsCountL;
-    }
-
-    /**
-     * @param bitCount
-     */
-    public IntBitfield(final int bitCount) {
-        final int units = Math.max(1, ( bitCount + 31 ) >>> UNIT_SHIFT_I);
-        this.storage = new int[units];
-        this.bitsCountI = units << UNIT_SHIFT_I;
-        this.bitsCountL = bitsCountI;
-    }
-
-    private final void check(final long bitnum) {
-        if( 0 > bitnum || bitnum >= bitsCountL ) {
-            throw new ArrayIndexOutOfBoundsException("Bitnum should be within [0.."+(bitsCountL-1)+"], but is "+bitnum);
-        }
-    }
-    private final void check(final int bitnum) {
-        if( 0 > bitnum || bitnum >= bitsCountI ) {
-            throw new ArrayIndexOutOfBoundsException("Bitnum should be within [0.."+(bitsCountI-1)+"], but is "+bitnum);
-        }
-    }
-
-    /** Return the capacity of this bit field, i.e. the number of bits stored int this field. */
-    public final long capacity() { return bitsCountL; }
-
-    /** Return <code>true</code> if the bit at position <code>bitnum</code> is set, otherwise <code>false</code>. */
-    public final boolean get(final long bitnum) {
-        check(bitnum);
-        final int u = (int) ( bitnum >>> UNIT_SHIFT_L );
-        final int b = (int) ( bitnum - ( (long)u << UNIT_SHIFT_L ) );
-        return 0 != ( storage[u] & ( 1 << b ) ) ;
-    }
-
-    /** Return <code>true</code> if the bit at position <code>bitnum</code> is set, otherwise <code>false</code>. */
-    public final boolean get(final int bitnum) {
-        check(bitnum);
-        final int u = bitnum >>> UNIT_SHIFT_I;
-        final int b = bitnum - ( u << UNIT_SHIFT_I );
-        return 0 != ( storage[u] & ( 1 << b ) ) ;
-    }
-
-    /**
-     * Set or clear the bit at position <code>bitnum</code> according to <code>bit</code>
-     * and return the previous value.
-     */
-    public final boolean put(final long bitnum, final boolean bit) {
-        check(bitnum);
-        final int u = (int) ( bitnum >>> UNIT_SHIFT_L );
-        final int b = (int) ( bitnum - ( (long)u << UNIT_SHIFT_L ) );
-        final int m = 1 << b;
-        final boolean prev = 0 != ( storage[u] & m ) ;
-        if( prev != bit ) {
-            if( bit ) {
-                storage[u] |=  m;
-            } else {
-                storage[u] &= ~m;
-            }
-        }
-        return prev;
-    }
-
-    /**
-     * Set or clear the bit at position <code>bitnum</code> according to <code>bit</code>
-     * and return the previous value.
-     */
-    public final boolean put(final int bitnum, final boolean bit) {
-        check(bitnum);
-        final int u = bitnum >>> UNIT_SHIFT_I;
-        final int b = bitnum - ( u << UNIT_SHIFT_I );
-        final int m = 1 << b;
-        final boolean prev = 0 != ( storage[u] & m ) ;
-        if( prev != bit ) {
-            if( bit ) {
-                storage[u] |=  m;
-            } else {
-                storage[u] &= ~m;
-            }
-        }
-        return prev;
-    }
-    /**
-     * @deprecated Use {@link Bitfield.Util#bitCount(int)}.
-     */
-    public static final int getBitCount(final int n) {
-        return Bitfield.Util.bitCount(n);
-    }
-
-    /**
-     * Returns the number of set bits within this bitfield.
-     * <p>
-     * Utilizes {#link {@link #getBitCount(int)}}.
-     * </p>
-     */
-    public long getBitCount() {
-        long c = 0;
-        for(int i = storage.length-1; i>=0; i--) {
-            c += Bitfield.Util.bitCount(storage[i]);
-        }
-        return c;
-    }
-}
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/util/IntIntHashMap.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/IntIntHashMap.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/util/IntIntHashMap.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/IntIntHashMap.java	2023-02-01 18:52:41.000000000 +0100
@@ -34,7 +34,6 @@
 import com.jogamp.common.JogampRuntimeException;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
-import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -84,7 +83,7 @@
         isPrimitive = valueClazz.isPrimitive();
 
         if(!isPrimitive) {
-            final EntryCM cm = AccessController.doPrivileged(new PrivilegedAction<EntryCM>() {
+            final EntryCM cm = SecurityUtil.doPrivileged(new PrivilegedAction<EntryCM>() {
                 @Override
                 @SuppressWarnings("unchecked")
                 public EntryCM run() {
@@ -502,7 +501,7 @@
 
     private static Method getCloneMethod(final Object obj) {
         final Class<?> clazz = obj.getClass();
-        return AccessController.doPrivileged(new PrivilegedAction<Method>() {
+        return SecurityUtil.doPrivileged(new PrivilegedAction<Method>() {
                 @Override
                 public Method run() {
                     try {
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/util/IOUtil.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/IOUtil.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/util/IOUtil.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/IOUtil.java	2023-02-01 18:52:41.000000000 +0100
@@ -43,10 +43,15 @@
 import java.io.SyncFailedException;
 import java.lang.ref.WeakReference;
 import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
 import java.net.URISyntaxException;
 import java.net.URL;
 import java.net.URLConnection;
 import java.nio.ByteBuffer;
+import java.security.PrivilegedAction;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
 import java.util.regex.Pattern;
 
 import jogamp.common.Debug;
@@ -54,6 +59,7 @@
 import jogamp.common.os.PlatformPropsImpl;
 
 import com.jogamp.common.ExceptionUtils;
+import com.jogamp.common.JogampRuntimeException;
 import com.jogamp.common.net.AssetURLContext;
 import com.jogamp.common.net.Uri;
 import com.jogamp.common.nio.Buffers;
@@ -65,14 +71,56 @@
     private static final boolean DEBUG_EXE;
     private static final boolean DEBUG_EXE_NOSTREAM;
     private static final boolean DEBUG_EXE_EXISTING_FILE;
+    private static final boolean testTempDirExec;
+    private static final Method fileToPathGetter;
+    private static final Method isExecutableQuery;
+    private static final boolean useNativeExeFile;
 
     static {
-        Debug.initSingleton();
-        DEBUG = Debug.debug("IOUtil");
-        DEBUG_EXE = PropertyAccess.isPropertyDefined("jogamp.debug.IOUtil.Exe", true);
-        DEBUG_EXE_NOSTREAM = PropertyAccess.isPropertyDefined("jogamp.debug.IOUtil.Exe.NoStream", true);
-        // For security reasons, we have to hardcode this, i.e. disable this manual debug feature!
-        DEBUG_EXE_EXISTING_FILE = false; // PropertyAccess.isPropertyDefined("jogamp.debug.IOUtil.Exe.ExistingFile", true);
+        final boolean _props[] = { false, false, false, false, false, false };
+        final Method[] res = SecurityUtil.doPrivileged(new PrivilegedAction<Method[]>() {
+            @Override
+            public Method[] run() {
+                final Method[] res = new Method[] { null, null };
+                try {
+                    int i=0;
+                    _props[i++] = Debug.debug("IOUtil");
+                    _props[i++] = PropertyAccess.isPropertyDefined("jogamp.debug.IOUtil.Exe", true);
+                    _props[i++] =  PropertyAccess.isPropertyDefined("jogamp.debug.IOUtil.Exe.NoStream", true);
+                    // For security reasons, we have to hardcode this, i.e. disable this manual debug feature!
+                    _props[i++] = false; // PropertyAccess.isPropertyDefined("jogamp.debug.IOUtil.Exe.ExistingFile", true);
+                    _props[i++] = PropertyAccess.getBooleanProperty("jogamp.gluegen.TestTempDirExec", true, true);
+                    _props[i++] = PropertyAccess.getBooleanProperty("jogamp.gluegen.UseNativeExeFile", true, false);
+
+                    // Java 1.7
+                    i=0;
+                    res[i] = File.class.getDeclaredMethod("toPath");
+                    res[i++].setAccessible(true);
+                    final Class<?> nioPathClz = ReflectionUtil.getClass("java.nio.file.Path", false, IOUtil.class.getClassLoader());
+                    final Class<?> nioFilesClz = ReflectionUtil.getClass("java.nio.file.Files", false, IOUtil.class.getClassLoader());
+                    res[i] = nioFilesClz.getDeclaredMethod("isExecutable", nioPathClz);
+                    res[i++].setAccessible(true);
+                } catch (final Throwable t) {
+                    if(_props[0]) {
+                        ExceptionUtils.dumpThrowable("ioutil-init", t);
+                    }
+                }
+                return res;
+            }
+        });
+        {
+            int i=0;
+            DEBUG = _props[i++];
+            DEBUG_EXE = _props[i++];
+            DEBUG_EXE_NOSTREAM = _props[i++];
+            DEBUG_EXE_EXISTING_FILE = _props[i++];
+            testTempDirExec = _props[i++];
+            useNativeExeFile = _props[i++];
+
+            i=0;
+            fileToPathGetter = res[i++];
+            isExecutableQuery = res[i++];
+        }
     }
 
     /** Std. temporary directory property key <code>java.io.tmpdir</code>. */
@@ -454,14 +502,6 @@
         public final int resourceCount() { return resourcePaths.length; }
 
         /**
-         * @param contextCL class instance to {@link #resolve(int)} {@link #resourcePaths}.
-         * @param resourcePaths array of strings denominating multiple resource paths. None shall be null.
-         * @deprecated Use {@link #IOUtil(String[], ClassLoader, Class)} for clarity!
-         */
-        public ClassResources(final Class<?> contextCL, final String[] resourcePaths) {
-            this(resourcePaths, contextCL.getClassLoader(), contextCL);
-        }
-        /**
          * @param resourcePaths multiple relative or absolute resource locations
          * @param classLoader optional {@link ClassLoader}, see {@link IOUtil#getResource(String, ClassLoader, Class)}
          * @param relContext optional relative context, see {@link IOUtil#getResource(String, ClassLoader, Class)}
@@ -490,30 +530,6 @@
     /**
      * Locating a resource using {@link #getResource(String, ClassLoader)}:
      * <ul>
-     *   <li><i>relative</i>: <code>context</code>'s package name-path plus <code>resourcePath</code> via <code>context</code>'s ClassLoader.
-     *       This allows locations relative to JAR- and other URLs.
-     *       The <code>resourcePath</code> may start with <code>../</code> to navigate to parent folder.
-     *       This attempt is skipped if {@code context} is {@code null}.</li>
-     *   <li><i>absolute</i>: <code>resourcePath</code> as is via <code>context</code>'s ClassLoader.
-     *       In case {@code context} is {@code null}, this class {@link ClassLoader} is being used.</li>
-     * </ul>
-     * <p>
-     * Returns the resolved and open URLConnection or null if not found.
-     * </p>
-     *
-     * @see #getResource(String, ClassLoader)
-     * @see ClassLoader#getResource(String)
-     * @see ClassLoader#getSystemResource(String)
-     * @deprecated Use {@link IOUtil#getResource(String, ClassLoader, Class)} for clarity!
-     */
-    public static URLConnection getResource(final Class<?> context, final String resourcePath) {
-        final ClassLoader contextCL = null != context ? context.getClassLoader() : IOUtil.class.getClassLoader();
-        return getResource(resourcePath, contextCL, context);
-    }
-
-    /**
-     * Locating a resource using {@link #getResource(String, ClassLoader)}:
-     * <ul>
      *   <li><i>relative</i>: <code>relContext</code>'s package name-path plus <code>resourcePath</code> via <code>classLoader</code>.
      *       This allows locations relative to JAR- and other URLs.
      *       The <code>resourcePath</code> may start with <code>../</code> to navigate to parent folder.
@@ -740,7 +756,7 @@
     private static String getExeTestFileSuffix() {
         switch(PlatformPropsImpl.OS_TYPE) {
             case WINDOWS:
-              if( Platform.CPUFamily.X86 == PlatformPropsImpl.CPU_ARCH.family ) {
+              if( useNativeExeFile && Platform.CPUFamily.X86 == PlatformPropsImpl.CPU_ARCH.family ) {
                   return ".exe";
               } else {
                   return ".bat";
@@ -754,7 +770,7 @@
             case WINDOWS:
               return "echo off"+PlatformPropsImpl.NEWLINE;
             default:
-              return null;
+              return "#!/bin/true"+PlatformPropsImpl.NEWLINE;
         }
     }
     private static String[] getExeTestCommandArgs(final String scriptFile) {
@@ -781,7 +797,8 @@
     private static WeakReference<byte[]> exeTestCodeRef = null;
 
     private static void fillExeTestFile(final File exefile) throws IOException {
-        if( Platform.OSType.WINDOWS == PlatformPropsImpl.OS_TYPE &&
+        if( useNativeExeFile &&
+            Platform.OSType.WINDOWS == PlatformPropsImpl.OS_TYPE &&
             Platform.CPUFamily.X86 == PlatformPropsImpl.CPU_ARCH.family
           ) {
             final byte[] exeTestCode;
@@ -845,6 +862,7 @@
         switch(PlatformPropsImpl.OS_TYPE) {
             case ANDROID:
             case MACOS:
+            case IOS:
             case WINDOWS:
             case OPENKODE:
               return false;
@@ -938,6 +956,18 @@
         }
     }
 
+    private static final Boolean isNioExecutableFile(final File file) {
+        if( null != fileToPathGetter && null != isExecutableQuery ) {
+            try {
+                return (Boolean) isExecutableQuery.invoke(null, fileToPathGetter.invoke(file));
+            } catch (final Throwable t) {
+                throw new JogampRuntimeException("error invoking Files.isExecutable(file.toPath())", t);
+            }
+        } else {
+            return null;
+        }
+    }
+
     /**
      * Returns true if the given {@code dir}
      * <ol>
@@ -955,6 +985,12 @@
     {
         final boolean debug = DEBUG_EXE || DEBUG;
 
+        if( !testTempDirExec ) {
+            if(DEBUG) {
+                System.err.println("IOUtil.testDirExec: <"+dir.getAbsolutePath()+">: Disabled TestTempDirExec");
+            }
+            return false;
+        }
         if (!testFile(dir, true, true)) {
             if( debug ) {
                 System.err.println("IOUtil.testDirExec: <"+dir.getAbsolutePath()+">: Not writeable dir");
@@ -979,6 +1015,7 @@
             } else {
                 exeTestFile = File.createTempFile("jogamp_exe_tst", getExeTestFileSuffix(), dir);
                 existingExe = false;
+                fillExeTestFile(exeTestFile);
             }
         } catch (final SecurityException se) {
             throw se; // fwd Security exception
@@ -992,41 +1029,52 @@
         long t2;
         int res = -1;
         int exitValue = -1;
+        Boolean isNioExec = null;
         if( existingExe || exeTestFile.setExecutable(true /* exec */, true /* ownerOnly */) ) {
-            Process pr = null;
-            try {
-                if( !existingExe ) {
-                    fillExeTestFile(exeTestFile);
-                }
-                t2 = debug ? System.currentTimeMillis() : 0;
-                // Using 'Process.exec(String[])' avoids StringTokenizer of 'Process.exec(String)'
-                // and hence splitting up command by spaces!
-                // Note: All no-exec cases throw an IOExceptions at ProcessBuilder.start(), i.e. below exec() call!
-                pr = Runtime.getRuntime().exec( getExeTestCommandArgs( exeTestFile.getCanonicalPath() ), null, null );
-                if( DEBUG_EXE && !DEBUG_EXE_NOSTREAM ) {
-                    new StreamMonitor(new InputStream[] { pr.getInputStream(), pr.getErrorStream() }, System.err, "Exe-Tst: ");
-                }
-                pr.waitFor();
-                exitValue = pr.exitValue(); // Note: Bug 1219 Comment 50: On reporter's machine exit value 1 is being returned
-                res = 0; // file has been executed
-            } catch (final SecurityException se) {
-                throw se; // fwd Security exception
-            } catch (final Throwable t) {
-                t2 = debug ? System.currentTimeMillis() : 0;
-                res = -2;
-                if( debug ) {
-                    System.err.println("IOUtil.testDirExec: <"+exeTestFile.getAbsolutePath()+">: Caught "+t.getClass().getSimpleName()+": "+t.getMessage());
-                    t.printStackTrace();
-                }
-            } finally {
-                if( null != pr ) {
-                    // Bug 1219 Comment 58: Ensure that the launched process gets terminated!
-                    // This is Process implementation specific and varies on different platforms,
-                    // hence it may be required.
-                    try {
-                        pr.destroy();
-                    } catch (final Throwable t) {
-                        ExceptionUtils.dumpThrowable("", t);
+            t2 = debug ? System.currentTimeMillis() : 0;
+            // First soft exec test via NIO's ACL check, if available
+            isNioExec = isNioExecutableFile(exeTestFile);
+            if( null != isNioExec ) {
+                res = isNioExec.booleanValue() ? 0 : -1;
+            }
+            if( null == isNioExec || 0 <= res ) {
+                // Hard exec test via actual execution, if NIO's ACL check succeeded or not available.
+                // Required, since Windows 'Software Restriction Policies (SRP)' won't be triggered merely by NIO's ACL check.
+                Process pr = null;
+                try {
+                    // Using 'Process.exec(String[])' avoids StringTokenizer of 'Process.exec(String)'
+                    // and hence splitting up command by spaces!
+                    // Note: All no-exec cases throw an IOExceptions at ProcessBuilder.start(), i.e. below exec() call!
+                    pr = Runtime.getRuntime().exec( getExeTestCommandArgs( exeTestFile.getCanonicalPath() ), null, null );
+                    if( DEBUG_EXE && !DEBUG_EXE_NOSTREAM ) {
+                        new StreamMonitor(new InputStream[] { pr.getInputStream(), pr.getErrorStream() }, System.err, "Exe-Tst: ");
+                    }
+                    pr.waitFor();
+                    exitValue = pr.exitValue(); // Note: Bug 1219 Comment 50: On reporter's machine exit value 1 is being returned
+                    if( 0 == exitValue ) {
+                        res++; // file has been executed and exited normally
+                    } else {
+                        res = -2; // abnormal termination
+                    }
+                } catch (final SecurityException se) {
+                    throw se; // fwd Security exception
+                } catch (final Throwable t) {
+                    t2 = debug ? System.currentTimeMillis() : 0;
+                    res = -3;
+                    if( debug ) {
+                        System.err.println("IOUtil.testDirExec: <"+exeTestFile.getAbsolutePath()+">: Caught "+t.getClass().getSimpleName()+": "+t.getMessage());
+                        t.printStackTrace();
+                    }
+                } finally {
+                    if( null != pr ) {
+                        // Bug 1219 Comment 58: Ensure that the launched process gets terminated!
+                        // This is Process implementation specific and varies on different platforms,
+                        // hence it may be required.
+                        try {
+                            pr.destroy();
+                        } catch (final Throwable t) {
+                            ExceptionUtils.dumpThrowable("", t);
+                        }
                     }
                 }
             }
@@ -1034,13 +1082,13 @@
             t2 = debug ? System.currentTimeMillis() : 0;
         }
 
-        final boolean ok = 0 == res;
+        final boolean ok = 0 <= res;
         if( !DEBUG_EXE && !existingExe ) {
             exeTestFile.delete();
         }
         if( debug ) {
             final long t3 = System.currentTimeMillis();
-            System.err.println("IOUtil.testDirExec(): test-exe <"+exeTestFile.getAbsolutePath()+">, existingFile "+existingExe+", returned "+exitValue);
+            System.err.println("IOUtil.testDirExec(): test-exe <"+exeTestFile.getAbsolutePath()+">, existingFile "+existingExe+", isNioExec "+isNioExec+", returned "+exitValue);
             System.err.println("IOUtil.testDirExec(): abs-path <"+dir.getAbsolutePath()+">: res "+res+" -> "+ok);
             System.err.println("IOUtil.testDirExec(): total "+(t3-t0)+"ms, create "+(t1-t0)+"ms, fill "+(t2-t1)+"ms, execute "+(t3-t2)+"ms");
         }
@@ -1117,7 +1165,7 @@
        File tmpBaseDir = null;
        if(null != testDirImpl(tmpRoot, true /* create */, executable, dbgMsg)) { // check tmpRoot first
            for(int i = 0; null == tmpBaseDir && i<=9999; i++) {
-               final String tmpDirSuffix = String.format("_%04d", i); // 4 digits for iteration
+               final String tmpDirSuffix = String.format((Locale)null, "_%04d", i); // 4 digits for iteration
                tmpBaseDir = testDirImpl(new File(tmpRoot, tmpSubDirPrefix+tmpDirSuffix), true /* create */, executable, dbgMsg);
            }
        }
@@ -1225,7 +1273,7 @@
 
                     // 1) java.io.tmpdir/jogamp
                     if( null == tempRootExec && null != java_io_tmpdir ) {
-                        if( Platform.OSType.MACOS == PlatformPropsImpl.OS_TYPE ) {
+                        if( Platform.OSType.MACOS == PlatformPropsImpl.OS_TYPE || Platform.OSType.IOS == PlatformPropsImpl.OS_TYPE ) {
                             // Bug 865: Safari >= 6.1 [OSX] May employ xattr on 'com.apple.quarantine' on 'PluginProcess.app'
                             // We attempt to fix this issue _after_ gluegen native lib is loaded, see JarUtil.fixNativeLibAttribs(File).
                             tempRootExec = getSubTempDir(java_io_tmpdir, tmpSubDir, false /* executable */, "tempX1");
@@ -1356,4 +1404,75 @@
         }
         return null;
     }
+
+    /**
+     * Retrieve the list of all filenames traversing through given paths
+     * @param paths list of paths to traverse through, containing directories and files
+     * @param excludes optional list of exclude {@link Pattern}. All {@link Pattern#matcher(CharSequence) matching} files or directories will be omitted. Maybe be null or empty.
+     * @param includes optional list of explicit include {@link Pattern}. If given, only {@link Pattern#matcher(CharSequence) matching} files will be returned, otherwise all occurring.
+     * @return list of unsorted filenames within given paths
+     */
+    public static ArrayList<String> filesOf(final List<String> paths, final List<Pattern> excludes, final List<Pattern> includes) {
+        final ArrayList<String> files = new ArrayList<String>(paths.size()*32);
+        final ArrayList<String> todo = new ArrayList<String>(paths);
+        while(todo.size() > 0) {
+            final String p = todo.remove(0);
+            if( null != excludes && excludes.size() > 0) {
+                boolean exclude = false;
+                for(int i=0; !exclude && i<excludes.size(); i++) {
+                    exclude = excludes.get(i).matcher(p).matches();
+                    if( DEBUG ) {
+                        if( exclude ) {
+                            System.err.println("IOUtil.filesOf(): excluding <"+p+"> (exclude["+i+"]: "+excludes.get(i)+")");
+                        }
+                    }
+                }
+                if( exclude ) {
+                    continue; // skip further processing, continue w/ next path
+                }
+            }
+            final File f = new File(p);
+            if( !f.exists() ) {
+                if( DEBUG ) {
+                    System.err.println("IOUtil.filesOf(): not existing: "+f);
+                }
+                continue;
+            } else if( f.isDirectory() ) {
+                final String[] subs = f.list();
+                if( null == subs ) {
+                    if( DEBUG ) {
+                        System.err.println("IOUtil.filesOf(): null list of directory: "+f);
+                    }
+                } else if( 0 == subs.length ) {
+                    if( DEBUG ) {
+                        System.err.println("IOUtil.filesOf(): empty list of directory: "+f);
+                    }
+                } else {
+                    int j=0;
+                    final String pp = p.endsWith("/") ? p : p+"/";
+                    for(int i=0; i<subs.length; i++) {
+                        todo.add(j++, pp+subs[i]); // add 'in-place' to soothe the later sorting algorithm
+                    }
+                }
+            } else {
+                if( null != includes && includes.size() > 0) {
+                    boolean include = false;
+                    for(int i=0; !include && i<includes.size(); i++) {
+                        include = includes.get(i).matcher(p).matches();
+                        if( DEBUG ) {
+                            if( include ) {
+                                System.err.println("IOUtil.filesOf(): including <"+p+"> (including["+i+"]: "+includes.get(i)+")");
+                            }
+                        }
+                    }
+                    if( include ) {
+                        files.add(p);
+                    }
+                } else {
+                    files.add(p);
+                }
+            }
+        }
+        return files;
+    }
 }
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/util/JarUtil.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/JarUtil.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/util/JarUtil.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/JarUtil.java	2023-02-01 18:52:41.000000000 +0100
@@ -413,20 +413,6 @@
     }
 
     /**
-     * See {@link #getRelativeOf(Class, com.jogamp.common.net.Uri.Encoded, com.jogamp.common.net.Uri.Encoded)}.
-     * @param classFromJavaJar URI encoded!
-     * @param cutOffInclSubDir URI encoded!
-     * @param relResPath URI encoded!
-     * @return
-     * @throws IllegalArgumentException
-     * @throws IOException
-     * @throws URISyntaxException
-     * @deprecated Use {@link #getRelativeOf(Class, com.jogamp.common.net.Uri.Encoded, com.jogamp.common.net.Uri.Encoded)}.
-     */
-    public static java.net.URI getRelativeOf(final Class<?> classFromJavaJar, final String cutOffInclSubDir, final String relResPath) throws IllegalArgumentException, IOException, URISyntaxException {
-        return getRelativeOf(classFromJavaJar, Uri.Encoded.cast(cutOffInclSubDir), Uri.Encoded.cast(relResPath)).toURI();
-    }
-    /**
      * Locates the {@link JarUtil#getJarFileUri(Uri) Jar file Uri} of a given resource
      * relative to a given class's Jar's Uri.
      * <pre>
@@ -674,7 +660,7 @@
         // We tolerate UnsatisfiedLinkError (and derived) to solve the chicken and egg problem
         // of loading gluegen's native library.
         // On Safari(OSX), Bug 865, we simply hope the destination folder is executable.
-        if( Platform.OSType.MACOS == Platform.getOSType() ) {
+        if( Platform.OSType.MACOS == Platform.getOSType() || Platform.OSType.IOS == Platform.getOSType() ) {
             final String fileAbsPath = file.getAbsolutePath();
             try {
                 fixNativeLibAttribs(fileAbsPath);
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/util/JogampVersion.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/JogampVersion.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/util/JogampVersion.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/JogampVersion.java	2023-02-01 18:52:41.000000000 +0100
@@ -45,6 +45,16 @@
     public static final Attributes.Name IMPLEMENTATION_BRANCH = new Attributes.Name("Implementation-Branch");
     /** See {@link #getImplementationCommit()} */
     public static final Attributes.Name IMPLEMENTATION_COMMIT = new Attributes.Name("Implementation-Commit");
+    /** See {@link #getImplementationSHASources()} */
+    public static final Attributes.Name IMPLEMENTATION_SHA_SOURCES = new Attributes.Name("Implementation-SHA-Sources");
+    /** See {@link #getImplementationSHAClasses()} */
+    public static final Attributes.Name IMPLEMENTATION_SHA_CLASSES = new Attributes.Name("Implementation-SHA-Classes");
+    /** See {@link #getImplementationSHAClassesThis()} */
+    public static final Attributes.Name IMPLEMENTATION_SHA_CLASSES_THIS = new Attributes.Name("Implementation-SHA-Classes-this");
+    /** See {@link #getImplementationSHANatives()} */
+    public static final Attributes.Name IMPLEMENTATION_SHA_NATIVES = new Attributes.Name("Implementation-SHA-Natives");
+    /** See {@link #getImplementationSHANativesThis()} */
+    public static final Attributes.Name IMPLEMENTATION_SHA_NATIVES_THIS = new Attributes.Name("Implementation-SHA-Natives-this");
 
     /** For FAT JogAmp jar files */
     private static final String packageNameFAT = "com.jogamp";
@@ -155,6 +165,41 @@
         return this.getAttribute(JogampVersion.IMPLEMENTATION_COMMIT);
     }
 
+    /**
+     * Returns the SHA of all concatenated source files of the whole project
+     */
+    public final String getImplementationSHASources() {
+        return this.getAttribute(JogampVersion.IMPLEMENTATION_SHA_SOURCES);
+    }
+
+    /**
+     * Returns the SHA of all concatenated class files of all build classes
+     */
+    public final String getImplementationSHAClasses() {
+        return this.getAttribute(JogampVersion.IMPLEMENTATION_SHA_CLASSES);
+    }
+
+    /**
+     * Returns the SHA of all concatenated class files of the local (jar) package subset
+     */
+    public final String getImplementationSHAClassesThis() {
+        return this.getAttribute(JogampVersion.IMPLEMENTATION_SHA_CLASSES_THIS);
+    }
+
+    /**
+     * Returns the SHA of all concatenated native library files of all build libs
+     */
+    public final String getImplementationSHANatives() {
+        return this.getAttribute(JogampVersion.IMPLEMENTATION_SHA_NATIVES);
+    }
+
+    /**
+     * Returns the SHA of all concatenated native library files of the local (jar) package subset
+     */
+    public final String getImplementationSHANativesThis() {
+        return this.getAttribute(JogampVersion.IMPLEMENTATION_SHA_NATIVES_THIS);
+    }
+
     public final String getImplementationTitle() {
         return this.getAttribute(Attributes.Name.IMPLEMENTATION_TITLE);
     }
@@ -220,6 +265,11 @@
         sb.append("Implementation Build: ").append(getImplementationBuild()).append(nl);
         sb.append("Implementation Branch: ").append(getImplementationBranch()).append(nl);
         sb.append("Implementation Commit: ").append(getImplementationCommit()).append(nl);
+        sb.append("Implementation SHA Sources: ").append(getImplementationSHASources()).append(nl);
+        sb.append("Implementation SHA Classes: ").append(getImplementationSHAClasses()).append(nl);
+        sb.append("Implementation SHA Classes-this: ").append(getImplementationSHAClassesThis()).append(nl);
+        sb.append("Implementation SHA Natives: ").append(getImplementationSHANatives()).append(nl);
+        sb.append("Implementation SHA Natives-this: ").append(getImplementationSHANativesThis()).append(nl);
         if(null != getAndroidPackageVersionName()) {
             sb.append("Android Package Version: ").append(getAndroidPackageVersionName()).append(nl);
         }
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/util/PropertyAccess.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/PropertyAccess.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/util/PropertyAccess.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/PropertyAccess.java	2023-02-01 18:52:41.000000000 +0100
@@ -175,7 +175,7 @@
   }
 
   private static final String getTrustedPropKey(final String propertyKey) {
-    return AccessController.doPrivileged(new PrivilegedAction<String>() {
+    return SecurityUtil.doPrivileged(new PrivilegedAction<String>() {
         @Override
         public String run() {
           try {
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/util/ReflectionUtil.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/ReflectionUtil.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/util/ReflectionUtil.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/ReflectionUtil.java	2023-02-01 18:52:41.000000000 +0100
@@ -42,6 +42,7 @@
 import java.lang.reflect.Method;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
@@ -92,7 +93,7 @@
         public int count;
         @Override
         public String toString() {
-            return String.format("%8.3f ms, %03d invoc, %s", nanoCosts/1e6, count, name);
+            return String.format((Locale)null, "%8.3f ms, %03d invoc, %s", nanoCosts/1e6, count, name);
         }
     }
     public static void resetForNameCount() {
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/util/RunnableTask.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/RunnableTask.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/util/RunnableTask.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/RunnableTask.java	2023-02-01 18:52:41.000000000 +0100
@@ -40,18 +40,16 @@
     protected final Runnable runnable;
 
     /**
-     * @deprecated Simply invoke {@link Runnable#run()}
+     * Invokes <code>runnable</code> on the current {@link Thread}.
+     * @param runnable the {@link Runnable} to execute on the current thread.
+     *                 The runnable <b>must exit</b>, i.e. not loop forever.
+     * @return the newly created and invoked {@link RunnableTask}
+     * @since 2.4.0
      */
-    public static void invoke(final boolean waitUntilDone, final Runnable runnable) {
-        runnable.run();
-    }
-
-    /**
-     * @deprecated Use {@link #invokeOnNewThread(ThreadGroup, String, boolean, Runnable)}
-     */
-    public static Thread invokeOnNewThread(final ThreadGroup tg, final boolean waitUntilDone, final Runnable runnable, final String threadName) {
-        final RunnableTask rt = invokeOnNewThread(tg, threadName, waitUntilDone, runnable);
-        return rt.getExecutionThread();
+    public static RunnableTask invokeOnCurrentThread(final Runnable runnable) {
+        final RunnableTask rt = new RunnableTask( runnable, null, false, null );
+        rt.run();
+        return rt;
     }
 
     /**
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/util/SecurityUtil.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/SecurityUtil.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/util/SecurityUtil.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/SecurityUtil.java	2023-02-01 18:52:41.000000000 +0100
@@ -27,7 +27,6 @@
  */
 package com.jogamp.common.util;
 
-import java.security.AccessController;
 import java.security.AllPermission;
 import java.security.CodeSource;
 import java.security.Permission;
@@ -35,19 +34,63 @@
 import java.security.ProtectionDomain;
 import java.security.cert.Certificate;
 
+import jogamp.common.os.PlatformPropsImpl;
+
 public class SecurityUtil {
+    @SuppressWarnings("removal")
     private static final SecurityManager securityManager;
     private static final Permission allPermissions;
     private static final boolean DEBUG = false;
 
+    /**
+     * Call wrapper for {@link System#getSecurityManager()}.
+     * <p>
+     * {@link System#getSecurityManager()} is deprecated
+     * since Java 17 (JEP 411) and earmarked to be removed.<br/>
+     * </p>
+     * <p>
+     * On a Java 17 machine, this method will simply return null.
+     * </p>
+     */
+    @SuppressWarnings({ "deprecation", "removal" })
+    public static final SecurityManager getSecurityManager() {
+        if( PlatformPropsImpl.JAVA_17 ) {
+            return null;
+        } else {
+            return System.getSecurityManager();
+        }
+    }
+
+    /**
+     * Call wrapper for {@link java.security.AccessController#doPrivileged(PrivilegedAction)}.
+     * <p>
+     * {@link java.security.AccessController#doPrivileged(PrivilegedAction)} is deprecated
+     * since Java 17 (JEP 411) and earmarked to be removed.<br/>
+     * </p>
+     * <p>
+     * On a Java 17 machine, this method will simply invoke the given PrivilegedAction<T>.
+     * </p>
+     * @param <T> return type of PrivilegedAction<T>
+     * @param o the PrivilegedAction<T>
+     * @return the return type
+     */
+    @SuppressWarnings({ "deprecation", "removal" })
+    public static <T> T doPrivileged(final PrivilegedAction<T> o) {
+        if( PlatformPropsImpl.JAVA_17 ) {
+            return o.run();
+        } else {
+            return java.security.AccessController.doPrivileged( o );
+        }
+    }
+
     static {
         allPermissions = new AllPermission();
-        securityManager = System.getSecurityManager();
+        securityManager = getSecurityManager();
 
         if( DEBUG ) {
             final boolean hasAllPermissions;
             {
-                final ProtectionDomain insecPD = AccessController.doPrivileged(new PrivilegedAction<ProtectionDomain>() {
+                final ProtectionDomain insecPD = doPrivileged(new PrivilegedAction<ProtectionDomain>() {
                                                 @Override
                                                 public ProtectionDomain run() {
                                                     return SecurityUtil.class.getProtectionDomain();
@@ -64,7 +107,7 @@
 
             System.err.println("SecurityUtil: Has SecurityManager: "+ ( null != securityManager ) ) ;
             System.err.println("SecurityUtil: Has AllPermissions: "+hasAllPermissions);
-            final Certificate[] certs = AccessController.doPrivileged(new PrivilegedAction<Certificate[]>() {
+            final Certificate[] certs = doPrivileged(new PrivilegedAction<Certificate[]>() {
                                                 @Override
                                                 public Certificate[] run() {
                                                     return getCerts(SecurityUtil.class);
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/util/SHASum.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/SHASum.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/util/SHASum.java	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/SHASum.java	2023-02-01 18:52:41.000000000 +0100
@@ -0,0 +1,329 @@
+/**
+ * Copyright 2019 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ *    1. Redistributions of source code must retain the above copyright notice, this list of
+ *       conditions and the following disclaimer.
+ *
+ *    2. Redistributions in binary form must reproduce the above copyright notice, this list
+ *       of conditions and the following disclaimer in the documentation and/or other materials
+ *       provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+
+package com.jogamp.common.util;
+
+import java.io.BufferedInputStream;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.net.URISyntaxException;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Locale;
+import java.util.regex.Pattern;
+
+import com.jogamp.common.util.cache.TempFileCache;
+import com.jogamp.common.util.cache.TempJarCache;
+
+import jogamp.common.Debug;
+
+/**
+ * Utility class to produce secure hash (SHA) sums over diverse input sources.
+ * <p>
+ * See {@link #updateDigest(MessageDigest, List)}
+ * </p>
+ * <p>
+ * This implementation is being utilized at JogAmp build time to produce various
+ * SHA sums over sources, class files and native libraries to ensure their identity.
+ * See {@link JogampVersion#getImplementationSHASources()},
+ * {@link JogampVersion#getImplementationSHAClasses()}
+ * and {@link JogampVersion#getImplementationSHANatives()}.
+ * </p>
+ * <p>
+ * {@link JogampVersion#getImplementationSHASources()} for module gluegen is produced via:
+ * <pre>
+ * java -cp build/gluegen-rt.jar com.jogamp.common.util.SHASum --algorithm 256 --exclude ".*\\.log" --exclude "make/lib/toolchain" src jcpp/src make
+ * </pre>
+ * </p>
+ * @see #SHASum(MessageDigest, List, List, List)
+ * @see #compute(boolean)
+ * @see TempJarSHASum
+ * @see #main(String[])
+ */
+public class SHASum {
+    private static final boolean DEBUG = Debug.debug("SHASum");
+
+    /**
+     * {@link MessageDigest#update(byte[], int, int) Updates} the given {@code digest}
+     * with the bytes contained by the files denoted by the given {@code filenames} in the given order.
+     * <p>
+     * To retrieve the list of all files traversing through directories, one may use {@link IOUtil#filesOf(List, List, List)}.
+     * </p>
+     * <p>
+     * The SHA implementation is sensitive to the order of input bytes and hence the given filename order.
+     * </p>
+     * <p>
+     * It is advised to pass given list of filenames in lexicographically sorted order to ensure reproducible outcome across all platforms,
+     * one may use {@link #sort(ArrayList)}.
+     * </p>
+     * <p>
+     * As an example, one could write
+     * <pre>
+     * final MessageDigest digest = ...;
+     * final long totalBytes = updateDigest(digest, sort(IOUtil.filesOf(Arrays.asList("sources"), null, null)));
+     * </pre>
+     * </p>
+     * @param digest to be updated digest
+     * @param filenames list of filenames denoting files, which bytes will be used to update the digest
+     * @return total number of bytes read.
+     * @throws FileNotFoundException see {@link FileInputStream#FileInputStream(String)}
+     * @throws IOException see {@link InputStream#read(byte[])}
+     */
+    public static long updateDigest(final MessageDigest digest, final List<String> filenames) throws IOException {
+        long numBytes = 0;
+        final byte buffer[] = new byte[4096]; // avoid Platform.getMachineDataInfo().pageSizeInBytes() due to native dependency
+        for(int i=0; i<filenames.size(); i++) {
+            final InputStream in = new BufferedInputStream(new FileInputStream(filenames.get(i)));
+            try {
+                while (true) {
+                    int count;
+                    if ((count = in.read(buffer)) == -1) {
+                        break;
+                    }
+                    digest.update(buffer, 0, count);
+                    numBytes += count;
+                }
+            } finally {
+                in.close();
+            }
+        }
+        return numBytes;
+    }
+
+    /**
+     * Simple helper to print the given byte-array into a string, here appended to StringBuilder
+     * @param shasum the given byte-array
+     * @param sb optional pre-existing StringBuilder, may be null
+     * @return return given or new StringBuilder with appended hex-string
+     */
+    public static StringBuilder toHexString(final byte[] shasum, StringBuilder sb) {
+        if( null == sb ) {
+            sb = new StringBuilder();
+        }
+        for(int i=0; i<shasum.length; i++) {
+            sb.append(String.format((Locale)null, "%02x", shasum[i]));
+        }
+        return sb;
+    }
+
+    /**
+     * Returns the sorted list of given strings using {@link String#compareTo(String)}'s lexicographically comparison.
+     * @param source given input strings
+     * @return sorted list of given strings
+     */
+    public static List<String> sort(final ArrayList<String> source) {
+        final String s[] = source.toArray(new String[source.size()]);
+        Arrays.sort(s, 0, s.length, null);
+        return Arrays.asList(s);
+    }
+
+    final MessageDigest digest;
+    final List<String> origins;
+    final List<Pattern> excludes, includes;
+
+    /**
+     * Instance to ensure proper {@link #compute(boolean)} of identical SHA sums over same contents within given paths across machines.
+     * <p>
+     * Instantiation of this class is lightweight, {@link #compute(boolean)} performs all operations.
+     * </p>
+     *
+     * @param digest the SHA algorithm
+     * @param origins the mandatory path origins to be used for {@link IOUtil#filesOf(List, List, List)}
+     * @param excludes the optional exclude patterns to be used for {@link IOUtil#filesOf(List, List, List)}
+     * @param includes the optional include patterns to be used for {@link IOUtil#filesOf(List, List, List)}
+     * @throws IllegalArgumentException
+     * @throws IOException
+     * @throws URISyntaxException
+     */
+    public SHASum(final MessageDigest digest, final List<String> origins, final List<Pattern> excludes, final List<Pattern> includes) {
+        this.digest = digest;
+        this.origins = origins;
+        this.excludes = excludes;
+        this.includes = includes;
+    }
+
+    /**
+     * Implementation gathers all files traversing through given paths via {@link IOUtil#filesOf(List, List, List)},
+     * sorts the resulting file list via {@link #sort(ArrayList)} and finally
+     * calculates the SHA sum over its byte content via {@link #updateDigest(MessageDigest, List)}.
+     * <p>
+     * This ensures identical SHA sums over same contents within given paths across machines.
+     * </p>
+     * <p>
+     * This method is heavyweight and performs all operations.
+     * </p>
+     *
+     * @param verbose if true, all used files will be dumped as well as the digest result
+     * @return the resulting SHA value
+     * @throws IOException
+     */
+    public final byte[] compute(final boolean verbose) throws IOException {
+        final List<String> fnamesS = SHASum.sort(IOUtil.filesOf(origins, excludes, includes));
+        if( verbose ) {
+            for(int i=0; i<fnamesS.size(); i++) {
+                System.err.println(fnamesS.get(i));
+            }
+        }
+        final long numBytes = SHASum.updateDigest(digest, fnamesS);
+        final byte[] shasum = digest.digest();
+        if( verbose ) {
+            System.err.println("Digested "+numBytes+" bytes, shasum size "+shasum.length+" bytes");
+            System.err.println("Digested result: "+SHASum.toHexString(shasum, null).toString());
+        }
+        return shasum;
+    }
+
+    public final List<String> getOrigins() { return origins; }
+    public final List<Pattern> getExcludes() { return excludes; }
+    public final List<Pattern> getIncludes() { return includes; }
+
+    /**
+     * {@link SHASum} specialization utilizing {@link TempJarCache} to access jar file content for SHA computation
+     */
+    public static class TempJarSHASum extends SHASum {
+        /**
+         * Instance to ensure proper {@link #compute(boolean)} of identical SHA sums over same contents within given paths across machines.
+         * <p>
+         * Instantiation of this class is lightweight, {@link #compute(boolean)} performs all operations.
+         * </p>
+         * <p>
+         * {@link TempJarCache#getTempFileCache()}'s {@link TempFileCache#getTempDir()} is used as origin for {@link IOUtil#filesOf(List, List, List)}
+         * </p>
+         *
+         * @param digest the SHA algorithm
+         * @param jarclazz a class from the desired classpath jar file used for {@link TempJarCache#addAll(Class, com.jogamp.common.net.Uri)}
+         * @param excludes the optional exclude patterns to be used for {@link IOUtil#filesOf(List, List, List)}
+         * @param includes the optional include patterns to be used for {@link IOUtil#filesOf(List, List, List)}
+         * @throws SecurityException
+         * @throws IllegalArgumentException
+         * @throws IOException
+         * @throws URISyntaxException
+         */
+        public TempJarSHASum(final MessageDigest digest, final Class<?> jarclazz, final List<Pattern> excludes, final List<Pattern> includes)
+                throws SecurityException, IllegalArgumentException, IOException, URISyntaxException
+        {
+            super(digest, Arrays.asList(IOUtil.slashify(TempJarCache.getTempFileCache().getTempDir().getAbsolutePath(), false, false)),
+                  excludes, includes);
+            TempJarCache.addAll(jarclazz, JarUtil.getJarFileUri(jarclazz.getName(), jarclazz.getClassLoader()));
+        }
+
+        public final String getOrigin() { return origins.get(0); }
+    }
+
+    /**
+     * Main entry point taking var-arg path or gnu-arguments with a leading '--'.
+     * <p>
+     * Implementation gathers all files traversing through given paths via {@link IOUtil#filesOf(List, List, List)},
+     * sorts the resulting file list via {@link #sort(ArrayList)} and finally
+     * calculates the SHA sum over its byte content via {@link #updateDigest(MessageDigest, List)}.
+     * This ensures identical SHA sums over same contents within given paths.
+     * </p>
+     * <p>
+     * Example to calculate the SHA-256 over our source files as performed for {@link JogampVersion#getImplementationSHASources()}
+     * <pre>
+     * java -cp build/gluegen-rt.jar com.jogamp.common.util.SHASum --algorithm 256 --exclude ".*\\.log" --exclude "make/lib/toolchain" src jcpp/src make
+     * </pre>
+     * </p>
+     * <p>
+     * To validate the implementation, one can gather the sorted list of files (to ensure same order)
+     * <pre>
+     * java -cp build/gluegen-rt.jar com.jogamp.common.util.SHASum --listfilesonly --exclude ".*\\.log" --exclude "make/lib/toolchain" src jcpp/src make >& java.sorted.txt
+     * </pre>
+     * and then calculate the shasum independently
+     * <pre>
+     * find `cat java.sorted.txt` -exec cat {} + | shasum -a 256 -b - | awk '{print $1}'
+     * </pre>
+     * </p>
+     * @param args
+     * @throws IOException
+     * @throws URISyntaxException
+     * @throws IllegalArgumentException
+     */
+    public static void main(final String[] args) throws IOException {
+        boolean listFilesOnly = false;
+        int shabits = 256;
+        int i;
+        final ArrayList<String> pathU = new ArrayList<String>();
+        final ArrayList<Pattern> excludes = new ArrayList<Pattern>();
+        final ArrayList<Pattern> includes = new ArrayList<Pattern>();
+        {
+            for(i=0; i<args.length; i++) {
+                if(null != args[i]) {
+                    if( args[i].startsWith("--") ) {
+                        // options
+                        if( args[i].equals("--algorithm")) {
+                            shabits = Integer.parseInt(args[++i]);
+                        } else if( args[i].equals("--exclude")) {
+                            excludes.add(Pattern.compile(args[++i]));
+                            if( DEBUG ) {
+                                System.err.println("adding exclude: <"+args[i]+"> -> <"+excludes.get(excludes.size()-1)+">");
+                            }
+                        } else if( args[i].equals("--include")) {
+                            includes.add(Pattern.compile(args[++i]));
+                            if( DEBUG ) {
+                                System.err.println("adding include: <"+args[i]+"> -> <"+includes.get(includes.size()-1)+">");
+                            }
+                        } else if( args[i].equals("--listfilesonly")) {
+                            listFilesOnly = true;
+                        } else {
+                            System.err.println("Abort, unknown argument: "+args[i]);
+                            return;
+                        }
+                    } else {
+                        pathU.add(args[i]);
+                        if( DEBUG ) {
+                            System.err.println("adding path: <"+args[i]+">");
+                        }
+                    }
+                }
+            }
+            if( listFilesOnly ) {
+                final List<String> fnamesS = sort(IOUtil.filesOf(pathU, excludes, includes));
+                for(i=0; i<fnamesS.size(); i++) {
+                    System.out.println(fnamesS.get(i));
+                }
+                return;
+            }
+        }
+        final String shaalgo = "SHA-"+shabits;
+        final MessageDigest digest;
+        try {
+            digest = MessageDigest.getInstance(shaalgo);
+        } catch (final NoSuchAlgorithmException e) {
+            System.err.println("Abort, implementation for "+shaalgo+" not available: "+e.getMessage());
+            return;
+        }
+        final SHASum shaSum = new SHASum(digest, pathU, excludes, includes);
+        System.out.println(toHexString(shaSum.compute(DEBUG), null).toString());
+    }
+}
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/util/TaskBase.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/TaskBase.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/util/TaskBase.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/TaskBase.java	2023-02-01 18:52:41.000000000 +0100
@@ -58,17 +58,25 @@
     protected volatile boolean isFlushed;
     protected volatile Thread execThread;
 
+    /**
+     * @param syncObject The synchronization object if caller wait until <code>runnable</code> execution is completed,
+     *                   or <code>null</code> if waiting is not desired.
+     * @param catchExceptions Influence an occurring exception during <code>runnable</code> execution.
+     *                        If <code>true</code>, the exception is silenced and can be retrieved via {@link #getThrowable()},
+     *                        otherwise the exception is thrown.
+     * @param exceptionOut If not <code>null</code>, exceptions are written to this {@link PrintStream}.
+     */
     protected TaskBase(final Object syncObject, final boolean catchExceptions, final PrintStream exceptionOut) {
         this.syncObject = syncObject;
         this.catchExceptions = catchExceptions;
         this.exceptionOut = exceptionOut;
         this.sourceStack = TRACE_SOURCE ? new Throwable("Creation @") : null;
-        tCreated = System.currentTimeMillis();
-        tStarted = 0;
-        tExecuted = 0;
-        isExecuted = false;
-        isFlushed = false;
-        execThread = null;
+        this.tCreated = System.currentTimeMillis();
+        this.tStarted = 0;
+        this.tExecuted = 0;
+        this.isExecuted = false;
+        this.isFlushed = false;
+        this.execThread = null;
     }
 
     protected final String getExceptionOutIntro() {
@@ -171,7 +179,16 @@
 
     @Override
     public String toString() {
-        return "RunnableTask[enqueued "+isInQueue()+"[executed "+isExecuted()+", flushed "+isFlushed()+"], tTotal "+getDurationTotal()+" ms, tExec "+getDurationInExec()+" ms, tQueue "+getDurationInQueue()+" ms, attachment "+attachment+", throwable "+getThrowable()+"]";
+        final String etn;
+        final String eth;
+        if( null != execThread ) {
+            etn = execThread.getName();
+            eth = "0x"+Integer.toHexString(execThread.hashCode());
+        } else {
+            etn = "n/a";
+            eth = "n/a";
+        }
+        return "RunnableTask[enqueued "+isInQueue()+"[executed "+isExecuted()+", flushed "+isFlushed()+", thread["+eth+", "+etn+"]], tTotal "+getDurationTotal()+" ms, tExec "+getDurationInExec()+" ms, tQueue "+getDurationInQueue()+" ms, attachment "+attachment+", throwable "+getThrowable()+"]";
     }
 }
 
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/util/UnsafeUtil.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/UnsafeUtil.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/util/UnsafeUtil.java	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/UnsafeUtil.java	2023-02-01 18:52:41.000000000 +0100
@@ -0,0 +1,221 @@
+/**
+ * Copyright 2019 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ *    1. Redistributions of source code must retain the above copyright notice, this list of
+ *       conditions and the following disclaimer.
+ *
+ *    2. Redistributions in binary form must reproduce the above copyright notice, this list
+ *       of conditions and the following disclaimer in the documentation and/or other materials
+ *       provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+package com.jogamp.common.util;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.nio.ByteBuffer;
+import java.security.PrivilegedAction;
+
+import com.jogamp.common.ExceptionUtils;
+
+import jogamp.common.Debug;
+import jogamp.common.os.PlatformPropsImpl;
+
+/**
+ * Utility methods allowing easy access to certain {@link sun.misc.Unsafe} functionality.
+ */
+public class UnsafeUtil {
+
+    static final boolean DEBUG;
+    static {
+        DEBUG = Debug.debug("UnsafeUtil");
+    }
+
+    protected UnsafeUtil() {}
+
+    private static final Object theUnsafe;
+    private static final Method unsafeCleanBB;
+    private static volatile boolean hasUnsafeCleanBBError; /** OK to be lazy on thread synchronization, just for early out **/
+
+    private static final Method staticFieldOffset;
+    private static final Method getObjectVolatile;
+    private static final Method putObjectVolatile;
+    private static volatile boolean hasGetPutObjectVolatile;
+
+    private static final Class<?> illegalAccessLoggerClass;
+    private static final Long illegalAccessLoggerOffset;
+    private static final Object illegalAccessLoggerSync = new Object();
+    private static volatile boolean hasIllegalAccessError;
+
+    static {
+        final Object[] _theUnsafe = { null };
+        final Method[] _cleanBB = { null };
+        final Method[] _staticFieldOffset = { null };
+        final Method[] _objectVolatile = { null, null }; // unsafeGetObjectVolatile, unsafePutObjectVolatile
+        final Class<?>[] _illegalAccessLoggerClass = { null };
+        final Long[] _loggerOffset = { null };
+
+        SecurityUtil.doPrivileged(new PrivilegedAction<Object>() {
+            @Override
+            public Object run() {
+                Class<?> unsafeClass = null;
+                try {
+                    // Using: sun.misc.Unsafe { public void invokeCleaner(java.nio.ByteBuffer directBuffer); }
+                    unsafeClass = Class.forName("sun.misc.Unsafe");
+                    {
+                        final Field f = unsafeClass.getDeclaredField("theUnsafe");
+                        f.setAccessible(true);
+                        _theUnsafe[0] = f.get(null);
+                    }
+                    _cleanBB[0] = unsafeClass.getMethod("invokeCleaner", java.nio.ByteBuffer.class);
+                    _cleanBB[0].setAccessible(true);
+                } catch(final Throwable t) {
+                    if( DEBUG ) {
+                        ExceptionUtils.dumpThrowable("UnsafeUtil", t);
+                    }
+                }
+                if( null != _theUnsafe[0] && PlatformPropsImpl.JAVA_9 ) {
+                    try {
+                        _staticFieldOffset[0] = unsafeClass.getDeclaredMethod("staticFieldOffset", Field.class);
+                        _objectVolatile[0] = unsafeClass.getDeclaredMethod("getObjectVolatile", Object.class, long.class);
+                        _objectVolatile[1] = unsafeClass.getDeclaredMethod("putObjectVolatile", Object.class, long.class, Object.class);
+
+                        if( PlatformPropsImpl.JAVA_9 ) {
+                            _illegalAccessLoggerClass[0] = Class.forName("jdk.internal.module.IllegalAccessLogger");
+                            final Field loggerField = _illegalAccessLoggerClass[0].getDeclaredField("logger");
+                            _loggerOffset[0] = (Long) _staticFieldOffset[0].invoke(_theUnsafe[0], loggerField);
+                        }
+                    } catch(final Throwable t) {
+                        if( DEBUG ) {
+                            ExceptionUtils.dumpThrowable("UnsafeUtil", t);
+                        }
+                    }
+                }
+                return null;
+            } } );
+        theUnsafe = _theUnsafe[0];
+        unsafeCleanBB = _cleanBB[0];
+        hasUnsafeCleanBBError = null == theUnsafe || null == unsafeCleanBB;
+        if( DEBUG ) {
+            System.err.println("UnsafeUtil.init: hasTheUnsafe: "+(null!=theUnsafe)+", hasInvokeCleaner: "+!hasUnsafeCleanBBError);
+        }
+
+        staticFieldOffset = _staticFieldOffset[0];
+        getObjectVolatile = _objectVolatile[0];
+        putObjectVolatile = _objectVolatile[1];
+        hasGetPutObjectVolatile = null != staticFieldOffset && null != getObjectVolatile && null != putObjectVolatile;
+        illegalAccessLoggerClass = _illegalAccessLoggerClass[0];
+        illegalAccessLoggerOffset = _loggerOffset[0];
+        hasIllegalAccessError = !hasGetPutObjectVolatile || null == illegalAccessLoggerClass || null == illegalAccessLoggerOffset;
+        if( DEBUG ) {
+            System.err.println("UnsafeUtil.init: hasUnsafeGetPutObjectVolatile: "+hasGetPutObjectVolatile+", hasUnsafeIllegalAccessLogger: "+!hasIllegalAccessError);
+        }
+    }
+
+    /**
+     * Returns {@code true} if {@code sun.misc.Unsafe.invokeCleaner(java.nio.ByteBuffer)}
+     * is available and has not caused an exception.
+     * @see #invokeCleaner(ByteBuffer)
+     */
+    public static boolean hasInvokeCleaner() { return !hasUnsafeCleanBBError; }
+
+    /**
+     * Access to {@code sun.misc.Unsafe.invokeCleaner(java.nio.ByteBuffer)}.
+     * <p>
+     * If {@code b} is an direct NIO buffer, i.e {@link sun.nio.ch.DirectBuffer},
+     * calls it's {@link sun.misc.Cleaner} instance {@code clean()} method once.
+     * </p>
+     * @return {@code true} if successful, otherwise {@code false}.
+     * @see #hasInvokeCleaner()
+     */
+    public static boolean invokeCleaner(final ByteBuffer bb) {
+        if( hasUnsafeCleanBBError || !bb.isDirect() ) {
+            return false;
+        }
+        try {
+            unsafeCleanBB.invoke(theUnsafe, bb);
+            return true;
+        } catch(final Throwable t) {
+            hasUnsafeCleanBBError = true;
+            if( DEBUG ) {
+                ExceptionUtils.dumpThrowable("UnsafeUtil", t);
+            }
+            return false;
+        }
+    }
+
+    /**
+     * Returns {@code true} if access to {@code jdk.internal.module.IllegalAcessLogger}'s {@code logger} field
+     * is available and has not caused an exception.
+     * @see #doWithoutIllegalAccessLogger(PrivilegedAction)
+     */
+    public static boolean hasIllegalAccessLoggerAccess() { return !hasIllegalAccessError; }
+
+    /**
+     * Issue the given user {@code action} while {@code jdk.internal.module.IllegalAcessLogger}'s {@code logger} has been temporarily disabled.
+     * <p>
+     * The caller shall place this call into their own {@link SecurityUtil#doPrivileged(PrivilegedAction)} block.
+     * </p>
+     * <p>
+     * In case the runtime is not {@link PlatformPropsImpl#JAVA_9} or the logger is not accessible or disabling caused an exception,
+     * the user {@code action} is just executed w/o temporary logger modifications.
+     * </p>
+     * @param action the user action task
+     * @throws RuntimeException is thrown for a caught {@link Throwable} while executing the user {@code action}
+     * @see #hasIllegalAccessLoggerAccess()
+     */
+    public static <T> T doWithoutIllegalAccessLogger(final PrivilegedAction<T> action) throws RuntimeException {
+        if( !hasIllegalAccessError ) {
+            synchronized(illegalAccessLoggerSync) {
+                final Object newLogger = null;
+                Object oldLogger = null;
+                try {
+                    oldLogger = getObjectVolatile.invoke(theUnsafe, illegalAccessLoggerClass, illegalAccessLoggerOffset);
+                    putObjectVolatile.invoke(theUnsafe, illegalAccessLoggerClass, illegalAccessLoggerOffset, newLogger);
+                } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
+                    // unaccessible ..
+                    hasIllegalAccessError = true;
+                    if( DEBUG ) {
+                        ExceptionUtils.dumpThrowable("UnsafeUtil", e);
+                    }
+                    return action.run();
+                }
+                try {
+                    return action.run();
+                } catch (final Throwable t) {
+                    if( DEBUG ) {
+                        t.printStackTrace();
+                    }
+                    throw new RuntimeException(t);
+                } finally {
+                    try {
+                        putObjectVolatile.invoke(theUnsafe, illegalAccessLoggerClass, illegalAccessLoggerOffset, oldLogger);
+                    } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
+                        // should not happen, worked above @ logger setup
+                        hasIllegalAccessError = true;
+                        throw new InternalError(e);
+                    }
+                }
+            }
+        } else {
+            return action.run();
+        }
+    }
+}
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/util/VersionUtil.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/VersionUtil.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/util/VersionUtil.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/VersionUtil.java	2023-02-01 18:52:41.000000000 +0100
@@ -73,8 +73,18 @@
         sb.append("Platform: Java Version: ").append(Platform.getJavaVersion()).append(" (").append(Platform.getJavaVersionNumber()).append("u").append(PlatformPropsImpl.JAVA_VERSION_UPDATE).append("), VM: ").append(Platform.getJavaVMName());
         sb.append(", Runtime: ").append(Platform.getJavaRuntimeName()).append(Platform.getNewline());
         sb.append("Platform: Java Vendor: ").append(Platform.getJavaVendor()).append(", ").append(Platform.getJavaVendorURL());
-        sb.append(", JavaSE: ").append(PlatformPropsImpl.JAVA_SE);
-        sb.append(", Java6: ").append(PlatformPropsImpl.JAVA_6);
+        if( PlatformPropsImpl.JAVA_21 ) {
+            sb.append(", Java21");
+        } else if( PlatformPropsImpl.JAVA_17 ) {
+            sb.append(", Java17");
+        } else if( PlatformPropsImpl.JAVA_9 ) {
+            sb.append(", Java9");
+        } else if( PlatformPropsImpl.JAVA_6 ) {
+            sb.append(", Java6");
+        } else if( PlatformPropsImpl.JAVA_SE ) {
+            sb.append(", JavaSE");
+        }
+        sb.append(", dynamicLib: ").append(PlatformPropsImpl.useDynamicLibraries);
         sb.append(", AWT enabled: ").append(Platform.AWT_AVAILABLE);
         sb.append(Platform.getNewline()).append(SEPERATOR);
 
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/common/util/WeakIdentityHashMap.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/WeakIdentityHashMap.java
--- gluegen2-2.3.2/src/java/com/jogamp/common/util/WeakIdentityHashMap.java	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/common/util/WeakIdentityHashMap.java	2023-02-01 18:52:41.000000000 +0100
@@ -0,0 +1,316 @@
+/**
+ * Copyright 2019 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ *    1. Redistributions of source code must retain the above copyright notice, this list of
+ *       conditions and the following disclaimer.
+ *
+ *    2. Redistributions in binary form must reproduce the above copyright notice, this list
+ *       of conditions and the following disclaimer in the documentation and/or other materials
+ *       provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ *
+ * Original source code of this class taken from Apache Avro
+ * <https://github.com/apache/avro/blob/master/lang/java/avro/src/main/java/org/apache/avro/util/WeakIdentityHashMap.java>
+ * commit 70260919426f89825ca148f5ee815f3b2cf4764d.
+ * Up until commit 70260919426f89825ca148f5ee815f3b2cf4764d,
+ * this code has been licensed as described below:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.jogamp.common.util;
+
+import java.lang.ref.ReferenceQueue;
+import java.lang.ref.WeakReference;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Implements a combination of WeakHashMap and IdentityHashMap. Useful for
+ * caches that need to key off of a == comparison instead of a .equals.
+ *
+ * <b> This class is not a general-purpose Map implementation! While this class
+ * implements the Map interface, it intentionally violates Map's general
+ * contract, which mandates the use of the equals method when comparing objects.
+ * This class is designed for use only in the rare cases wherein
+ * reference-equality semantics are required.
+ *
+ * Note that this implementation is not synchronized. </b>
+ */
+public class WeakIdentityHashMap<K, V> implements Map<K, V> {
+  private final ReferenceQueue<K> queue = new ReferenceQueue<>();
+  private final Map<IdentityWeakReference<K>, V> backingStore;
+
+  /**
+   * See {@link HashMap#HashMap()}
+   */
+  public WeakIdentityHashMap() {
+      backingStore = new HashMap<>();
+  }
+
+  /**
+   * See {@link HashMap#HashMap(int, float)}
+   * <p>
+   * Usable slots before resize are {@code capacity * loadFactor}.
+   * </p>
+   * <p>
+   * Capacity for n-slots w/o resize would be {@code (float)n/loadFactor + 1.0f}, see {@link #capacityForRequiredSize(int, float[])}.
+   * </p>
+   * @param initialCapacity default value would be 16, i.e. 12 slots @ 0.75f loadFactor before resize
+   * @param loadFactor default value would be 0.75f
+   * @see #capacityForRequiredSize(int, float[])
+   * @see #createWithRequiredSize(int, float)
+   */
+  public WeakIdentityHashMap(final int initialCapacity, final float loadFactor) {
+      backingStore = new HashMap<>(initialCapacity, loadFactor);
+  }
+
+  /**
+   * Static creation method using {@link #capacityForRequiredSize(int, float[])}
+   * to instantiate a new {@link WeakIdentityHashMap} via {@link #WeakIdentityHashMap(int, float)}.
+   *
+   * @param requiredSize the user desired n-slots before resize
+   * @param loadFactor given loadFactor, which might be increased a little to avoid next PowerOf2 bloat
+   * @return the new {@link WeakIdentityHashMap} instance
+   */
+  @SuppressWarnings("rawtypes")
+  public static WeakIdentityHashMap<?, ?> createWithRequiredSize(final int requiredSize, final float loadFactor) {
+      final float[] lf = { loadFactor };
+      final int icap = capacityForRequiredSize(requiredSize, lf);
+      return new WeakIdentityHashMap(icap, lf[0]);
+  }
+
+  /**
+   * Returns the [initial] capacity using the given {@code loadFactor}
+   * and {@code requiredSize}.
+   * <p>
+   * General calculation is {@code (float)requiredSize/loadFactor + 1.0f}, using {@code loadFactor := 0.75f}.
+   * </p>
+   * <p>
+   * In case above computed capacity is {@link Bitfield.Util#isPowerOf2(int)},
+   * the given {@code loadFactor} will be increased to avoid next PowerOf2 table size initialization.
+   * </p>
+   * @param requiredSize the user desired n-slots before resize
+   * @param loadFactor given loadFactor, which might be increased a little to avoid next PowerOf2 bloat
+   * @return the [initial] capacity to be used for {@link #WeakIdentityHashMap(int, float)}
+   */
+  public static int capacityForRequiredSize(final int requiredSize, final float[] loadFactor) {
+      if( requiredSize >= Bitfield.Util.MAX_POWER_OF_2 ) {
+          return Integer.MAX_VALUE;
+      }
+      float lf = loadFactor[0];
+      int c0 = (int)( requiredSize/lf + 1.0f );
+      if( !Bitfield.Util.isPowerOf2(c0) || 0.86f <= lf ) {
+          return c0;
+      }
+      do {
+          lf += 0.01f;
+          c0 = (int)( requiredSize/lf + 1.0f );
+      } while( Bitfield.Util.isPowerOf2(c0) && 0.86f > lf );
+
+      loadFactor[0] = lf;
+      return c0;
+  }
+
+  @Override
+  public void clear() {
+    backingStore.clear();
+    reap();
+  }
+
+  @SuppressWarnings("unchecked")
+  @Override
+  public boolean containsKey(final Object key) {
+    reap();
+    return backingStore.containsKey(new IdentityWeakReference<K>((K) key, queue));
+  }
+
+  @Override
+  public boolean containsValue(final Object value) {
+    reap();
+    return backingStore.containsValue(value);
+  }
+
+  @Override
+  public Set<Map.Entry<K, V>> entrySet() {
+    reap();
+    final Set<Map.Entry<K, V>> ret = new HashSet<>();
+    for (final Map.Entry<IdentityWeakReference<K>, V> ref : backingStore.entrySet()) {
+      final K key = ref.getKey().get();
+      if( null != key ) {
+          final V value = ref.getValue();
+          final Map.Entry<K, V> entry = new Map.Entry<K, V>() {
+            @Override
+            public K getKey() {
+              return key;
+            }
+
+            @Override
+            public V getValue() {
+              return value;
+            }
+
+            @Override
+            public V setValue(final V value) {
+              throw new UnsupportedOperationException();
+            }
+          };
+          ret.add(entry);
+      }
+    }
+    return Collections.unmodifiableSet(ret);
+  }
+
+  @Override
+  public Set<K> keySet() {
+    reap();
+    final Set<K> ret = new HashSet<>();
+    for (final IdentityWeakReference<K> ref : backingStore.keySet()) {
+      final K key = ref.get();
+      if( null != key ) {
+          ret.add(key);
+      }
+    }
+    return Collections.unmodifiableSet(ret);
+  }
+
+  @Override
+  public boolean equals(final Object o) {
+    if (!(o instanceof WeakIdentityHashMap)) {
+      return false;
+    }
+    return backingStore.equals(((WeakIdentityHashMap<?, ?>) o).backingStore);
+  }
+
+  @SuppressWarnings("unchecked")
+  @Override
+  public V get(final Object key) {
+    reap();
+    return backingStore.get(new IdentityWeakReference<K>((K) key, queue));
+  }
+
+  @Override
+  public V put(final K key, final V value) {
+    reap();
+    return backingStore.put(new IdentityWeakReference<K>(key, queue), value);
+  }
+
+  @Override
+  public int hashCode() {
+    reap();
+    return backingStore.hashCode();
+  }
+
+  @Override
+  public boolean isEmpty() {
+    reap();
+    return backingStore.isEmpty();
+  }
+
+  @Override
+  public void putAll(final Map<? extends K, ? extends V> t) {
+    final int n = t.size();
+    if ( 0 < n ) {
+        final float[] lf = { 0.75f };
+        final int icap = capacityForRequiredSize(n, lf);
+        final Map<IdentityWeakReference<K>, V> t2 = new HashMap<>(icap, lf[0]);
+        for (final Map.Entry<? extends K, ? extends V> e : t.entrySet()) {
+          t2.put(new IdentityWeakReference<K>(e.getKey(), queue), e.getValue());
+        }
+        backingStore.putAll(t2);
+        reap();
+    }
+  }
+
+  @SuppressWarnings("unchecked")
+  @Override
+  public V remove(final Object key) {
+    reap();
+    return backingStore.remove(new IdentityWeakReference<K>((K) key, queue));
+  }
+
+  @Override
+  public int size() {
+    reap();
+    return backingStore.size();
+  }
+
+  @Override
+  public Collection<V> values() {
+    reap();
+    return backingStore.values();
+  }
+
+  private synchronized void reap() {
+    Object zombie = queue.poll();
+
+    while (zombie != null) {
+      @SuppressWarnings("unchecked")
+      final IdentityWeakReference<K> victim = (IdentityWeakReference<K>) zombie;
+      backingStore.remove(victim);
+      zombie = queue.poll();
+    }
+  }
+
+  private static class IdentityWeakReference<K> extends WeakReference<K> {
+    final int hash;
+
+    IdentityWeakReference(final K obj, final ReferenceQueue<K> q) {
+      super(obj, q);
+      hash = System.identityHashCode(obj);
+    }
+
+    @Override
+    public int hashCode() {
+      return hash;
+    }
+
+    @Override
+    public boolean equals(final Object o) {
+      if (this == o) {
+        return true;
+      }
+      if (!(o instanceof IdentityWeakReference)) {
+        return false;
+      }
+      @SuppressWarnings("unchecked")
+      final IdentityWeakReference<K> ref = (IdentityWeakReference<K>) o;
+      return this.get() == ref.get();
+    }
+  }
+}
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/gluegen/JavaEmitter.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/gluegen/JavaEmitter.java
--- gluegen2-2.3.2/src/java/com/jogamp/gluegen/JavaEmitter.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/gluegen/JavaEmitter.java	2023-02-01 18:52:41.000000000 +0100
@@ -2554,6 +2554,7 @@
          "#define JINT_MAX_VALUE ((size_t)0x7fffffffU)\n"+
          "static const char * sNewBufferImplNotCalled = \"initializeImpl() not called\";\n"+
          "static const char * sNewBufferMAX_INT = \"capacity > MAX_INT\";\n"+
+         "static const char * sNewBufferEXCPT = \"New direct ByteBuffer threw Exception\";\n"+
          "static const char * sNewBufferNULL = \"New direct ByteBuffer is NULL\";\n"+
          "\n"+
          "static jobject JVMUtil_NewDirectByteBufferCopy(JNIEnv *env, void * source_address, size_t capacity) {\n"+
@@ -2571,6 +2572,12 @@
          "        return NULL;\n"+
          "    }\n"+
          "    jbyteBuffer  = (*env)->CallStaticObjectMethod(env, clazzBuffers, cstrBuffersNew, (jint)capacity);\n"+
+         "    if( (*env)->ExceptionCheck(env) ) {\n"+
+         "        (*env)->ExceptionDescribe(env);\n"+
+         "        (*env)->ExceptionClear(env);\n"+
+         "        (*env)->FatalError(env, sNewBufferEXCPT);\n"+
+         "        return NULL;\n"+
+         "    }\n"+
          "    if( NULL == jbyteBuffer ) {\n"+
          "        fprintf(stderr, \"%s %s: size %lu\\n\", sFatalError, sNewBufferNULL, (unsigned long)capacity);\n"+
          "        (*env)->FatalError(env, sNewBufferNULL);\n"+
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/gluegen/runtime/ProcAddressTable.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/gluegen/runtime/ProcAddressTable.java
--- gluegen2-2.3.2/src/java/com/jogamp/gluegen/runtime/ProcAddressTable.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/gluegen/runtime/ProcAddressTable.java	2023-02-01 18:52:41.000000000 +0100
@@ -46,7 +46,6 @@
 import java.io.PrintStream;
 import java.lang.reflect.AccessibleObject;
 import java.lang.reflect.Field;
-import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.Iterator;
 import java.util.LinkedHashSet;
@@ -89,7 +88,7 @@
     private final FunctionAddressResolver resolver;
 
     static {
-        AccessController.doPrivileged(new PrivilegedAction<Object>() {
+        SecurityUtil.doPrivileged(new PrivilegedAction<Object>() {
             @Override
             public Object run() {
                 DEBUG = (System.getProperty("jogamp.debug.ProcAddressHelper") != null);
@@ -207,7 +206,7 @@
      * </p>
      */
     private final Field fieldForFunctionInSec(final String name) throws IllegalArgumentException {
-        return AccessController.doPrivileged(new PrivilegedAction<Field>() {
+        return SecurityUtil.doPrivileged(new PrivilegedAction<Field>() {
             @Override
             public Field run() {
                 try {
diff -Nru gluegen2-2.3.2/src/java/com/jogamp/gluegen/structgen/CStructAnnotationProcessor.java gluegen2-2.4.0+dfsg/src/java/com/jogamp/gluegen/structgen/CStructAnnotationProcessor.java
--- gluegen2-2.3.2/src/java/com/jogamp/gluegen/structgen/CStructAnnotationProcessor.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/com/jogamp/gluegen/structgen/CStructAnnotationProcessor.java	2023-02-01 18:52:41.000000000 +0100
@@ -85,7 +85,7 @@
  * @author Michael Bien, et al.
  */
 @SupportedAnnotationTypes(value = {"com.jogamp.gluegen.structgen.CStruct", "com.jogamp.gluegen.structgen.CStructs"})
- at SupportedSourceVersion(SourceVersion.RELEASE_6)
+ at SupportedSourceVersion(SourceVersion.RELEASE_11)
 public class CStructAnnotationProcessor extends AbstractProcessor {
     private static final String DEFAULT = "_default_";
     static final boolean DEBUG;
@@ -178,7 +178,10 @@
                 System.err.println("CStruct.0: element: "+element+", .simpleName "+element.getSimpleName());
                 System.err.print("CStruct.0: isPackageOrType "+isPackageOrType+", enclElement: "+enclElement);
                 if( !isPackageOrType ) {
-                    System.err.println(", .simpleName "+enclElement.getSimpleName()+", .package "+eltUtils.getPackageOf(enclElement).toString());
+                	if(!enclElement.toString().equals("unnamed module"))
+	                    System.err.println(", .simpleName "+enclElement.getSimpleName()+", .package "+eltUtils.getPackageOf(enclElement).toString());
+                	else
+	                    System.err.println(", .simpleName "+enclElement.getSimpleName()+", .package <unnamed modules have no package>");
                 } else {
                     System.err.println("");
                 }
@@ -246,7 +249,7 @@
             writer = new FileWriter(configFile);
             writer.write("Package "+pakage+"\n");
             writer.write("EmitStruct "+structName+"\n");
-            if( finalType != structName ) {
+            if( !useJavaName && (finalType != structName) ) {
                 // We allow renaming the structType to the element's declaredType (FIELD annotation only)
                 writer.write("RenameJavaType " + struct.name()+" " + declaredType +"\n");
             }
diff -Nru gluegen2-2.3.2/src/java/jogamp/android/launcher/LauncherTempFileCache.java gluegen2-2.4.0+dfsg/src/java/jogamp/android/launcher/LauncherTempFileCache.java
--- gluegen2-2.3.2/src/java/jogamp/android/launcher/LauncherTempFileCache.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/jogamp/android/launcher/LauncherTempFileCache.java	2023-02-01 18:52:41.000000000 +0100
@@ -145,7 +145,7 @@
         synchronized (System.out) {
             // Get the name of the tmpbase directory.
             {
-                final File tmpRoot = ctx.getDir("temp", Context.MODE_WORLD_READABLE);
+                final File tmpRoot = ctx.getDir("temp", Context.MODE_PRIVATE); // Context.MODE_WORLD_READABLE -> SecurityException API >= 24
                 tmpBaseDir = new File(new File(tmpRoot, tmpSubDir), tmpDirPrefix);
             }
             tmpRootPropValue = System.getProperty(tmpRootPropName);
diff -Nru gluegen2-2.3.2/src/java/jogamp/common/Debug.java gluegen2-2.4.0+dfsg/src/java/jogamp/common/Debug.java
--- gluegen2-2.3.2/src/java/jogamp/common/Debug.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/jogamp/common/Debug.java	2023-02-01 18:52:41.000000000 +0100
@@ -28,10 +28,10 @@
 
 package jogamp.common;
 
-import java.security.AccessController;
 import java.security.PrivilegedAction;
 
 import com.jogamp.common.util.PropertyAccess;
+import com.jogamp.common.util.SecurityUtil;
 
 /** Helper routines for logging and debugging. */
 
@@ -41,7 +41,7 @@
   private static final boolean debugAll;
 
   static {
-    AccessController.doPrivileged(new PrivilegedAction<Object>() {
+    SecurityUtil.doPrivileged(new PrivilegedAction<Object>() {
         @Override
         public Object run() {
             PropertyAccess.addTrustedPrefix("jogamp.");
diff -Nru gluegen2-2.3.2/src/java/jogamp/common/os/android/AndroidUtilsImpl.java gluegen2-2.4.0+dfsg/src/java/jogamp/common/os/android/AndroidUtilsImpl.java
--- gluegen2-2.3.2/src/java/jogamp/common/os/android/AndroidUtilsImpl.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/jogamp/common/os/android/AndroidUtilsImpl.java	2023-02-01 18:52:41.000000000 +0100
@@ -75,7 +75,7 @@
    {
        final Context ctx = StaticContext.getContext();
        if(null != ctx) {
-           final File tmpRoot = ctx.getDir("temp", Context.MODE_WORLD_READABLE);
+           final File tmpRoot = ctx.getDir("temp", Context.MODE_PRIVATE); // Context.MODE_WORLD_READABLE -> SecurityException API >= 24
            if(null==tmpRoot|| !tmpRoot.isDirectory() || !tmpRoot.canWrite()) {
                throw new RuntimeException("Not a writable directory: '"+tmpRoot+"', retrieved Android static context");
            }
diff -Nru gluegen2-2.3.2/src/java/jogamp/common/os/DynamicLinkerImpl.java gluegen2-2.4.0+dfsg/src/java/jogamp/common/os/DynamicLinkerImpl.java
--- gluegen2-2.3.2/src/java/jogamp/common/os/DynamicLinkerImpl.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/jogamp/common/os/DynamicLinkerImpl.java	2023-02-01 18:52:41.000000000 +0100
@@ -144,14 +144,15 @@
   @Override
   public final void closeLibrary(final long libraryHandle, final boolean debug) throws SecurityException, IllegalArgumentException {
     final LibRef libRef = decrLibRefCount( libraryHandle );
-    if( null == libRef ) {
-        throw new IllegalArgumentException("Library handle 0x"+Long.toHexString(libraryHandle)+" unknown.");
-    }
-    checkLinkPermission(libRef.getName());
+    if( null != libRef ) {
+        checkLinkPermission(libRef.getName());
+    } // else null libRef is OK for global lookup
     if( DEBUG || debug ) {
         System.err.println("DynamicLinkerImpl.closeLibrary(0x"+Long.toHexString(libraryHandle)+" -> "+libRef+")");
     }
-    closeLibraryImpl(libraryHandle);
+    if( 0 != libraryHandle ) {
+        closeLibraryImpl(libraryHandle);
+    }
   }
   protected abstract void closeLibraryImpl(final long libraryHandle) throws SecurityException;
 
diff -Nru gluegen2-2.3.2/src/java/jogamp/common/os/MachineDataInfoRuntime.java gluegen2-2.4.0+dfsg/src/java/jogamp/common/os/MachineDataInfoRuntime.java
--- gluegen2-2.3.2/src/java/jogamp/common/os/MachineDataInfoRuntime.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/jogamp/common/os/MachineDataInfoRuntime.java	2023-02-01 18:52:41.000000000 +0100
@@ -71,6 +71,11 @@
       }
       throw new InternalError("Already initialized");
   }
+  /**
+   * The static {@link MachineDataInfo} is utilized for high performance
+   * precompiled size, offset, etc table lookup within generated structures
+   * using the {@link MachineDataInfo.StaticConfig} index.
+   */
   public static MachineDataInfo.StaticConfig getStatic() {
       if(!initialized) {
           synchronized(MachineDataInfo.class) { // volatile dbl-checked-locking OK
@@ -110,8 +115,10 @@
               return StaticConfig.X86_32_UNIX;
           }
       } else {
-          if( osType == Platform.OSType.WINDOWS ) {
+          if( Platform.OSType.WINDOWS == osType ) {
               return StaticConfig.X86_64_WINDOWS;
+          } else if( Platform.OSType.IOS == osType &&  Platform.CPUType.ARM64 == cpuType ) {
+              return StaticConfig.ARM64_IOS;
           } else {
               // for all 64bit unix types (x86_64, aarch64, sparcv9, ..)
               return StaticConfig.LP64_UNIX;
@@ -121,7 +128,7 @@
 
   private static MachineDataInfo getRuntimeImpl() {
         try {
-            Platform.initSingleton(); // loads native gluegen-rt library
+            Platform.initSingleton(); // loads native gluegen_rt library
         } catch (final UnsatisfiedLinkError err) {
             return null;
         }
diff -Nru gluegen2-2.3.2/src/java/jogamp/common/os/PlatformPropsImpl.java gluegen2-2.4.0+dfsg/src/java/jogamp/common/os/PlatformPropsImpl.java
--- gluegen2-2.3.2/src/java/jogamp/common/os/PlatformPropsImpl.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/jogamp/common/os/PlatformPropsImpl.java	2023-02-01 18:52:41.000000000 +0100
@@ -6,7 +6,6 @@
 import java.nio.ByteBuffer;
 import java.nio.IntBuffer;
 import java.nio.ShortBuffer;
-import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.List;
 
@@ -23,6 +22,7 @@
 import com.jogamp.common.os.Platform.CPUFamily;
 import com.jogamp.common.os.Platform.CPUType;
 import com.jogamp.common.os.Platform.OSType;
+import com.jogamp.common.util.SecurityUtil;
 import com.jogamp.common.util.VersionNumber;
 
 /**
@@ -38,16 +38,6 @@
 public abstract class PlatformPropsImpl {
     static final boolean DEBUG = Debug.debug("Platform");
 
-    /** Selected {@link Platform.OSType#MACOS} {@link VersionNumber}s. */
-    public static class OSXVersion {
-        /** OSX Tiger, i.e. 10.4.0 */
-        public static final VersionNumber Tiger = new VersionNumber(10,4,0);
-        /** OSX Lion, i.e. 10.7.0 */
-        public static final VersionNumber Lion = new VersionNumber(10,7,0);
-        /** OSX Mavericks, i.e. 10.9.0 */
-        public static final VersionNumber Mavericks = new VersionNumber(10,9,0);
-    }
-
     /**
      * Returns {@code true} if the given {@link CPUType}s and {@link ABIType}s are compatible.
      */
@@ -59,15 +49,6 @@
     // static initialization order:
     //
 
-    /** Version 1.6. As a JVM version, it enables certain JVM 1.6 features. */
-    public static final VersionNumber Version16;
-    /** Version 1.7. As a JVM version, it enables certain JVM 1.7 features. */
-    public static final VersionNumber Version17;
-    /** Version 1.8. As a JVM version, it enables certain JVM 1.8 features. */
-    public static final VersionNumber Version18;
-    /** Version 1.9. As a JVM version, it enables certain JVM 1.9 features. */
-    public static final VersionNumber Version19;
-
     public static final String OS;
     public static final String OS_lower;
     public static final String OS_VERSION;
@@ -94,6 +75,34 @@
      */
     public static final boolean JAVA_6;
 
+    /**
+     * True only if being compatible w/ language level 9, e.g. JRE 9.
+     * <p>
+     * Implies {@link #JAVA_6} and {@link #isJavaSE()}
+     * </p>
+     * <p>
+     * Since JRE 9, the version string has dropped the major release number,
+     * see JEP 223: http://openjdk.java.net/jeps/223
+     * </p>
+     */
+    public static final boolean JAVA_9;
+
+    /**
+     * True only if being compatible w/ language level 17, e.g. JRE 17 (LTS).
+     * <p>
+     * Implies {@link #JAVA_9}, {@link #JAVA_6} and {@link #isJavaSE()}
+     * </p>
+     */
+    public static final boolean JAVA_17;
+
+    /**
+     * True only if being compatible w/ language level 21, e.g. JRE 21 (LTS).
+     * <p>
+     * Implies {@link #JAVA_17}, {@link #JAVA_9}, {@link #JAVA_6} and {@link #isJavaSE()}
+     * </p>
+     */
+    public static final boolean JAVA_21;
+
     public static final String NEWLINE;
     public static final boolean LITTLE_ENDIAN;
 
@@ -101,13 +110,16 @@
     public static final ABIType ABI_TYPE;
     public static final OSType OS_TYPE;
     public static final String os_and_arch;
+    /**
+     * Usually GlueGen and subsequent JogAmp modules are build using dynamic libraries on supported platforms,
+     * hence this boolean is expected to be true.
+     * <p>
+     * However, on certain systems static libraries are being used on which native JNI library loading is disabled.
+     * </p>
+     */
+    public static final boolean useDynamicLibraries;
 
     static {
-        Version16 = new VersionNumber(1, 6, 0);
-        Version17 = new VersionNumber(1, 7, 0);
-        Version18 = new VersionNumber(1, 8, 0);
-        Version19 = new VersionNumber(1, 9, 0);
-
         // We don't seem to need an AccessController.doPrivileged() block
         // here as these system properties are visible even to unsigned Applets.
         final boolean isAndroid = AndroidVersion.isAvailable; // also triggers it's static initialization
@@ -135,8 +147,41 @@
         JAVA_VM_NAME = System.getProperty("java.vm.name");
         JAVA_RUNTIME_NAME = getJavaRuntimeNameImpl();
         JAVA_SE = initIsJavaSE();
-        JAVA_6 = JAVA_SE && ( isAndroid || JAVA_VERSION_NUMBER.compareTo(Version16) >= 0 ) ;
-
+        if( JAVA_SE ) {
+            if( JAVA_VERSION_NUMBER.compareTo(new VersionNumber(21, 0, 0)) >= 0 ) {
+                JAVA_21 = true;
+                JAVA_17 = true;
+                JAVA_9 = true;
+                JAVA_6 = true;
+            } else if( JAVA_VERSION_NUMBER.compareTo(new VersionNumber(17, 0, 0)) >= 0 ) {
+                JAVA_21 = false;
+                JAVA_17 = true;
+                JAVA_9 = true;
+                JAVA_6 = true;
+            } else if( JAVA_VERSION_NUMBER.compareTo(new VersionNumber(9, 0, 0)) >= 0 ) {
+                JAVA_21 = false;
+                JAVA_17 = false;
+                JAVA_9 = true;
+                JAVA_6 = true;
+            } else if( isAndroid || JAVA_VERSION_NUMBER.compareTo(new VersionNumber(1, 6, 0)) >= 0 ) {
+                JAVA_21 = false;
+                JAVA_17 = false;
+                JAVA_9 = false;
+                JAVA_6 = true;
+            } else {
+                // we probably don't support anything below 1.6
+                JAVA_21 = false;
+                JAVA_17 = false;
+                JAVA_9 = false;
+                JAVA_6 = false;
+            }
+        } else {
+            // we probably don't support anything below 1.6 or non JavaSE
+            JAVA_21 = false;
+            JAVA_17 = false;
+            JAVA_9 = false;
+            JAVA_6 = false;
+        }
         NEWLINE = System.getProperty("line.separator");
 
         OS =  System.getProperty("os.name");
@@ -157,7 +202,7 @@
             final ABIType[] _elfAbiType = { null };
             final int[] _elfLittleEndian = { 0 }; // 1 - little, 2 - big
             final boolean[] _elfValid = { false };
-            AccessController.doPrivileged(new PrivilegedAction<Object>() {
+            SecurityUtil.doPrivileged(new PrivilegedAction<Object>() {
                 @Override
                 public Object run() {
                     RandomAccessFile in = null;
@@ -275,9 +320,9 @@
                 }
                 ABI_TYPE = elfABIType;
             } else {
-                if( AndroidVersion.CPU_TYPE.family == CPUFamily.ARM ||
+                if( AndroidVersion.CPU_TYPE.family == CPUFamily.ARM || AndroidVersion.CPU_TYPE.family == CPUFamily.X86 ||
                     null == AndroidVersion.CPU_TYPE2 ) {
-                    // Favor Android-1: Either b/c ARM Family, or no Android-2
+                    // Favor Android-1: Either b/c ARM or x86 Family, or no Android-2
                     ARCH = AndroidVersion.CPU_ABI;
                     ARCH_lower = ARCH;
                     CPU_ARCH = AndroidVersion.CPU_TYPE;
@@ -318,8 +363,13 @@
                 strategy = 220;
             }
         }
+        if( OSType.IOS == OS_TYPE ) {
+            useDynamicLibraries = false;
+        } else {
+            useDynamicLibraries = true;
+        }
         if( DEBUG ) {
-            System.err.println("Platform.Hard: ARCH "+ARCH+", CPU_ARCH "+CPU_ARCH+", ABI_TYPE "+ABI_TYPE+" - strategy "+strategy+"(isAndroid "+isAndroid+", elfValid "+elfValid+")");
+            System.err.println("Platform.Hard: ARCH "+ARCH+", CPU_ARCH "+CPU_ARCH+", ABI_TYPE "+ABI_TYPE+" - strategy "+strategy+"(isAndroid "+isAndroid+", elfValid "+elfValid+"), useDynLibs "+useDynamicLibraries);
         }
         os_and_arch = getOSAndArch(OS_TYPE, CPU_ARCH, ABI_TYPE, LITTLE_ENDIAN);
     }
@@ -328,7 +378,7 @@
 
     private static final String getJavaRuntimeNameImpl() {
         // the fast path, check property Java SE instead of traversing through the ClassLoader
-        return AccessController.doPrivileged(new PrivilegedAction<String>() {
+        return SecurityUtil.doPrivileged(new PrivilegedAction<String>() {
             @Override
             public String run() {
               return System.getProperty("java.runtime.name");
@@ -380,7 +430,7 @@
      * For Elf parsing one of the following binaries is used:
      * <ul>
      *  <li>Linux: Current executable</li>
-     *  <li>Android: Found gluegen-rt library</li>
+     *  <li>Android: Found gluegen_rt library</li>
      *  <li>Other: A found java/jvm native library.</li>
      * </ul>
      * </p>
@@ -392,7 +442,7 @@
         File file = null;
         try {
             if( OSType.ANDROID == osType ) {
-                file = new File(NativeLibrary.findLibrary("gluegen-rt", PlatformPropsImpl.class.getClassLoader()));
+                file = new File(NativeLibrary.findLibrary("gluegen_rt", PlatformPropsImpl.class.getClassLoader()));
             } else {
                 if( OSType.LINUX == osType ) {
                     file = new File("/proc/self/exe");
@@ -492,6 +542,9 @@
         if ( osLower.startsWith("kd") ) {
             return OSType.OPENKODE;
         }
+        if ( osLower.startsWith("ios") ) {
+            return OSType.IOS;
+        }
         throw new RuntimeException("Please port OS detection to your platform (" + OS_lower + "/" + ARCH_lower + ")");
     }
 
@@ -511,6 +564,7 @@
      * <ul>
      *   <li>android-armv6</li>
      *   <li>android-aarch64</li>
+     *   <li>android-x86</li>
      *   <li>linux-armv6</li>
      *   <li>linux-armv6hf</li>
      *   <li>linux-i586</li>
@@ -522,6 +576,7 @@
      *   <li>linux-aarch64</li>
      *   <li>linux-amd64</li>
      *   <li>linux-ppc64</li>
+     *   <li>linux-ppc64le</li>
      *   <li>linux-mips64</li>
      *   <li>linux-ia64</li>
      *   <li>linux-sparcv9</li>
@@ -578,7 +633,7 @@
                 _and_arch_tmp = "amd64";
                 break;
             case PPC64:
-                _and_arch_tmp = "ppc64";
+                _and_arch_tmp = littleEndian ? "ppc64le" : "ppc64";
                 break;
             case MIPS_64:
                 _and_arch_tmp = "mips64";
@@ -605,6 +660,10 @@
               os_ = "macosx";
               _and_arch_final = "universal";
               break;
+            case IOS:
+              os_ = "ios";
+              _and_arch_final = _and_arch_tmp;
+              break;
             case WINDOWS:
               os_ = "windows";
               _and_arch_final = _and_arch_tmp;
diff -Nru gluegen2-2.3.2/src/java/jogamp/common/os/UnixDynamicLinkerImpl.java gluegen2-2.4.0+dfsg/src/java/jogamp/common/os/UnixDynamicLinkerImpl.java
--- gluegen2-2.3.2/src/java/jogamp/common/os/UnixDynamicLinkerImpl.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/jogamp/common/os/UnixDynamicLinkerImpl.java	2023-02-01 18:52:41.000000000 +0100
@@ -49,15 +49,16 @@
 
   @Override
   protected final long lookupSymbolLocalImpl(final long libraryHandle, final String symbolName) throws SecurityException {
-      return dlsym(libraryHandle, symbolName);
+      return 0 != libraryHandle ? dlsym(libraryHandle, symbolName) : 0;
   }
 
   @Override
   protected final void closeLibraryImpl(final long libraryHandle) throws SecurityException {
-      dlclose(libraryHandle);
+      if( 0 != libraryHandle ) {
+          dlclose(libraryHandle);
+      }
   }
 
-
   @Override
   public final String getLastError() {
       return dlerror();
diff -Nru gluegen2-2.3.2/src/java/net/highteq/nativetaglet/NativeTaglet.java gluegen2-2.4.0+dfsg/src/java/net/highteq/nativetaglet/NativeTaglet.java
--- gluegen2-2.3.2/src/java/net/highteq/nativetaglet/NativeTaglet.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/java/net/highteq/nativetaglet/NativeTaglet.java	2023-02-01 18:52:41.000000000 +0100
@@ -1,11 +1,20 @@
 package net.highteq.nativetaglet;
 
-import com.sun.tools.doclets.Taglet;
-import com.sun.javadoc.*;
+import jdk.javadoc.doclet.Taglet;
+import com.sun.source.doctree.DocTree;
+import com.sun.source.doctree.TextTree;
+import com.sun.source.doctree.UnknownBlockTagTree;
+import com.sun.source.doctree.UnknownInlineTagTree;
+import com.sun.source.util.SimpleDocTreeVisitor;
+
+import javax.lang.model.element.Element;
 
 import java.util.Map;
 import java.util.Properties;
+import java.util.Set;
+import java.util.HashSet;
 import java.util.Iterator;
+import java.util.List;
 import java.io.InputStream;
 import java.net.URL;
 import java.net.MalformedURLException;
@@ -25,65 +34,6 @@
   }
 
   /**
-   * @return true since this tag can be used in a field
-   *         doc comment
-   */
-  @Override
-  public boolean inField()
-  {
-    return true;
-  }
-
-  /**
-   * @return true since this tag can be used in a constructor
-   *         doc comment
-   */
-  @Override
-  public boolean inConstructor()
-  {
-    return true;
-  }
-
-  /**
-   * @return true since this tag can be used in a method
-   *         doc comment
-   */
-  @Override
-  public boolean inMethod()
-  {
-    return true;
-  }
-
-  /**
-   * @return true since this tag can be used in an overview
-   *         doc comment
-   */
-  @Override
-  public boolean inOverview()
-  {
-    return true;
-  }
-
-  /**
-   * @return true since this tag can be used in a package
-   *         doc comment
-   */
-  @Override
-  public boolean inPackage()
-  {
-    return true;
-  }
-
-  /**
-   * @return true since this
-   */
-  @Override
-  public boolean inType()
-  {
-    return true;
-  }
-
-  /**
    * Will return true since this is an inline tag.
    *
    * @return true since this is an inline tag.
@@ -111,16 +61,54 @@
     tagletMap.put(tag.getName(), tag);
   }
 
+    /**
+     * Utility function to visit the tree of tags and return the text.
+     * @param tags the list of instances of this tag
+     * @return the text of the tags.
+     */
+    static String getTagsText(DocTree tags) {
+        return new SimpleDocTreeVisitor<String, Void>() {
+            @Override
+            public String visitText(TextTree node, Void unused) {
+                return node.getBody();
+            }
+
+            @Override
+            public String visitUnknownBlockTag(UnknownBlockTagTree node, Void unused) {
+                for(DocTree doctree : node.getContent())
+                    return doctree.accept(this, unused);
+
+                return "";
+            }
+
+            @Override
+            public String visitUnknownInlineTag(UnknownInlineTagTree node, Void unused) {
+                for(DocTree doctree : node.getContent())
+                    return doctree.accept(this, unused);
+
+                return "";
+            }
+
+            @Override
+            protected String defaultAction(DocTree node, Void unused) {
+                return "";
+            }
+
+      }.visit(tags, null);
+  }
+
   /**
-   * Given the <code>Tag</code> representation of this custom
-   * tag, return its string representation.
+   * Returns the string representation of a series of instances of
+   * this tag to be included in the generated output.
    *
-   * @param tag the <code>Tag</code> representation of this custom tag.
+   * @param tags the list of instances of this tag
+   * @param element the element to which the enclosing comment belongs
+   * @return the string representation of the tags to be included in
+   *  the generated output
    */
   @Override
-  public String toString(final Tag tag)
-  {
-    String text= tag.text().trim();
+  public String toString(List<? extends DocTree> tags, Element element) {
+    String text= getTagsText(tags.get(0)).trim();
     if(mapping== null)
       {
         mapping= new Properties();
@@ -222,16 +210,15 @@
     return false;
   }
 
-  /**
-   * This method should not be called since arrays of inline tags do not
-   * exist.  Method {@link #tostring(Tag)} should be used to convert this
-   * inline tag to a string.
-   *
-   * @param tags the array of <code>Tag</code>s representing of this custom tag.
-   */
-  @Override
-  public String toString(final Tag[] tags)
-  {
-    return null;
-  }
+    @Override
+    public Set<Location> getAllowedLocations() {
+        Set<Location> locations = new HashSet<Location>();
+        locations.add(Location.FIELD);
+        locations.add(Location.CONSTRUCTOR);
+        locations.add(Location.METHOD);
+        locations.add(Location.OVERVIEW);
+        locations.add(Location.PACKAGE);
+        locations.add(Location.TYPE);
+        return locations;
+    }
 }
diff -Nru gluegen2-2.3.2/src/junit/com/jogamp/common/nio/BuffersTest.java gluegen2-2.4.0+dfsg/src/junit/com/jogamp/common/nio/BuffersTest.java
--- gluegen2-2.3.2/src/junit/com/jogamp/common/nio/BuffersTest.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/junit/com/jogamp/common/nio/BuffersTest.java	1970-01-01 01:00:00.000000000 +0100
@@ -1,163 +0,0 @@
-/**
- * Copyright 2010 JogAmp Community. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- *    1. Redistributions of source code must retain the above copyright notice, this list of
- *       conditions and the following disclaimer.
- *
- *    2. Redistributions in binary form must reproduce the above copyright notice, this list
- *       of conditions and the following disclaimer in the documentation and/or other materials
- *       provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * The views and conclusions contained in the software and documentation are those of the
- * authors and should not be interpreted as representing official policies, either expressed
- * or implied, of JogAmp Community.
- */
-
-/*
- * Created on Sunday, July 04 2010 20:00
- */
-package com.jogamp.common.nio;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.CharBuffer;
-import java.nio.DoubleBuffer;
-import java.nio.FloatBuffer;
-import java.nio.IntBuffer;
-import java.nio.LongBuffer;
-import java.nio.ShortBuffer;
-
-import org.junit.Test;
-
-import com.jogamp.junit.util.SingletonJunitCase;
-
-import static org.junit.Assert.*;
-
-/**
- * @author Michael Bien
- */
-import org.junit.FixMethodOrder;
-import org.junit.runners.MethodSorters;
-
- at FixMethodOrder(MethodSorters.NAME_ASCENDING)
-public class BuffersTest extends SingletonJunitCase {
-
-    @Test
-    public void test01PositionLimitCapacityAfterArrayAllocation() {
-        final byte[] byteData = { 1, 2, 3, 4, 5, 6, 7, 8 };
-        final ByteBuffer byteBuffer = Buffers.newDirectByteBuffer(byteData);
-        assertEquals(0, byteBuffer.position());
-        assertEquals(8, byteBuffer.limit());
-        assertEquals(8, byteBuffer.capacity());
-        assertEquals(8, byteBuffer.remaining());
-        assertEquals(5, byteBuffer.get(4));
-
-        final double[] doubleData = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 };
-        final DoubleBuffer doubleBuffer = Buffers.newDirectDoubleBuffer(doubleData);
-        assertEquals(0, doubleBuffer.position());
-        assertEquals(8, doubleBuffer.limit());
-        assertEquals(8, doubleBuffer.capacity());
-        assertEquals(8, doubleBuffer.remaining());
-        assertEquals(5.0, doubleBuffer.get(4), 0.1);
-
-        final float[] floatData = { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f };
-        final FloatBuffer floatBuffer = Buffers.newDirectFloatBuffer(floatData);
-        assertEquals(0, floatBuffer.position());
-        assertEquals(8, floatBuffer.limit());
-        assertEquals(8, floatBuffer.capacity());
-        assertEquals(8, floatBuffer.remaining());
-        assertEquals(5.0f, floatBuffer.get(4), 0.1f);
-
-        final int[] intData = { 1, 2, 3, 4, 5, 6, 7, 8 };
-        final IntBuffer intBuffer = Buffers.newDirectIntBuffer(intData);
-        assertEquals(0, intBuffer.position());
-        assertEquals(8, intBuffer.limit());
-        assertEquals(8, intBuffer.capacity());
-        assertEquals(8, intBuffer.remaining());
-        assertEquals(5, intBuffer.get(4));
-
-        final long[] longData = { 1, 2, 3, 4, 5, 6, 7, 8 };
-        final LongBuffer longBuffer = Buffers.newDirectLongBuffer(longData);
-        assertEquals(0, longBuffer.position());
-        assertEquals(8, longBuffer.limit());
-        assertEquals(8, longBuffer.capacity());
-        assertEquals(8, longBuffer.remaining());
-        assertEquals(5, longBuffer.get(4));
-
-        final short[] shortData = { 1, 2, 3, 4, 5, 6, 7, 8 };
-        final ShortBuffer shortBuffer = Buffers.newDirectShortBuffer(shortData);
-        assertEquals(0, shortBuffer.position());
-        assertEquals(8, shortBuffer.limit());
-        assertEquals(8, shortBuffer.capacity());
-        assertEquals(8, shortBuffer.remaining());
-        assertEquals(5, shortBuffer.get(4));
-
-        final char[] charData = { 1, 2, 3, 4, 5, 6, 7, 8 };
-        final CharBuffer charBuffer = Buffers.newDirectCharBuffer(charData);
-        assertEquals(0, charBuffer.position());
-        assertEquals(8, charBuffer.limit());
-        assertEquals(8, charBuffer.capacity());
-        assertEquals(8, charBuffer.remaining());
-        assertEquals(5, charBuffer.get(4));
-    }
-
-    @Test
-    public void test10Slice() {
-
-        final IntBuffer buffer = Buffers.newDirectIntBuffer(6);
-        buffer.put(new int[]{1,2,3,4,5,6}).rewind();
-
-        final IntBuffer threefour = Buffers.slice(buffer, 2, 2);
-
-        assertEquals(3, threefour.get(0));
-        assertEquals(4, threefour.get(1));
-        assertEquals(2, threefour.capacity());
-
-        assertEquals(0, buffer.position());
-        assertEquals(6, buffer.limit());
-
-        final IntBuffer fourfivesix = Buffers.slice(buffer, 3, 3);
-
-        assertEquals(4, fourfivesix.get(0));
-        assertEquals(5, fourfivesix.get(1));
-        assertEquals(6, fourfivesix.get(2));
-        assertEquals(3, fourfivesix.capacity());
-
-        assertEquals(0, buffer.position());
-        assertEquals(6, buffer.limit());
-
-        final IntBuffer onetwothree = Buffers.slice(buffer, 0, 3);
-
-        assertEquals(1, onetwothree.get(0));
-        assertEquals(2, onetwothree.get(1));
-        assertEquals(3, onetwothree.get(2));
-        assertEquals(3, onetwothree.capacity());
-
-        assertEquals(0, buffer.position());
-        assertEquals(6, buffer.limit());
-
-        // is it really sliced?
-        buffer.put(2, 42);
-
-        assertEquals(42, buffer.get(2));
-        assertEquals(42, onetwothree.get(2));
-    }
-
-    public static void main(final String args[]) throws IOException {
-        final String tstname = BuffersTest.class.getName();
-        org.junit.runner.JUnitCore.main(tstname);
-    }
-}
diff -Nru gluegen2-2.3.2/src/junit/com/jogamp/common/nio/CachedBufferFactoryTest.java gluegen2-2.4.0+dfsg/src/junit/com/jogamp/common/nio/CachedBufferFactoryTest.java
--- gluegen2-2.3.2/src/junit/com/jogamp/common/nio/CachedBufferFactoryTest.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/junit/com/jogamp/common/nio/CachedBufferFactoryTest.java	1970-01-01 01:00:00.000000000 +0100
@@ -1,252 +0,0 @@
-/*
- * Copyright 2011 JogAmp Community. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- *    1. Redistributions of source code must retain the above copyright notice, this list of
- *       conditions and the following disclaimer.
- *
- *    2. Redistributions in binary form must reproduce the above copyright notice, this list
- *       of conditions and the following disclaimer in the documentation and/or other materials
- *       provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * The views and conclusions contained in the software and documentation are those of the
- * authors and should not be interpreted as representing official policies, either expressed
- * or implied, of JogAmp Community.
- */
-package com.jogamp.common.nio;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.nio.IntBuffer;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-import java.util.concurrent.Callable;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.jogamp.junit.util.SingletonJunitCase;
-
-import static java.lang.System.*;
-import static org.junit.Assert.*;
-
-/**
- *
- * @author Michael Bien
- */
-import org.junit.FixMethodOrder;
-import org.junit.runners.MethodSorters;
-
- at FixMethodOrder(MethodSorters.NAME_ASCENDING)
-public class CachedBufferFactoryTest extends SingletonJunitCase {
-
-    private final int BUFFERCOUNT = 120;
-
-    private static int[] sizes;
-    private static int[] values;
-    private static IntBuffer[] buffers;
-
-    @Before
-    public void setup() {
-
-        sizes = new int[BUFFERCOUNT];
-        values = new int[sizes.length];
-        buffers = new IntBuffer[sizes.length];
-
-        final Random rnd = new Random(7);
-
-        // setup
-        for (int i = 0; i < sizes.length; i++) {
-            sizes[i] = rnd.nextInt(80)+1;
-            values[i] = rnd.nextInt();
-        }
-
-    }
-
-    @After
-    public void teardown() {
-        sizes = null;
-        values = null;
-        buffers = null;
-    }
-
-    @Test
-    public void dynamicTest() {
-
-        final CachedBufferFactory factory = CachedBufferFactory.create(64);
-
-        // create
-        for (int i = 0; i < sizes.length; i++) {
-            buffers[i] = factory.newDirectIntBuffer(sizes[i]);
-            assertEquals(ByteOrder.nativeOrder(), buffers[i].order());
-            fill(buffers[i], values[i]);
-        }
-
-        // check
-        checkBuffers(buffers, sizes, values);
-
-    }
-
-    @Test
-    public void dynamicConcurrentTest() throws InterruptedException, ExecutionException {
-
-        final CachedBufferFactory factory = CachedBufferFactory.createSynchronized(24);
-
-        final List<Callable<Object>> callables = new ArrayList<Callable<Object>>();
-
-        final CountDownLatch latch = new CountDownLatch(10);
-
-        // create
-        for (int i = 0; i < sizes.length; i++) {
-            final int n = i;
-            final Callable<Object> c = new Callable<Object>() {
-                public Object call() throws Exception {
-                    latch.countDown();
-                    latch.await();
-                    buffers[n] = factory.newDirectIntBuffer(sizes[n]);
-                    fill(buffers[n], values[n]);
-                    return null;
-                }
-            };
-            callables.add(c);
-        }
-
-        final ExecutorService dathVader = Executors.newFixedThreadPool(10);
-        dathVader.invokeAll(callables);
-
-        dathVader.shutdown();
-
-        // check
-        checkBuffers(buffers, sizes, values);
-
-    }
-
-    private void checkBuffers(final IntBuffer[] buffers, final int[] sizes, final int[] values) {
-        for (int i = 0; i < buffers.length; i++) {
-            final IntBuffer buffer = buffers[i];
-            assertEquals(sizes[i], buffer.capacity());
-            assertEquals(0, buffer.position());
-            assertTrue(equals(buffer, values[i]));
-        }
-    }
-
-    @Test
-    public void staticTest() {
-
-        final CachedBufferFactory factory = CachedBufferFactory.create(10, true);
-
-        for (int i = 0; i < 5; i++) {
-            factory.newDirectByteBuffer(2);
-        }
-
-        try{
-            factory.newDirectByteBuffer(1);
-            fail();
-        }catch (final RuntimeException ex) {
-            // expected
-        }
-
-    }
-
-    private void fill(final IntBuffer buffer, final int value) {
-        while(buffer.remaining() != 0)
-            buffer.put(value);
-
-        buffer.rewind();
-    }
-
-    private boolean equals(final IntBuffer buffer, final int value) {
-        while(buffer.remaining() != 0) {
-            if(value != buffer.get())
-                return false;
-        }
-
-        buffer.rewind();
-        return true;
-    }
-
-
-    /* load testing */
-
-    private int size = 4;
-    private final int iterations = 10000;
-
-//    @Test
-    public Object loadTest() {
-        final CachedBufferFactory factory = CachedBufferFactory.create();
-        final ByteBuffer[] buffer = new ByteBuffer[iterations];
-        for (int i = 0; i < buffer.length; i++) {
-            buffer[i] = factory.newDirectByteBuffer(size);
-        }
-        return buffer;
-    }
-
-//    @Test
-    public Object referenceTest() {
-        final ByteBuffer[] buffer = new ByteBuffer[iterations];
-        for (int i = 0; i < buffer.length; i++) {
-            buffer[i] = Buffers.newDirectByteBuffer(size);
-        }
-        return buffer;
-    }
-
-
-    public static void main(final String[] args) {
-
-        CachedBufferFactoryTest test = new CachedBufferFactoryTest();
-
-        out.print("warmup...");
-        Object obj = null;
-        for (int i = 0; i < 100; i++) {
-            obj = test.referenceTest();
-            obj = test.loadTest();
-            gc();
-        }
-        out.println("done");
-
-        test = new CachedBufferFactoryTest();
-        gc();
-
-        for (int i = 0; i < 10; i++) {
-
-            out.println("allocation size: "+test.size);
-
-            long time = System.currentTimeMillis();
-            obj = test.referenceTest();
-            if(obj == null) return; // ref lock
-
-            out.println("reference: "+ (System.currentTimeMillis()-time));
-
-            gc();
-
-            time = currentTimeMillis();
-            obj = test.loadTest();
-            if(obj == null) return; // ref lock
-
-            out.println("factory:   "+ (System.currentTimeMillis()-time));
-
-            gc();
-
-            test.size*=2;
-        }
-
-    }
-
-}
diff -Nru gluegen2-2.3.2/src/junit/com/jogamp/common/nio/TestBuffers.java gluegen2-2.4.0+dfsg/src/junit/com/jogamp/common/nio/TestBuffers.java
--- gluegen2-2.3.2/src/junit/com/jogamp/common/nio/TestBuffers.java	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/src/junit/com/jogamp/common/nio/TestBuffers.java	2023-02-01 18:52:41.000000000 +0100
@@ -0,0 +1,169 @@
+/**
+ * Copyright 2010 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ *    1. Redistributions of source code must retain the above copyright notice, this list of
+ *       conditions and the following disclaimer.
+ *
+ *    2. Redistributions in binary form must reproduce the above copyright notice, this list
+ *       of conditions and the following disclaimer in the documentation and/or other materials
+ *       provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+
+/*
+ * Created on Sunday, July 04 2010 20:00
+ */
+package com.jogamp.common.nio;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.CharBuffer;
+import java.nio.DoubleBuffer;
+import java.nio.FloatBuffer;
+import java.nio.IntBuffer;
+import java.nio.LongBuffer;
+import java.nio.ShortBuffer;
+
+import org.junit.Test;
+
+import com.jogamp.junit.util.SingletonJunitCase;
+
+import static org.junit.Assert.*;
+
+/**
+ * @author Michael Bien
+ */
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+ at FixMethodOrder(MethodSorters.NAME_ASCENDING)
+public class TestBuffers extends SingletonJunitCase {
+
+    @Test
+    public void test01PositionLimitCapacityAfterArrayAllocation() {
+        final byte[] byteData = { 1, 2, 3, 4, 5, 6, 7, 8 };
+        final ByteBuffer byteBuffer = Buffers.newDirectByteBuffer(byteData);
+        assertEquals(0, byteBuffer.position());
+        assertEquals(8, byteBuffer.limit());
+        assertEquals(8, byteBuffer.capacity());
+        assertEquals(8, byteBuffer.remaining());
+        assertEquals(5, byteBuffer.get(4));
+
+        final double[] doubleData = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 };
+        final DoubleBuffer doubleBuffer = Buffers.newDirectDoubleBuffer(doubleData);
+        assertEquals(0, doubleBuffer.position());
+        assertEquals(8, doubleBuffer.limit());
+        assertEquals(8, doubleBuffer.capacity());
+        assertEquals(8, doubleBuffer.remaining());
+        assertEquals(5.0, doubleBuffer.get(4), 0.1);
+
+        final float[] floatData = { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f };
+        final FloatBuffer floatBuffer = Buffers.newDirectFloatBuffer(floatData);
+        assertEquals(0, floatBuffer.position());
+        assertEquals(8, floatBuffer.limit());
+        assertEquals(8, floatBuffer.capacity());
+        assertEquals(8, floatBuffer.remaining());
+        assertEquals(5.0f, floatBuffer.get(4), 0.1f);
+
+        final int[] intData = { 1, 2, 3, 4, 5, 6, 7, 8 };
+        final IntBuffer intBuffer = Buffers.newDirectIntBuffer(intData);
+        assertEquals(0, intBuffer.position());
+        assertEquals(8, intBuffer.limit());
+        assertEquals(8, intBuffer.capacity());
+        assertEquals(8, intBuffer.remaining());
+        assertEquals(5, intBuffer.get(4));
+
+        final long[] longData = { 1, 2, 3, 4, 5, 6, 7, 8 };
+        final LongBuffer longBuffer = Buffers.newDirectLongBuffer(longData);
+        assertEquals(0, longBuffer.position());
+        assertEquals(8, longBuffer.limit());
+        assertEquals(8, longBuffer.capacity());
+        assertEquals(8, longBuffer.remaining());
+        assertEquals(5, longBuffer.get(4));
+
+        final short[] shortData = { 1, 2, 3, 4, 5, 6, 7, 8 };
+        final ShortBuffer shortBuffer = Buffers.newDirectShortBuffer(shortData);
+        assertEquals(0, shortBuffer.position());
+        assertEquals(8, shortBuffer.limit());
+        assertEquals(8, shortBuffer.capacity());
+        assertEquals(8, shortBuffer.remaining());
+        assertEquals(5, shortBuffer.get(4));
+
+        final char[] charData = { 1, 2, 3, 4, 5, 6, 7, 8 };
+        final CharBuffer charBuffer = Buffers.newDirectCharBuffer(charData);
+        assertEquals(0, charBuffer.position());
+        assertEquals(8, charBuffer.limit());
+        assertEquals(8, charBuffer.capacity());
+        assertEquals(8, charBuffer.remaining());
+        assertEquals(5, charBuffer.get(4));
+    }
+
+    @Test
+    public void test10Slice() {
+
+        final IntBuffer buffer = Buffers.newDirectIntBuffer(6);
+        buffer.put(new int[]{1,2,3,4,5,6}).rewind();
+
+        final IntBuffer threefour = Buffers.slice(buffer, 2, 2);
+
+        assertEquals(3, threefour.get(0));
+        assertEquals(4, threefour.get(1));
+        assertEquals(2, threefour.capacity());
+
+        assertEquals(0, buffer.position());
+        assertEquals(6, buffer.limit());
+
+        final IntBuffer fourfivesix = Buffers.slice(buffer, 3, 3);
+
+        assertEquals(4, fourfivesix.get(0));
+        assertEquals(5, fourfivesix.get(1));
+        assertEquals(6, fourfivesix.get(2));
+        assertEquals(3, fourfivesix.capacity());
+
+        assertEquals(0, buffer.position());
+        assertEquals(6, buffer.limit());
+
+        final IntBuffer onetwothree = Buffers.slice(buffer, 0, 3);
+
+        assertEquals(1, onetwothree.get(0));
+        assertEquals(2, onetwothree.get(1));
+        assertEquals(3, onetwothree.get(2));
+        assertEquals(3, onetwothree.capacity());
+
+        assertEquals(0, buffer.position());
+        assertEquals(6, buffer.limit());
+
+        // is it really sliced?
+        buffer.put(2, 42);
+
+        assertEquals(42, buffer.get(2));
+        assertEquals(42, onetwothree.get(2));
+    }
+
+    @Test
+    public void test20Cleaner() {
+        final ByteBuffer byteBuffer = Buffers.newDirectByteBuffer(1024);
+        Buffers.Cleaner.clean(byteBuffer);
+    }
+
+    public static void main(final String args[]) throws IOException {
+        final String tstname = TestBuffers.class.getName();
+        org.junit.runner.JUnitCore.main(tstname);
+    }
+}
diff -Nru gluegen2-2.3.2/src/junit/com/jogamp/common/nio/TestByteBufferCopyStream.java gluegen2-2.4.0+dfsg/src/junit/com/jogamp/common/nio/TestByteBufferCopyStream.java
--- gluegen2-2.3.2/src/junit/com/jogamp/common/nio/TestByteBufferCopyStream.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/junit/com/jogamp/common/nio/TestByteBufferCopyStream.java	2023-02-01 18:52:41.000000000 +0100
@@ -52,6 +52,8 @@
                          final MappedByteBufferInputStream.CacheMode srcCacheMode, final int srcSliceShift,
                          final String dstFileName,
                          final MappedByteBufferInputStream.CacheMode dstCacheMode, final int dstSliceShift ) throws IOException {
+        System.err.println("Test: source[CacheMode "+srcCacheMode+", SliceShift "+srcSliceShift+"]");
+        System.err.println("      destin[CacheMode "+dstCacheMode+", SliceShift "+dstSliceShift+"]");
         final Runtime runtime = Runtime.getRuntime();
         final long[] usedMem0 = { 0 };
         final long[] freeMem0 = { 0 };
@@ -60,6 +62,7 @@
         final String prefix = "test "+String.format(TestByteBufferInputStream.PrintPrecision+" MiB", size/TestByteBufferInputStream.MIB);
         TestByteBufferInputStream.dumpMem(prefix+" before", runtime, -1, -1, usedMem0, freeMem0 );
 
+        final long t0 = Platform.currentTimeMillis();
         final File srcFile = new File(srcFileName);
         srcFile.delete();
         srcFile.createNewFile();
@@ -72,6 +75,7 @@
             _input.close();
             input = new RandomAccessFile(srcFile, "r");
         }
+        final long t1 = Platform.currentTimeMillis();
         final MappedByteBufferInputStream mis = new MappedByteBufferInputStream(input.getChannel(),
                                                                                 FileChannel.MapMode.READ_ONLY,
                                                                                 srcCacheMode,
@@ -131,12 +135,19 @@
             output.close();
             srcFile.delete();
             dstFile.delete();
+            final long t5 = Platform.currentTimeMillis();
             TestByteBufferInputStream.dumpMem(prefix+" after ", runtime, usedMem0[0], freeMem0[0], usedMem1, freeMem1 );
             System.gc();
+            final long t6 = Platform.currentTimeMillis();
             try {
                 Thread.sleep(500);
             } catch (final InterruptedException e) { }
             TestByteBufferInputStream.dumpMem(prefix+" gc'ed ", runtime, usedMem0[0], freeMem0[0], usedMem1, freeMem1 );
+            System.err.println("Performance Stats: ");
+            System.err.printf("- File-Create %6d ms\n", t1-t0);
+            System.err.printf("- File-Copy   %6d ms\n", t5-t1);
+            System.err.printf("- GC          %6d ms\n", t6-t5);
+            System.err.printf("- Total       %6d ms\n", t6-t0);
         }
         if( null != ioe || null != oome ) {
             if( null != oome ) {
diff -Nru gluegen2-2.3.2/src/junit/com/jogamp/common/nio/TestCachedBufferFactory.java gluegen2-2.4.0+dfsg/src/junit/com/jogamp/common/nio/TestCachedBufferFactory.java
--- gluegen2-2.3.2/src/junit/com/jogamp/common/nio/TestCachedBufferFactory.java	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/src/junit/com/jogamp/common/nio/TestCachedBufferFactory.java	2023-02-01 18:52:41.000000000 +0100
@@ -0,0 +1,252 @@
+/*
+ * Copyright 2011 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ *    1. Redistributions of source code must retain the above copyright notice, this list of
+ *       conditions and the following disclaimer.
+ *
+ *    2. Redistributions in binary form must reproduce the above copyright notice, this list
+ *       of conditions and the following disclaimer in the documentation and/or other materials
+ *       provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+package com.jogamp.common.nio;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.nio.IntBuffer;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+import java.util.concurrent.Callable;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.jogamp.junit.util.SingletonJunitCase;
+
+import static java.lang.System.*;
+import static org.junit.Assert.*;
+
+/**
+ *
+ * @author Michael Bien
+ */
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+ at FixMethodOrder(MethodSorters.NAME_ASCENDING)
+public class TestCachedBufferFactory extends SingletonJunitCase {
+
+    private final int BUFFERCOUNT = 120;
+
+    private static int[] sizes;
+    private static int[] values;
+    private static IntBuffer[] buffers;
+
+    @Before
+    public void setup() {
+
+        sizes = new int[BUFFERCOUNT];
+        values = new int[sizes.length];
+        buffers = new IntBuffer[sizes.length];
+
+        final Random rnd = new Random(7);
+
+        // setup
+        for (int i = 0; i < sizes.length; i++) {
+            sizes[i] = rnd.nextInt(80)+1;
+            values[i] = rnd.nextInt();
+        }
+
+    }
+
+    @After
+    public void teardown() {
+        sizes = null;
+        values = null;
+        buffers = null;
+    }
+
+    @Test
+    public void dynamicTest() {
+
+        final CachedBufferFactory factory = CachedBufferFactory.create(64);
+
+        // create
+        for (int i = 0; i < sizes.length; i++) {
+            buffers[i] = factory.newDirectIntBuffer(sizes[i]);
+            assertEquals(ByteOrder.nativeOrder(), buffers[i].order());
+            fill(buffers[i], values[i]);
+        }
+
+        // check
+        checkBuffers(buffers, sizes, values);
+
+    }
+
+    @Test
+    public void dynamicConcurrentTest() throws InterruptedException, ExecutionException {
+
+        final CachedBufferFactory factory = CachedBufferFactory.createSynchronized(24);
+
+        final List<Callable<Object>> callables = new ArrayList<Callable<Object>>();
+
+        final CountDownLatch latch = new CountDownLatch(10);
+
+        // create
+        for (int i = 0; i < sizes.length; i++) {
+            final int n = i;
+            final Callable<Object> c = new Callable<Object>() {
+                public Object call() throws Exception {
+                    latch.countDown();
+                    latch.await();
+                    buffers[n] = factory.newDirectIntBuffer(sizes[n]);
+                    fill(buffers[n], values[n]);
+                    return null;
+                }
+            };
+            callables.add(c);
+        }
+
+        final ExecutorService dathVader = Executors.newFixedThreadPool(10);
+        dathVader.invokeAll(callables);
+
+        dathVader.shutdown();
+
+        // check
+        checkBuffers(buffers, sizes, values);
+
+    }
+
+    private void checkBuffers(final IntBuffer[] buffers, final int[] sizes, final int[] values) {
+        for (int i = 0; i < buffers.length; i++) {
+            final IntBuffer buffer = buffers[i];
+            assertEquals(sizes[i], buffer.capacity());
+            assertEquals(0, buffer.position());
+            assertTrue(equals(buffer, values[i]));
+        }
+    }
+
+    @Test
+    public void staticTest() {
+
+        final CachedBufferFactory factory = CachedBufferFactory.create(10, true);
+
+        for (int i = 0; i < 5; i++) {
+            factory.newDirectByteBuffer(2);
+        }
+
+        try{
+            factory.newDirectByteBuffer(1);
+            fail();
+        }catch (final RuntimeException ex) {
+            // expected
+        }
+
+    }
+
+    private void fill(final IntBuffer buffer, final int value) {
+        while(buffer.remaining() != 0)
+            buffer.put(value);
+
+        buffer.rewind();
+    }
+
+    private boolean equals(final IntBuffer buffer, final int value) {
+        while(buffer.remaining() != 0) {
+            if(value != buffer.get())
+                return false;
+        }
+
+        buffer.rewind();
+        return true;
+    }
+
+
+    /* load testing */
+
+    private int size = 4;
+    private final int iterations = 10000;
+
+//    @Test
+    public Object loadTest() {
+        final CachedBufferFactory factory = CachedBufferFactory.create();
+        final ByteBuffer[] buffer = new ByteBuffer[iterations];
+        for (int i = 0; i < buffer.length; i++) {
+            buffer[i] = factory.newDirectByteBuffer(size);
+        }
+        return buffer;
+    }
+
+//    @Test
+    public Object referenceTest() {
+        final ByteBuffer[] buffer = new ByteBuffer[iterations];
+        for (int i = 0; i < buffer.length; i++) {
+            buffer[i] = Buffers.newDirectByteBuffer(size);
+        }
+        return buffer;
+    }
+
+
+    public static void main(final String[] args) {
+
+        TestCachedBufferFactory test = new TestCachedBufferFactory();
+
+        out.print("warmup...");
+        Object obj = null;
+        for (int i = 0; i < 100; i++) {
+            obj = test.referenceTest();
+            obj = test.loadTest();
+            gc();
+        }
+        out.println("done");
+
+        test = new TestCachedBufferFactory();
+        gc();
+
+        for (int i = 0; i < 10; i++) {
+
+            out.println("allocation size: "+test.size);
+
+            long time = System.currentTimeMillis();
+            obj = test.referenceTest();
+            if(obj == null) return; // ref lock
+
+            out.println("reference: "+ (System.currentTimeMillis()-time));
+
+            gc();
+
+            time = currentTimeMillis();
+            obj = test.loadTest();
+            if(obj == null) return; // ref lock
+
+            out.println("factory:   "+ (System.currentTimeMillis()-time));
+
+            gc();
+
+            test.size*=2;
+        }
+
+    }
+
+}
diff -Nru gluegen2-2.3.2/src/junit/com/jogamp/common/util/BitDemoData.java gluegen2-2.4.0+dfsg/src/junit/com/jogamp/common/util/BitDemoData.java
--- gluegen2-2.3.2/src/junit/com/jogamp/common/util/BitDemoData.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/junit/com/jogamp/common/util/BitDemoData.java	2023-02-01 18:52:41.000000000 +0100
@@ -29,6 +29,7 @@
 package com.jogamp.common.util;
 
 import java.nio.ByteBuffer;
+import java.util.Locale;
 
 public class BitDemoData {
     public static final long UNSIGNED_INT_MAX_VALUE = 0xffffffffL;
@@ -166,14 +167,14 @@
     }
     public static String toHexBinaryString(final long v, final int bitCount) {
         final int nibbles = 0 == bitCount ? 2 : ( bitCount + 3 ) / 4;
-        return String.format("[%0"+nibbles+"X, %s]", v, toBinaryString(v, bitCount));
+        return String.format((Locale)null, "[%0"+nibbles+"X, %s]", v, toBinaryString(v, bitCount));
     }
     public static String toHexBinaryString(final int v, final int bitCount) {
         final int nibbles = 0 == bitCount ? 2 : ( bitCount + 3 ) / 4;
-        return String.format("[%0"+nibbles+"X, %s]", v, toBinaryString(v, bitCount));
+        return String.format((Locale)null, "[%0"+nibbles+"X, %s]", v, toBinaryString(v, bitCount));
     }
     public static String toHexBinaryString(final short v, final int bitCount) {
         final int nibbles = 0 == bitCount ? 2 : ( bitCount + 3 ) / 4;
-        return String.format("[%0"+nibbles+"X, %s]", v, toBinaryString(v, bitCount));
+        return String.format((Locale)null, "[%0"+nibbles+"X, %s]", v, toBinaryString(v, bitCount));
     }
 }
diff -Nru gluegen2-2.3.2/src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java gluegen2-2.4.0+dfsg/src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java
--- gluegen2-2.3.2/src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java	2023-02-01 18:52:41.000000000 +0100
@@ -57,7 +57,7 @@
         }
     }
 
-    static void yield(final YieldMode mode) {
+    static void yield_thread(final YieldMode mode) {
         switch(mode) {
             case YIELD:
                 Thread.yield();
@@ -119,7 +119,7 @@
                     System.err.print("+");
                 }
                 while(l>0) l--;
-                yield(yieldMode);
+                yield_thread(yieldMode);
             } finally {
                 if(DEBUG) {
                     System.err.print("-");
@@ -151,7 +151,7 @@
                         System.err.print("+");
                     }
                     while(l>0) l--;
-                     yield(yieldMode);
+                     yield_thread(yieldMode);
                 } finally {
                     if(DEBUG) {
                         System.err.print("-");
diff -Nru gluegen2-2.3.2/src/junit/com/jogamp/common/util/locks/TestRecursiveThreadGroupLock01.java gluegen2-2.4.0+dfsg/src/junit/com/jogamp/common/util/locks/TestRecursiveThreadGroupLock01.java
--- gluegen2-2.3.2/src/junit/com/jogamp/common/util/locks/TestRecursiveThreadGroupLock01.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/junit/com/jogamp/common/util/locks/TestRecursiveThreadGroupLock01.java	2023-02-01 18:52:41.000000000 +0100
@@ -53,7 +53,7 @@
         }
     }
 
-    static void yield(final YieldMode mode) {
+    static void yield_thread(final YieldMode mode) {
         switch(mode) {
             case YIELD:
                 Thread.yield();
@@ -96,7 +96,7 @@
                         slaves[i].start();
                     }
                     while(slaveCounter<mark) {
-                        yield(yieldMode);
+                        yield_thread(yieldMode);
                     }
                 }
             } finally {
@@ -130,7 +130,7 @@
                 while(slaveCounter<mark) {
                     slaveCounter++;
                 } */
-                yield(yieldMode);
+                yield_thread(yieldMode);
             } finally {
                 if(DEBUG) {
                     System.err.println(tab+" "+name+" c "+slaveCounter+"]");
diff -Nru gluegen2-2.3.2/src/junit/com/jogamp/common/util/TestIteratorIndexCORE.java gluegen2-2.4.0+dfsg/src/junit/com/jogamp/common/util/TestIteratorIndexCORE.java
--- gluegen2-2.3.2/src/junit/com/jogamp/common/util/TestIteratorIndexCORE.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/junit/com/jogamp/common/util/TestIteratorIndexCORE.java	2023-02-01 18:52:41.000000000 +0100
@@ -45,7 +45,7 @@
     static int elems = 10;
     static int loop = ( Platform.getCPUFamily() == Platform.CPUFamily.ARM ) ? 20 : 9999999;
 
-    public void populate(final List l, int len) {
+    public void populate(final List<Integer> l, int len) {
         while(len>0) {
             l.add(new Integer(len--));
         }
@@ -54,12 +54,12 @@
     @Test
     public void test01ArrayListIterator() {
         int sum=0;
-        final ArrayList l = new ArrayList();
+        final ArrayList<Integer> l = new ArrayList<Integer>();
         populate(l, elems);
 
         for(int j=loop; j>0; j--) {
-            for(final Iterator iter = l.iterator(); iter.hasNext(); ) {
-                final Integer i = (Integer)iter.next();
+            for(final Iterator<Integer> iter = l.iterator(); iter.hasNext(); ) {
+                final Integer i = iter.next();
                 sum+=i.intValue();
             }
         }
@@ -69,12 +69,12 @@
     @Test
     public void test0ArrayListIndex() {
         int sum=0;
-        final ArrayList l = new ArrayList();
+        final ArrayList<Integer> l = new ArrayList<Integer>();
         populate(l, elems);
 
         for(int j=loop; j>0; j--) {
             for(int k = 0; k < l.size(); k++) {
-                final Integer i = (Integer)l.get(k);
+                final Integer i = l.get(k);
                 sum+=i.intValue();
             }
         }
@@ -84,12 +84,12 @@
     @Test
     public void test01LinkedListListIterator() {
         int sum=0;
-        final LinkedList l = new LinkedList();
+        final LinkedList<Integer> l = new LinkedList<Integer>();
         populate(l, elems);
 
         for(int j=loop; j>0; j--) {
-            for(final Iterator iter = l.iterator(); iter.hasNext(); ) {
-                final Integer i = (Integer)iter.next();
+            for(final Iterator<Integer> iter = l.iterator(); iter.hasNext(); ) {
+                final Integer i = iter.next();
                 sum+=i.intValue();
             }
         }
@@ -99,12 +99,12 @@
     @Test
     public void test01LinkedListListIndex() {
         int sum=0;
-        final LinkedList l = new LinkedList();
+        final LinkedList<Integer> l = new LinkedList<Integer>();
         populate(l, elems);
 
         for(int j=loop; j>0; j--) {
             for(int k = 0; k < l.size(); k++) {
-                final Integer i = (Integer)l.get(k);
+                final Integer i = l.get(k);
                 sum+=i.intValue();
             }
         }
diff -Nru gluegen2-2.3.2/src/junit/com/jogamp/common/util/TestJarUtil.java gluegen2-2.4.0+dfsg/src/junit/com/jogamp/common/util/TestJarUtil.java
--- gluegen2-2.3.2/src/junit/com/jogamp/common/util/TestJarUtil.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/junit/com/jogamp/common/util/TestJarUtil.java	2023-02-01 18:52:41.000000000 +0100
@@ -73,7 +73,7 @@
         Assert.assertTrue(TempCacheReg.isTempFileCacheUsed());
 
         fileCache = new TempFileCache();
-        Assert.assertTrue(fileCache.isValid());
+        Assert.assertTrue(fileCache.isValid(false));
         System.err.println("tmp dir: "+fileCache.getTempDir());
     }
 
@@ -150,8 +150,8 @@
         System.err.println("XXXXXXXXXXXXXXXXXXXXXXXXXXXX");
 
         Assert.assertTrue(TempJarCache.initSingleton());
-        Assert.assertTrue(TempCacheReg.isTempJarCacheUsed());
-        Assert.assertTrue(TempJarCache.isInitialized());
+        Assert.assertTrue(TempCacheReg.isTempJarCacheUsed(false));
+        Assert.assertTrue(TempJarCache.isInitialized(false));
 
         final ClassLoader rootCL = this.getClass().getClassLoader();
 
@@ -171,8 +171,8 @@
         System.err.println("XXXXXXXXXXXXXXXXXXXXXXXXXXXX");
 
         Assert.assertTrue(TempJarCache.initSingleton());
-        Assert.assertTrue(TempCacheReg.isTempJarCacheUsed());
-        Assert.assertTrue(TempJarCache.isInitialized());
+        Assert.assertTrue(TempCacheReg.isTempJarCacheUsed(false));
+        Assert.assertTrue(TempJarCache.isInitialized(false));
 
         final ClassLoader rootCL = this.getClass().getClassLoader();
 
@@ -199,8 +199,8 @@
         System.err.println("XXXXXXXXXXXXXXXXXXXXXXXXXXXX");
 
         Assert.assertTrue(TempJarCache.initSingleton());
-        Assert.assertTrue(TempCacheReg.isTempJarCacheUsed());
-        Assert.assertTrue(TempJarCache.isInitialized());
+        Assert.assertTrue(TempCacheReg.isTempJarCacheUsed(false));
+        Assert.assertTrue(TempJarCache.isInitialized(false));
 
         /** This classloader mimics what OSGi's does -- it takes jar: URLs and makes them into bundleresource: URLs
          * where the JAR is not directly accessible anymore. Here I leave the JAR name at the end of the URL so I can
diff -Nru gluegen2-2.3.2/src/junit/com/jogamp/common/util/TestTempJarCache.java gluegen2-2.4.0+dfsg/src/junit/com/jogamp/common/util/TestTempJarCache.java
--- gluegen2-2.3.2/src/junit/com/jogamp/common/util/TestTempJarCache.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/junit/com/jogamp/common/util/TestTempJarCache.java	2023-02-01 18:52:41.000000000 +0100
@@ -72,8 +72,8 @@
         Assert.assertTrue(fileCache3.getTempDir().exists());
         Assert.assertTrue(fileCache3.getTempDir().isDirectory());
 
-        Assert.assertEquals(fileCache2.getBaseDir(), fileCache3.getBaseDir());
-        Assert.assertEquals(fileCache2.getRootDir(), fileCache3.getRootDir());
+        Assert.assertEquals(TempFileCache.getBaseDir(), TempFileCache.getBaseDir());
+        Assert.assertEquals(TempFileCache.getRootDir(), TempFileCache.getRootDir());
 
         if(shallBeSame) {
             Assert.assertTrue("file caches are not equal", fileCache2.getTempDir().equals(fileCache3.getTempDir()));
@@ -122,7 +122,7 @@
         Assert.assertTrue(TempCacheReg.isTempFileCacheUsed());
 
         fileCache = new TempFileCache();
-        Assert.assertTrue(fileCache.isValid());
+        Assert.assertTrue(fileCache.isValid(false));
         System.err.println("tmp dir: "+fileCache.getTempDir());
     }
 
@@ -167,8 +167,8 @@
         // Assert.assertFalse(TempCacheReg.isTempJarCacheUsed());
         // Assert.assertFalse(TempJarCache.isInitialized());
         Assert.assertTrue(TempJarCache.initSingleton());
-        Assert.assertTrue(TempCacheReg.isTempJarCacheUsed());
-        Assert.assertTrue(TempJarCache.isInitialized());
+        Assert.assertTrue(TempCacheReg.isTempJarCacheUsed(false));
+        Assert.assertTrue(TempJarCache.isInitialized(false));
     }
 
     @Test
@@ -197,7 +197,7 @@
     public void testTempJarCache02AddNativeLibs() throws IOException, IllegalArgumentException, URISyntaxException {
         if(AndroidVersion.isAvailable) { System.err.println("n/a on Android"); return; }
         final Uri.Encoded nativeJarName = Uri.Encoded.cast("gluegen-rt-natives-"+Platform.getOSAndArch()+".jar");
-        final String libBaseName = "gluegen-rt";
+        final String libBaseName = "gluegen_rt";
         final ClassLoader cl = getClass().getClassLoader();
 
         final Uri jarUri = JarUtil.getJarUri(TempJarCache.class.getName(), cl);
@@ -245,17 +245,17 @@
         final ClassLoader cl2 = new TestClassLoader(urls, null);
         final ClassLoader cl3 = new TestClassLoader(urls, null);
 
-        Assert.assertFalse(( (Boolean) ReflectionUtil.callStaticMethod(TempJarCache.class.getName(), "isInitialized", null, null, cl2)
+        Assert.assertFalse(( (Boolean) ReflectionUtil.callStaticMethod(TempJarCache.class.getName(), "isInitialized", new Class<?>[] { Boolean.TYPE }, new Object[] { Boolean.FALSE }, cl2)
                            ).booleanValue());
-        Assert.assertFalse(( (Boolean) ReflectionUtil.callStaticMethod(TempJarCache.class.getName(), "isInitialized", null, null, cl3)
+        Assert.assertFalse(( (Boolean) ReflectionUtil.callStaticMethod(TempJarCache.class.getName(), "isInitialized", new Class<?>[] { Boolean.TYPE }, new Object[] { Boolean.FALSE }, cl3)
                            ).booleanValue());
         Assert.assertTrue(( (Boolean) ReflectionUtil.callStaticMethod(TempJarCache.class.getName(), "initSingleton", null, null, cl2)
                            ).booleanValue());
         Assert.assertTrue(( (Boolean) ReflectionUtil.callStaticMethod(TempJarCache.class.getName(), "initSingleton", null, null, cl3)
                            ).booleanValue());
-        Assert.assertTrue(( (Boolean) ReflectionUtil.callStaticMethod(TempJarCache.class.getName(), "isInitialized", null, null, cl2)
+        Assert.assertTrue(( (Boolean) ReflectionUtil.callStaticMethod(TempJarCache.class.getName(), "isInitialized", new Class<?>[] { Boolean.TYPE }, new Object[] { Boolean.FALSE }, cl2)
                            ).booleanValue());
-        Assert.assertTrue(( (Boolean) ReflectionUtil.callStaticMethod(TempJarCache.class.getName(), "isInitialized", null, null, cl3)
+        Assert.assertTrue(( (Boolean) ReflectionUtil.callStaticMethod(TempJarCache.class.getName(), "isInitialized", new Class<?>[] { Boolean.TYPE }, new Object[] { Boolean.FALSE }, cl3)
                            ).booleanValue());
 
         final Object fileCache2 = ReflectionUtil.callStaticMethod(TempJarCache.class.getName(), "getTempFileCache", null, null, cl2);
diff -Nru gluegen2-2.3.2/src/junit/com/jogamp/common/util/TestVersionInfo.java gluegen2-2.4.0+dfsg/src/junit/com/jogamp/common/util/TestVersionInfo.java
--- gluegen2-2.3.2/src/junit/com/jogamp/common/util/TestVersionInfo.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/junit/com/jogamp/common/util/TestVersionInfo.java	2023-02-01 18:52:41.000000000 +0100
@@ -29,19 +29,24 @@
 package com.jogamp.common.util;
 
 import java.io.IOException;
+import java.net.URISyntaxException;
+import java.security.NoSuchAlgorithmException;
 import org.junit.Test;
 
 import com.jogamp.common.GlueGenVersion;
 import com.jogamp.junit.util.SingletonJunitCase;
 
+import org.junit.Assert;
 import org.junit.FixMethodOrder;
 import org.junit.runners.MethodSorters;
 
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
 public class TestVersionInfo extends SingletonJunitCase {
+    static boolean VERBOSE = false;
 
     @Test
-    public void testInfo01() {
+    public void test01Info() {
+        System.err.println(VersionUtil.getPlatformInfo());
         System.err.println("Version Info:");
         System.err.println(GlueGenVersion.getInstance());
         System.err.println("");
@@ -49,8 +54,23 @@
         System.err.println(GlueGenVersion.getInstance().getFullManifestInfo(null));
     }
 
+    @Test
+    public void test02ValidateSHA()
+            throws IllegalArgumentException, IOException, URISyntaxException, SecurityException, NoSuchAlgorithmException
+    {
+        final GlueGenVersion info = GlueGenVersion.getInstance();
+        final String shaClassesThis = info.getImplementationSHAClassesThis();
+        System.err.println("SHA CLASSES.this (build-time): "+shaClassesThis);
+
+        final GlueGenVersion.GluGenRTJarSHASum shaSum = new GlueGenVersion.GluGenRTJarSHASum();
+        final byte[] shasum = shaSum.compute(VERBOSE);
+        final String shaClasses = SHASum.toHexString(shasum, null).toString();
+        System.err.println("SHA CLASSES.this (now): "+shaClasses);
+        Assert.assertEquals("SHA not equal", shaClassesThis, shaClasses);
+    }
 
     public static void main(final String args[]) throws IOException {
+        // VERBOSE = true;
         final String tstname = TestVersionInfo.class.getName();
         org.junit.runner.JUnitCore.main(tstname);
     }
diff -Nru gluegen2-2.3.2/src/junit/com/jogamp/common/util/TestVersionSemantics.java gluegen2-2.4.0+dfsg/src/junit/com/jogamp/common/util/TestVersionSemantics.java
--- gluegen2-2.3.2/src/junit/com/jogamp/common/util/TestVersionSemantics.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/junit/com/jogamp/common/util/TestVersionSemantics.java	2023-02-01 18:52:41.000000000 +0100
@@ -89,6 +89,11 @@
         testVersions(diffCriteria, Delta.CompatibilityType.NON_BACKWARD_COMPATIBLE, "2.2.1", "2.3.0", excludesDefault);
     }
 
+    @Test
+    public void testVersionV230V232() throws IllegalArgumentException, IOException, URISyntaxException {
+        testVersions(diffCriteria, Delta.CompatibilityType.BACKWARD_COMPATIBLE_BINARY, "2.3.0", "2.3.2", excludesDefault);
+    }
+
     void testVersions(final DiffCriteria diffCriteria, final Delta.CompatibilityType expectedCompatibilityType,
                       final String v1, final String v2, final Set<String> excludes)
                               throws IllegalArgumentException, IOException, URISyntaxException {
@@ -104,12 +109,12 @@
     }
 
     @Test
-    public void testVersionV230V23x() throws IllegalArgumentException, IOException, URISyntaxException {
-        // final Delta.CompatibilityType expectedCompatibilityType = Delta.CompatibilityType.NON_BACKWARD_COMPATIBLE;
+    public void testVersionV232V24x() throws IllegalArgumentException, IOException, URISyntaxException {
+        final Delta.CompatibilityType expectedCompatibilityType = Delta.CompatibilityType.NON_BACKWARD_COMPATIBLE;
         // final Delta.CompatibilityType expectedCompatibilityType = Delta.CompatibilityType.BACKWARD_COMPATIBLE_USER;
-        final Delta.CompatibilityType expectedCompatibilityType = Delta.CompatibilityType.BACKWARD_COMPATIBLE_BINARY;
+        // final Delta.CompatibilityType expectedCompatibilityType = Delta.CompatibilityType.BACKWARD_COMPATIBLE_BINARY;
 
-        final VersionNumberString preVersionNumber = new VersionNumberString("2.3.0");
+        final VersionNumberString preVersionNumber = new VersionNumberString("2.3.2");
         final File previousJar = new File("lib/v"+preVersionNumber.getVersionString()+"/"+jarFile);
 
         final ClassLoader currentCL = TestVersionSemantics.class.getClassLoader();
diff -Nru gluegen2-2.3.2/src/junit/com/jogamp/gluegen/test/junit/generation/BindingJNILibLoader.java gluegen2-2.4.0+dfsg/src/junit/com/jogamp/gluegen/test/junit/generation/BindingJNILibLoader.java
--- gluegen2-2.3.2/src/junit/com/jogamp/gluegen/test/junit/generation/BindingJNILibLoader.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/junit/com/jogamp/gluegen/test/junit/generation/BindingJNILibLoader.java	2023-02-01 18:52:41.000000000 +0100
@@ -29,27 +29,31 @@
 package com.jogamp.gluegen.test.junit.generation;
 
 import com.jogamp.common.jvm.JNILibLoaderBase;
+import com.jogamp.common.util.SecurityUtil;
+
 import java.security.*;
 
 public class BindingJNILibLoader extends JNILibLoaderBase {
 
-  public static void loadBindingtest1p1() {
-    AccessController.doPrivileged(new PrivilegedAction<Object>() {
-      public Object run() {
-        loadLibrary("Bindingtest1p1", null, true, BindingJNILibLoader.class.getClassLoader());
-        return null;
-      }
-    });
-  }
-
-  public static void loadBindingtest1p2() {
-    AccessController.doPrivileged(new PrivilegedAction<Object>() {
-      public Object run() {
-        loadLibrary("Bindingtest1p2", null, true, BindingJNILibLoader.class.getClassLoader());
-        return null;
-      }
-    });
-  }
+    public static void loadBindingtest1p1() {
+        SecurityUtil.doPrivileged(new PrivilegedAction<Object>() {
+            @Override
+            public Object run() {
+                loadLibrary("Bindingtest1p1", null, true, BindingJNILibLoader.class.getClassLoader());
+                return null;
+            }
+        });
+    }
+
+    public static void loadBindingtest1p2() {
+        SecurityUtil.doPrivileged(new PrivilegedAction<Object>() {
+            @Override
+            public Object run() {
+                loadLibrary("Bindingtest1p2", null, true, BindingJNILibLoader.class.getClassLoader());
+                return null;
+            }
+        });
+    }
 }
 
 
diff -Nru gluegen2-2.3.2/src/junit/com/jogamp/gluegen/test/junit/generation/test1.h gluegen2-2.4.0+dfsg/src/junit/com/jogamp/gluegen/test/junit/generation/test1.h
--- gluegen2-2.3.2/src/junit/com/jogamp/gluegen/test/junit/generation/test1.h	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/junit/com/jogamp/gluegen/test/junit/generation/test1.h	2023-02-01 18:52:41.000000000 +0100
@@ -299,8 +299,8 @@
 #define HUGE_VALF_3        ((int) 1e53)
 #define DOUBLE_DEFINE_BRACKETS_3 HUGE_VALF_3
 
-size_t unsigned_size_t_1;
-ptrdiff_t a_signed_pointer_t_1;
+extern size_t unsigned_size_t_1;
+extern ptrdiff_t a_signed_pointer_t_1;
 
 MYAPI int32_t   MYAPIENTRY typeTestInt32T(const int32_t i1, int32_t i2);
 MYAPI uint32_t  MYAPIENTRY typeTestUInt32T(const uint32_t ui1, uint32_t ui2);
@@ -462,8 +462,8 @@
 
     TK_Context ctx;
 
-    const char modelNameArrayFixedLen[12]; /* 'Hello Array' len=11+1 */
-    const char * modelNamePointerCString;    /* 'Hello CString' len=13+1 */
+    char modelNameArrayFixedLen[12]; /* 'Hello Array' len=11+1 */
+    char * modelNamePointerCString;    /* 'Hello CString' len=13+1 */
     const char * modelNamePointerCustomLen;  /* 'Hello Pointer' len=13+1 */
     const int modelNamePointerCustomLenVal;  /* 13+1 */
 
@@ -495,7 +495,7 @@
     TK_Context ctx;
 
     char modelNameArrayFixedLen[12]; /* 'Hello Array' len=11+1 */
-    const char * modelNamePointerCString;    /* 'Hello CString' len=13+1 */
+    char * modelNamePointerCString;    /* 'Hello CString' len=13+1 */
     char * modelNamePointerCustomLen;  /* 'Hello Pointer' len=13+1 */
     int modelNamePointerCustomLenVal;  /* 13+1 */
 
diff -Nru gluegen2-2.3.2/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p2DynamicLibraryBundle.java gluegen2-2.4.0+dfsg/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p2DynamicLibraryBundle.java
--- gluegen2-2.3.2/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p2DynamicLibraryBundle.java	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p2DynamicLibraryBundle.java	2023-02-01 18:52:41.000000000 +0100
@@ -0,0 +1,271 @@
+/**
+ * Copyright 2019 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ *    1. Redistributions of source code must retain the above copyright notice, this list of
+ *       conditions and the following disclaimer.
+ *
+ *    2. Redistributions in binary form must reproduce the above copyright notice, this list
+ *       of conditions and the following disclaimer in the documentation and/or other materials
+ *       provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+
+package com.jogamp.gluegen.test.junit.generation;
+
+import com.jogamp.gluegen.test.junit.generation.impl.Bindingtest1p2Impl;
+import com.jogamp.common.os.DynamicLibraryBundle;
+import com.jogamp.common.os.DynamicLibraryBundleInfo;
+import com.jogamp.common.os.NativeLibrary;
+import com.jogamp.common.util.RunnableExecutor;
+import com.jogamp.common.util.TestIOUtil01;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+ at FixMethodOrder(MethodSorters.NAME_ASCENDING)
+public class Test1p2DynamicLibraryBundle extends BaseClass {
+
+    static DynamicLibraryBundle dlb;
+
+    /**
+     * Verifies loading of the new library.
+     */
+    @BeforeClass
+    public static void chapter__TestLoadLibrary() throws Exception {
+        dlb = new DynamicLibraryBundle(new Test1DynLibBundleInfo());
+        Assert.assertTrue("DynamicLibraryBundle failed", dlb.isLibComplete());
+
+        Bindingtest1p2Impl.resetProcAddressTable(dlb);
+    }
+
+    /**
+     * Verifies the existence and creation of the generated class.
+     */
+    @Test
+    public void chapter00TestClassExist() throws Exception {
+        testClassExist("test1p2");
+    }
+
+    /**
+     * Verifies if all generated method signatures are completed,
+     * ie a compilation only coverage test without functional tests.
+     */
+    public void chapter__TestCoverageSignature() throws Exception {
+        chapter__TestCoverageSignature(new Bindingtest1p2Impl());
+    }
+
+    /**
+     * Verifies if all generated static constant values are completed,
+     * and whether their value is as expected!
+     * <p>
+     * Covers all enumerates and defines.
+     * </p>
+     */
+    @Test
+    public void chapter01TestStaticConstants() throws Exception {
+        chapter01TestStaticConstants(new Bindingtest1p2Impl());
+    }
+
+    /**
+     * Verifies if all methods / signatures are properly generated,
+     * can be invoked and functions.
+     * This is a compilation (coverage) and runtime time (semantic) test.
+     * This covers indirect primitive arrays and direct NIO buffers.
+     */
+    @Test
+    public void chapter03aTestCoverageFunctionalityDirectNIOAndPrimitiveArray() throws Exception {
+        chapter03TestCoverageFunctionalityNIOAndPrimitiveArray(new Bindingtest1p2Impl(), true);
+    }
+
+    /**
+     * Verifies if all methods / signatures are properly generated,
+     * can be invoked and functions.
+     * This is a compilation (coverage) and runtime time (semantic) test.
+     * This covers indirect primitive arrays and indirect NIO buffers (nio using arrays).
+     */
+    @Test
+    public void chapter03bTestCoverageFunctionalityIndirectNIOAndPrimitiveArray() throws Exception {
+        chapter03TestCoverageFunctionalityNIOAndPrimitiveArray(new Bindingtest1p2Impl(), false);
+    }
+
+    /**
+     * This covers direct / indirect pointer buffers
+     */
+    @Test
+    public void chapter04TestPointerBuffer() throws Exception {
+        this.chapter04TestPointerBuffer(new Bindingtest1p2Impl());
+    }
+
+    /**
+     * This covers indirect primitive arrays and indirect NIO buffers.
+     */
+    @Test
+    public void chapter05TestSomeFunctionsAllIndirect() throws Exception {
+        chapter05TestSomeFunctionsAllIndirect(new Bindingtest1p2Impl());
+    }
+
+    /**
+     * This covers compounds (structs) data alignment
+     */
+    @Test
+    public void chapter09TestCompoundAlignment() throws Exception {
+        chapter09TestCompoundAlignment(new Bindingtest1p2Impl());
+    }
+
+    /**
+     * This covers compounds (structs) call-by-reference
+     */
+    @Test
+    public void chapter10TestCompoundCallByReference() throws Exception {
+        chapter10TestCompoundCallByReference(new Bindingtest1p2Impl());
+    }
+
+    /**
+     * This covers compounds (structs) call-by-value
+     */
+    @Test
+    public void chapter11TestCompoundCallByValue() throws Exception {
+        chapter11TestCompoundCallByValue(new Bindingtest1p2Impl());
+    }
+
+    /**
+     * Test compound access read-only
+     */
+    @Test
+    public void chapter12TestStructArrayModelConst() throws Exception {
+        chapter12TestStructArrayModelConst(new Bindingtest1p2Impl());
+    }
+
+    /**
+     * Test compound access read-write
+     */
+    @Test
+    public void chapter13TestStructArrayModelMutable() throws Exception {
+        chapter13TestStructArrayModelMutable(new Bindingtest1p2Impl());
+    }
+
+    /**
+     * Verifies unloading of the new library.
+     */
+    @AfterClass
+    public static void chapter0XTestUnloadLibrary() throws Exception {
+        Assert.assertNotNull(dlb);
+        dlb.destroy();
+        dlb = null;
+    }
+
+    @SuppressWarnings("unused")
+    public static void main(final String args[]) throws Exception {
+        if( false ) {
+            chapter__TestLoadLibrary();
+            final Test1p2DynamicLibraryBundle tst = new Test1p2DynamicLibraryBundle();
+            tst.chapter00TestClassExist();
+        } else {
+            final String tstname = Test1p2DynamicLibraryBundle.class.getName();
+            org.junit.runner.JUnitCore.main(tstname);
+        }
+    }
+
+    public static class Test1DynLibBundleInfo implements DynamicLibraryBundleInfo  {
+        private static final List<String> glueLibNames;
+        static {
+            glueLibNames = new ArrayList<String>();
+            glueLibNames.add("Bindingtest1p2");
+        }
+
+        protected Test1DynLibBundleInfo() {
+        }
+
+        /**
+         * <p>
+         * Returns <code>true</code>,
+         * since we might load the library and allow symbol access to subsequent libs.
+         * </p>
+         */
+        @Override
+        public final boolean shallLinkGlobal() { return true; }
+
+        /**
+         * {@inheritDoc}
+         * <p>
+         * Returns <code>false</code>.
+         * </p>
+         */
+        @Override
+        public final boolean shallLookupGlobal() { return false; }
+
+        @Override
+        public final List<String> getGlueLibNames() {
+            return glueLibNames;
+        }
+
+        @Override
+        public final boolean searchToolLibInSystemPath() {
+            return true;
+        }
+
+        @Override
+        public final boolean searchToolLibSystemPathFirst() {
+            return true;
+        }
+
+        @Override
+        public final List<List<String>> getToolLibNames() {
+            final List<List<String>> libNamesList = new ArrayList<List<String>>();
+
+            final List<String> libNames = new ArrayList<String>();
+            {
+                // this is the default AL lib name, according to the spec
+                // libNames.add("libtest1.so"); // unix
+                libNames.add("test1"); // windows, OSX
+            }
+            libNamesList.add(libNames);
+
+            return libNamesList;
+        }
+
+        @Override
+        public final List<String> getToolGetProcAddressFuncNameList() {
+            return null;
+        }
+
+        @Override
+        public final long toolGetProcAddress(final long toolGetProcAddressHandle, final String funcName) {
+            return 0;
+        }
+
+        @Override
+        public final boolean useToolGetProcAdressFirst(final String funcName) {
+            return false;
+        }
+
+        @Override
+        public final RunnableExecutor getLibLoaderExecutor() {
+            return DynamicLibraryBundle.getDefaultRunnableExecutor();
+        }
+    }
+
+}
diff -Nru gluegen2-2.3.2/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p2LoadJNIAndImplLib.java gluegen2-2.4.0+dfsg/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p2LoadJNIAndImplLib.java
--- gluegen2-2.3.2/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p2LoadJNIAndImplLib.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p2LoadJNIAndImplLib.java	2023-02-01 18:52:41.000000000 +0100
@@ -48,7 +48,7 @@
     @BeforeClass
     public static void chapter__TestLoadLibrary() throws Exception {
         BindingJNILibLoader.loadBindingtest1p2();
-        dynamicLookupHelper = NativeLibrary.open("test1", Test1p2LoadJNIAndImplLib.class.getClassLoader(), true);
+        dynamicLookupHelper = NativeLibrary.open("test1", true, true, Test1p2LoadJNIAndImplLib.class.getClassLoader(), true);
         Assert.assertNotNull("NativeLibrary.open(test1) failed", dynamicLookupHelper);
 
         Bindingtest1p2Impl.resetProcAddressTable(dynamicLookupHelper);
diff -Nru gluegen2-2.3.2/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p2ProcAddressEmitter.java gluegen2-2.4.0+dfsg/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p2ProcAddressEmitter.java
--- gluegen2-2.3.2/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p2ProcAddressEmitter.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p2ProcAddressEmitter.java	2023-02-01 18:52:41.000000000 +0100
@@ -57,7 +57,7 @@
     @BeforeClass
     public static void chapter__TestLoadLibrary() throws Exception {
         BindingJNILibLoader.loadBindingtest1p2();
-        dynamicLookupHelper = NativeLibrary.open("test1", Test1p2ProcAddressEmitter.class.getClassLoader(), true);
+        dynamicLookupHelper = NativeLibrary.open("test1", false, false, Test1p2ProcAddressEmitter.class.getClassLoader(), true);
         Assert.assertNotNull("NativeLibrary.open(test1) failed", dynamicLookupHelper);
 
         Bindingtest1p2Impl.resetProcAddressTable(dynamicLookupHelper);
diff -Nru gluegen2-2.3.2/src/junit/com/jogamp/gluegen/test/junit/structgen/package-info.java gluegen2-2.4.0+dfsg/src/junit/com/jogamp/gluegen/test/junit/structgen/package-info.java
--- gluegen2-2.3.2/src/junit/com/jogamp/gluegen/test/junit/structgen/package-info.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/junit/com/jogamp/gluegen/test/junit/structgen/package-info.java	2023-02-01 18:52:41.000000000 +0100
@@ -7,7 +7,7 @@
  * </p>
  * @see BuildStruct01
  */
- at CStructs({@CStruct(name="RenderingConfig", header="TestStruct01.h"), @CStruct(name="Pixel", header="TestStruct02.h")})
+ at CStructs({@CStruct(name="RenderingConfig", jname="RenderingConfig", header="TestStruct01.h"), @CStruct(name="Pixel", jname="Pixel", header="TestStruct02.h")})
 package com.jogamp.gluegen.test.junit.structgen;
 
 import com.jogamp.gluegen.structgen.CStructs;
diff -Nru gluegen2-2.3.2/src/junit/com/jogamp/junit/sec/Applet01.java gluegen2-2.4.0+dfsg/src/junit/com/jogamp/junit/sec/Applet01.java
--- gluegen2-2.3.2/src/junit/com/jogamp/junit/sec/Applet01.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/junit/com/jogamp/junit/sec/Applet01.java	2023-02-01 18:52:41.000000000 +0100
@@ -201,7 +201,7 @@
             final Uri absLib = libDir1.concat(Uri.Encoded.cast("natives/" + libBaseName));
             Exception sec01 = null;
             try {
-                final NativeLibrary nlib = NativeLibrary.open(absLib.toFile().getPath(), cl);
+                final NativeLibrary nlib = NativeLibrary.open(absLib.toFile().getPath(), true, true, cl, true);
                 System.err.println("NativeLibrary: "+nlib);
             } catch (final SecurityException e) {
                 sec01 = e;
diff -Nru gluegen2-2.3.2/src/junit/com/jogamp/junit/sec/TestSecIOUtil01.java gluegen2-2.4.0+dfsg/src/junit/com/jogamp/junit/sec/TestSecIOUtil01.java
--- gluegen2-2.3.2/src/junit/com/jogamp/junit/sec/TestSecIOUtil01.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/junit/com/jogamp/junit/sec/TestSecIOUtil01.java	2023-02-01 18:52:41.000000000 +0100
@@ -183,7 +183,7 @@
             Exception se0 = null;
             NativeLibrary nlib = null;
             try {
-                nlib = NativeLibrary.open(absLib.toFile().getPath(), cl);
+                nlib = NativeLibrary.open(absLib.toFile().getPath(), true, true, cl, true);
                 System.err.println("NativeLibrary: "+nlib);
             } catch (final SecurityException e) {
                 se0 = e;
diff -Nru gluegen2-2.3.2/src/junit/com/jogamp/junit/util/JunitTracer.java gluegen2-2.4.0+dfsg/src/junit/com/jogamp/junit/util/JunitTracer.java
--- gluegen2-2.3.2/src/junit/com/jogamp/junit/util/JunitTracer.java	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/src/junit/com/jogamp/junit/util/JunitTracer.java	2023-02-01 18:52:41.000000000 +0100
@@ -98,7 +98,7 @@
 
     static final String unsupportedTestMsg = "Test not supported on this platform.";
 
-    public static final void waitForKey(final String preMessage) {
+    public static void waitForKey(final String preMessage) {
         final BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
         System.err.println(preMessage+"> Press enter to continue");
         try {
diff -Nru gluegen2-2.3.2/src/native/common/JVM_JNI8.c gluegen2-2.4.0+dfsg/src/native/common/JVM_JNI8.c
--- gluegen2-2.3.2/src/native/common/JVM_JNI8.c	1970-01-01 01:00:00.000000000 +0100
+++ gluegen2-2.4.0+dfsg/src/native/common/JVM_JNI8.c	2023-02-01 18:52:41.000000000 +0100
@@ -0,0 +1,42 @@
+/**
+ * Copyright 2019 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ *    1. Redistributions of source code must retain the above copyright notice, this list of
+ *       conditions and the following disclaimer.
+ *
+ *    2. Redistributions in binary form must reproduce the above copyright notice, this list
+ *       of conditions and the following disclaimer in the documentation and/or other materials
+ *       provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+
+#include <stdio.h> //required by android to identify NULL
+#include <jni.h>
+
+#if defined (JNI_VERSION_1_8)
+
+JNIEXPORT jint JNICALL JNI_OnLoad_gluegen_rt(JavaVM *vm, void *reserved) {
+    return JNI_VERSION_1_8;
+}
+
+JNIEXPORT void JNICALL JNI_OnUnload_gluegen_rt(JavaVM *vm, void *reserved) {
+}
+
+#endif /* defined (JNI_VERSION_1_8) */
+
diff -Nru gluegen2-2.3.2/test/junit/com/jogamp/gluegen/build.xml gluegen2-2.4.0+dfsg/test/junit/com/jogamp/gluegen/build.xml
--- gluegen2-2.3.2/test/junit/com/jogamp/gluegen/build.xml	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/test/junit/com/jogamp/gluegen/build.xml	2023-02-01 18:52:41.000000000 +0100
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<project name="GlueGenTest" default="default" basedir=".">
+<project name="GlueGenTest" basedir=".">
 
     <description>Tests GlueGen</description>
 
@@ -22,7 +22,6 @@
         <echo message=" - - - compiling java files - - - "/>
 
         <property name="build.dir.java" value="${build.dir}/classes"/>
-        <property name="tools.jar" value="${java.home}/../lib/tools.jar"/>
 
         <echo message="src: ${src.dir} "/>
         <echo message="build: ${build.dir.java} "/>
@@ -31,7 +30,7 @@
 
         <javac destdir="${build.dir.java}" source="1.5" failonerror="true" debug="true" debuglevel="lines,vars,source">
             <src path="${src.dir}"/>
-            <classpath path="${gluegen.root}/${rootrel.build}/classes:${src.dir}:${gluegen.root}/${rootrel.build}/antlr-3.2.jar:${gluegen.root}/make/lib/junit.jar:${tools.jar}:${ant.core.lib}"/>
+            <classpath path="${gluegen.root}/${rootrel.build}/classes:${src.dir}:${gluegen.root}/${rootrel.build}/antlr-3.2.jar:${gluegen.root}/make/lib/junit.jar:${ant.core.lib}"/>
         </javac>
 
         <echo message=" - - - java files compiled - - - "/>
diff -Nru gluegen2-2.3.2/www/index.html gluegen2-2.4.0+dfsg/www/index.html
--- gluegen2-2.3.2/www/index.html	2015-10-09 06:18:28.000000000 +0200
+++ gluegen2-2.4.0+dfsg/www/index.html	2023-02-01 18:52:41.000000000 +0100
@@ -2,7 +2,9 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
         <link href="../../style.css" rel="stylesheet" type="text/css"/>
+        <link href="../../style-alt1.css" rel="alternate stylesheet" title="default sans-serif font" type="text/css"/>
         <title>Gluegen</title>
     </head>
     <body>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libjogl2-java.diff
Type: text/x-diff
Size: 3600378 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20230423/c39b3ad1/attachment-0001.diff>


More information about the debian-science-maintainers mailing list