aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Leres <leres@FreeBSD.org>2022-07-09 19:52:20 +0000
committerCraig Leres <leres@FreeBSD.org>2022-07-09 19:52:20 +0000
commit619c9efdbb5b809b2187706427c1ee1d0e57ca1f (patch)
treef5474cd5651d7c36f226643fab8b584681a1585b
parent8b0eb02c2efed83a4207860142a34605621d0e42 (diff)
downloadports-619c9efdbb5b809b2187706427c1ee1d0e57ca1f.tar.gz
ports-619c9efdbb5b809b2187706427c1ee1d0e57ca1f.zip
security/zeek: Patch to allow building without ENABLE_ZEEK_UNIT_TESTS
5.0.0 does not build without ENABLE_ZEEK_UNIT_TESTS enabled. Apply upstream patch which solves this: https://github.com/zeek/zeek/pull/2256 Obtained from: Benjamin Bannier
-rw-r--r--security/zeek/Makefile2
-rw-r--r--security/zeek/files/patch-auxil_spicy_CMakeLists.txt22
-rw-r--r--security/zeek/pkg-plist8
3 files changed, 23 insertions, 9 deletions
diff --git a/security/zeek/Makefile b/security/zeek/Makefile
index 26c89c7bcc7a..37b42d0770b9 100644
--- a/security/zeek/Makefile
+++ b/security/zeek/Makefile
@@ -2,6 +2,7 @@
PORTNAME= zeek
PORTVERSION= 5.0.0
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= https://download.zeek.org/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
@@ -38,7 +39,6 @@ CMAKE_ARGS+= -GNinja \
-D CMAKE_EXE_LINKER_FLAGS="${OPENSSL_LDFLAGS}" \
-D CMAKE_INSTALL_PREFIX:PATH=${PREFIX} \
-D ENABLE_PERFTOOLS_DEBUG:BOOL=false \
- -D ENABLE_ZEEK_UNIT_TESTS:BOOL=true \
-D INSTALL_AUX_TOOLS:BOOL=true \
-D PYTHON_EXECUTABLE:PATH=${PYTHON_CMD} \
-D PY_MOD_INSTALL_DIR:PATH=${PREFIX}/lib/zeekctl \
diff --git a/security/zeek/files/patch-auxil_spicy_CMakeLists.txt b/security/zeek/files/patch-auxil_spicy_CMakeLists.txt
new file mode 100644
index 000000000000..6aee2809e636
--- /dev/null
+++ b/security/zeek/files/patch-auxil_spicy_CMakeLists.txt
@@ -0,0 +1,22 @@
+--- auxil/spicy/CMakeLists.txt.orig 2022-07-09 17:28:05 UTC
++++ auxil/spicy/CMakeLists.txt
+@@ -36,3 +36,19 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-vla")
+ set(HILTI_DEV_PRECOMPILE_HEADERS OFF)
+
+ add_subdirectory(spicy)
++
++# Disable Spicy unit test targets.
++#
++# Spicy builds its unit tests as part of `ALL`. They are usually not only
++# uninteresting for us but might cause problems. Since any configuration
++# we do for our unit tests happens through global C++ compiler flags, they
++# would get inherited directly by Spicy which can cause issues, e.g., we set
++# `-DDOCTEST_CONFIG_DISABLE` if `ENABLE_ZEEK_UNIT_TESTS` is false, but Spicy
++# unit test do not anticipate this define being set.
++set_target_properties(
++ hilti-rt-tests
++ hilti-rt-configuration-tests
++ spicy-rt-tests
++ hilti-toolchain-tests
++ spicy-toolchain-tests
++ PROPERTIES EXCLUDE_FROM_ALL TRUE)
diff --git a/security/zeek/pkg-plist b/security/zeek/pkg-plist
index 1e1af63b2a69..3311d2a98f4c 100644
--- a/security/zeek/pkg-plist
+++ b/security/zeek/pkg-plist
@@ -1249,14 +1249,6 @@ lib/libparaglob.a
%%SPICY%%lib/zeek-spicy/spicy/zeek.spicy
%%SPICY%%lib/zeek-spicy/spicy/zeek_file.spicy
%%SPICY%%lib/zeek-spicy/spicy/zeek_rt.hlt
-%%SPICY%%lib/zeek-spicy/tests/Scripts/canonify-zeek-log
-%%SPICY%%lib/zeek-spicy/tests/Scripts/canonify-zeek-log-sorted
-%%SPICY%%lib/zeek-spicy/tests/Scripts/diff-remove-abspath
-%%SPICY%%lib/zeek-spicy/tests/Scripts/diff-remove-timestamps
-%%SPICY%%lib/zeek-spicy/tests/Scripts/diff-sort
-%%SPICY%%lib/zeek-spicy/tests/Scripts/spicy-version
-%%SPICY%%lib/zeek-spicy/tests/Scripts/zeek-version
-%%SPICY%%lib/zeek-spicy/tests/random.seed
%%NETMAP%%lib/zeek/plugins/Zeek_Netmap/COPYING
%%NETMAP%%lib/zeek/plugins/Zeek_Netmap/__bro_plugin__
%%NETMAP%%lib/zeek/plugins/Zeek_Netmap/lib/Zeek-Netmap.%%LCASE_OPSYS%%-%%ARCH%%.so