diff mbox series

[meta-oe,1/2] libwebsockets: Support building for native

Message ID 20231026132203.3840009-1-pkj@axis.com
State Under Review
Headers show
Series [meta-oe,1/2] libwebsockets: Support building for native | expand

Commit Message

Peter Kjellerstedt Oct. 26, 2023, 1:22 p.m. UTC
This is needed to be able to build mosquitto-native.

The dependency on libcap when building for native is needed because
cmake will pick up the existence of libcap from the host, but then the
build fails if it is not available in the sysroot. Unfortunately, there
does not seem to be any way to explicitly tell cmake to not build with
libcap.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 .../recipes-connectivity/libwebsockets/libwebsockets_4.3.2.bb  | 3 +++
 1 file changed, 3 insertions(+)

Comments

Khem Raj Oct. 26, 2023, 4:26 p.m. UTC | #1
On Thu, Oct 26, 2023 at 6:22 AM Peter Kjellerstedt
<peter.kjellerstedt@axis.com> wrote:
>
> This is needed to be able to build mosquitto-native.
>
> The dependency on libcap when building for native is needed because
> cmake will pick up the existence of libcap from the host, but then the
> build fails if it is not available in the sysroot. Unfortunately, there
> does not seem to be any way to explicitly tell cmake to not build with
> libcap.
>
> Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> ---
>  .../recipes-connectivity/libwebsockets/libwebsockets_4.3.2.bb  | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.3.2.bb b/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.3.2.bb
> index 5e6069fb8..b80c31a1e 100644
> --- a/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.3.2.bb
> +++ b/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.3.2.bb
> @@ -4,6 +4,7 @@ LICENSE = "MIT & Zlib & BSD-3-Clause & Apache-2.0"
>  LIC_FILES_CHKSUM = "file://LICENSE;md5=382bfdf329e774859fd401eaf850d29b"
>
>  DEPENDS = "zlib"
> +DEPENDS:append:class-native = " libcap"

it will expand to native automatically but it might be better to be
explicit here and use libcap-native

>
>  S = "${WORKDIR}/git"
>  SRCREV = "b0a749c8e7a8294b68581ce4feac0e55045eb00b"
> @@ -61,3 +62,5 @@ RDEPENDS:${PN}-dev += " ${@bb.utils.contains('PACKAGECONFIG', 'static', '${PN}-s
>
>  # Avoid absolute paths to end up in the sysroot.
>  SSTATE_SCAN_FILES += "*.cmake"
> +
> +BBCLASSEXTEND = "native"
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#105748): https://lists.openembedded.org/g/openembedded-devel/message/105748
> Mute This Topic: https://lists.openembedded.org/mt/102199463/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.3.2.bb b/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.3.2.bb
index 5e6069fb8..b80c31a1e 100644
--- a/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.3.2.bb
+++ b/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.3.2.bb
@@ -4,6 +4,7 @@  LICENSE = "MIT & Zlib & BSD-3-Clause & Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=382bfdf329e774859fd401eaf850d29b"
 
 DEPENDS = "zlib"
+DEPENDS:append:class-native = " libcap"
 
 S = "${WORKDIR}/git"
 SRCREV = "b0a749c8e7a8294b68581ce4feac0e55045eb00b"
@@ -61,3 +62,5 @@  RDEPENDS:${PN}-dev += " ${@bb.utils.contains('PACKAGECONFIG', 'static', '${PN}-s
 
 # Avoid absolute paths to end up in the sysroot.
 SSTATE_SCAN_FILES += "*.cmake"
+
+BBCLASSEXTEND = "native"