From: Joshua Watt <jpewhacker@gmail.com>
To: openembedded-devel@lists.openembedded.org
Cc: Stefan Agner <stefan.agner@toradex.com>
Subject: [meta-networking][PATCH v2] waf-samba.bbclass: No longer inherit waf.bbclass
Date: Mon, 12 Feb 2018 10:20:41 -0600 [thread overview]
Message-ID: <20180212162041.25713-1-JPEWhacker@gmail.com> (raw)
In-Reply-To: <20180211215129.9564-1-JPEWhacker@gmail.com>
waf-samba.bbclass uses waf in a very different way than the "standard"
method that waf.bbclass targets and ends getting very little useful
functionality from that class.
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
meta-networking/classes/waf-samba.bbclass | 28 ++++++++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/meta-networking/classes/waf-samba.bbclass b/meta-networking/classes/waf-samba.bbclass
index e490176241..0ce51610f3 100644
--- a/meta-networking/classes/waf-samba.bbclass
+++ b/meta-networking/classes/waf-samba.bbclass
@@ -1,7 +1,7 @@
# waf is a build system which is used by samba related project.
# Obtain details from https://wiki.samba.org/index.php/Waf
-#
-inherit qemu pythonnative waf
+#
+inherit qemu pythonnative
DEPENDS += "qemu-native libxslt-native docbook-xsl-stylesheets-native python"
@@ -21,6 +21,29 @@ CONFIGUREOPTS = " --prefix=${prefix} \
${PACKAGECONFIG_CONFARGS} \
"
+# avoids build breaks when using no-static-libs.inc
+DISABLE_STATIC = ""
+
+def get_waf_parallel_make(d):
+ pm = d.getVar('PARALLEL_MAKE')
+ if pm:
+ # look for '-j' and throw other options (e.g. '-l') away
+ # because they might have different meaning in bjam
+ pm = pm.split()
+ while pm:
+ opt = pm.pop(0)
+ if opt == '-j':
+ v = pm.pop(0)
+ elif opt.startswith('-j'):
+ v = opt[2:].strip()
+ else:
+ continue
+
+ v = min(64, int(v))
+ return '-j' + str(v)
+
+ return ""
+
# Three methods for waf cross compile:
# 1. answers:
# Only --cross-answers - try the cross-answers file, and if
@@ -86,6 +109,7 @@ do_configure() {
fi
}
+do_compile[progress] = "outof:^\[\s*(\d+)/\s*(\d+)\]\s+"
do_compile () {
python ./buildtools/bin/waf ${@get_waf_parallel_make(d)}
}
--
2.14.3
next prev parent reply other threads:[~2018-02-12 16:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-11 21:51 [meta-networking][PATCH] waf-samba.bbclass: No longer inherit waf.bbclass Joshua Watt
2018-02-12 2:30 ` Robert Yang
2018-02-12 3:53 ` Joshua Watt
2018-02-12 16:20 ` Joshua Watt [this message]
2018-02-14 16:28 ` [meta-networking][PATCH v2] " Kyle Russell
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=20180212162041.25713-1-JPEWhacker@gmail.com \
--to=jpewhacker@gmail.com \
--cc=openembedded-devel@lists.openembedded.org \
--cc=stefan.agner@toradex.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox