libtins: Added menu configuration options
authorIlya Tsybulsky <redacted>
Sun, 9 Feb 2020 19:48:43 +0000 (22:48 +0300)
committerIlya Tsybulsky <redacted>
Sun, 9 Feb 2020 21:48:35 +0000 (00:48 +0300)
Signed-off-by: Ilya Tsybulsky <redacted>
libs/libtins/Config.in [new file with mode: 0644]
libs/libtins/Makefile

diff --git a/libs/libtins/Config.in b/libs/libtins/Config.in
new file mode 100644 (file)
index 0000000..1d5efd1
--- /dev/null
@@ -0,0 +1,32 @@
+# libtins configuration
+menu "Configuration"
+       depends on PACKAGE_libtins
+
+config LIBTINS_ENABLE_ACK_TRACKER
+       bool "Enable ACK tracker"
+       default n
+
+config LIBTINS_ENABLE_CXX11
+       bool "Enable C++11"
+       default y
+
+config LIBTINS_ENABLE_DOT11
+       bool "Enable IEEE 802.11 support (select this to access ENABLE_WPA2 option)"
+       help
+               If selected, this also allows configuring WPA2 support which requires openssl
+       default n
+
+config LIBTINS_ENABLE_PCAP
+       bool "Enable PCAP library support"
+       default y
+
+config LIBTINS_ENABLE_TCP_STREAM_CUSTOM_DATA
+       bool "Enable TCP stream custom data"
+       default n
+
+config LIBTINS_ENABLE_WPA2
+       depends on LIBTINS_ENABLE_DOT11
+       bool "Enable WPA2 (this selects libopenssl)"
+       default n
+endmenu
+
index 318da36facc71bb55ebb8d8252ea95ba1bd408c5..10d1acacc7057dcf1d7d592e37153ee6aecd1d8b 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libtins
 PKG_VERSION:=4.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/mfontanini/libtins/tar.gz/v$(PKG_VERSION)?
@@ -30,7 +30,12 @@ define Package/libtins
   CATEGORY:=Libraries
   TITLE:=libtins
   URL:=https://libtins.github.io/
-  DEPENDS:=+libstdcpp +libpcap
+  DEPENDS:=+libstdcpp +LIBTINS_ENABLE_PCAP:libpcap +LIBTINS_ENABLE_WPA2:libopenssl
+  MENU:=1
+endef
+
+define Package/libtins/config
+       source "$(SOURCE)/Config.in"
 endef
 
 define Package/libtins/description
@@ -41,12 +46,12 @@ CMAKE_OPTIONS += \
        -D_RUN_RESULT_VAR=FORCE \
        -DLIBTINS_BUILD_EXAMPLES=OFF \
        -DLIBTINS_BUILD_TESTS=OFF \
-       -DLIBTINS_ENABLE_ACK_TRACKER=OFF \
-       -DLIBTINS_ENABLE_CXX11=ON \
-       -DLIBTINS_ENABLE_DOT11=OFF \
-       -DLIBTINS_ENABLE_PCAP=ON \
-       -DLIBTINS_ENABLE_TCP_STREAM_CUSTOM_DATA=OFF \
-       -DLIBTINS_ENABLE_WPA2=OFF
+       -DLIBTINS_ENABLE_ACK_TRACKER=$(if $(CONFIG_LIBTINS_ENABLE_ACK_TRACKER),ON,OFF) \
+       -DLIBTINS_ENABLE_CXX11=$(if $(CONFIG_LIBTINS_ENABLE_CXX11),ON,OFF) \
+       -DLIBTINS_ENABLE_DOT11=$(if $(CONFIG_LIBTINS_ENABLE_DOT11),ON,OFF) \
+       -DLIBTINS_ENABLE_PCAP=$(if $(CONFIG_LIBTINS_ENABLE_PCAP),ON,OFF) \
+       -DLIBTINS_ENABLE_TCP_STREAM_CUSTOM_DATA=$(if $(CONFIG_LIBTINS_ENABLE_TCP_STREAM_CUSTOM_DATA),ON,OFF) \
+       -DLIBTINS_ENABLE_WPA2=$(if $(CONFIG_LIBTINS_ENABLE_WPA2),ON,OFF)
 
 TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -flto
 TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
git clone https://git.99rst.org/PROJECT