diff mbox series

[meta-arago,master/scarthgap,09/10] open62541: Wrap the bbappend in a compliant manner

Message ID 20250312144540.14210-10-reatmon@ti.com
State New
Headers show
Series Wrap bbappends in a | expand

Commit Message

Ryan Eatmon March 12, 2025, 2:45 p.m. UTC
Wrap the bbappend in a yocto-check-layer compliant manner so that only
if you are building this recipe under meta-arago-distro with the arago
DISTRO_OVERRIDE would the bbappend apply.

Signed-off-by: Ryan Eatmon <reatmon@ti.com>
---
 ...en62541_%.bbappend => open62541-arago.inc} |  8 ++--
 .../open62541/open62541_%.bbappend            | 42 ++-----------------
 2 files changed, 7 insertions(+), 43 deletions(-)
 copy meta-arago-extras/recipes-connectivity/open62541/{open62541_%.bbappend => open62541-arago.inc} (83%)
diff mbox series

Patch

diff --git a/meta-arago-extras/recipes-connectivity/open62541/open62541_%.bbappend b/meta-arago-extras/recipes-connectivity/open62541/open62541-arago.inc
similarity index 83%
copy from meta-arago-extras/recipes-connectivity/open62541/open62541_%.bbappend
copy to meta-arago-extras/recipes-connectivity/open62541/open62541-arago.inc
index 765639fa..745c88a1 100644
--- a/meta-arago-extras/recipes-connectivity/open62541/open62541_%.bbappend
+++ b/meta-arago-extras/recipes-connectivity/open62541/open62541-arago.inc
@@ -1,7 +1,8 @@ 
+FILESEXTRAPATHS:prepend := "${THISDIR}/open62541:"
 
-FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
-SRC_URI:append = " file://0001-examples-client-allow-configurable-server.patch \
-                   file://0001-examples-Remove-sys-io.h.patch \
+SRC_URI:append = " \
+    file://0001-examples-client-allow-configurable-server.patch \
+    file://0001-examples-Remove-sys-io.h.patch \
 "
 
 EXTRA_OECMAKE = "-DUA_BUILD_EXAMPLES=1"
@@ -37,4 +38,3 @@  ALLOW_EMPTY:${PN}-staticdev = "1"
 ALLOW_EMPTY:${PN}-tests = "1"
 
 BBCLASSEXTEND = "native nativesdk"
-
diff --git a/meta-arago-extras/recipes-connectivity/open62541/open62541_%.bbappend b/meta-arago-extras/recipes-connectivity/open62541/open62541_%.bbappend
index 765639fa..c7e308c6 100644
--- a/meta-arago-extras/recipes-connectivity/open62541/open62541_%.bbappend
+++ b/meta-arago-extras/recipes-connectivity/open62541/open62541_%.bbappend
@@ -1,40 +1,4 @@ 
+OPEN62541_ARAGO = ""
+OPEN62541_ARAGO:arago = "open62541-arago.inc"
 
-FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
-SRC_URI:append = " file://0001-examples-client-allow-configurable-server.patch \
-                   file://0001-examples-Remove-sys-io.h.patch \
-"
-
-EXTRA_OECMAKE = "-DUA_BUILD_EXAMPLES=1"
-
-# Install examples and unit tests
-do_install:append() {
-    # Install examples
-    install -d "${D}${datadir}/${BPN}/examples"
-    for example in ${B}/bin/examples/*
-    do
-        install -m 755 "$example" "${D}${datadir}/${BPN}/examples"
-    done
-
-    if ${@bb.utils.contains('PACKAGECONFIG','unit_tests','true','false',d)}
-    then
-        # Install unittests
-        install -d "${D}${datadir}/${BPN}/tests"
-        for test in ${B}/bin/tests/*
-        do
-            install -m 755 "$test" "${D}${datadir}/${BPN}/tests"
-        done
-    fi
-}
-
-PACKAGES =+ "${PN}-examples ${PN}-tests"
-FILES:${PN} += "${bindir}"
-FILES:${PN}-dev += "${libdir}/cmake/* ${datadir}/${BPN}/tools"
-FILES:${PN}-examples += "${datadir}/${BPN}/examples"
-FILES:${PN}-tests += "${datadir}/${BPN}/tests"
-
-# Allow staticdev package to be empty incase sharedlibs is switched on
-ALLOW_EMPTY:${PN}-staticdev = "1"
-ALLOW_EMPTY:${PN}-tests = "1"
-
-BBCLASSEXTEND = "native nativesdk"
-
+require ${OPEN62541_ARAGO}