Skip to contentSkip to conversation

net-snmp: fix invalid paths in target net-snmp-config

PATCH New Ovidiu Panait 1 participant 1 message Dec 22, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 net-snmp: fix invalid paths in target net-snmp-config

Remove build host paths from target net-snmp-config.

---
 meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb | 11 +++++++++++
 1 file changed, 11 insertions(+)
meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb +11 -0
index af6fd1b1f..f6da945af 100644
@@ -116,6 +116,10 @@ do_install_append() {
     sed    -e "s@^NSC_SRCDIR=.*@NSC_SRCDIR=.@g" \
         -i ${D}${bindir}/net-snmp-create-v3-user
     sed    -e "s@^NSC_SRCDIR=.*@NSC_SRCDIR=.@g" \
+           -e "s@${STAGING_DIR_NATIVE}@@g" \
+           -e "s@${STAGING_DIR_HOST}@@g" \
+           -e "s@${D}@@g" \
+           -e "s@${WORKDIR}@@g" \
         -i ${D}${bindir}/net-snmp-config
 
     if [ "${HAS_PERL}" = "1" ]; then
@@ -144,6 +148,7 @@ do_install_ptest() {
 }
 
 SYSROOT_PREPROCESS_FUNCS += "net_snmp_sysroot_preprocess"
+SNMP_DBGDIR = "/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
 
 net_snmp_sysroot_preprocess () {
     if [ -e ${D}${bindir}/net-snmp-config ]; then
@@ -155,6 +160,12 @@ net_snmp_sysroot_preprocess () {
             -e "s@^includedir=.*@includedir=${STAGING_INCDIR}@g" \
             -e "s@^libdir=.*@libdir=${STAGING_LIBDIR}@g" \
             -e "s@^NSC_SRCDIR=.*@NSC_SRCDIR=${S}@g" \
+            -e "s@-fdebug-prefix-map==${SNMP_DBGDIR}@-fdebug-prefix-map=${WORKDIR}=${SNMP_DBGDIR}@g" \
+            -e "s@-fdebug-prefix-map== -fdebug-prefix-map==@-fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
+                  -fdebug-prefix-map=${STAGING_DIR_HOST}=@g" \
+            -e "s@--sysroot=@--sysroot=${STAGING_DIR_HOST}@g" \
+            -e "s@--with-libtool-sysroot=@--with-libtool-sysroot=${STAGING_DIR_HOST}@g" \
+            -e "s@--with-install-prefix=@--with-install-prefix=${D}@g" \
           -i  ${SYSROOT_DESTDIR}${bindir_crossscripts}/net-snmp-config
     fi
 }
Signature · 1 line
2.13.3