diff mbox series

[meta-oe] cli11: Use the standard catch2 version

Message ID 20250602131807.3748115-1-jhaller.oss@gmail.com
State Under Review
Headers show
Series [meta-oe] cli11: Use the standard catch2 version | expand

Commit Message

Julian Haller June 2, 2025, 1:18 p.m. UTC
From: Julian Haller <julian.haller@philips.com>

The cmake infrastructure already supports using catch2 from the recipe
sysroot. Make use of this mechanism and add catch2 as build time
dependency. This allows us to drop the custom patch, the additional
catch2 fork reference and the do_configure workaround.

Also, cli11 does not use git submodules, so change the SRC_URI type to
git.

Fixes: 62db1c041f81 ("cli11: upgrade 1.9.1 -> 2.2.0")
Signed-off-by: Julian Haller <julian.haller@philips.com>
---
 meta-oe/recipes-support/cli11/cli11_2.3.2.bb | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

Comments

Khem Raj June 2, 2025, 9:12 p.m. UTC | #1
fails with ptest in DISTR_FEATURES

   /home/kraj200/yoe/build/tmp/work/riscv32-yoe-linux-musl/cli11/2.3.2+git/git/tests/catch.hpp:9:10:
fatal error: 'catch2/catch.hpp' file not found
       9 | #include <catch2/catch.hpp>
         |          ^~~~~~~~~~~~~~~~~~
   1 error generated.

sometimes there are hard version dependencies too, have you checked
that it will not run out of sync

On Mon, Jun 2, 2025 at 6:18 AM Julian Haller via
lists.openembedded.org <jhaller.oss=gmail.com@lists.openembedded.org>
wrote:
>
> From: Julian Haller <julian.haller@philips.com>
>
> The cmake infrastructure already supports using catch2 from the recipe
> sysroot. Make use of this mechanism and add catch2 as build time
> dependency. This allows us to drop the custom patch, the additional
> catch2 fork reference and the do_configure workaround.
>
> Also, cli11 does not use git submodules, so change the SRC_URI type to
> git.
>
> Fixes: 62db1c041f81 ("cli11: upgrade 1.9.1 -> 2.2.0")
> Signed-off-by: Julian Haller <julian.haller@philips.com>
> ---
>  meta-oe/recipes-support/cli11/cli11_2.3.2.bb | 12 +++---------
>  1 file changed, 3 insertions(+), 9 deletions(-)
>
> diff --git a/meta-oe/recipes-support/cli11/cli11_2.3.2.bb b/meta-oe/recipes-support/cli11/cli11_2.3.2.bb
> index ef3c951bbf..a247509c24 100644
> --- a/meta-oe/recipes-support/cli11/cli11_2.3.2.bb
> +++ b/meta-oe/recipes-support/cli11/cli11_2.3.2.bb
> @@ -6,17 +6,11 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=afb20fe5f67e21074b10b864d9563c11"
>  SRCREV = "291c58789c031208f08f4f261a858b5b7083e8e2"
>  PV .= "+git"
>
> -SRC_URI += "gitsm://github.com/CLIUtils/CLI11;branch=main;protocol=https \
> -            https://github.com/philsquared/Catch/releases/download/v2.13.7/catch.hpp \
> -            file://0001-Do-not-download-the-catch-framework-during-configure.patch"
> +DEPENDS = "catch2"
>
> -SRC_URI[sha256sum] = "ea379c4a3cb5799027b1eb451163dff065a3d641aaba23bf4e24ee6b536bd9bc"
> -S = "${WORKDIR}/git"
> +SRC_URI = "git://github.com/CLIUtils/CLI11;branch=main;protocol=https"
>
> -do_configure:prepend() {
> -    mkdir -p ${S}/tests/catch2
> -    cp ${DL_DIR}/catch.hpp ${S}/tests/catch2/catch.hpp
> -}
> +S = "${WORKDIR}/git"
>
>  inherit cmake
>
> --
> 2.43.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#117706): https://lists.openembedded.org/g/openembedded-devel/message/117706
> Mute This Topic: https://lists.openembedded.org/mt/113427706/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-support/cli11/cli11_2.3.2.bb b/meta-oe/recipes-support/cli11/cli11_2.3.2.bb
index ef3c951bbf..a247509c24 100644
--- a/meta-oe/recipes-support/cli11/cli11_2.3.2.bb
+++ b/meta-oe/recipes-support/cli11/cli11_2.3.2.bb
@@ -6,17 +6,11 @@  LIC_FILES_CHKSUM = "file://LICENSE;md5=afb20fe5f67e21074b10b864d9563c11"
 SRCREV = "291c58789c031208f08f4f261a858b5b7083e8e2"
 PV .= "+git"
 
-SRC_URI += "gitsm://github.com/CLIUtils/CLI11;branch=main;protocol=https \
-            https://github.com/philsquared/Catch/releases/download/v2.13.7/catch.hpp \
-            file://0001-Do-not-download-the-catch-framework-during-configure.patch"
+DEPENDS = "catch2"
 
-SRC_URI[sha256sum] = "ea379c4a3cb5799027b1eb451163dff065a3d641aaba23bf4e24ee6b536bd9bc"
-S = "${WORKDIR}/git"
+SRC_URI = "git://github.com/CLIUtils/CLI11;branch=main;protocol=https"
 
-do_configure:prepend() {
-    mkdir -p ${S}/tests/catch2
-    cp ${DL_DIR}/catch.hpp ${S}/tests/catch2/catch.hpp
-}
+S = "${WORKDIR}/git"
 
 inherit cmake