diff options
author | nia <nia@pkgsrc.org> | 2020-11-29 20:27:28 +0000 |
---|---|---|
committer | nia <nia@pkgsrc.org> | 2020-11-29 20:27:28 +0000 |
commit | e22337a4ea50dc79a1ffb3d29e1a4914dbe7dedc (patch) | |
tree | 4a00d42090e3387e6691ccdce02245273821bb32 /devel/hyperscan | |
parent | 89e792db5df4f7850ce99760a3c7e4ea94a3be23 (diff) | |
download | pkgsrc-e22337a4ea50dc79a1ffb3d29e1a4914dbe7dedc.tar.gz |
hyperscan: Handle sqlite dependency - attempt to fix build
Diffstat (limited to 'devel/hyperscan')
-rw-r--r-- | devel/hyperscan/Makefile | 3 | ||||
-rw-r--r-- | devel/hyperscan/distinfo | 6 | ||||
-rw-r--r-- | devel/hyperscan/patches/patch-CMakeLists.txt | 72 | ||||
-rw-r--r-- | devel/hyperscan/patches/patch-tools_hsbench_CMakeLists.txt | 17 |
4 files changed, 82 insertions, 16 deletions
diff --git a/devel/hyperscan/Makefile b/devel/hyperscan/Makefile index 67ed81a1bbe..cc5c76ca74d 100644 --- a/devel/hyperscan/Makefile +++ b/devel/hyperscan/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2019/04/25 07:32:46 maya Exp $ +# $NetBSD: Makefile,v 1.5 2020/11/29 20:27:28 nia Exp $ DISTNAME= hyperscan-5.0.0 PKGREVISION= 1 @@ -30,6 +30,7 @@ PKGCONFIG_OVERRIDE+= libhs.pc.in CFLAGS+= -march=core2 .endif +.include "../../databases/sqlite3/buildlink3.mk" .include "../../devel/boost-headers/buildlink3.mk" .include "../../lang/python/tool.mk" .include "../../mk/bsd.pkg.mk" diff --git a/devel/hyperscan/distinfo b/devel/hyperscan/distinfo index 5833db888b5..332272092f5 100644 --- a/devel/hyperscan/distinfo +++ b/devel/hyperscan/distinfo @@ -1,11 +1,11 @@ -$NetBSD: distinfo,v 1.4 2018/08/17 16:03:20 minskim Exp $ +$NetBSD: distinfo,v 1.5 2020/11/29 20:27:28 nia Exp $ SHA1 (hyperscan-5.0.0.tar.gz) = 5cb3fc5726950c4025854da8ec05a15f929279db RMD160 (hyperscan-5.0.0.tar.gz) = e172831d368ad5565355ba5da93837c65183c7aa SHA512 (hyperscan-5.0.0.tar.gz) = 2a942832ab6908ea4b17342428188d635d1db0a57ac6452abbbcdadcf972be0174edeec67d03d925ce92d969c767e9933fdc636c4e3df0067aade659337692a5 Size (hyperscan-5.0.0.tar.gz) = 1801219 bytes -SHA1 (patch-CMakeLists.txt) = 1a51aee0bb7a807a293f5a16357b3536343915fa +SHA1 (patch-CMakeLists.txt) = 6b6b8f4ed47132c2df593f108246ed129dd73240 SHA1 (patch-src_nfa_limex__compile.cpp) = 7301935120e523e8e9490c3ccc1f37e9c9e5f317 SHA1 (patch-src_util_popcount.h) = 3d30d412318c474c9d7a5b7fc45ea3148e6ed4b4 -SHA1 (patch-tools_hsbench_CMakeLists.txt) = 3b4cdd8a7ed17fedb1a090c3dc76fa307084b7a2 +SHA1 (patch-tools_hsbench_CMakeLists.txt) = 69ea565ee36811a632e8bc521901c4cdd0a91ca3 SHA1 (patch-tools_hscollider_CMakeLists.txt) = ee22d83890ca7bf010dd751469d90dcb4930dd08 diff --git a/devel/hyperscan/patches/patch-CMakeLists.txt b/devel/hyperscan/patches/patch-CMakeLists.txt index 9d5b60a9594..f6f317c4e43 100644 --- a/devel/hyperscan/patches/patch-CMakeLists.txt +++ b/devel/hyperscan/patches/patch-CMakeLists.txt @@ -1,7 +1,8 @@ -$NetBSD: patch-CMakeLists.txt,v 1.3 2018/07/25 00:26:30 minskim Exp $ +$NetBSD: patch-CMakeLists.txt,v 1.4 2020/11/29 20:27:28 nia Exp $ Avoid conflicts with pkgsrc's CMAKE_MODULE_PATH override. Disable examples as they require Linux specific headers. +Do not try to use -march/-mtune. --- CMakeLists.txt.orig 2018-07-09 16:45:44.000000000 +0000 +++ CMakeLists.txt @@ -42,7 +43,58 @@ Disable examples as they require Linux specific headers. OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE) else () -@@ -320,7 +319,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux") +@@ -179,35 +178,6 @@ else() + string(REGEX REPLACE "-O[^ ]*" "" CMAKE_CXX_FLAGS_${CONFIG} "${CMAKE_CXX_FLAGS_${CONFIG}}") + endforeach () + +- if (CMAKE_COMPILER_IS_GNUCC) +- message(STATUS "gcc version ${CMAKE_C_COMPILER_VERSION}") +- # If gcc doesn't recognise the host cpu, then mtune=native becomes +- # generic, which isn't very good in some cases. march=native looks at +- # cpuid info and then chooses the best microarch it can (and replaces +- # the flag), so use that for tune. +- +- # arg1 might exist if using ccache +- string (STRIP "${CMAKE_C_COMPILER_ARG1}" CC_ARG1) +- set (EXEC_ARGS ${CC_ARG1} -c -Q --help=target -march=native -mtune=native) +- execute_process(COMMAND ${CMAKE_C_COMPILER} ${EXEC_ARGS} +- OUTPUT_VARIABLE _GCC_OUTPUT) +- string(REGEX REPLACE ".*march=[ \t]*([^ \n]*)[ \n].*" "\\1" +- GNUCC_ARCH "${_GCC_OUTPUT}") +- +- # test the parsed flag +- set (EXEC_ARGS ${CC_ARG1} -E - -mtune=${GNUCC_ARCH}) +- execute_process(COMMAND ${CMAKE_C_COMPILER} ${EXEC_ARGS} +- OUTPUT_QUIET ERROR_QUIET +- INPUT_FILE /dev/null +- RESULT_VARIABLE GNUCC_TUNE_TEST) +- if (NOT GNUCC_TUNE_TEST EQUAL 0) +- message(SEND_ERROR "Something went wrong determining gcc tune: -mtune=${GNUCC_ARCH} not valid") +- endif() +- set(TUNE_FLAG ${GNUCC_ARCH}) +- else () +- set(TUNE_FLAG native) +- endif() +- + # compiler version checks TODO: test more compilers + if (CMAKE_COMPILER_IS_GNUCXX) + set(GNUCXX_MINVER "4.8.1") +@@ -246,14 +216,6 @@ else() + set(EXTRA_CXX_FLAGS "${EXTRA_CXX_FLAGS} -DNDEBUG") + endif() + +- if (NOT CMAKE_C_FLAGS MATCHES .*march.* AND NOT CMAKE_C_FLAGS MATCHES .*mtune.*) +- set(ARCH_C_FLAGS "-march=native -mtune=${TUNE_FLAG}") +- endif() +- +- if (NOT CMAKE_CXX_FLAGS MATCHES .*march.* AND NOT CMAKE_CXX_FLAGS MATCHES .*mtune.*) +- set(ARCH_CXX_FLAGS "-march=native -mtune=${TUNE_FLAG}") +- endif() +- + if(CMAKE_COMPILER_IS_GNUCC) + # spurious warnings? + set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Wno-array-bounds -Wno-maybe-uninitialized") +@@ -320,7 +282,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux") message (STATUS "Building the fat runtime requires the Unix Makefiles generator, or Ninja with CMake v3.0 or higher") set (FAT_RUNTIME_REQUISITES FALSE) else() @@ -51,7 +103,7 @@ Disable examples as they require Linux specific headers. if (NOT HAS_C_ATTR_IFUNC) message(STATUS "Compiler does not support ifunc attribute, cannot build fat runtime") set (FAT_RUNTIME_REQUISITES FALSE) -@@ -331,7 +330,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux") +@@ -331,7 +293,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux") CMAKE_DEPENDENT_OPTION(FAT_RUNTIME "Build a library that supports multiple microarchitecures" ${RELEASE_BUILD} "FAT_RUNTIME_REQUISITES" OFF) endif () @@ -60,7 +112,7 @@ Disable examples as they require Linux specific headers. # testing a builtin takes a little more work CHECK_C_SOURCE_COMPILES("void *aa_test(void *x) { return __builtin_assume_aligned(x, 16);}\nint main(void) { return 0; }" HAVE_CC_BUILTIN_ASSUME_ALIGNED) -@@ -454,7 +453,7 @@ if (NOT WIN32) +@@ -454,7 +416,7 @@ if (NOT WIN32) set(PCRE_REQUIRED_MAJOR_VERSION 8) set(PCRE_REQUIRED_MINOR_VERSION 41) set(PCRE_REQUIRED_VERSION ${PCRE_REQUIRED_MAJOR_VERSION}.${PCRE_REQUIRED_MINOR_VERSION}) @@ -69,7 +121,7 @@ Disable examples as they require Linux specific headers. if (NOT CORRECT_PCRE_VERSION) message(STATUS "PCRE ${PCRE_REQUIRED_VERSION} not found") endif() -@@ -474,7 +473,7 @@ endif() +@@ -474,7 +436,7 @@ endif() endif() # do substitutions @@ -78,7 +130,7 @@ Disable examples as they require Linux specific headers. configure_file(src/hs_version.h.in ${PROJECT_BINARY_DIR}/hs_version.h) if (NOT WIN32) -@@ -506,7 +505,7 @@ if (WIN32) +@@ -506,7 +468,7 @@ if (WIN32) set(PCRE_REQUIRED_MAJOR_VERSION 8) set(PCRE_REQUIRED_MINOR_VERSION 41) set(PCRE_REQUIRED_VERSION ${PCRE_REQUIRED_MAJOR_VERSION}.${PCRE_REQUIRED_MINOR_VERSION}) @@ -87,7 +139,7 @@ Disable examples as they require Linux specific headers. if (NOT CORRECT_PCRE_VERSION) message(STATUS "PCRE ${PCRE_REQUIRED_VERSION} not found") endif() -@@ -1195,28 +1194,28 @@ else (FAT_RUNTIME) +@@ -1195,28 +1157,28 @@ else (FAT_RUNTIME) list(APPEND RUNTIME_LIBS $<TARGET_OBJECTS:hs_exec_core2>) set_target_properties(hs_exec_core2 PROPERTIES COMPILE_FLAGS "-march=core2" @@ -120,7 +172,7 @@ Disable examples as they require Linux specific headers. ) endif (BUILD_AVX512) -@@ -1251,21 +1250,21 @@ else (FAT_RUNTIME) +@@ -1251,21 +1213,21 @@ else (FAT_RUNTIME) set_target_properties(hs_exec_shared_core2 PROPERTIES COMPILE_FLAGS "-march=core2" POSITION_INDEPENDENT_CODE TRUE @@ -145,7 +197,7 @@ Disable examples as they require Linux specific headers. ) if (BUILD_AVX512) -@@ -1274,7 +1273,7 @@ else (FAT_RUNTIME) +@@ -1274,7 +1236,7 @@ else (FAT_RUNTIME) set_target_properties(hs_exec_shared_avx512 PROPERTIES COMPILE_FLAGS "${SKYLAKE_FLAG}" POSITION_INDEPENDENT_CODE TRUE @@ -154,7 +206,7 @@ Disable examples as they require Linux specific headers. ) endif (BUILD_AVX512) add_library(hs_exec_common_shared OBJECT -@@ -1367,8 +1366,3 @@ if (NOT BUILD_STATIC_LIBS) +@@ -1367,8 +1329,3 @@ if (NOT BUILD_STATIC_LIBS) # use shared lib without having to change all the targets add_library(hs ALIAS hs_shared) endif () diff --git a/devel/hyperscan/patches/patch-tools_hsbench_CMakeLists.txt b/devel/hyperscan/patches/patch-tools_hsbench_CMakeLists.txt index 4ca8e43c0fc..05ea21d8eb4 100644 --- a/devel/hyperscan/patches/patch-tools_hsbench_CMakeLists.txt +++ b/devel/hyperscan/patches/patch-tools_hsbench_CMakeLists.txt @@ -1,8 +1,10 @@ -$NetBSD: patch-tools_hsbench_CMakeLists.txt,v 1.1 2018/05/07 22:19:34 minskim Exp $ +$NetBSD: patch-tools_hsbench_CMakeLists.txt,v 1.2 2020/11/29 20:27:28 nia Exp $ Avoid conflicts with pkgsrc's CMAKE_MODULE_PATH override. ---- tools/hsbench/CMakeLists.txt.orig 2017-06-09 00:17:04.000000000 +0000 +NetBSD's pthread_setaffinity_np is incompatible with hsbench's expectations. + +--- tools/hsbench/CMakeLists.txt.orig 2018-07-09 16:45:44.000000000 +0000 +++ tools/hsbench/CMakeLists.txt @@ -1,4 +1,4 @@ -include (${CMAKE_MODULE_PATH}/sqlite3.cmake) @@ -10,3 +12,14 @@ Avoid conflicts with pkgsrc's CMAKE_MODULE_PATH override. if (NOT SQLITE3_FOUND) message(STATUS "sqlite3 not found, not building hsbench") return() +@@ -16,7 +16,10 @@ endif () + + set (CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -D_GNU_SOURCE") + set (CMAKE_REQUIRED_LIBRARIES pthread) ++ ++if (NOT CMAKE_SYSTEM_NAME MATCHES "NetBSD") + CHECK_CXX_SYMBOL_EXISTS(pthread_setaffinity_np ${PTHREAD_NP_INC} HAVE_DECL_PTHREAD_SETAFFINITY_NP) ++endif () + + CHECK_FUNCTION_EXISTS(malloc_info HAVE_MALLOC_INFO) + CHECK_FUNCTION_EXISTS(shmget HAVE_SHMGET) |