aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2022-08-21 12:55:43 +0200
committerToni Uhlig <matzeton@googlemail.com>2022-09-11 13:16:27 +0200
commit673547ad3305eca31ac01f7c709665d462ec2381 (patch)
tree66115698baa84a9125c7b42edc020e743e88fd10
parent97b08ad93588f32efcb72a3435e67e07a66f32ae (diff)
suricata6: fix build
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
-rw-r--r--libs/expat/Makefile14
-rw-r--r--net/suricata6/Makefile24
2 files changed, 24 insertions, 14 deletions
diff --git a/libs/expat/Makefile b/libs/expat/Makefile
index e41d6fd..dd8710e 100644
--- a/libs/expat/Makefile
+++ b/libs/expat/Makefile
@@ -21,6 +21,7 @@ PKG_CPE_ID:=cpe:/a:libexpat:expat
CMAKE_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/libexpat
@@ -46,9 +47,22 @@ CMAKE_OPTIONS += \
-DEXPAT_NS=OFF \
-DEXPAT_DEV_URANDOM=OFF
+CMAKE_HOST_OPTIONS += \
+ -DDOCBOOK_TO_MAN=OFF \
+ -DEXPAT_BUILD_TOOLS=OFF \
+ -DEXPAT_BUILD_EXAMPLES=OFF \
+ -DEXPAT_BUILD_TESTS=OFF \
+ -DEXPAT_BUILD_DOCS=OFF \
+ -DEXPAT_WITH_LIBBSD=OFF \
+ -DEXPAT_ENABLE_INSTALL=ON \
+ -DEXPAT_DTD=OFF \
+ -DEXPAT_NS=OFF \
+ -DEXPAT_DEV_URANDOM=OFF
+
define Package/libexpat/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libexpat.so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libexpat))
+$(eval $(call HostBuild))
diff --git a/net/suricata6/Makefile b/net/suricata6/Makefile
index 9859f89..c581a34 100644
--- a/net/suricata6/Makefile
+++ b/net/suricata6/Makefile
@@ -18,7 +18,7 @@ PKG_INSTALL := 1
PKG_BUILD_DEPENDS := rust/host python3/host expat/host
include $(INCLUDE_DIR)/package.mk
-include ../../lang/rust/rust_environment.mk
+include ../../lang/rust/rustc_environment.mk
define Package/suricata6/config
source "$(SOURCE)/Config.in"
@@ -26,8 +26,8 @@ endef
CONFIGURE_VARS += \
CARGO_HOME="$(CARGO_HOME)" \
- ac_cv_path_CARGO="$(CARGO_HOME)/bin/cargo" \
- ac_cv_path_RUSTC="$(CARGO_HOME)/bin/rustc" \
+ ac_cv_path_CARGO="$(STAGING_DIR_HOST)/bin/cargo" \
+ ac_cv_path_RUSTC="$(STAGING_DIR_HOST)/bin/rustc" \
CONFIGURE_ARGS += \
--target=$(RUSTC_TARGET_ARCH) \
@@ -36,11 +36,8 @@ CONFIGURE_ARGS += \
--enable-shared \
--disable-gccmarch-native \
--with-gnu-ld \
- --with-sysroot=$(STAGING_DIR_HOST)
-# --enable-non-bundled-htp \
-# --with-libhtp-includes=$(STAGING_DIR_HOSTPKG)/include \
-# --with-libhtp-libraries=$(STAGING_DIR_HOSTPKG)/lib
-# --with-sysroot=$(TOOLCHAIN_DIR)
+ --with-sysroot=$(STAGING_DIR_HOST) \
+ --enable-non-bundled-htp
ifeq ($(CONFIG_SURICATA_ENABLE_PYTHON),y)
CONFIGURE_ARGS += --enable-python
@@ -59,8 +56,10 @@ endif
ifneq ($(CONFIG_TARGET_x86),y)
ifeq ($(CONFIG_PKG_ASLR_PIE_ALL),y)
CONFIGURE_ARGS += --enable-pie
- else ($(CONFIG_PKG_ASLR_PIE_REGULAR),y)
- CONFIGURE_ARGS += --enable-pie
+ else
+ ifeq ($(CONFIG_PKG_ASLR_PIE_REGULAR),y)
+ CONFIGURE_ARGS += --enable-pie
+ endif
endif
endif
@@ -96,9 +95,6 @@ endif
define Build/Prepare
$(call Build/Prepare/Default)
- cd $(PKG_BUILD_DIR) && \
- git clone https://github.com/OISF/libhtp.git
-
[ -f $(CARGO_HOME)/bin/cbindgen ] || \
$(CONFIGURE_VARS) cargo install --root=$(CARGO_HOME) cbindgen
@@ -115,7 +111,7 @@ define Package/suricata6
SECTION:=net
CATEGORY:=Network
DEPENDS:=@!SMALL_FLASH @!LOW_MEMORY_FOOTPRINT +libexpat +jansson +libpcre +libyaml +libpcap +libcap-ng \
- +nspr +libnss +liblz4 +libatomic +libnet-1.2.x \
+ +nspr +libnss +liblz4 +libatomic +libnet-1.2.x +libhtp \
+SURICATA_ENABLE_NFLOG:libnetfilter-log \
+SURICATA_ENABLE_NFQUEUE:libnetfilter-queue +SURICATA_ENABLE_NFQUEUE:iptables-mod-nfqueue \
+SURICATA_ENABLE_HIREDIS:libhiredis +SURICATA_ENABLE_HIREDIS:libevent2 \