[oe] [meta-java][PATCH 3/5] openjdk-8-cross.inc: tweak PACKAGECONFIG default value

liu.ming50 at gmail.com liu.ming50 at gmail.com
Sun Apr 23 06:54:54 UTC 2017


From: Ming Liu <peter.x.liu at external.atlascopco.com>

When x11, alsa is being set in DISTRO_FEATURES, the users might expect
openjdk build with the related options as well. For instance, they might
be confused when the openjdk is still built as headless but x11 is
actually enabled from system aspect.

With this patch, the end users still can choose build openjdk without
these options by overriding PACKAGECONFIG.

Two small fixes are also needed to let openjdk build with x11:
- Add libxtst to DEPENDS.
- Pass ac_x_includes and ac_x_libraries to configure command.

Signed-off-by: Ming Liu <peter.x.liu at external.atlascopco.com>
---
 recipes-core/openjdk/openjdk-8-cross.inc | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/recipes-core/openjdk/openjdk-8-cross.inc b/recipes-core/openjdk/openjdk-8-cross.inc
index 11e98b5..3973fcf 100644
--- a/recipes-core/openjdk/openjdk-8-cross.inc
+++ b/recipes-core/openjdk/openjdk-8-cross.inc
@@ -15,8 +15,12 @@ PRIVATE_LIBS = "\
     libsctp.so libsplashscreen.so libsunec.so libunpack.so libverify.so libzip.so \
 "
 
-PACKAGECONFIG ??= "repack"
-PACKAGECONFIG[x11] = "--with-x,,libx11 xproto libxt libxext libxrender"
+PACKAGECONFIG ??= " \
+    repack \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 cups', '', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)} \
+"
+PACKAGECONFIG[x11] = "--with-x,,libx11 xproto libxt libxext libxrender libxtst"
 PACKAGECONFIG[cups] = "--with-cups,,cups"
 PACKAGECONFIG[alsa] = "--with-alsa,,alsa-lib"
 
@@ -31,6 +35,11 @@ PACKAGECONFIG[shark] = "--with-jvm-variants=zeroshark,,llvm3.5,"
 
 PACKAGECONFIG[repack] = ",,,"
 
+CACHED_CONFIGUREVARS = " \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'ac_x_includes=${STAGING_INCDIR}', '', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'ac_x_libraries=${STAGING_LIBDIR}', '', d)} \
+"
+
 require openjdk-8-common.inc
 
 JAVA_HOME[unexport] = "1"
-- 
2.7.4




More information about the Openembedded-devel mailing list