[yocto] [meta-java][PATCH 04/14] openjdk-8: rework do_patch (pt 1 - X11 wrappers)

André Draszik git at andred.net
Mon Mar 5 01:30:56 PST 2018


From: André Draszik <andre.draszik at jci.com>

X11 wrappers are currently being deleted using a custom
do_patch[postfuncs]. This is confusing to say the least,
as e.g. naming implies this is done after ./configure
has run.

At the moment, this also happens halfway through
patches have been applied, i.e. some patches are being
applied, then the X11 wrappers are deleted, then
more patches are being applied.

Streamline this so that the unneeded wrappers are
removed as part of do_unpack[postfuncs].

Signed-off-by: André Draszik <andre.draszik at jci.com>
---
 recipes-core/openjdk/openjdk-8-common.inc | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/recipes-core/openjdk/openjdk-8-common.inc b/recipes-core/openjdk/openjdk-8-common.inc
index ab4c870..cf14be9 100644
--- a/recipes-core/openjdk/openjdk-8-common.inc
+++ b/recipes-core/openjdk/openjdk-8-common.inc
@@ -39,6 +39,10 @@ do_unpack_extract_submodules () {
     tar xjf ${WORKDIR}/${NASHORN_FILE} --transform "s,-${NASHORN_CHANGESET},,g"
 }
 
+do_unpack_remove_X11_wrappers() {
+    find ${S}/jdk/src/solaris/classes/sun/awt/X11 -maxdepth 1 -name '*.java' -delete
+}
+
 def package_config_option_cleanup(d):
     distro_x11 = bb.utils.contains('DISTRO_FEATURES', 'x11', True, False, d)
     distro_alsa = bb.utils.contains('DISTRO_FEATURES', 'alsa', True, False, d)
@@ -149,13 +153,11 @@ def jdk_configure_options(d):
     return options[3]
 
 do_unpack[postfuncs] += "do_unpack_extract_submodules"
-
-POST_CONFIGURE_CLEAN_X11 = "${@bb.utils.contains('PACKAGECONFIG', 'x11', '', 'rm -f jdk/src/solaris/classes/sun/awt/X11/*.java', d)}"
+do_unpack[postfuncs] += "${@bb.utils.contains('PACKAGECONFIG', 'x11', '', 'do_unpack_remove_X11_wrappers', d)}"
 
 do_patch_openjdk8() {
         olddir=`pwd`
         cd "${S}"
-        ${POST_CONFIGURE_CLEAN_X11}
         for OJ8P in ${WORKDIR}/openjdk8-*.patch; do
                 patch -p0 < ${OJ8P}
         done
-- 
2.16.2




More information about the yocto mailing list