Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Vincent Jardin via buildroot <buildroot@buildroot.org>
Cc: Vincent Jardin <vjardin@free.fr>
Subject: Re: [Buildroot] [PATCH 2/2] package/sysrepo-cpp: new package
Date: Sun, 28 Dec 2025 14:24:55 +0100	[thread overview]
Message-ID: <20251228142455.46efcdd0@windsurf> (raw)
In-Reply-To: <20251205100626.66819-3-vjardin@free.fr>

Hello Vincent,

Thanks for the patch, which I have applied with a few tweaks, see below.

On Fri,  5 Dec 2025 11:06:26 +0100
Vincent Jardin via buildroot <buildroot@buildroot.org> wrote:


> diff --git a/package/sysrepo-cpp/Config.in b/package/sysrepo-cpp/Config.in
> new file mode 100644
> index 0000000000..5cdfefa025
> --- /dev/null
> +++ b/package/sysrepo-cpp/Config.in
> @@ -0,0 +1,20 @@
> +config BR2_PACKAGE_SYSREPO_CPP
> +	bool "sysrepo-cpp"
> +	depends on BR2_TOOLCHAIN_HAS_THREADS
> +	depends on BR2_INSTALL_LIBSTDCPP
> +	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_10
> +	depends on !BR2_STATIC_LIBS
> +	depends on !BR2_TOOLCHAIN_USES_UCLIBC

I had to update this to properly propagate all the dependencies:

        depends on BR2_USE_MMU # sysrepo
        depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # sysrepo
        depends on !BR2_STATIC_LIBS # sysrepo, libyang-cpp
        depends on BR2_INSTALL_LIBSTDCPP # sysrepo, libyang-cpp
        depends on BR2_TOOLCHAIN_GCC_AT_LEAST_10 # libyang-cpp
        depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libyang-cpp
        # std::timespec build issue
        depends on !BR2_TOOLCHAIN_USES_UCLIBC

> +	select BR2_PACKAGE_SYSREPO
> +	select BR2_PACKAGE_LIBYANG_CPP
> +	help
> +	  C++20 RAII bindings for the sysrepo YANG datastore library.
> +
> +	  This library provides modern C++ object-oriented bindings on top

Line was too long.

> +	  of sysrepo, using RAII for automatic lifetime management.
> +
> +	  https://github.com/sysrepo/sysrepo-cpp
> +
> +comment "sysrepo-cpp needs a toolchain w/ C++, threads, dynamic libs, gcc >= 10"
> +	depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP || \
> +		   BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_10

Updated this based on the dependencies.


> diff --git a/package/sysrepo-cpp/sysrepo-cpp.mk b/package/sysrepo-cpp/sysrepo-cpp.mk
> new file mode 100644
> index 0000000000..bbe81289b1
> --- /dev/null
> +++ b/package/sysrepo-cpp/sysrepo-cpp.mk
> @@ -0,0 +1,26 @@
> +################################################################################
> +#
> +# sysrepo-cpp
> +#
> +################################################################################
> +
> +SYSREPO_CPP_VERSION = 6
> +SYSREPO_CPP_SITE    = $(call github,sysrepo,sysrepo-cpp,v$(SYSREPO_CPP_VERSION))

We don't align spaces.

> +

Excessive empty line.

> +SYSREPO_CPP_LICENSE = BSD-3-Clause
> +SYSREPO_CPP_LICENSE_FILES = LICENSE
> +
> +SYSREPO_CPP_INSTALL_STAGING = YES
> +SYSREPO_CPP_INSTALL_TARGET  = YES

This last line is not needed, that's the default.

> +
> +SYSREPO_CPP_CONF_OPTS += \
> +	-DCMAKE_BUILD_TYPE=Release \

Not needed, CMAKE_BUILD_TYPE is handled by the cmake-package infra.

> +	-DBUILD_TESTING=OFF \

Same.

> +	-DWITH_DOCS=OFF \
> +	-DWITH_EXAMPLES=OFF
> +
> +SYSREPO_CPP_SUPPORTS_IN_SOURCE_BUILD = NO
> +
> +SYSREPO_CPP_DEPENDENCIES = sysrepo libyang-cpp
> +
> +$(eval $(cmake-package))

Applied with those tweaks. Thanks a lot!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      reply	other threads:[~2025-12-28 13:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-05 10:06 [Buildroot] [PATCH 0/2] package: add libyang-cpp and sysrepo-cpp Vincent Jardin via buildroot
2025-12-05 10:06 ` [Buildroot] [PATCH 1/2] libyang-cpp: new package Vincent Jardin via buildroot
2025-12-28 13:22   ` Thomas Petazzoni via buildroot
2025-12-05 10:06 ` [Buildroot] [PATCH 2/2] package/sysrepo-cpp: " Vincent Jardin via buildroot
2025-12-28 13:24   ` Thomas Petazzoni via buildroot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251228142455.46efcdd0@windsurf \
    --to=buildroot@buildroot.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=vjardin@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox