nftables: making interactive console optional
authorAlexander Clouter <alex+buildroot@digriz.org.uk>
Sat, 6 Dec 2014 23:21:53 +0000 (23:21 +0000)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 10 Jan 2015 16:45:45 +0000 (17:45 +0100)
This lets you (by default enabled) compile out its readline
dependency.

[Thomas:
  - remove the patch, which is now unneeded, since we've bumped to
    nftables 0.4, which as the patch to make readline optional.
  - remove the new Config.in option, just enable the interactive
    console when the readline package is enabled.]

Signed-off-by: Alexander Clouter <alex+buildroot@digriz.org.uk>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/nftables/Config.in
package/nftables/nftables.mk

index 4ddfdbd1afbc98a59d0106caae98833b5ef8a7f6..1e0798e57fd03116272d372ee3ab677c1370da88 100644 (file)
@@ -8,7 +8,6 @@ config BR2_PACKAGE_NFTABLES
        select BR2_PACKAGE_GMP
        select BR2_PACKAGE_LIBMNL
        select BR2_PACKAGE_LIBNFTNL
-       select BR2_PACKAGE_READLINE
        select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
        help
          nftables is the project that aims to replace the existing
index 6be05edbeda0a854190f5b31fdaca0dba382dfa9..35c56e8ed77f04d824c573e50bccf9ad9547b764 100644 (file)
@@ -7,12 +7,18 @@
 NFTABLES_VERSION = 0.4
 NFTABLES_SOURCE = nftables-$(NFTABLES_VERSION).tar.bz2
 NFTABLES_SITE = http://www.netfilter.org/projects/nftables/files
-NFTABLES_DEPENDENCIES = gmp libmnl libnftnl readline host-bison host-flex \
+NFTABLES_DEPENDENCIES = gmp libmnl libnftnl host-bison host-flex \
        host-pkgconf $(if $(BR2_NEEDS_GETTEXT),gettext)
 NFTABLES_LICENSE = GPLv2
 NFTABLES_LICENSE_FILES = COPYING
 
-NFTABLES_LIBS = -lncurses
+ifeq ($(BR2_PACKAGE_READLINE),y)
+NFTABLES_DEPENDENCIES += readline
+NFTABLES_LIBS += -lncurses
+else
+NFTABLES_CONF_OPTS = --without-cli
+endif
+
 ifeq ($(BR2_STATIC_LIBS)$(BR2_PACKAGE_LIBNFTNL_JSON),yy)
 NFTABLES_LIBS += -ljansson -lm
 endif