summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel McGregor <daniel.mcgregor@vecima.com>2016-04-20 14:09:52 -0600
committerMaxin B. John <maxin.john@intel.com>2016-04-26 11:51:40 +0300
commitc59092ac054860c98ce2f4d35e05936ead03f479 (patch)
tree4bc531d93c843ab5c0950aaaee4c7e941e9f0a57
parent1d125bfa18f7363bf9c9887434c441acbde10862 (diff)
downloadmeta-java-c59092ac054860c98ce2f4d35e05936ead03f479.tar.gz
openjdk-8: make jar repacking optional
Repacking the runtime jar files takes a long time, and is only done to save some space. Make it optional to speed up builds that don't need it. Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com> Signed-off-by: Maxin B. John <maxin.john@intel.com>
-rw-r--r--recipes-core/openjdk/openjdk-8-cross.inc21
-rw-r--r--recipes-core/openjdk/openjdk-8_72b05.bb7
-rw-r--r--recipes-core/openjdk/openjre-8_72b05.bb7
3 files changed, 22 insertions, 13 deletions
diff --git a/recipes-core/openjdk/openjdk-8-cross.inc b/recipes-core/openjdk/openjdk-8-cross.inc
index 63572ad..c68ac42 100644
--- a/recipes-core/openjdk/openjdk-8-cross.inc
+++ b/recipes-core/openjdk/openjdk-8-cross.inc
@@ -6,7 +6,7 @@ DEPENDS = "\
6 jpeg libpng krb5 libffi fontconfig freetype \ 6 jpeg libpng krb5 libffi fontconfig freetype \
7" 7"
8 8
9PACKAGECONFIG ??= "" 9PACKAGECONFIG ??= "repack"
10PACKAGECONFIG[x11] = "--with-x,,libx11 xproto libxt libxext libxrender" 10PACKAGECONFIG[x11] = "--with-x,,libx11 xproto libxt libxext libxrender"
11PACKAGECONFIG[cups] = "--with-cups,,cups" 11PACKAGECONFIG[cups] = "--with-cups,,cups"
12PACKAGECONFIG[alsa] = "--with-alsa,,alsa-lib-native" 12PACKAGECONFIG[alsa] = "--with-alsa,,alsa-lib-native"
@@ -20,6 +20,8 @@ export WANT_LLVM_RELEASE = "3.5.2"
20PACKAGECONFIG[zero] = "--with-jvm-variants=zero,,," 20PACKAGECONFIG[zero] = "--with-jvm-variants=zero,,,"
21PACKAGECONFIG[shark] = "--with-jvm-variants=zeroshark,,llvm3.5," 21PACKAGECONFIG[shark] = "--with-jvm-variants=zeroshark,,llvm3.5,"
22 22
23PACKAGECONFIG[repack] = ",,,"
24
23require openjdk-8-common.inc 25require openjdk-8-common.inc
24 26
25JAVA_HOME[unexport] = "1" 27JAVA_HOME[unexport] = "1"
@@ -49,6 +51,23 @@ do_configure_append() {
49 sed -i -e 's,POST_STRIP_CMD:=.*,POST_STRIP_CMD:=,g' ${B}/spec.gmk 51 sed -i -e 's,POST_STRIP_CMD:=.*,POST_STRIP_CMD:=,g' ${B}/spec.gmk
50} 52}
51 53
54do_install_append() {
55 if ${@bb.utils.contains('PACKAGECONFIG', 'repack', 'true', 'false', d)} ; then
56 if [ -d ${D}${JDK_HOME} ] ; then
57 find ${D}${JDK_HOME} -name "*.jar" -print0 | \
58 xargs -0 -n1 -P ${@get_jdk8_native_jobs(d)} sh -c ' \
59 echo "Repacking" "$0" ; \
60 pack200 --repack --effort=9 --segment-limit=-1 --modification-time=latest --strip-debug "$0"'
61 fi
62 if [ -d ${D}${JRE_HOME} ] ; then
63 find ${D}${JRE_HOME} -name "*.jar" -print0 | \
64 xargs -0 -n1 -P ${@get_jdk8_native_jobs(d)} sh -c ' \
65 echo "Repacking" "$0" ; \
66 pack200 --repack --effort=9 --segment-limit=-1 --modification-time=latest --strip-debug "$0"'
67 fi
68 fi
69}
70
52export MAKE_VERBOSE = "y" 71export MAKE_VERBOSE = "y"
53export MFLAGS="${@jdk_make_options(d)} MAKE_VERBOSE=y QUIETLY= VERBOSE=-s LOG_LEVEL=trace STRIP_POLICY=no_strip" 72export MFLAGS="${@jdk_make_options(d)} MAKE_VERBOSE=y QUIETLY= VERBOSE=-s LOG_LEVEL=trace STRIP_POLICY=no_strip"
54 73
diff --git a/recipes-core/openjdk/openjdk-8_72b05.bb b/recipes-core/openjdk/openjdk-8_72b05.bb
index feaf227..f378b0a 100644
--- a/recipes-core/openjdk/openjdk-8_72b05.bb
+++ b/recipes-core/openjdk/openjdk-8_72b05.bb
@@ -13,14 +13,9 @@ PATCHES_URI_append = "\
13 file://openjdk8-fix-adlc-flags.patch;apply=no \ 13 file://openjdk8-fix-adlc-flags.patch;apply=no \
14" 14"
15 15
16do_compile_append() {
17 find ${B}/images/j2sdk-image -name "*.jar" -print0 | \
18 xargs -0 -n1 ${STAGING_LIBDIR_NATIVE}/jvm/openjdk-8-native/bin/pack200 --repack --effort=9 --segment-limit=-1 --modification-time=latest
19}
20
21do_install() { 16do_install() {
22 rm -rf ${D}${JDK_HOME} 17 rm -rf ${D}${JDK_HOME}
23 mkdir -p ${D}${JDK_HOME} 18 mkdir -p ${D}${JDK_HOME}
24 cp -rp ${B}/images/j2sdk-image/* ${D}${JDK_HOME} 19 cp -rp ${B}/images/j2sdk-image/* ${D}${JDK_HOME}
25 chown -R root:root ${D}${JDK_HOME} 20 chown -R root:root ${D}${JDK_HOME}
26 install -m644 ${WORKDIR}/jvm.cfg ${D}${JDK_HOME}/jre/lib/${JDK_ARCH}/ 21 install -m644 ${WORKDIR}/jvm.cfg ${D}${JDK_HOME}/jre/lib/${JDK_ARCH}/
diff --git a/recipes-core/openjdk/openjre-8_72b05.bb b/recipes-core/openjdk/openjre-8_72b05.bb
index 6202498..6d29d12 100644
--- a/recipes-core/openjdk/openjre-8_72b05.bb
+++ b/recipes-core/openjdk/openjre-8_72b05.bb
@@ -11,14 +11,9 @@ PATCHES_URI_append = "\
11 file://openjdk8-use_builtin_frame_address_0_rather_than_returning_address_of_local_variable.patch;apply=no \ 11 file://openjdk8-use_builtin_frame_address_0_rather_than_returning_address_of_local_variable.patch;apply=no \
12" 12"
13 13
14do_compile_append() {
15 find ${B}/images/j2re-image -name "*.jar" -print0 | \
16 xargs -0 -n1 ${STAGING_LIBDIR_NATIVE}/jvm/openjdk-8-native/bin/pack200 --repack --effort=9 --segment-limit=-1 --modification-time=latest --strip-debug
17}
18
19do_install() { 14do_install() {
20 rm -rf ${D}${JRE_HOME} 15 rm -rf ${D}${JRE_HOME}
21 mkdir -p ${D}${JRE_HOME} 16 mkdir -p ${D}${JRE_HOME}
22 cp -rp ${B}/images/j2re-image/* ${D}${JRE_HOME} 17 cp -rp ${B}/images/j2re-image/* ${D}${JRE_HOME}
23 chown -R root:root ${D}${JRE_HOME} 18 chown -R root:root ${D}${JRE_HOME}
24 install -m644 ${WORKDIR}/jvm.cfg ${D}${JRE_HOME}/lib/${JDK_ARCH}/ 19 install -m644 ${WORKDIR}/jvm.cfg ${D}${JRE_HOME}/lib/${JDK_ARCH}/