aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam A. Kennington III <wak@google.com>2024-02-09 16:59:19 -0800
committerKhem Raj <raj.khem@gmail.com>2024-02-10 01:48:01 -0800
commit30bb83b306db5be21eaceaec44454ea3b5ca93a0 (patch)
tree520a0f1cf414d507852358954e44d4169d9cbc62
parentf0d3a2bc867ad5354066476f8ac9412f628d0fae (diff)
downloadmeta-openembedded-contrib-30bb83b306db5be21eaceaec44454ea3b5ca93a0.tar.gz
nanopb: Split into 2 packages
This makes it possible to avoid building components which are not used in the native or runtime tooling. Most users of nanopb just want to build `nanopb-generator-native` and `nanopb-runtime` and not the other two combinations as they are building software for their target leveraging nanopb. Signed-off-by: William A. Kennington III <wak@google.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-devtools/nanopb/nanopb-generator_0.4.8.bb14
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-devtools/nanopb/nanopb-runtime_0.4.8.bb16
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-devtools/nanopb/nanopb.bb17
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-devtools/nanopb/nanopb.inc13
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-devtools/nanopb/nanopb_0.4.8.bb29
5 files changed, 60 insertions, 29 deletions
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-devtools/nanopb/nanopb-generator_0.4.8.bb b/meta-oe/dynamic-layers/meta-python/recipes-devtools/nanopb/nanopb-generator_0.4.8.bb
new file mode 100644
index 0000000000..c86750f8b6
--- /dev/null
+++ b/meta-oe/dynamic-layers/meta-python/recipes-devtools/nanopb/nanopb-generator_0.4.8.bb
@@ -0,0 +1,14 @@
+require nanopb.inc
+
+inherit python3-dir
+
+DEPENDS = "protobuf-native"
+RDEPENDS:${PN} += "python3-protobuf"
+
+EXTRA_OECMAKE += " \
+ -Dnanopb_PYTHON_INSTDIR_OVERRIDE=${PYTHON_SITEPACKAGES_DIR} \
+ -Dnanopb_BUILD_RUNTIME=OFF \
+ -Dnanopb_BUILD_GENERATOR=ON \
+ "
+
+FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR}"
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-devtools/nanopb/nanopb-runtime_0.4.8.bb b/meta-oe/dynamic-layers/meta-python/recipes-devtools/nanopb/nanopb-runtime_0.4.8.bb
new file mode 100644
index 0000000000..e36abf808d
--- /dev/null
+++ b/meta-oe/dynamic-layers/meta-python/recipes-devtools/nanopb/nanopb-runtime_0.4.8.bb
@@ -0,0 +1,16 @@
+require nanopb.inc
+
+EXTRA_OECMAKE += " \
+ -Dnanopb_PROTOC_PATH=/bin/false \
+ -Dnanopb_BUILD_RUNTIME=ON \
+ -Dnanopb_BUILD_GENERATOR=OFF \
+ "
+
+# Maintain compatability with old header locations for packages
+# which haven't yet migrated to `nanopb/pb*.h`
+do_install:append() {
+ for hdr in ${D}${includedir}/nanopb/*; do
+ ln -sv nanopb/$(basename "$hdr") ${D}${includedir}/
+ done
+}
+
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-devtools/nanopb/nanopb.bb b/meta-oe/dynamic-layers/meta-python/recipes-devtools/nanopb/nanopb.bb
new file mode 100644
index 0000000000..7ad6a32782
--- /dev/null
+++ b/meta-oe/dynamic-layers/meta-python/recipes-devtools/nanopb/nanopb.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Combined nanopb package"
+PV = "1.0"
+PR = "r1"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+inherit packagegroup
+
+DEPENDS = " \
+ nanopb-generator \
+ nanopb-runtime \
+"
+
+RDEPENDS:${PN} = " \
+ nanopb-generator \
+ nanopb-runtime \
+"
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-devtools/nanopb/nanopb.inc b/meta-oe/dynamic-layers/meta-python/recipes-devtools/nanopb/nanopb.inc
new file mode 100644
index 0000000000..87dbc73e63
--- /dev/null
+++ b/meta-oe/dynamic-layers/meta-python/recipes-devtools/nanopb/nanopb.inc
@@ -0,0 +1,13 @@
+DESCRIPTION="Protocol Buffers with small code size"
+LICENSE="Zlib"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=9db4b73a55a3994384112efcdb37c01f"
+
+SRC_URI = "git://github.com/nanopb/nanopb.git;branch=master;protocol=https"
+SRCREV = "6cfe48d6f1593f8fa5c0f90437f5e6522587745e"
+
+S = "${WORKDIR}/git"
+
+inherit cmake
+
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-devtools/nanopb/nanopb_0.4.8.bb b/meta-oe/dynamic-layers/meta-python/recipes-devtools/nanopb/nanopb_0.4.8.bb
deleted file mode 100644
index d282bf1b2c..0000000000
--- a/meta-oe/dynamic-layers/meta-python/recipes-devtools/nanopb/nanopb_0.4.8.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-DESCRIPTION="Protocol Buffers with small code size"
-LICENSE="Zlib"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=9db4b73a55a3994384112efcdb37c01f"
-
-DEPENDS = "protobuf-native"
-
-SRC_URI = "git://github.com/nanopb/nanopb.git;branch=master;protocol=https"
-SRCREV = "6cfe48d6f1593f8fa5c0f90437f5e6522587745e"
-
-S = "${WORKDIR}/git"
-
-inherit cmake python3-dir
-
-EXTRA_OECMAKE += "-Dnanopb_PYTHON_INSTDIR_OVERRIDE=${PYTHON_SITEPACKAGES_DIR}"
-
-RDEPENDS:${PN} += "${PYTHON_PN}-protobuf"
-
-# Maintain compatability with old header locations for packages
-# which haven't yet migrated to `nanopb/pb*.h`
-do_install:append() {
- for hdr in ${D}${includedir}/nanopb/*; do
- ln -sv nanopb/$(basename "$hdr") ${D}${includedir}/
- done
-}
-
-FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR}"
-
-BBCLASSEXTEND = "native nativesdk"
-