[meta-java] openjdk-8: support building compact profiles

Submitted by Kyle Russell on Feb. 4, 2019, 10:09 p.m. | Patch ID: 158504

Details

Message ID 20190204220945.27243-1-bkylerussell@gmail.com
State Under Review
Delegated to: Richard Leitner
Headers show

Commit Message

Kyle Russell Feb. 4, 2019, 10:09 p.m.
Signed-off-by: Kyle Russell <bkylerussell@gmail.com>
---
 recipes-core/openjdk/openjdk-8-cross.inc | 3 +++
 recipes-core/openjdk/openjre-8_172b11.bb | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/recipes-core/openjdk/openjdk-8-cross.inc b/recipes-core/openjdk/openjdk-8-cross.inc
index d04b0d3..bc52638 100644
--- a/recipes-core/openjdk/openjdk-8-cross.inc
+++ b/recipes-core/openjdk/openjdk-8-cross.inc
@@ -1,6 +1,8 @@ 
 JDK_HOME = "${libdir_jvm}/openjdk-8"
 JRE_HOME = "${libdir_jvm}/openjre-8"
 
+JRE_PROFILE ?= "j2re-image"
+
 DEPENDS = "\
     openjdk-8-native zip-native ant-native libxslt \
     krb5 libffi fontconfig freetype \
@@ -105,6 +107,7 @@  EXTRA_OEMAKE_append = '\
     MAKE_VERBOSE=y VERBOSE=-s LOG_LEVEL=trace \
     QUIETLY= \
     images \
+    profiles \
 '
 
 python remove_debuglink() {
diff --git a/recipes-core/openjdk/openjre-8_172b11.bb b/recipes-core/openjdk/openjre-8_172b11.bb
index e9b930b..3dc799c 100644
--- a/recipes-core/openjdk/openjre-8_172b11.bb
+++ b/recipes-core/openjdk/openjre-8_172b11.bb
@@ -8,7 +8,7 @@  require openjdk-8-cross.inc
 do_install() {
     rm -rf ${D}${JRE_HOME}
     mkdir -p ${D}${JRE_HOME}
-    cp -rp ${B}/images/j2re-image/* ${D}${JRE_HOME}
+    cp -rp ${B}/images/${JRE_PROFILE}/* ${D}${JRE_HOME}
     chown -R root:root ${D}${JRE_HOME}
     install -m644 ${WORKDIR}/jvm.cfg  ${D}${JRE_HOME}/lib/${JDK_ARCH}/
     find ${D}${JRE_HOME} -name "*.debuginfo" -print0 | xargs -0 rm