git: 946604ae1901 - main - devel/libddwaf: Update to 1.16.0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 21 Feb 2024 15:18:26 UTC
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=946604ae19017f810d581e304cce2a2e55483e5e commit 946604ae19017f810d581e304cce2a2e55483e5e Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2024-02-21 14:25:46 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2024-02-21 15:06:23 +0000 devel/libddwaf: Update to 1.16.0 - Clean up LIB_DEPENDS Changes: https://github.com/DataDog/libddwaf/releases --- devel/libddwaf/Makefile | 24 +- devel/libddwaf/distinfo | 12 +- devel/libddwaf/files/patch-CMakeLists.txt | 205 -------------- devel/libddwaf/files/patch-cmake-objects.cmake | 64 +++++ devel/libddwaf/files/patch-cmake-shared.cmake | 30 ++ devel/libddwaf/files/patch-cmake-static.cmake | 15 + devel/libddwaf/files/patch-perf-CMakeLists.txt | 19 -- .../files/patch-third_party-CMakeLists.txt | 312 --------------------- 8 files changed, 124 insertions(+), 557 deletions(-) diff --git a/devel/libddwaf/Makefile b/devel/libddwaf/Makefile index 62533e2efec9..e47ec70bfe2f 100644 --- a/devel/libddwaf/Makefile +++ b/devel/libddwaf/Makefile @@ -1,6 +1,5 @@ PORTNAME= libddwaf -PORTVERSION= 1.15.1 -PORTREVISION= 1 +PORTVERSION= 1.16.0 CATEGORIES= devel MAINTAINER= sunpoet@FreeBSD.org @@ -12,29 +11,26 @@ LICENSE_COMB= dual LICENSE_FILE_APACHE20= ${WRKSRC}/LICENSE.Apache 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 \ - libutf8proc.so:textproc/utf8proc \ - libyaml-cpp.so:devel/yaml-cpp + libutf8proc.so:textproc/utf8proc USES= cmake compiler:c++20-lang localbase:ldflags -CMAKE_OFF= LIBDDWAF_KEEP_SYMBOL_FILE LIBDDWAF_TESTING -CMAKE_ON= LIBDDWAF_BUILD_SHARED LIBDDWAF_BUILD_STATIC +CMAKE_OFF= LIBDDWAF_TESTING LIBDDWAF_TEST_COVERAGE +CMAKE_ON= LIBDDWAF_BUILD_SHARED LIBDDWAF_BUILD_STATIC LIBDDWAF_ENABLE_LTO LIBDDWAF_VECTORIZED_TRANSFORMERS USE_GITHUB= yes GH_ACCOUNT= DataDog -GH_TUPLE= DataDog:appsec-event-rules:1.9.0:DataDog_appsec_event_rules/third_party/proj_event_rules \ - Tencent:rapidjson:f9d5341:Tencent_rapidjson/third_party/rapidjson post-patch: # Clean up bundled libraries - @${RM} -r ${WRKSRC}/third_party/libinjection/ - @${RM} -r ${WRKSRC}/third_party/lua-aho-corasick/ + #@${RM} -r ${WRKSRC}/src/vendor/fmt/ + @${RM} -r ${WRKSRC}/src/vendor/libinjection/ + @${RM} -r ${WRKSRC}/src/vendor/lua-aho-corasick/ + #@${RM} -r ${WRKSRC}/src/vendor/radixlib/ + @${RM} -r ${WRKSRC}/src/vendor/re2/ + @${RM} -r ${WRKSRC}/src/vendor/utf8proc/ .include <bsd.port.mk> diff --git a/devel/libddwaf/distinfo b/devel/libddwaf/distinfo index fc7111152005..aa11e5bffaf4 100644 --- a/devel/libddwaf/distinfo +++ b/devel/libddwaf/distinfo @@ -1,7 +1,5 @@ -TIMESTAMP = 1700759716 -SHA256 (DataDog-libddwaf-1.15.1_GH0.tar.gz) = a9080b43055f6600fce20034fe6aa2cb8029e2fb885c5e1c7f45fd4e8cf3d3c2 -SIZE (DataDog-libddwaf-1.15.1_GH0.tar.gz) = 926983 -SHA256 (DataDog-appsec-event-rules-1.9.0_GH0.tar.gz) = 41b3aae5cd6e461f8bb11f82ba768eb385ed5b576e0aeb61759480219cd93b26 -SIZE (DataDog-appsec-event-rules-1.9.0_GH0.tar.gz) = 156309 -SHA256 (Tencent-rapidjson-f9d5341_GH0.tar.gz) = 50dfb066d9de1fc5738ce4d35bd8dc04a2a7c9196331cd2143e0069da5ea1265 -SIZE (Tencent-rapidjson-f9d5341_GH0.tar.gz) = 1115737 +TIMESTAMP = 1708448904 +SHA256 (DataDog-libddwaf-1.16.0_GH0.tar.gz) = bea6dff766a2cf7ade1d0ee56bccf551119d55865c4b837e6a76fde7373360da +SIZE (DataDog-libddwaf-1.16.0_GH0.tar.gz) = 1212068 +SHA256 (Tencent-rapidjson-3f73eda_GH0.tar.gz) = b1be0acdf20cbd88c64d8688d8e587ffa6971682121332dc43f686174c72b27f +SIZE (Tencent-rapidjson-3f73eda_GH0.tar.gz) = 1115785 diff --git a/devel/libddwaf/files/patch-CMakeLists.txt b/devel/libddwaf/files/patch-CMakeLists.txt deleted file mode 100644 index eee96f28ae1f..000000000000 --- a/devel/libddwaf/files/patch-CMakeLists.txt +++ /dev/null @@ -1,205 +0,0 @@ ---- CMakeLists.txt.orig 2023-10-31 14:13:07 UTC -+++ CMakeLists.txt -@@ -7,24 +7,24 @@ set(CMAKE_PROJECT_VERSION ${version}) - - configure_file(src/version.hpp.in ${CMAKE_CURRENT_SOURCE_DIR}/src/version.hpp) - --set(CMAKE_OSX_DEPLOYMENT_TARGET "10.12" CACHE STRING "Minimum OS X deployment version") --if(CMAKE_OSX_ARCHITECTURES MATCHES "x86_64" OR -- CMAKE_OSX_ARCHITECTURES MATCHES "arm64") -- set(CPU_TYPE ${CMAKE_OSX_ARCHITECTURES}) --endif() -+#set(CMAKE_OSX_DEPLOYMENT_TARGET "10.12" CACHE STRING "Minimum OS X deployment version") -+#if(CMAKE_OSX_ARCHITECTURES MATCHES "x86_64" OR -+# CMAKE_OSX_ARCHITECTURES MATCHES "arm64") -+# set(CPU_TYPE ${CMAKE_OSX_ARCHITECTURES}) -+#endif() - - set(CMAKE_C_STANDARD 99) - set(CMAKE_CXX_STANDARD 20) - set(CMAKE_EXPORT_COMPILE_COMMANDS ON) - --set(LIBDDWAF_SHARED_LINKER_FLAGS "-static-libstdc++" CACHE STRING "Shared library extra linker flags") -+#set(LIBDDWAF_SHARED_LINKER_FLAGS "-static-libstdc++" CACHE STRING "Shared library extra linker flags") - set(LIBDDWAF_EXE_LINKER_FLAGS "" CACHE STRING "Executable extra linker flags") - set(LIBDDWAF_PACKAGE_SUFFIX "" CACHE STRING "Suffix for packaging purposes") --if(CMAKE_OSX_ARCHITECTURES MATCHES "arm64") -- set(LIBDDWAF_PACKAGE_PROCESSOR ${CMAKE_OSX_ARCHITECTURES} CACHE STRING "Alternative processor for packaging purposes") --else() -- set(LIBDDWAF_PACKAGE_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR} CACHE STRING "Alternative processor for packaging purposes") --endif() -+#if(CMAKE_OSX_ARCHITECTURES MATCHES "arm64") -+# set(LIBDDWAF_PACKAGE_PROCESSOR ${CMAKE_OSX_ARCHITECTURES} CACHE STRING "Alternative processor for packaging purposes") -+#else() -+# set(LIBDDWAF_PACKAGE_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR} CACHE STRING "Alternative processor for packaging purposes") -+#endif() - - option(LIBDDWAF_BUILD_SHARED "Build shared library" ON) - option(LIBDDWAF_BUILD_STATIC "Build shared library" ON) -@@ -59,7 +59,7 @@ endif() - - include(GNUInstallDirs) - --add_subdirectory(third_party) -+#add_subdirectory(third_party) - - add_library(glibc_compat OBJECT ${libddwaf_SOURCE_DIR}/src/glibc-compat/time64.c) - set_target_properties(glibc_compat PROPERTIES POSITION_INDEPENDENT_CODE 1) -@@ -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_utf8proc) -+#set(LIBDDWAF_PRIVATE_LIBRARIES lib_re2 lib_utf8proc) - - if(NOT MSVC AND LIBDDWAF_TEST_COVERAGE) - target_compile_options(libddwaf_objects PRIVATE -ggdb --coverage) -@@ -192,6 +192,28 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") - elseif(WIN32) - list(APPEND LIBDDWAF_INTERFACE_LIBRARIES ws2_32) - endif() -+find_library(LIBAC ac) -+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_rapidjson INTERFACE IMPORTED GLOBAL) -+target_include_directories(lib_rapidjson INTERFACE ${PROJECT_SOURCE_DIR}/third_party/rapidjson/include) -+find_library(LIBRE2 re2) -+if (LIBRE2) -+ list(APPEND LIBDDWAF_INTERFACE_LIBRARIES re2) -+endif() -+find_library(LIBUTF8PROC utf8proc) -+if (LIBUTF8PROC) -+ list(APPEND LIBDDWAF_INTERFACE_LIBRARIES utf8proc) -+endif() - - target_link_libraries(libddwaf_objects - PRIVATE ${LIBDDWAF_PRIVATE_LIBRARIES} -@@ -216,64 +238,65 @@ if (LIBDDWAF_BUILD_STATIC) - INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) - - # Post-processing on the static library -- if(MSVC) -- add_custom_command(TARGET libddwaf_static POST_BUILD -- 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_utf8proc> -- COMMAND ${CMAKE_COMMAND} -E copy lib_comb/combined${CMAKE_STATIC_LIBRARY_SUFFIX} $<TARGET_FILE:libddwaf_static> -- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) -- else() -- if(CMAKE_OSX_ARCHITECTURES MATCHES "arm64") -- add_custom_command(TARGET libddwaf_static POST_BUILD -- 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_utf8proc> -- 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> -- COMMAND rm -rf ar_comb -- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) -- else() -- add_custom_command(TARGET libddwaf_static POST_BUILD -- 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_utf8proc> -- 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* -- -- COMMAND ${CMAKE_COMMAND} -E copy ar_comb/combined${CMAKE_STATIC_LIBRARY_SUFFIX} $<TARGET_FILE:libddwaf_static> -- COMMAND rm -rf ar_comb -- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) -- endif() -- if(NOT (CMAKE_BUILD_TYPE MATCHES Debug)) -- if (CMAKE_SYSTEM_NAME STREQUAL Darwin OR CMAKE_SYSTEM_NAME STREQUAL Linux) -- if (NOT CMAKE_STRIP) -- find_program(STRIP strip) -- if (STRIP STREQUAL "STRIP-NOTFOUND") -- message(FATAL_ERROR "strip not found") -- endif() -- else() -- set(STRIP ${CMAKE_STRIP}) -- endif() -- add_custom_command(TARGET libddwaf_static POST_BUILD -- COMMAND ${STRIP} -x -S $<TARGET_FILE:libddwaf_static> -o $<TARGET_FILE:libddwaf_static>.stripped) -- install(FILES $<TARGET_FILE:libddwaf_static>.stripped DESTINATION ${CMAKE_INSTALL_LIBDIR}) -- endif() -- endif() -- endif() -+# if(MSVC) -+# add_custom_command(TARGET libddwaf_static POST_BUILD -+# 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_utf8proc> -+# COMMAND ${CMAKE_COMMAND} -E copy lib_comb/combined${CMAKE_STATIC_LIBRARY_SUFFIX} $<TARGET_FILE:libddwaf_static> -+# WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) -+# else() -+# if(CMAKE_OSX_ARCHITECTURES MATCHES "arm64") -+# add_custom_command(TARGET libddwaf_static POST_BUILD -+# 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_utf8proc> -+# 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> -+# COMMAND rm -rf ar_comb -+# WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) -+# else() -+# add_custom_command(TARGET libddwaf_static POST_BUILD -+# 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_utf8proc> -+# 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* -+# -+# COMMAND ${CMAKE_COMMAND} -E copy ar_comb/combined${CMAKE_STATIC_LIBRARY_SUFFIX} $<TARGET_FILE:libddwaf_static> -+# COMMAND rm -rf ar_comb -+# WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) -+# endif() -+# if(NOT (CMAKE_BUILD_TYPE MATCHES Debug)) -+# if (CMAKE_SYSTEM_NAME STREQUAL Darwin OR CMAKE_SYSTEM_NAME STREQUAL Linux) -+# if (NOT CMAKE_STRIP) -+# find_program(STRIP strip) -+# if (STRIP STREQUAL "STRIP-NOTFOUND") -+# message(FATAL_ERROR "strip not found") -+# endif() -+# else() -+# set(STRIP ${CMAKE_STRIP}) -+# endif() -+# add_custom_command(TARGET libddwaf_static POST_BUILD -+# COMMAND ${STRIP} -x -S $<TARGET_FILE:libddwaf_static> -o $<TARGET_FILE:libddwaf_static>.stripped) -+# install(FILES $<TARGET_FILE:libddwaf_static>.stripped DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+# endif() -+# endif() -+# endif() - endif() - - # Shared library - if (LIBDDWAF_BUILD_SHARED) -- execute_process(COMMAND git rev-parse HEAD -- WORKING_DIRECTORY ${libddwaf_SOURCE_DIR} -- OUTPUT_VARIABLE BUILD_ID -- OUTPUT_STRIP_TRAILING_WHITESPACE -- ) -+# execute_process(COMMAND git rev-parse HEAD -+# WORKING_DIRECTORY ${libddwaf_SOURCE_DIR} -+# OUTPUT_VARIABLE BUILD_ID -+# OUTPUT_STRIP_TRAILING_WHITESPACE -+# ) -+ 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-cmake-objects.cmake b/devel/libddwaf/files/patch-cmake-objects.cmake new file mode 100644 index 000000000000..ca79a3dfec97 --- /dev/null +++ b/devel/libddwaf/files/patch-cmake-objects.cmake @@ -0,0 +1,64 @@ +--- cmake/objects.cmake.orig 2024-02-07 14:23:49 UTC ++++ cmake/objects.cmake +@@ -54,31 +54,6 @@ set(LIBDDWAF_SOURCE + ${libddwaf_SOURCE_DIR}/src/libcxx-compat/monotonic_buffer_resource.cpp + ${libddwaf_SOURCE_DIR}/src/vendor/fmt/format.cc + ${libddwaf_SOURCE_DIR}/src/vendor/radixlib/radixlib.c +- ${libddwaf_SOURCE_DIR}/src/vendor/lua-aho-corasick/ac_fast.cxx +- ${libddwaf_SOURCE_DIR}/src/vendor/lua-aho-corasick/ac_slow.cxx +- ${libddwaf_SOURCE_DIR}/src/vendor/lua-aho-corasick/ac.cxx +- ${libddwaf_SOURCE_DIR}/src/vendor/libinjection/src/xss.c +- ${libddwaf_SOURCE_DIR}/src/vendor/libinjection/src/libinjection_html5.c +- ${libddwaf_SOURCE_DIR}/src/vendor/libinjection/src/libinjection_xss.c +- ${libddwaf_SOURCE_DIR}/src/vendor/libinjection/src/libinjection_sqli.c +- ${libddwaf_SOURCE_DIR}/src/vendor/utf8proc/utf8proc.c +- ${libddwaf_SOURCE_DIR}/src/vendor/re2/bitstate.cc +- ${libddwaf_SOURCE_DIR}/src/vendor/re2/compile.cc +- ${libddwaf_SOURCE_DIR}/src/vendor/re2/dfa.cc +- ${libddwaf_SOURCE_DIR}/src/vendor/re2/nfa.cc +- ${libddwaf_SOURCE_DIR}/src/vendor/re2/onepass.cc +- ${libddwaf_SOURCE_DIR}/src/vendor/re2/parse.cc +- ${libddwaf_SOURCE_DIR}/src/vendor/re2/perl_groups.cc +- ${libddwaf_SOURCE_DIR}/src/vendor/re2/prog.cc +- ${libddwaf_SOURCE_DIR}/src/vendor/re2/re2.cc +- ${libddwaf_SOURCE_DIR}/src/vendor/re2/regexp.cc +- ${libddwaf_SOURCE_DIR}/src/vendor/re2/simplify.cc +- ${libddwaf_SOURCE_DIR}/src/vendor/re2/stringpiece.cc +- ${libddwaf_SOURCE_DIR}/src/vendor/re2/tostring.cc +- ${libddwaf_SOURCE_DIR}/src/vendor/re2/unicode_casefold.cc +- ${libddwaf_SOURCE_DIR}/src/vendor/re2/unicode_groups.cc +- ${libddwaf_SOURCE_DIR}/src/vendor/re2/util/rune.cc +- ${libddwaf_SOURCE_DIR}/src/vendor/re2/util/strutil.cc + ) + + set(LIBDDWAF_PUBLIC_INCLUDES ${libddwaf_SOURCE_DIR}/include) +@@ -86,11 +61,25 @@ set(LIBDDWAF_PRIVATE_INCLUDES + set(LIBDDWAF_PRIVATE_INCLUDES + ${libddwaf_SOURCE_DIR}/src + ${libddwaf_SOURCE_DIR}/src/vendor +- ${libddwaf_SOURCE_DIR}/src/vendor/libinjection/src/ + ${libddwaf_SOURCE_DIR}/src/vendor/radixlib/ +- ${libddwaf_SOURCE_DIR}/src/vendor/lua-aho-corasick/ +- ${libddwaf_SOURCE_DIR}/src/vendor/utf8proc/ +- ${libddwaf_SOURCE_DIR}/src/vendor/re2/) ++) ++ ++find_library(LIBAC ac) ++if (LIBAC) ++ list(APPEND LIBDDWAF_INTERFACE_LIBRARIES ac) ++endif() ++find_library(LIBINJECTION injection) ++if (LIBINJECTION) ++ list(APPEND LIBDDWAF_INTERFACE_LIBRARIES injection) ++endif() ++find_library(LIBRE2 re2) ++if (LIBRE2) ++ list(APPEND LIBDDWAF_INTERFACE_LIBRARIES re2) ++endif() ++find_library(LIBUTF8PROC utf8proc) ++if (LIBUTF8PROC) ++ list(APPEND LIBDDWAF_INTERFACE_LIBRARIES utf8proc) ++endif() + + function(gen_objects target_name) + add_library(${target_name} OBJECT ${LIBDDWAF_SOURCE}) diff --git a/devel/libddwaf/files/patch-cmake-shared.cmake b/devel/libddwaf/files/patch-cmake-shared.cmake new file mode 100644 index 000000000000..0f12334386df --- /dev/null +++ b/devel/libddwaf/files/patch-cmake-shared.cmake @@ -0,0 +1,30 @@ +--- cmake/shared.cmake.orig 2024-02-07 14:23:49 UTC ++++ cmake/shared.cmake +@@ -1,8 +1,9 @@ +-execute_process(COMMAND git rev-parse HEAD +- WORKING_DIRECTORY ${libddwaf_SOURCE_DIR} +- OUTPUT_VARIABLE BUILD_ID +- OUTPUT_STRIP_TRAILING_WHITESPACE +-) ++#execute_process(COMMAND git rev-parse HEAD ++# WORKING_DIRECTORY ${libddwaf_SOURCE_DIR} ++# OUTPUT_VARIABLE BUILD_ID ++# OUTPUT_STRIP_TRAILING_WHITESPACE ++#) ++set(BUILD_ID "044f67522ec5df679fed4786d0ae965170bd63c1") + + message(STATUS "Build id is ${BUILD_ID}") + string(SUBSTRING "${BUILD_ID}" 0 2 BUILD_ID_PREFIX) +@@ -34,9 +35,9 @@ if(LINUX) + COMMAND ${CMAKE_STRIP} --only-keep-debug ${SYMBOL_FILE} + COMMAND ${CMAKE_STRIP} $<TARGET_FILE:libddwaf_shared>) + +- install(FILES ${SYMBOL_FILE} +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/.build-id/${BUILD_ID_PREFIX} +- RENAME ${BUILD_ID_SUFFIX}.debug) ++ #install(FILES ${SYMBOL_FILE} ++ # DESTINATION ${CMAKE_INSTALL_LIBDIR}/.build-id/${BUILD_ID_PREFIX} ++ # RENAME ${BUILD_ID_SUFFIX}.debug) + endif() + elseif (APPLE) + target_link_libraries(libddwaf_shared PRIVATE -Wl,-undefined,error libddwaf_shared_objects) diff --git a/devel/libddwaf/files/patch-cmake-static.cmake b/devel/libddwaf/files/patch-cmake-static.cmake new file mode 100644 index 000000000000..6bf611d39120 --- /dev/null +++ b/devel/libddwaf/files/patch-cmake-static.cmake @@ -0,0 +1,15 @@ +--- cmake/static.cmake.orig 2024-02-07 14:23:49 UTC ++++ cmake/static.cmake +@@ -34,8 +34,9 @@ if(NOT (CMAKE_BUILD_TYPE MATCHES Debug) AND (APPLE OR + else() + set(STRIP ${CMAKE_STRIP}) + endif() +- add_custom_command(TARGET libddwaf_static POST_BUILD +- COMMAND ${STRIP} -x -S $<TARGET_FILE:libddwaf_static> -o $<TARGET_FILE:libddwaf_static>.stripped) +- install(FILES $<TARGET_FILE:libddwaf_static>.stripped DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ #add_custom_command(TARGET libddwaf_static POST_BUILD ++ # COMMAND ${STRIP} -x -S $<TARGET_FILE:libddwaf_static> -o $<TARGET_FILE:libddwaf_static>.stripped) ++ #install(FILES $<TARGET_FILE:libddwaf_static>.stripped DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ install(FILES $<TARGET_FILE:libddwaf_static> DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() + diff --git a/devel/libddwaf/files/patch-perf-CMakeLists.txt b/devel/libddwaf/files/patch-perf-CMakeLists.txt deleted file mode 100644 index 9289108a65a6..000000000000 --- a/devel/libddwaf/files/patch-perf-CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ ---- perf/CMakeLists.txt.orig 2023-05-25 10:34:56 UTC -+++ perf/CMakeLists.txt -@@ -29,8 +29,8 @@ set_target_properties(benchmerge PROPERTIES - CXX_EXTENSIONS NO) - - --ExternalProject_Get_property(proj_event_rules SOURCE_DIR) --set(EVENT_RULES_SOURCE_DIR ${SOURCE_DIR}) -+#ExternalProject_Get_property(proj_event_rules SOURCE_DIR) -+set(EVENT_RULES_SOURCE_DIR ${CMAKE_BINARY_DIR}/third_party/proj_event_rules) - - add_custom_target(run_benchmark - COMMAND ${CMAKE_BINARY_DIR}/perf/benchmark -@@ -43,4 +43,4 @@ add_custom_target(run_benchmark - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - ) - --add_dependencies(run_benchmark benchmark proj_event_rules) -+#add_dependencies(run_benchmark benchmark proj_event_rules) diff --git a/devel/libddwaf/files/patch-third_party-CMakeLists.txt b/devel/libddwaf/files/patch-third_party-CMakeLists.txt deleted file mode 100644 index 49cd330eac5f..000000000000 --- a/devel/libddwaf/files/patch-third_party-CMakeLists.txt +++ /dev/null @@ -1,312 +0,0 @@ ---- 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") - endif() - --set(RAPIDJSON_COMMIT 22a62fcc2c2fa2418f5d358cdf65c1df73b418ae) --ExternalProject_Add(proj_rapidjson -- URL https://github.com/Tencent/rapidjson/archive/${RAPIDJSON_COMMIT}.tar.gz -- INSTALL_DIR ${INSTALL_DIR} -- CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -- -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -- -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -- -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} -- -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE} -- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -- -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} -- -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} -- BUILD_COMMAND "" -- INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory "<SOURCE_DIR>/include/" "<INSTALL_DIR>/include/" --) -+#set(RAPIDJSON_COMMIT 22a62fcc2c2fa2418f5d358cdf65c1df73b418ae) -+#ExternalProject_Add(proj_rapidjson -+# URL https://github.com/Tencent/rapidjson/archive/${RAPIDJSON_COMMIT}.tar.gz -+# INSTALL_DIR ${INSTALL_DIR} -+# CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -+# -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -+# -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -+# -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} -+# -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE} -+# -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -+# -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} -+# -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} -+# BUILD_COMMAND "" -+# INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory "<SOURCE_DIR>/include/" "<INSTALL_DIR>/include/" -+#) - add_library(lib_rapidjson INTERFACE IMPORTED GLOBAL) --target_include_directories(lib_rapidjson INTERFACE ${INSTALL_DIR}/include) --add_dependencies(lib_rapidjson proj_rapidjson) -+target_include_directories(lib_rapidjson INTERFACE ${INSTALL_DIR}/rapidjson/include) -+#add_dependencies(lib_rapidjson proj_rapidjson) - target_compile_definitions(lib_rapidjson INTERFACE RAPIDJSON_HAS_STDSTRING=1) - set_target_properties(proj_rapidjson PROPERTIES EXCLUDE_FROM_ALL TRUE) - -@@ -45,32 +45,32 @@ endif() - # To avoid building everything for re2, including test binvaries: - # BUILD_COMMAND cmake --build <BINARY_DIR> --target re2 - # But this is not enough, because the install target run afterwards insists on building everything --set(RE2_COMMIT 885eb38accf49e2ccdd2fa6786f3590cf40a3e23) --ExternalProject_Add(proj_re2 -- URL https://github.com/google/re2/archive/${RE2_COMMIT}.tar.gz -- INSTALL_DIR ${INSTALL_DIR} -- CMAKE_ARGS -DCMAKE_VERBOSE_MAKEFILE=1 -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -- -DCMAKE_INSTALL_LIBDIR=lib -- -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -- -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -- -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -- -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} -- -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE} -- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -- -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} -- -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} -- -DRE2_BUILD_TESTING=0 -- BUILD_BYPRODUCTS ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}re2${CMAKE_STATIC_LIBRARY_SUFFIX} --) -+#set(RE2_COMMIT 885eb38accf49e2ccdd2fa6786f3590cf40a3e23) -+#ExternalProject_Add(proj_re2 -+# URL https://github.com/google/re2/archive/${RE2_COMMIT}.tar.gz -+# INSTALL_DIR ${INSTALL_DIR} -+# CMAKE_ARGS -DCMAKE_VERBOSE_MAKEFILE=1 -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -+# -DCMAKE_INSTALL_LIBDIR=lib -+# -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -+# -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -+# -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -+# -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} -+# -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE} -+# -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -+# -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} -+# -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} -+# -DRE2_BUILD_TESTING=0 -+# BUILD_BYPRODUCTS ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}re2${CMAKE_STATIC_LIBRARY_SUFFIX} -+#) - # alas, we can't use find_package because by the package is not downloaded by config time - # so manually creating the library --add_library(lib_re2 STATIC IMPORTED GLOBAL) --set_property(TARGET lib_re2 PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}re2${CMAKE_STATIC_LIBRARY_SUFFIX}) --target_include_directories(lib_re2 INTERFACE ${INSTALL_DIR}/include) --if(NOT MSVC) -- target_link_libraries(lib_re2 INTERFACE -lpthread) --endif() --add_dependencies(lib_re2 proj_re2) -+#add_library(lib_re2 STATIC IMPORTED GLOBAL) -+#set_property(TARGET lib_re2 PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}re2${CMAKE_STATIC_LIBRARY_SUFFIX}) -+#target_include_directories(lib_re2 INTERFACE ${INSTALL_DIR}/include) -+#if(NOT MSVC) -+# target_link_libraries(lib_re2 INTERFACE -lpthread) -+#endif() -+#add_dependencies(lib_re2 proj_re2) - - if(CMAKE_BUILD_TYPE MATCHES Debug) - set(LIBGTEST_FILENAME ${CMAKE_STATIC_LIBRARY_PREFIX}gtestd${CMAKE_STATIC_LIBRARY_SUFFIX}) -@@ -81,114 +81,114 @@ else() - endif() - - --set(GOOGLETEST_COMMIT 955c7f837efad184ec63e771c42542d37545eaef) --ExternalProject_Add(proj_gtest -- URL https://github.com/google/googletest/archive/${GOOGLETEST_COMMIT}.tar.gz -- INSTALL_DIR ${INSTALL_DIR} -- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -- -DCMAKE_INSTALL_LIBDIR=lib -- -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -- -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -- -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -- -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} -- -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE} -- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -- -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} -- -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} -- -DBUILD_SHARED_LIBS=0 -- -DBUILD_GMOCK=ON -- BUILD_BYPRODUCTS ${INSTALL_DIR}/lib/${LIBGTEST_FILENAME} ${INSTALL_DIR}/lib/${LIBGMOCK_FILENAME} --) -+#set(GOOGLETEST_COMMIT 955c7f837efad184ec63e771c42542d37545eaef) -+#ExternalProject_Add(proj_gtest -+# URL https://github.com/google/googletest/archive/${GOOGLETEST_COMMIT}.tar.gz -+# INSTALL_DIR ${INSTALL_DIR} -+# CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -+# -DCMAKE_INSTALL_LIBDIR=lib -+# -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -+# -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -+# -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -+# -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} -+# -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE} -+# -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -+# -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} -+# -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} -+# -DBUILD_SHARED_LIBS=0 -+# -DBUILD_GMOCK=ON -+# BUILD_BYPRODUCTS ${INSTALL_DIR}/lib/${LIBGTEST_FILENAME} ${INSTALL_DIR}/lib/${LIBGMOCK_FILENAME} -+#) - --add_library(lib_gtest STATIC IMPORTED GLOBAL) --add_library(lib_gmock STATIC IMPORTED GLOBAL) --set_property(TARGET lib_gtest PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib/${LIBGTEST_FILENAME}) --set_property(TARGET lib_gmock PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib/${LIBGMOCK_FILENAME}) --target_include_directories(lib_gtest INTERFACE ${INSTALL_DIR}/include) --target_include_directories(lib_gmock INTERFACE ${INSTALL_DIR}/include) --if(NOT MSVC) -- target_link_libraries(lib_gtest INTERFACE -lpthread) -- target_link_libraries(lib_gmock INTERFACE -lpthread) --endif() -+#add_library(lib_gtest STATIC IMPORTED GLOBAL) -+#add_library(lib_gmock STATIC IMPORTED GLOBAL) -+#set_property(TARGET lib_gtest PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib/${LIBGTEST_FILENAME}) -+#set_property(TARGET lib_gmock PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib/${LIBGMOCK_FILENAME}) -+#target_include_directories(lib_gtest INTERFACE ${INSTALL_DIR}/include) -+#target_include_directories(lib_gmock INTERFACE ${INSTALL_DIR}/include) -+#if(NOT MSVC) -+# target_link_libraries(lib_gtest INTERFACE -lpthread) -+# target_link_libraries(lib_gmock INTERFACE -lpthread) -+#endif() - - add_dependencies(lib_gtest proj_gtest) - add_dependencies(lib_gmock proj_gtest) - set_target_properties(lib_gtest lib_gmock proj_gtest PROPERTIES EXCLUDE_FROM_ALL TRUE) - --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 -- URL https://github.com/JuliaStrings/utf8proc/archive/refs/tags/${UTF8PROC_VERSION}.tar.gz -- INSTALL_DIR ${INSTALL_DIR} -- CMAKE_ARGS -DCMAKE_VERBOSE_MAKEFILE=1 -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -- -DCMAKE_INSTALL_LIBDIR=lib -- -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -- -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -- -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -- -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} -- -DCMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE} -- -DCMAKE_C_FLAGS_RELWITHDEBINFO=${CMAKE_C_FLAGS_RELWITHDEBINFO} -- -DCMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG} -- -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} -- BUILD_BYPRODUCTS ${INSTALL_DIR}/lib/${LIBUTF8PROC_FILENAME} --) -+#set(UTF8PROC_VERSION v2.7.0) -+#ExternalProject_Add(proj_utf8proc -+# URL https://github.com/JuliaStrings/utf8proc/archive/refs/tags/${UTF8PROC_VERSION}.tar.gz -+# INSTALL_DIR ${INSTALL_DIR} -+# CMAKE_ARGS -DCMAKE_VERBOSE_MAKEFILE=1 -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -+# -DCMAKE_INSTALL_LIBDIR=lib -+# -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -+# -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -+# -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -+# -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} -+# -DCMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE} -+# -DCMAKE_C_FLAGS_RELWITHDEBINFO=${CMAKE_C_FLAGS_RELWITHDEBINFO} -+# -DCMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG} -+# -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} -+# BUILD_BYPRODUCTS ${INSTALL_DIR}/lib/${LIBUTF8PROC_FILENAME} -+#) - --add_library(lib_utf8proc STATIC IMPORTED GLOBAL) --set_property(TARGET lib_utf8proc PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib/${LIBUTF8PROC_FILENAME}) --target_include_directories(lib_utf8proc INTERFACE ${INSTALL_DIR}/include) --add_dependencies(lib_utf8proc proj_utf8proc) -+#add_library(lib_utf8proc STATIC IMPORTED GLOBAL) -+#set_property(TARGET lib_utf8proc PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib/${LIBUTF8PROC_FILENAME}) -+#target_include_directories(lib_utf8proc INTERFACE ${INSTALL_DIR}/include) -+#add_dependencies(lib_utf8proc proj_utf8proc) - - # yaml-cpp --if (NOT MSVC) -- if(CMAKE_BUILD_TYPE MATCHES Debug) -- set(LIBYAML_FILENAME libyaml-cppd${CMAKE_STATIC_LIBRARY_SUFFIX}) -- else() -- set(LIBYAML_FILENAME libyaml-cpp${CMAKE_STATIC_LIBRARY_SUFFIX}) -- endif() --else() -- set(LIBYAML_FILENAME yaml-cpp${CMAKE_STATIC_LIBRARY_SUFFIX}) --endif() -+#if (NOT MSVC) -+# if(CMAKE_BUILD_TYPE MATCHES Debug) -+# set(LIBYAML_FILENAME libyaml-cppd${CMAKE_STATIC_LIBRARY_SUFFIX}) -+# else() -+# set(LIBYAML_FILENAME libyaml-cpp${CMAKE_STATIC_LIBRARY_SUFFIX}) -+# endif() -+#else() -+# set(LIBYAML_FILENAME yaml-cpp${CMAKE_STATIC_LIBRARY_SUFFIX}) -+#endif() - --ExternalProject_Add(proj_yamlcpp -- URL https://github.com/jbeder/yaml-cpp/archive/refs/tags/yaml-cpp-0.7.0.zip -- INSTALL_DIR ${INSTALL_DIR} -- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -- -DCMAKE_INSTALL_LIBDIR=lib -- -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -- -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -- -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} -- -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE} -- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -- -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} -- -DYAML_CPP_BUILD_TESTS=OFF -- -DYAML_CPP_BUILD_CONTRIB=OFF -- -DYAML_CPP_BUILD_TOOLS=OFF -- -DYAML_CPP_INSTALL=ON -- -DYAML_BUILD_SHARED_LIBS=OFF -- -DYAML_MSVC_SHARED_RT=OFF -- -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -- -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} -- BUILD_BYPRODUCTS ${INSTALL_DIR}/lib/${LIBYAML_FILENAME} --) --add_library(lib_yamlcpp STATIC IMPORTED GLOBAL) --set_target_properties(lib_yamlcpp PROPERTIES IMPORTED_LOCATION ${INSTALL_DIR}/lib/${LIBYAML_FILENAME}) --target_include_directories(lib_yamlcpp INTERFACE ${INSTALL_DIR}/include) --add_dependencies(lib_yamlcpp proj_yamlcpp) --set_target_properties(lib_yamlcpp proj_yamlcpp PROPERTIES EXCLUDE_FROM_ALL TRUE) -+#ExternalProject_Add(proj_yamlcpp -+# URL https://github.com/jbeder/yaml-cpp/archive/refs/tags/yaml-cpp-0.7.0.zip -+# INSTALL_DIR ${INSTALL_DIR} -+# CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -+# -DCMAKE_INSTALL_LIBDIR=lib -+# -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -+# -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -+# -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} -+# -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE} -+# -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -+# -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} -+# -DYAML_CPP_BUILD_TESTS=OFF -+# -DYAML_CPP_BUILD_CONTRIB=OFF -+# -DYAML_CPP_BUILD_TOOLS=OFF -+# -DYAML_CPP_INSTALL=ON -+# -DYAML_BUILD_SHARED_LIBS=OFF -+# -DYAML_MSVC_SHARED_RT=OFF -+# -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -+# -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} -+# BUILD_BYPRODUCTS ${INSTALL_DIR}/lib/${LIBYAML_FILENAME} -+#) -+#add_library(lib_yamlcpp STATIC IMPORTED GLOBAL) -+#set_target_properties(lib_yamlcpp PROPERTIES IMPORTED_LOCATION ${INSTALL_DIR}/lib/${LIBYAML_FILENAME}) -+#target_include_directories(lib_yamlcpp INTERFACE ${INSTALL_DIR}/include) -+#add_dependencies(lib_yamlcpp proj_yamlcpp) -+#set_target_properties(lib_yamlcpp proj_yamlcpp PROPERTIES EXCLUDE_FROM_ALL TRUE) - - # Appsec event rules --ExternalProject_Add(proj_event_rules -- GIT_REPOSITORY https://github.com/DataDog/appsec-event-rules.git -- GIT_TAG 1.7.1 -- GIT_SHALLOW ON -- CONFIGURE_COMMAND "" -- BUILD_COMMAND "" -- INSTALL_COMMAND "") -+#ExternalProject_Add(proj_event_rules -+# GIT_REPOSITORY https://github.com/DataDog/appsec-event-rules.git -+# GIT_TAG 1.7.1 -+# GIT_SHALLOW ON -+# CONFIGURE_COMMAND "" -+# BUILD_COMMAND "" -+# INSTALL_COMMAND "") - --set_target_properties(proj_event_rules PROPERTIES EXCLUDE_FROM_ALL TRUE) -+#set_target_properties(proj_event_rules PROPERTIES EXCLUDE_FROM_ALL TRUE) - # vim: et