java-atk-wrapper accessibility and openjdk9

Fridrich Strba fridrich.strba at suse.com
Tue Nov 7 08:15:18 UTC 2017


So, I gave a good thought to making the java-atk-wrapper a modular jar
and I came with a serie of patches that I submitted to GNOME bugzilla.
This one contains all patches that fix some issues I had with it, but
that will not force us to build it with source/target 9:

https://bugzilla.gnome.org/show_bug.cgi?id=789956

This bug has the two patches that (1) make the j-a-w implement the
javax.accessibility.AccessibilityProvider interface that is new in jdk9
and (2) build j-a-w as a modular jar:

https://bugzilla.gnome.org/show_bug.cgi?id=789959

These two patches modify the java-atk-wrapper so much that I don't think
putting them into the source tree is useful at this point. I submitted
them into bugzilla for the reference of future generations who would
have the same itch to scratch.

I attached minimal versions of patches that change only the necessary
parts so that I can build java-atk-wrapper inside the rpm build and link
the atk.wrapper (as I named it) module into the jdk. The java code is
then always part of the jdk, but the -accessibility package adds the
native library into JAVA_HOME/lib/ and the accessibility.properties file
into JAVA_HOME/conf. Without the accessibility.properties file, the
AtkProvider is not even trying to load. This is still then corresponding
to the result I wanted so that the accessibility doesn't need to be
configured by user, just the -accessibility package installed.

Cheers

Fridrich

P.S.: The part of my rpm spec file that builds and merges the
atk.wrapper module is:

# Build the accessibility plugin
pushd java-atk-wrapper-%{java_atk_wrapper_version}
autoreconf --force --install
rm wrapper/org/GNOME/Accessibility/AtkWrapper.java
%configure \
	--without-jdk-auto-detect \
	JDK_SRC=$JAVA_HOME
rm wrapper/org/GNOME/Accessibility/AtkWrapper.java
make %{?_smp_mflags}
cp wrapper/java-atk-wrapper.jar $JAVA_HOME/../jmods/
cp jni/src/.libs/libatk-wrapper.so $JAVA_HOME/lib/
popd
# Merge the java-atk-wrapper into the JDK
source $JAVA_HOME/release; export MODULES
$JAVA_HOME/bin/jlink --module-path $JAVA_HOME/../jmods --add-modules
"atk.wrapper,${MODULES//\ /,}" --output $JAVA_HOME/../newjdk
cp -rf $JAVA_HOME/../newjdk/* $JAVA_HOME/
rm -rf $JAVA_HOME/../newjdk


-------------- next part --------------
A non-text attachment was scrubbed...
Name: jaw-jdk9.patch
Type: text/x-patch
Size: 4913 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20171107/6f495a45/jaw-jdk9.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jaw-misc.patch
Type: text/x-patch
Size: 1500 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20171107/6f495a45/jaw-misc.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20171107/6f495a45/signature.asc>


More information about the distro-pkg-dev mailing list