From 0c6cdbe3dbe95ae1f4654c13583020ae55a6c0af Mon Sep 17 00:00:00 2001 From: André Draszik Date: Sun, 10 Nov 2019 22:05:07 +0000 Subject: nodejs: delete all bundled deps in do_unpack() if needed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We can delete bundled deps where system-provided counterparts should be used instead. Amongst others, this ensures they are not used accidentally. Signed-off-by: André Draszik Signed-off-by: Khem Raj --- meta-oe/recipes-devtools/nodejs/nodejs_10.17.0.bb | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'meta-oe/recipes-devtools') diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_10.17.0.bb b/meta-oe/recipes-devtools/nodejs/nodejs_10.17.0.bb index 9af0d998c2..4342693b34 100644 --- a/meta-oe/recipes-devtools/nodejs/nodejs_10.17.0.bb +++ b/meta-oe/recipes-devtools/nodejs/nodejs_10.17.0.bb @@ -69,9 +69,24 @@ EXTRA_OEMAKE = "\ AR.host='${AR}' \ " +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 '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 -- cgit v1.2.3-54-g00ecf