diff options
Diffstat (limited to 'meta-oe/recipes-support/libsmi')
3 files changed, 99 insertions, 10 deletions
diff --git a/meta-oe/recipes-support/libsmi/libsmi/0001-Define-createIdentifierRef-prototype-in-yang-complex.patch b/meta-oe/recipes-support/libsmi/libsmi/0001-Define-createIdentifierRef-prototype-in-yang-complex.patch new file mode 100644 index 0000000000..3374f8484e --- /dev/null +++ b/meta-oe/recipes-support/libsmi/libsmi/0001-Define-createIdentifierRef-prototype-in-yang-complex.patch @@ -0,0 +1,53 @@ +From 77b520a8ee193b6d9f12e049f505d8d98204c11c Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 31 Aug 2022 17:13:32 -0700 +Subject: [PATCH] Define createIdentifierRef prototype in yang-complex-types.c + +Provide needed prototype to make compiler happy + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + lib/parser-yang.y | 3 ++- + lib/yang-complex-types.c | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +--- a/lib/parser-yang.y ++++ b/lib/parser-yang.y +@@ -41,7 +41,8 @@ + #include "yang-complex-types.h" + #include "util.h" + #include "error.h" +- ++#include "yang-check.h" ++ + #ifdef HAVE_DMALLOC_H + #include <dmalloc.h> + #endif +@@ -61,7 +62,8 @@ + #define debug + #endif + +- ++extern void createIdentifierRef(struct _YangNode *node, char* prefix, char* ident); ++extern void smiyyerror(char *msg, Parser *parserPtr); + /* + * NOTE: The argument lvalp ist not really a void pointer. Unfortunately, + * we don't know it better at this point. bison generated C code declares +--- a/lib/yang-complex-types.c ++++ b/lib/yang-complex-types.c +@@ -35,12 +35,13 @@ + #include "yang-data.h" + #include "yang-check.h" + #include "yang-complex-types.h" +- + /* + * Current parser defined in parser-yang. Workaround - can't include data.h + */ + extern Parser *currentParser; + ++extern void createIdentifierRef(struct _YangNode *node, char* prefix, char* ident); ++ + static const int parents_complex_type[] = { + YANG_DECL_MODULE, YANG_DECL_SUBMODULE, YANG_DECL_CONTAINER, + YANG_DECL_LIST, YANG_DECL_RPC, YANG_DECL_INPUT, diff --git a/meta-oe/recipes-support/libsmi/libsmi/0001-parser-yang-Define-_DEFAULT_SOURCE.patch b/meta-oe/recipes-support/libsmi/libsmi/0001-parser-yang-Define-_DEFAULT_SOURCE.patch new file mode 100644 index 0000000000..9354a889a0 --- /dev/null +++ b/meta-oe/recipes-support/libsmi/libsmi/0001-parser-yang-Define-_DEFAULT_SOURCE.patch @@ -0,0 +1,28 @@ +From 86b706f694b822d8028fd36320147767056d2ffa Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 6 Sep 2022 12:09:00 -0700 +Subject: [PATCH] parser-yang: Define _DEFAULT_SOURCE + +This is needed for timegm API + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + lib/parser-yang.y | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/parser-yang.y b/lib/parser-yang.y +index b111607..0ded9d2 100644 +--- a/lib/parser-yang.y ++++ b/lib/parser-yang.y +@@ -21,6 +21,7 @@ + #ifdef BACKEND_YANG + + #define _ISOC99_SOURCE ++#define _DEFAULT_SOURCE + #include <stdio.h> + #include <errno.h> + #include <stdlib.h> +-- +2.37.3 + diff --git a/meta-oe/recipes-support/libsmi/libsmi_0.5.0.bb b/meta-oe/recipes-support/libsmi/libsmi_0.5.0.bb index ae76fade73..73aeb55393 100644 --- a/meta-oe/recipes-support/libsmi/libsmi_0.5.0.bb +++ b/meta-oe/recipes-support/libsmi/libsmi_0.5.0.bb @@ -1,32 +1,40 @@ SUMMARY = "A Library to Access SMI MIB Information" HOMEPAGE = "https://www.ibr.cs.tu-bs.de/projects/libsmi" -LICENSE = "BSD-3-Clause & tcl" +LICENSE = "BSD-3-Clause & TCL" LIC_FILES_CHKSUM = "file://COPYING;md5=3ad3076f9332343a21636cfd351f05b7" SRC_URI = "https://www.ibr.cs.tu-bs.de/projects/${BPN}/download/${BP}.tar.gz \ file://smi.conf \ file://libsmi-fix-the-test-dump-files.patch \ + file://0001-Define-createIdentifierRef-prototype-in-yang-complex.patch \ + file://0001-parser-yang-Define-_DEFAULT_SOURCE.patch \ " SRC_URI[md5sum] = "4bf47483c06c9f07d1b10fbc74eddf11" SRC_URI[sha256sum] = "f21accdadb1bb328ea3f8a13fc34d715baac6e2db66065898346322c725754d3" -RDEPENDS_${PN} += "wget" +DEPENDS += "bison-native flex-native wget-native gawk-native" -inherit autotools +inherit autotools-brokensep update-alternatives +ALTERNATIVE_PRIORITY = "50" +ALTERNATIVE:${PN}-yang = "ietf-interfaces " +ALTERNATIVE_LINK_NAME[ietf-interfaces] = "${datadir}/yang/ietf-interfaces.yang" -EXTRA_OECONF = "ac_cv_path_SH=/bin/sh ac_cv_path_WGET=${bindir}/wget ac_cv_path_AWK=${bindir}/awk" +EXTRA_OECONF:class-native = "ac_cv_path_SH=/bin/sh" +EXTRA_OECONF:class-target = "ac_cv_path_SH=/bin/sh ac_cv_path_WGET=${bindir}/wget ac_cv_path_AWK=${bindir}/awk" -do_install_append () { +do_install:append () { install -d ${D}${sysconfdir} - install -m 0644 ${WORKDIR}/smi.conf ${D}${sysconfdir}/smi.conf + install -m 0644 ${UNPACKDIR}/smi.conf ${D}${sysconfdir}/smi.conf } PACKAGES += "${PN}-mibs ${PN}-pibs ${PN}-yang" -FILES_${PN}-mibs += "${datadir}/mibs" -FILES_${PN}-pibs += "${datadir}/pibs" -FILES_${PN}-yang += "${datadir}/yang" +FILES:${PN}-mibs += "${datadir}/mibs" +FILES:${PN}-pibs += "${datadir}/pibs" +FILES:${PN}-yang += "${datadir}/yang" -RRECOMMENDS_${PN} = "${BPN}-mibs" +RRECOMMENDS:${PN} = "${BPN}-mibs" + +BBCLASSEXTEND = "native nativesdk" |