[Buildroot] [PATCH v2] package/iproute2: add optional dependency on libbpf
Ignacy Gawędzki
ignacy.gawedzki at green-communications.fr
Mon Jul 3 21:15:59 UTC 2023
The configure script will automatically detect used pkg-config if
libbpf is available.
Signed-off-by: Ignacy Gawędzki <ignacy.gawedzki at green-communications.fr>
---
v2: Add --libbpf_force to configure, in order to force libbpf support
depending on BR2_PACKAGE_LIBBPF.
package/iproute2/iproute2.mk | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/package/iproute2/iproute2.mk b/package/iproute2/iproute2.mk
index 15af076db9..5f1154287d 100644
--- a/package/iproute2/iproute2.mk
+++ b/package/iproute2/iproute2.mk
@@ -12,6 +12,7 @@ IPROUTE2_DEPENDENCIES = host-bison host-flex host-pkgconf \
IPROUTE2_LICENSE = GPL-2.0+
IPROUTE2_LICENSE_FILES = COPYING
IPROUTE2_CPE_ID_VENDOR = iproute2_project
+IPROUTE2_CONFIGURE_OPTS =
ifeq ($(BR2_PACKAGE_ELFUTILS),y)
IPROUTE2_DEPENDENCIES += elfutils
@@ -38,8 +39,16 @@ ifeq ($(BR2_PACKAGE_BERKELEYDB_COMPAT185),y)
IPROUTE2_DEPENDENCIES += berkeleydb
endif
+ifeq ($(BR2_PACKAGE_LIBBPF),y)
+IPROUTE2_DEPENDENCIES += libbpf
+IPROUTE2_CONFIGURE_OPTS += --libbpf_force on
+else
+IPROUTE2_CONFIGURE_OPTS += --libbpf_force off
+endif
+
define IPROUTE2_CONFIGURE_CMDS
- cd $(@D) && $(TARGET_CONFIGURE_OPTS) ./configure
+ cd $(@D) && $(TARGET_CONFIGURE_OPTS) ./configure \
+ $(IPROUTE2_CONFIGURE_OPTS)
$(IPROUTE2_DISABLE_IPTABLES)
endef
--
2.39.2
More information about the buildroot
mailing list