diff options
Diffstat (limited to 'recipes-core/openjdk/openjdk-8-native.inc')
| -rw-r--r-- | recipes-core/openjdk/openjdk-8-native.inc | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/recipes-core/openjdk/openjdk-8-native.inc b/recipes-core/openjdk/openjdk-8-native.inc new file mode 100644 index 0000000..7813ec2 --- /dev/null +++ b/recipes-core/openjdk/openjdk-8-native.inc | |||
| @@ -0,0 +1,82 @@ | |||
| 1 | JDK_DIR = "openjdk-8-native" | ||
| 2 | DEPENDS = "\ | ||
| 3 | icedtea7-native ant-native \ | ||
| 4 | libxslt-native attr-native \ | ||
| 5 | giflib-native jpeg-native libpng-native \ | ||
| 6 | glib-2.0-native freetype-native fontconfig-native \ | ||
| 7 | zlib-native zip-native \ | ||
| 8 | unzip-native make-native \ | ||
| 9 | ca-certificates-native openssl-native \ | ||
| 10 | " | ||
| 11 | |||
| 12 | PACKAGECONFIG ??= "" | ||
| 13 | PACKAGECONFIG[x11] = "--with-x,,libx11-native xproto-native libxt-native libxext-native libxrender-native" | ||
| 14 | PACKAGECONFIG[cups] = "--with-cups,,cups" | ||
| 15 | PACKAGECONFIG[alsa] = "--with-alsa,,alsa-lib-native" | ||
| 16 | PACKAGECONFIG[jce] = "--enable-unlimited-crypto,," | ||
| 17 | |||
| 18 | # do not use --wth-extra-cflags, it breaks building demos for jdk | ||
| 19 | # maybe disabling demos is more reasonable than avoiding --wth-extra-cflags | ||
| 20 | # needs discussion | ||
| 21 | EXTRA_OECONF_append = "\ | ||
| 22 | --with-jobs=${@get_jdk8_native_jobs(d)} \ | ||
| 23 | \ | ||
| 24 | --with-sys-root=${STAGING_DIR_NATIVE} \ | ||
| 25 | --with-tools-dir=${STAGING_DIR_NATIVE} \ | ||
| 26 | --with-boot-jdk=${STAGING_LIBDIR_NATIVE}/jvm/icedtea7-native \ | ||
| 27 | ${@jdk_configure_options(d)} \ | ||
| 28 | " | ||
| 29 | # --with-boot-jdk=${WORKDIR}/fake-jdk | ||
| 30 | |||
| 31 | inherit native | ||
| 32 | |||
| 33 | require openjdk-8-common.inc | ||
| 34 | |||
| 35 | CFLAGS_append = "${@jdk_cpp_options(d)}" | ||
| 36 | CPPFLAGS_append = "${@jdk_cpp_options(d)}" | ||
| 37 | CXXFLAGS_append = "${@jdk_cpp_options(d)}" | ||
| 38 | |||
| 39 | export MAKE_VERBOSE = "y" | ||
| 40 | export MFLAGS="${@jdk_make_options(d)} MAKE_VERBOSE=y QUIETLY= VERBOSE=-s LOG_LEVEL=trace" | ||
| 41 | |||
| 42 | EXTRA_OEMAKE_append = ' \ | ||
| 43 | OE_CFLAGS="${CFLAGS}" \ | ||
| 44 | OE_CPPFLAGS="${CPPFLAGS}" \ | ||
| 45 | OE_CXXFLAGS="${CXXFLAGS}" \ | ||
| 46 | OE_LDFLAGS="${LDFLAGS}" \ | ||
| 47 | ${@jdk_make_options(d)} \ | ||
| 48 | MAKE_VERBOSE=y VERBOSE=-s LOG_LEVEL=trace \ | ||
| 49 | QUIETLY= \ | ||
| 50 | images \ | ||
| 51 | ' | ||
| 52 | |||
| 53 | do_compile_append() { | ||
| 54 | set -x | ||
| 55 | mkdir -p ${B}/certs | ||
| 56 | for pem in $(find ${STAGING_DATADIR}/ca-certificates -name "*.crt") | ||
| 57 | do | ||
| 58 | bp=`basename ${pem}` | ||
| 59 | alias=`echo ${bp} | sed -e 's,\.[^.]*$,,'` | ||
| 60 | md5a=`echo ${alias} | md5sum | awk '{print $1}'` | ||
| 61 | der=`echo ${bp} | sed -e 's,crt$,der,'` | ||
| 62 | openssl x509 -in "${pem}" -inform pem -out "${B}/certs/${md5a}.der" -outform der | ||
| 63 | ${B}/images/j2sdk-image/bin/keytool -importcert -noprompt -storepass changeit \ | ||
| 64 | -keystore "${B}/images/j2sdk-image/jre/lib/security/cacerts" \ | ||
| 65 | -alias "${alias}" -file "${B}/certs/${md5a}.der" | ||
| 66 | done | ||
| 67 | set +x | ||
| 68 | } | ||
| 69 | |||
| 70 | do_install() { | ||
| 71 | rm -rf ${STAGING_LIBDIR_NATIVE}/jvm/${JDK_DIR} | ||
| 72 | mkdir -p ${STAGING_LIBDIR_NATIVE}/jvm/${JDK_DIR} | ||
| 73 | cp -rp ${B}/images/j2sdk-image/* ${STAGING_LIBDIR_NATIVE}/jvm/${JDK_DIR} | ||
| 74 | |||
| 75 | # clean up the mess from bootstrap | ||
| 76 | for tool in jar java javac keytool pack200 unpack200 | ||
| 77 | do | ||
| 78 | rm -f ${STAGING_BINDIR_NATIVE}/$tool | ||
| 79 | |||
| 80 | ln -sf "../lib/jvm/${JDK_DIR}/bin/$tool" ${STAGING_BINDIR_NATIVE}/$tool | ||
| 81 | done | ||
| 82 | } | ||
