ndctl: fix compiling without including tests

In case "tests" PACKAGECONFIG is not included, do_configure fails
with the following error message:

 ../git/ndctl/meson.build:51:4: ERROR: Problem encountered: '-D=destructive=enabled' requires '-Dtest=enabled'

Since "destructive" option only enables an extra set of tests, it only
makes sense to use along with including the tests. In case tests
are not required, this option can be left on its default value (disabled).

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Gyorgy Sarvari 2025-01-22 17:54:21 +01:00 committed by Khem Raj
parent 3a3ef736cd
commit 23e6533f2b
No known key found for this signature in database
GPG Key ID: BB053355919D3314

View File

@ -20,11 +20,11 @@ DEPENDS = "kmod udev json-c keyutils iniparser libtraceevent libtracefs"
S = "${WORKDIR}/git"
EXTRA_OEMESON += "-Ddestructive=enabled -Diniparserdir=${STAGING_INCDIR}/iniparser"
EXTRA_OEMESON += "-Diniparserdir=${STAGING_INCDIR}/iniparser"
PACKAGECONFIG ??= "tests ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','',d)}"
PACKAGECONFIG[systemd] = "-Dsystemd=enabled,-Dsystemd=disabled,systemd"
PACKAGECONFIG[tests] = "-Dtest=enabled, -Dtest=disabled,"
PACKAGECONFIG[tests] = "-Dtest=enabled -Ddestructive=enabled, -Dtest=disabled,"
PACKAGECONFIG[docs] = "-Ddocs=enabled -Dasciidoctor=enabled,-Ddocs=disabled -Dasciidoctor=disabled, asciidoc-native"
SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}"