]> code.ossystems Code Review - openembedded-core.git/commitdiff
net-tools: enable native and nativesdk variant
authorPatrick Ohly <patrick.ohly@intel.com>
Thu, 30 Mar 2017 15:09:36 +0000 (17:09 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 30 Mar 2017 21:52:32 +0000 (22:52 +0100)
net-tools-native is needed by swtpm-wrappers (in meta-security)
because swtpm_setup.sh calls netstat, which cannot be assumed to be
present in all Linux installations (for example, it is not in OpenSUSE
minimal base).

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/net-tools/net-tools_1.60-26.bb

index be267351e3cdabc411d05225034bc4a536266351..115b3987c33639bc40d0e39bd252c24fcc3b2595 100644 (file)
@@ -70,11 +70,21 @@ python do_patch() {
     bb.build.exec_func('patch_do_patch', d)
 }
 
+# i18n only enabled for the target, doesn't build for native
+# and isn't needed there.
+disable_i18n() {
+       sed -i -e 's/^I18N=1/# I18N=1/' ${S}/config.make
+}
+disable_i18n_class-target () {
+       :
+}
+
 do_configure() {
        # net-tools has its own config mechanism requiring "make config"
        # we pre-generate desired options and copy to source directory instead
        cp ${WORKDIR}/net-tools-config.h    ${S}/config.h
        cp ${WORKDIR}/net-tools-config.make ${S}/config.make
+       disable_i18n
 }
 
 do_compile() {
@@ -125,3 +135,4 @@ python __anonymous() {
 }
 ALTERNATIVE_PRIORITY = "100"
 
+BBCLASSEXTEND = "native nativesdk"