mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-04-17 22:48:28 +00:00
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>
This commit is contained in:
committed by
Khem Raj
parent
f0d3a2bc86
commit
30bb83b306
@@ -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}"
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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 \
|
||||
"
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user