diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2021-06-23 18:38:05 +0200 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2021-06-27 07:18:06 -0700 |
commit | b6e76a4a380f2a60d99bc36634cd8823107f5493 (patch) | |
tree | 160f9fdabdafad24e94bc4aae1fbd23e395c342e | |
parent | f7967ddfbb634fdaccb49b7289f54834a51d1e89 (diff) | |
download | meta-openembedded-b6e76a4a380f2a60d99bc36634cd8823107f5493.tar.gz |
net-snmp: Support building for native
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>
-rw-r--r-- | meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.1.bb | 18 |
1 files 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" | |||
5 | 5 | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=9d100a395a38584f2ec18a8275261687" | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=9d100a395a38584f2ec18a8275261687" |
7 | 7 | ||
8 | DEPENDS = "openssl pciutils" | 8 | DEPENDS = "openssl" |
9 | DEPENDS_append_class-target = " pciutils" | ||
9 | 10 | ||
10 | SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.tar.gz \ | 11 | SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.tar.gz \ |
11 | file://init \ | 12 | file://init \ |
@@ -72,8 +73,10 @@ CACHED_CONFIGUREVARS = " \ | |||
72 | ac_cv_file__etc_printcap=no \ | 73 | ac_cv_file__etc_printcap=no \ |
73 | NETSNMP_CONFIGURE_OPTIONS= \ | 74 | NETSNMP_CONFIGURE_OPTIONS= \ |
74 | " | 75 | " |
75 | export PERLPROG="${bindir}/env perl" | 76 | PERLPROG = "${bindir}/env perl" |
77 | PERLPROG_class-native = "${bindir_native}/env perl" | ||
76 | PERLPROG_append = "${@bb.utils.contains('PACKAGECONFIG', 'perl', ' -I${WORKDIR}', '', d)}" | 78 | PERLPROG_append = "${@bb.utils.contains('PACKAGECONFIG', 'perl', ' -I${WORKDIR}', '', d)}" |
79 | export PERLPROG | ||
77 | 80 | ||
78 | HAS_PERL = "${@bb.utils.contains('PACKAGECONFIG', 'perl', '1', '0', d)}" | 81 | HAS_PERL = "${@bb.utils.contains('PACKAGECONFIG', 'perl', '1', '0', d)}" |
79 | 82 | ||
@@ -126,11 +129,14 @@ do_install_append() { | |||
126 | -e 's@[^ ]*--with-install-prefix=[^ "]*@@g' \ | 129 | -e 's@[^ ]*--with-install-prefix=[^ "]*@@g' \ |
127 | -e 's@[^ ]*PKG_CONFIG_PATH=[^ "]*@@g' \ | 130 | -e 's@[^ ]*PKG_CONFIG_PATH=[^ "]*@@g' \ |
128 | -e 's@[^ ]*PKG_CONFIG_LIBDIR=[^ "]*@@g' \ | 131 | -e 's@[^ ]*PKG_CONFIG_LIBDIR=[^ "]*@@g' \ |
129 | -e 's@${STAGING_DIR_HOST}@@g' \ | ||
130 | -i ${D}${bindir}/net-snmp-config | 132 | -i ${D}${bindir}/net-snmp-config |
131 | 133 | ||
132 | sed -e 's@${STAGING_DIR_HOST}@@g' \ | 134 | # ${STAGING_DIR_HOST} is empty for native builds, and the sed command below |
133 | -i ${D}${libdir}/pkgconfig/netsnmp*.pc | 135 | # will result in errors if run for native. |
136 | if [ "${STAGING_DIR_HOST}" ]; then | ||
137 | sed -e 's@${STAGING_DIR_HOST}@@g' \ | ||
138 | -i ${D}${bindir}/net-snmp-config ${D}${libdir}/pkgconfig/netsnmp*.pc | ||
139 | fi | ||
134 | 140 | ||
135 | sed -e "s@^NSC_INCLUDEDIR=.*@NSC_INCLUDEDIR=\$\{includedir\}@g" \ | 141 | sed -e "s@^NSC_INCLUDEDIR=.*@NSC_INCLUDEDIR=\$\{includedir\}@g" \ |
136 | -e "s@^NSC_LIBDIR=-L.*@NSC_LIBDIR=-L\$\{libdir\}@g" \ | 142 | -e "s@^NSC_LIBDIR=-L.*@NSC_LIBDIR=-L\$\{libdir\}@g" \ |
@@ -270,3 +276,5 @@ RCONFLICTS_${PN}-server-snmptrapd += "${PN}-server-snmptrapd-systemd" | |||
270 | LEAD_SONAME = "libnetsnmp.so" | 276 | LEAD_SONAME = "libnetsnmp.so" |
271 | 277 | ||
272 | MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/net-snmp-config" | 278 | MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/net-snmp-config" |
279 | |||
280 | BBCLASSEXTEND = "native" | ||