From 1b975523b8d0467b2e3a44097825c30cdc9e3944 Mon Sep 17 00:00:00 2001 From: Erkka Kääriä Date: Fri, 29 Apr 2016 09:48:19 +0300 Subject: java-bootstrapping: Do not rely on hardcoded paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Various paths to files are hardcoded in either helper scripts or the resulting binaries (like path to Java class libraries). While this works well when using the files on the build machine, things start breaking down when the sstate gets shared between multiple workers in CI, as the paths between workers can differ. Instead of using these hardcoded paths, form the paths at runtime and pass them as parameters when required. Signed-off-by: Erkka Kääriä Signed-off-by: Maxin B. John --- recipes-core/cacao/cacao_1.6.1.bb | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'recipes-core/cacao/cacao_1.6.1.bb') diff --git a/recipes-core/cacao/cacao_1.6.1.bb b/recipes-core/cacao/cacao_1.6.1.bb index 83f216c..ec13cc5 100644 --- a/recipes-core/cacao/cacao_1.6.1.bb +++ b/recipes-core/cacao/cacao_1.6.1.bb @@ -11,7 +11,10 @@ DEPENDS = "zlib libtool classpath virtual/javac-native bdwgc" RPROVIDES_${PN} = "java2-runtime" SRC_URI = "http://www.complang.tuwien.ac.at/cacaojvm/download/cacao-${PV}/cacao-${PV}.tar.xz \ - file://system-boehm-gc.patch" + file://system-boehm-gc.patch \ + file://cacao-1.6.1-do-not-rely-on-absolute-paths.patch \ +" + SRC_URI[md5sum] = "2c18478404afd1cffdd15ad1e9d85a57" SRC_URI[sha256sum] = "eecc8bd1b528a028f43d9d1d0c06b97855bbf1d40e03826d911ebbc0b6971e12" @@ -23,13 +26,12 @@ REQUIRED_DISTRO_FEATURES_class-native := "" EXTRA_OECONF_class-native = "\ --enable-debug \ --with-vm-zip=${datadir}/cacao/vm.zip \ - --disable-libjvm \ - \ --with-java-runtime-library-classes=${datadir}/classpath/glibj.zip \ --with-java-runtime-library-libdir=${libdir_jni}:${libdir} \ --with-jni_md_h=${includedir}/classpath \ --with-jni_h=${includedir}/classpath \ --disable-test-dependency-checks \ + --disable-libjvm \ " CACHED_CONFIGUREVARS_class-native += "ac_cv_prog_JAVAC=${STAGING_BINDIR_NATIVE}/ecj-initial" @@ -37,11 +39,9 @@ CACHED_CONFIGUREVARS_class-native += "ac_cv_prog_JAVAC=${STAGING_BINDIR_NATIVE}/ EXTRA_OECONF = "\ --with-vm-zip=${datadir}/cacao/vm.zip \ --disable-libjvm \ - \ --with-build-java-runtime-library-classes=${STAGING_DATADIR}/classpath/glibj.zip \ --with-jni_h=${STAGING_INCDIR}/classpath \ --with-jni_md_h=${STAGING_INCDIR}/classpath \ - \ --with-java-runtime-library-classes=${datadir}/classpath/glibj.zip \ --with-java-runtime-library-libdir=${libdir_jni}:${libdir} \ --disable-test-dependency-checks \ @@ -54,21 +54,12 @@ do_configure_prepend () { mkdir -p src/mm/boehm-gc/m4 } -do_install_append () { +do_install_append_class-target() { rm ${D}/${bindir}/java } -do_install_append_class-native () { - ln -sf cacao ${D}/${bindir}/java -} - FILES_${PN} = "${bindir}/${PN} ${libdir}/cacao/lib*.so ${libdir}/lib*.so* ${datadir}/${PN}" FILES_${PN}-dbg += "${bindir}/.debug ${libdir}/.debug/lib*.so*" FILES_${PN}-doc += "${datadir}/gc" -ALTERNATIVE_${PN} = "java" -ALTERNATIVE_LINK = "${bindir}/java" -ALTERNATIVE_TARGET = "${bindir}/cacao" -ALTERNATIVE_PRIORITY = "10" - BBCLASSEXTEND = "native" -- cgit v1.2.3-54-g00ecf