git: 20d1ed50cfbb - main - devel/libddwaf: Update to 1.15.0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 14 Nov 2023 17:17:52 UTC
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=20d1ed50cfbbc4ea52c4aa1c50e66cf52d4f8fb9 commit 20d1ed50cfbbc4ea52c4aa1c50e66cf52d4f8fb9 Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2023-11-14 16:29:39 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2023-11-14 17:15:31 +0000 devel/libddwaf: Update to 1.15.0 Changes: https://github.com/DataDog/libddwaf/releases --- devel/libddwaf/Makefile | 8 ++-- devel/libddwaf/distinfo | 14 +++---- devel/libddwaf/files/patch-CMakeLists.txt | 42 +++++++------------ .../files/patch-third_party-CMakeLists.txt | 47 ++++++---------------- 4 files changed, 37 insertions(+), 74 deletions(-) diff --git a/devel/libddwaf/Makefile b/devel/libddwaf/Makefile index 929b3908a9f9..d5f1f85b4f0d 100644 --- a/devel/libddwaf/Makefile +++ b/devel/libddwaf/Makefile @@ -1,6 +1,5 @@ PORTNAME= libddwaf -PORTVERSION= 1.14.0 -PORTREVISION= 2 +PORTVERSION= 1.15.0 CATEGORIES= devel MAINTAINER= sunpoet@FreeBSD.org @@ -15,6 +14,7 @@ LICENSE_FILE_BSD3CLAUSE=${WRKSRC}/LICENSE.BSD3 BUILD_DEPENDS= rapidjson>=1.1.0.524:devel/rapidjson LIB_DEPENDS= libac.so:devel/libac \ libbenchmark.so:devel/benchmark \ + libfmt.so:devel/libfmt \ libgtest.so:devel/googletest \ libinjection.so:devel/libinjection \ libre2.so:devel/re2 \ @@ -28,8 +28,8 @@ CMAKE_ON= LIBDDWAF_BUILD_SHARED LIBDDWAF_BUILD_STATIC USE_GITHUB= yes GH_ACCOUNT= DataDog -GH_TUPLE= DataDog:appsec-event-rules:1.7.2:DataDog_appsec_event_rules/third_party/proj_event_rules \ - Tencent:rapidjson:476ffa2:Tencent_rapidjson/third_party/rapidjson +GH_TUPLE= DataDog:appsec-event-rules:1.8.0:DataDog_appsec_event_rules/third_party/proj_event_rules \ + Tencent:rapidjson:f9d5341:Tencent_rapidjson/third_party/rapidjson post-patch: # Clean up bundled libraries diff --git a/devel/libddwaf/distinfo b/devel/libddwaf/distinfo index 55e79c425138..9e8ed66aa7ef 100644 --- a/devel/libddwaf/distinfo +++ b/devel/libddwaf/distinfo @@ -1,7 +1,7 @@ -TIMESTAMP = 1694348240 -SHA256 (DataDog-libddwaf-1.14.0_GH0.tar.gz) = b6064baa887da67b0e48116d9a2e413bd6bd687e67e859d36a1fe26870410d19 -SIZE (DataDog-libddwaf-1.14.0_GH0.tar.gz) = 775136 -SHA256 (DataDog-appsec-event-rules-1.7.2_GH0.tar.gz) = 4d4a699949e7bb9ad0fa513094f6e47a40e9b1f2e5023590b8476172da0055d7 -SIZE (DataDog-appsec-event-rules-1.7.2_GH0.tar.gz) = 136232 -SHA256 (Tencent-rapidjson-476ffa2_GH0.tar.gz) = 6a1628b73d007ffe5d2bc84f206d05b2194e25eeb0585a41bfd29db150591f84 -SIZE (Tencent-rapidjson-476ffa2_GH0.tar.gz) = 1115582 +TIMESTAMP = 1699774452 +SHA256 (DataDog-libddwaf-1.15.0_GH0.tar.gz) = ea106abd88acc419341e9be4f172efc392bfa34016acc78774d1cd30bd6e33b0 +SIZE (DataDog-libddwaf-1.15.0_GH0.tar.gz) = 926926 +SHA256 (DataDog-appsec-event-rules-1.8.0_GH0.tar.gz) = 89ffe8639f73403c5641a7e27c0294a0217342c054f1d119212ee2e860662d24 +SIZE (DataDog-appsec-event-rules-1.8.0_GH0.tar.gz) = 152303 +SHA256 (Tencent-rapidjson-f9d5341_GH0.tar.gz) = 50dfb066d9de1fc5738ce4d35bd8dc04a2a7c9196331cd2143e0069da5ea1265 +SIZE (Tencent-rapidjson-f9d5341_GH0.tar.gz) = 1115737 diff --git a/devel/libddwaf/files/patch-CMakeLists.txt b/devel/libddwaf/files/patch-CMakeLists.txt index 5d7df8ac29b0..eee96f28ae1f 100644 --- a/devel/libddwaf/files/patch-CMakeLists.txt +++ b/devel/libddwaf/files/patch-CMakeLists.txt @@ -1,4 +1,4 @@ ---- CMakeLists.txt.orig 2023-08-17 10:28:49 UTC +--- CMakeLists.txt.orig 2023-10-31 14:13:07 UTC +++ CMakeLists.txt @@ -7,24 +7,24 @@ set(CMAKE_PROJECT_VERSION ${version}) @@ -36,7 +36,7 @@ option(LIBDDWAF_BUILD_SHARED "Build shared library" ON) option(LIBDDWAF_BUILD_STATIC "Build shared library" ON) -@@ -58,7 +58,7 @@ endif() +@@ -59,7 +59,7 @@ endif() include(GNUInstallDirs) @@ -45,17 +45,16 @@ add_library(glibc_compat OBJECT ${libddwaf_SOURCE_DIR}/src/glibc-compat/time64.c) set_target_properties(glibc_compat PROPERTIES POSITION_INDEPENDENT_CODE 1) -@@ -143,7 +143,8 @@ install(FILES ${libddwaf_SOURCE_DIR}/include/ddwaf.h D +@@ -159,7 +159,7 @@ install(FILES ${libddwaf_SOURCE_DIR}/include/ddwaf.h D # System dependencies set(LIBDDWAF_INTERFACE_LIBRARIES "") --set(LIBDDWAF_PRIVATE_LIBRARIES lib_re2 lib_ac lib_injection lib_radix lib_utf8proc) -+#set(LIBDDWAF_PRIVATE_LIBRARIES lib_re2 lib_ac lib_injection lib_radix lib_utf8proc) -+set(LIBDDWAF_PRIVATE_LIBRARIES lib_radix) +-set(LIBDDWAF_PRIVATE_LIBRARIES lib_re2 lib_utf8proc) ++#set(LIBDDWAF_PRIVATE_LIBRARIES lib_re2 lib_utf8proc) if(NOT MSVC AND LIBDDWAF_TEST_COVERAGE) target_compile_options(libddwaf_objects PRIVATE -ggdb --coverage) -@@ -176,6 +177,27 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") +@@ -192,6 +192,28 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") elseif(WIN32) list(APPEND LIBDDWAF_INTERFACE_LIBRARIES ws2_32) endif() @@ -63,13 +62,14 @@ +if (LIBAC) + list(APPEND LIBDDWAF_INTERFACE_LIBRARIES ac) +endif() ++find_library(LIBFMT fmt) ++if (LIBFMT) ++ list(APPEND LIBDDWAF_INTERFACE_LIBRARIES fmt) ++endif() +find_library(LIBINJECTION injection) +if (LIBINJECTION) + list(APPEND LIBDDWAF_INTERFACE_LIBRARIES injection) +endif() -+add_library(lib_radix STATIC ${PROJECT_SOURCE_DIR}/third_party/radixlib/radixlib.c) -+target_include_directories(lib_radix INTERFACE ${PROJECT_SOURCE_DIR}/third_party/radixlib) -+set_target_properties(lib_radix PROPERTIES POSITION_INDEPENDENT_CODE 1) +add_library(lib_rapidjson INTERFACE IMPORTED GLOBAL) +target_include_directories(lib_rapidjson INTERFACE ${PROJECT_SOURCE_DIR}/third_party/rapidjson/include) +find_library(LIBRE2 re2) @@ -83,7 +83,7 @@ target_link_libraries(libddwaf_objects PRIVATE ${LIBDDWAF_PRIVATE_LIBRARIES} -@@ -200,71 +222,72 @@ if (LIBDDWAF_BUILD_STATIC) +@@ -216,64 +238,65 @@ if (LIBDDWAF_BUILD_STATIC) INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) # Post-processing on the static library @@ -92,8 +92,7 @@ - COMMAND ${CMAKE_COMMAND} -E make_directory lib_comb - COMMAND ${CMAKE_COMMAND} -E chdir lib_comb lib.exe - /OUT:combined${CMAKE_STATIC_LIBRARY_SUFFIX} -- $<TARGET_FILE:libddwaf_static> $<TARGET_FILE:lib_re2> $<TARGET_FILE:lib_ac> -- $<TARGET_FILE:lib_injection> $<TARGET_FILE:lib_utf8proc> $<TARGET_FILE:lib_radix> +- $<TARGET_FILE:libddwaf_static> $<TARGET_FILE:lib_re2> $<TARGET_FILE:lib_utf8proc> - COMMAND ${CMAKE_COMMAND} -E copy lib_comb/combined${CMAKE_STATIC_LIBRARY_SUFFIX} $<TARGET_FILE:libddwaf_static> - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) - else() @@ -102,10 +101,7 @@ - COMMAND ${CMAKE_COMMAND} -E make_directory ar_comb - COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:libddwaf_static> - COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:lib_re2> -- COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:lib_ac> -- COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:lib_injection> - COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:lib_utf8proc> -- COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:lib_radix> - COMMAND libtool -static -o ar_comb/combined.a -arch_only ${CMAKE_OSX_ARCHITECTURES} ar_comb/*.o* - - COMMAND ${CMAKE_COMMAND} -E copy ar_comb/combined${CMAKE_STATIC_LIBRARY_SUFFIX} $<TARGET_FILE:libddwaf_static> @@ -116,10 +112,7 @@ - COMMAND ${CMAKE_COMMAND} -E make_directory ar_comb - COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:libddwaf_static> - COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:lib_re2> -- COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:lib_ac> -- COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:lib_injection> - COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:lib_utf8proc> -- COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:lib_radix> - COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_OBJECTS:glibc_compat> ar_comb - COMMAND ${CMAKE_AR} -qcs ar_comb/combined${CMAKE_STATIC_LIBRARY_SUFFIX} ar_comb/*.o* - @@ -148,8 +141,7 @@ +# COMMAND ${CMAKE_COMMAND} -E make_directory lib_comb +# COMMAND ${CMAKE_COMMAND} -E chdir lib_comb lib.exe +# /OUT:combined${CMAKE_STATIC_LIBRARY_SUFFIX} -+# $<TARGET_FILE:libddwaf_static> $<TARGET_FILE:lib_re2> $<TARGET_FILE:lib_ac> -+# $<TARGET_FILE:lib_injection> $<TARGET_FILE:lib_utf8proc> $<TARGET_FILE:lib_radix> ++# $<TARGET_FILE:libddwaf_static> $<TARGET_FILE:lib_re2> $<TARGET_FILE:lib_utf8proc> +# COMMAND ${CMAKE_COMMAND} -E copy lib_comb/combined${CMAKE_STATIC_LIBRARY_SUFFIX} $<TARGET_FILE:libddwaf_static> +# WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) +# else() @@ -158,10 +150,7 @@ +# COMMAND ${CMAKE_COMMAND} -E make_directory ar_comb +# COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:libddwaf_static> +# COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:lib_re2> -+# COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:lib_ac> -+# COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:lib_injection> +# COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:lib_utf8proc> -+# COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:lib_radix> +# COMMAND libtool -static -o ar_comb/combined.a -arch_only ${CMAKE_OSX_ARCHITECTURES} ar_comb/*.o* +# +# COMMAND ${CMAKE_COMMAND} -E copy ar_comb/combined${CMAKE_STATIC_LIBRARY_SUFFIX} $<TARGET_FILE:libddwaf_static> @@ -172,10 +161,7 @@ +# COMMAND ${CMAKE_COMMAND} -E make_directory ar_comb +# COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:libddwaf_static> +# COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:lib_re2> -+# COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:lib_ac> -+# COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:lib_injection> +# COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:lib_utf8proc> -+# COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:lib_radix> +# COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_OBJECTS:glibc_compat> ar_comb +# COMMAND ${CMAKE_AR} -qcs ar_comb/combined${CMAKE_STATIC_LIBRARY_SUFFIX} ar_comb/*.o* +# @@ -213,7 +199,7 @@ +# OUTPUT_VARIABLE BUILD_ID +# OUTPUT_STRIP_TRAILING_WHITESPACE +# ) -+ set(BUILD_ID "25b0021f1d2ce1eea39a37ad41b6de9eec12ee84") ++ set(BUILD_ID "e7d3c209402b8d81d119584cb147f88efe976965") message(STATUS "Build id is ${BUILD_ID}") string(SUBSTRING "${BUILD_ID}" 0 2 BUILD_ID_PREFIX) string(SUBSTRING "${BUILD_ID}" 2 39 BUILD_ID_SUFFIX) diff --git a/devel/libddwaf/files/patch-third_party-CMakeLists.txt b/devel/libddwaf/files/patch-third_party-CMakeLists.txt index 41564fb5cdf0..49cd330eac5f 100644 --- a/devel/libddwaf/files/patch-third_party-CMakeLists.txt +++ b/devel/libddwaf/files/patch-third_party-CMakeLists.txt @@ -1,4 +1,4 @@ ---- third_party/CMakeLists.txt.orig 2023-08-17 10:28:49 UTC +--- third_party/CMakeLists.txt.orig 2023-10-31 14:13:07 UTC +++ third_party/CMakeLists.txt @@ -15,24 +15,24 @@ if(NOT MSVC) set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wno-unused-parameter") @@ -99,7 +99,7 @@ if(CMAKE_BUILD_TYPE MATCHES Debug) set(LIBGTEST_FILENAME ${CMAKE_STATIC_LIBRARY_PREFIX}gtestd${CMAKE_STATIC_LIBRARY_SUFFIX}) -@@ -81,54 +81,54 @@ else() +@@ -81,114 +81,114 @@ else() endif() @@ -165,39 +165,16 @@ add_dependencies(lib_gmock proj_gtest) set_target_properties(lib_gtest lib_gmock proj_gtest PROPERTIES EXCLUDE_FROM_ALL TRUE) --add_library(lib_injection STATIC -- libinjection/src/xss.c -- libinjection/src/libinjection_html5.c -- libinjection/src/libinjection_xss.c -- libinjection/src/libinjection_sqli.c) --target_include_directories(lib_injection INTERFACE ${PROJECT_SOURCE_DIR}/libinjection/src) --set_target_properties(lib_injection PROPERTIES POSITION_INDEPENDENT_CODE 1) -+#add_library(lib_injection STATIC -+# libinjection/src/xss.c -+# libinjection/src/libinjection_html5.c -+# libinjection/src/libinjection_xss.c -+# libinjection/src/libinjection_sqli.c) -+#target_include_directories(lib_injection INTERFACE ${PROJECT_SOURCE_DIR}/libinjection/src) -+#set_target_properties(lib_injection PROPERTIES POSITION_INDEPENDENT_CODE 1) - --add_library(lib_ac STATIC -- lua-aho-corasick/ac_fast.cxx -- lua-aho-corasick/ac_slow.cxx -- lua-aho-corasick/ac.cxx) --target_include_directories(lib_ac INTERFACE ${PROJECT_SOURCE_DIR}/lua-aho-corasick) --set_target_properties(lib_ac PROPERTIES POSITION_INDEPENDENT_CODE 1) -+#add_library(lib_ac STATIC -+# lua-aho-corasick/ac_fast.cxx -+# lua-aho-corasick/ac_slow.cxx -+# lua-aho-corasick/ac.cxx) -+#target_include_directories(lib_ac INTERFACE ${PROJECT_SOURCE_DIR}/lua-aho-corasick) -+#set_target_properties(lib_ac PROPERTIES POSITION_INDEPENDENT_CODE 1) - - add_library(lib_radix STATIC - radixlib/radixlib.c) -@@ -141,74 +141,74 @@ else () - set(LIBUTF8PROC_FILENAME ${CMAKE_STATIC_LIBRARY_PREFIX}utf8proc${CMAKE_STATIC_LIBRARY_SUFFIX}) - endif() +-if (MSVC) +- set(LIBUTF8PROC_FILENAME ${CMAKE_STATIC_LIBRARY_PREFIX}utf8proc_static${CMAKE_STATIC_LIBRARY_SUFFIX}) +-else () +- set(LIBUTF8PROC_FILENAME ${CMAKE_STATIC_LIBRARY_PREFIX}utf8proc${CMAKE_STATIC_LIBRARY_SUFFIX}) +-endif() ++#if (MSVC) ++# set(LIBUTF8PROC_FILENAME ${CMAKE_STATIC_LIBRARY_PREFIX}utf8proc_static${CMAKE_STATIC_LIBRARY_SUFFIX}) ++#else () ++# set(LIBUTF8PROC_FILENAME ${CMAKE_STATIC_LIBRARY_PREFIX}utf8proc${CMAKE_STATIC_LIBRARY_SUFFIX}) ++#endif() -set(UTF8PROC_VERSION v2.7.0) -ExternalProject_Add(proj_utf8proc