package/fastd: libcap is optional not mandatory
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Sat, 31 Oct 2020 21:07:06 +0000 (22:07 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 31 Oct 2020 21:22:11 +0000 (22:22 +0100)
libcap is an optional dependency which is available since version 7:
https://github.com/NeoRaider/fastd/commit/eaac49427339a365aac2d3505f567572cfbdbb96

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/fastd/Config.in
package/fastd/fastd.mk

index c4f296dd634647f4ca4809887ef7a769feca9191..5319d685033e67b14a133a7c263c6071f77ed3f9 100644 (file)
@@ -6,7 +6,6 @@ config BR2_PACKAGE_FASTD
        select BR2_PACKAGE_LIBUECC
        select BR2_PACKAGE_LIBSODIUM
        select BR2_PACKAGE_LIBSODIUM_FULL
-       select BR2_PACKAGE_LIBCAP
        help
          Fast and Secure Tunneling Daemon
 
index d556e2fbb154868d3c2cbd5223c6225988131adb..43d3c242f3606e96594bf906fe0d163a2f983d53 100644 (file)
@@ -10,11 +10,18 @@ FASTD_SOURCE = fastd-$(FASTD_VERSION).tar.xz
 FASTD_LICENSE = BSD-2-Clause
 FASTD_LICENSE_FILES = COPYRIGHT
 FASTD_CONF_OPTS = -DENABLE_LIBSODIUM=ON
-FASTD_DEPENDENCIES = host-bison host-pkgconf libuecc libsodium libcap
+FASTD_DEPENDENCIES = host-bison host-pkgconf libuecc libsodium
 
 # 0002-receive-fix-buffer-leak-when-receiving-invalid-packets.patch
 FASTD_IGNORE_CVES += CVE-2020-27638
 
+ifeq ($(BR2_PACKAGE_LIBCAP),y)
+FASTD_CONF_OPTS += -DWITH_CAPABILITIES=ON
+FASTD_DEPENDENCIES += libcap
+else
+FASTD_CONF_OPTS += -DWITH_CAPABILITIES=OFF
+endif
+
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 FASTD_CONF_OPTS += -DENABLE_OPENSSL=ON
 FASTD_DEPENDENCIES += openssl