From 70a689f9dc4a50b2bf909f891a1c9220cb5da920 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20Lothor=C3=A9?= Date: Tue, 9 Dec 2025 09:54:11 +0100 Subject: [PATCH] package/libldns: add an option to build and install drill MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The libldns library also comes with a CLI tool named drill, allowing to perform DNS requests. Drill build is currently disabled by default. Add a KConfig option to allow building and installing drill tool. Set the default value to n to preserve the current behavior. Similarly to linktest (see the comment in the .mk), drill fails to build correctly as a static binary, so make the new option depend on non-static build. Signed-off-by: Alexis Lothoré Signed-off-by: Julien Olivain --- package/libldns/Config.in | 13 +++++++++++++ package/libldns/libldns.mk | 7 +++++++ 2 files changed, 20 insertions(+) diff --git a/package/libldns/Config.in b/package/libldns/Config.in index 696fec97b5..60b149e201 100644 --- a/package/libldns/Config.in +++ b/package/libldns/Config.in @@ -8,3 +8,16 @@ config BR2_PACKAGE_LIBLDNS experimental software for current Internet Drafts. http://www.nlnetlabs.nl/projects/ldns + +if BR2_PACKAGE_LIBLDNS + +config BR2_PACKAGE_LIBLDNS_DRILL + bool "drill binary" + depends on !BR2_STATIC_LIBS + help + Install the drill binary + +comment "drill needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +endif # BR2_PACKAGE_LIBLDNS diff --git a/package/libldns/libldns.mk b/package/libldns/libldns.mk index 0740d09fab..6ced75a44f 100644 --- a/package/libldns/libldns.mk +++ b/package/libldns/libldns.mk @@ -45,4 +45,11 @@ endif # interested in the lib target anyway LIBLDNS_MAKE_OPTS = lib +ifeq ($(BR2_PACKAGE_LIBLDNS_DRILL),y) +LIBLDNS_CONF_OPTS += --with-drill +LIBLDNS_MAKE_OPTS += drill +else +LIBLDNS_CONF_OPTS += --without-drill +endif + $(eval $(autotools-package))