package/nftables: check for python
authorAdam Duskett <Aduskett@gmail.com>
Mon, 30 Mar 2020 23:46:12 +0000 (16:46 -0700)
committerYann E. MORIN <yann.morin.1998@free.fr>
Wed, 1 Apr 2020 20:16:51 +0000 (22:16 +0200)
If python or python3 is selected, nftables should depend on the package
and set the --enable-python option, otherwise set --disable-python

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/nftables/nftables.mk

index 11ef6844ce9772b6e9a7403049990681d1ceb2e1..210e950c1150725fd98983a1c5db14a6e6e0db2e 100644 (file)
@@ -27,6 +27,13 @@ else
 NFTABLES_CONF_OPTS += --without-json
 endif
 
+ifeq ($(BR2_PACKAGE_PYTHON)$(BR2_PACKAGE_PYTHON3),y)
+NFTABLES_CONF_OPTS += --enable-python
+NFTABLES_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON),python,python3)
+else
+NFTABLES_CONF_OPTS += --disable-python
+endif
+
 ifeq ($(BR2_STATIC_LIBS)$(BR2_PACKAGE_LIBNFTNL_JSON),yy)
 NFTABLES_LIBS += -ljansson -lm
 endif