diff options
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_10.17.0.bb')
-rw-r--r-- | meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_10.17.0.bb | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_10.17.0.bb b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_10.17.0.bb index 4013c6931..8c690ae7d 100644 --- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_10.17.0.bb +++ b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_10.17.0.bb @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=be980eb7ccafe287cb438076a65e888c" DEPENDS = "openssl" DEPENDS_append_class-target = " nodejs-native" -inherit pkgconfig +inherit pkgconfig pythonnative COMPATIBLE_MACHINE_armv4 = "(!.*armv4).*" COMPATIBLE_MACHINE_armv5 = "(!.*armv5).*" @@ -19,7 +19,7 @@ SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \ file://0001-Disable-running-gyp-files-for-bundled-deps.patch \ file://0004-Make-compatibility-with-gcc-4.8.patch \ file://0005-Link-atomic-library.patch \ - file://0006-Use-target-ldflags.patch \ + file://0007-v8-don-t-override-ARM-CFLAGS.patch \ " SRC_URI_append_class-target = " \ file://0002-Using-native-torque.patch \ @@ -53,14 +53,46 @@ ARCHFLAGS ?= "" PACKAGECONFIG ??= "ares icu libuv zlib" PACKAGECONFIG[ares] = "--shared-cares,,c-ares" +PACKAGECONFIG[gyp] = ",,gyp-py2-native" PACKAGECONFIG[icu] = "--with-intl=system-icu,--without-intl,icu" PACKAGECONFIG[libuv] = "--shared-libuv,,libuv" PACKAGECONFIG[nghttp2] = "--shared-nghttp2,,nghttp2" PACKAGECONFIG[zlib] = "--shared-zlib,,zlib" +# We don't want to cross-compile during target compile, +# and we need to use the right flags during host compile, +# too. +EXTRA_OEMAKE = "\ + CC.host='${CC}' \ + CFLAGS.host='${CPPFLAGS} ${CFLAGS}' \ + CXX.host='${CXX}' \ + CXXFLAGS.host='${CPPFLAGS} ${CXXFLAGS}' \ + LDFLAGS.host='${LDFLAGS}' \ + AR.host='${AR}' \ + \ + builddir_name=./ \ +" + +python do_unpack() { + import shutil + + bb.build.exec_func('base_do_unpack', d) + + shutil.rmtree(d.getVar('S') + '/deps/openssl', True) + if 'ares' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/cares', True) + if 'gyp' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/tools/gyp', True) + if 'libuv' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/uv', True) + if 'nghttp2' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/nghttp2', True) + if 'zlib' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/zlib', True) +} + # Node is way too cool to use proper autotools, so we install two wrappers to forcefully inject proper arch cflags to workaround gypi do_configure () { - rm -rf ${S}/deps/openssl export LD="${CXX}" GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES # $TARGET_ARCH settings don't match --dest-cpu settings |