[prev in list] [next in list] [prev in thread] [next in thread]
List: openembedded-devel
Subject: [oe] [hardknott 12/20] net-snmp: Support building for native
From: "Armin Kuster" <akuster808 () gmail ! com>
Date: 2021-06-27 20:22:07
Message-ID: b6e76a4a380f2a60d99bc36634cd8823107f5493.1624825239.git.akuster808 () gmail ! com
[Download RAW message or body]
From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Due to the sed commands in do_install_append() that removed
${STAGING_DIR_HOST} and it being empty when building for native, it was
impossible to add support for building this as native using a bbappend.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 74d58bc6e8f53bff15d2c06865591c325ebb6a7f)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
.../net-snmp/net-snmp_5.9.1.bb | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.1.bb \
b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.1.bb index \
46aba3b81a..7c3d5babd8 100644
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.1.bb
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.1.bb
@@ -5,7 +5,8 @@ LICENSE = "BSD & MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=9d100a395a38584f2ec18a8275261687"
-DEPENDS = "openssl pciutils"
+DEPENDS = "openssl"
+DEPENDS_append_class-target = " pciutils"
SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.tar.gz \
file://init \
@@ -72,8 +73,10 @@ CACHED_CONFIGUREVARS = " \
ac_cv_file__etc_printcap=no \
NETSNMP_CONFIGURE_OPTIONS= \
"
-export PERLPROG="${bindir}/env perl"
+PERLPROG = "${bindir}/env perl"
+PERLPROG_class-native = "${bindir_native}/env perl"
PERLPROG_append = "${@bb.utils.contains('PACKAGECONFIG', 'perl', ' -I${WORKDIR}', \
'', d)}" +export PERLPROG
HAS_PERL = "${@bb.utils.contains('PACKAGECONFIG', 'perl', '1', '0', d)}"
@@ -126,11 +129,14 @@ do_install_append() {
-e 's@[^ ]*--with-install-prefix=[^ "]*@@g' \
-e 's@[^ ]*PKG_CONFIG_PATH=[^ "]*@@g' \
-e 's@[^ ]*PKG_CONFIG_LIBDIR=[^ "]*@@g' \
- -e 's@${STAGING_DIR_HOST}@@g' \
-i ${D}${bindir}/net-snmp-config
- sed -e 's@${STAGING_DIR_HOST}@@g' \
- -i ${D}${libdir}/pkgconfig/netsnmp*.pc
+ # ${STAGING_DIR_HOST} is empty for native builds, and the sed command below
+ # will result in errors if run for native.
+ if [ "${STAGING_DIR_HOST}" ]; then
+ sed -e 's@${STAGING_DIR_HOST}@@g' \
+ -i ${D}${bindir}/net-snmp-config ${D}${libdir}/pkgconfig/netsnmp*.pc
+ fi
sed -e "s@^NSC_INCLUDEDIR=.*@NSC_INCLUDEDIR=\$\{includedir\}@g" \
-e "s@^NSC_LIBDIR=-L.*@NSC_LIBDIR=-L\$\{libdir\}@g" \
@@ -270,3 +276,5 @@ RCONFLICTS_${PN}-server-snmptrapd += \
"${PN}-server-snmptrapd-systemd" LEAD_SONAME = "libnetsnmp.so"
MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/net-snmp-config"
+
+BBCLASSEXTEND = "native"
--
2.17.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#92047): https://lists.openembedded.org/g/openembedded-devel/message/92047
Mute This Topic: https://lists.openembedded.org/mt/83831084/4455120
Group Owner: openembedded-devel+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [openembedded-devel@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic