Skip to contentSkip to conversation

net-snmp: fix the replacement in net-snmp-config

PATCH New [email protected] 1 participant 1 message Dec 31, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 net-snmp: fix the replacement in net-snmp-config

From: Roy Li <[email protected]>

when net-snmp-config is used to configure by other package, and fail since /libnl3 is not found, in fact, it should be -I/usr/include/libnl3, and is modified as /libnl3 incorrectly.

instead of modify the net-snmp-config for target, the one under ${bindir_crossscripts} should be replaced with ${TAGING_INCDIR}

---
 meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb +3 -2
index b32d842..68eea3f 100644
@@ -63,8 +63,7 @@ do_install_append() {
     install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/snmpd
     install -m 644 ${WORKDIR}/snmpd.conf ${D}${sysconfdir}/snmp/
     install -m 644 ${WORKDIR}/snmptrapd.conf ${D}${sysconfdir}/snmp/
-    sed -e "s@-I/usr/include@@g" \
-        -e "s@^prefix=.*@prefix=${STAGING_DIR_HOST}@g" \
+    sed    -e "s@^prefix=.*@prefix=${STAGING_DIR_HOST}@g" \
         -e "s@^exec_prefix=.*@exec_prefix=${STAGING_DIR_HOST}@g" \
         -e "s@^includedir=.*@includedir=${STAGING_INCDIR}@g" \
         -e "s@^libdir=.*@libdir=${STAGING_LIBDIR}@g" \
@@ -98,6 +97,8 @@ net_snmp_sysroot_preprocess () {
     if [ -e ${D}${bindir}/net-snmp-config ]; then
         install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
         install -m 755 ${D}${bindir}/net-snmp-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/
+        sed -e "s@-I/usr/include@-I${STAGING_INCDIR}@g" \
+          -i  ${SYSROOT_DESTDIR}${bindir_crossscripts}/net-snmp-config
     fi
 }
 
Signature · 1 line
1.9.1