[Buildroot] [PATCH RESEND 1/2] package/libldns: add an option to build and install drill
Alexis Lothoré
alexis.lothore at bootlin.com
Thu Oct 16 15:27:02 UTC 2025
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.
---
package/libldns/Config.in | 14 ++++++++++++++
package/libldns/libldns.mk | 7 +++++++
2 files changed, 21 insertions(+)
diff --git a/package/libldns/Config.in b/package/libldns/Config.in
index 696fec97b59857fbd99bdcaababa09d49774f3ae..7a169c495281be01b2ee724fd2f9e27b83f5e2ec 100644
--- a/package/libldns/Config.in
+++ b/package/libldns/Config.in
@@ -8,3 +8,17 @@ 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"
+ default n
+ depends on !BR2_STATIC_LIBS
+ help
+ Install the drill binary
+
+comment "drill needs dynamic library"
+ depends on BR2_STATIC_LIBS
+
+endif # BR2_PACKAGE_LIBLDNS
diff --git a/package/libldns/libldns.mk b/package/libldns/libldns.mk
index 0740d09fab2fd15592c3d55cd2c1932664ca3344..6ced75a44fcf5bf9c95e443181362f99c9375eeb 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))
--
2.51.0
More information about the buildroot
mailing list