All of lore.kernel.org
 help / color / mirror / Atom feed
From: "André Draszik" <git@andred.net>
To: openembedded-devel@lists.openembedded.org
Subject: [meta-oe][PATCH 2/5] nodejs: delete all bundled deps in do_unpack() if needed
Date: Sun, 10 Nov 2019 22:05:07 +0000	[thread overview]
Message-ID: <20191110220510.10077-2-git@andred.net> (raw)
In-Reply-To: <20191110220510.10077-1-git@andred.net>

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 <git@andred.net>
---
 .../recipes-devtools/nodejs/nodejs_10.17.0.bb   | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

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 9c514e6be..53149af5e 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_append = "\
     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
-- 
2.23.0.rc1



  reply	other threads:[~2019-11-10 22:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-10 22:05 [meta-oe][PATCH 1/5] nodejs: ensure to use correct compiler & flags always André Draszik
2019-11-10 22:05 ` André Draszik [this message]
2019-11-10 22:05 ` [meta-oe][PATCH 3/5] nodejs: allow use of system gyp André Draszik
2019-11-10 22:05 ` [meta-oe][PATCH 4/5] nodejs: use OE-provided compiler flags (arm) André Draszik
2019-11-10 22:05 ` [meta-oe][PATCH 5/5] nodejs: support long directory names for ${B} / ${S} André Draszik
2019-11-13  9:58 ` [meta-oe][PATCH] nodejs: ensure to use correct compiler & flags always André Draszik
2019-11-13 12:19   ` André Draszik
2019-11-13 16:12     ` Khem Raj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191110220510.10077-2-git@andred.net \
    --to=git@andred.net \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.