[hyperscan] New port (#5285)

* add support for building hyperscan

* patch hyperscan to work with latest boost

* correct hyperscan source dir name

* speed the build by depending on only the parts of boost we actually need

* make python3 support release-only builds

* upgrade to hyperscan 5.1.0

* remove redundant disambiguate patch

* Add comments about how to build

* restore original x64-windows-static.cmake

* [hyperscan] Check linkage

* [python3] Allow DLLs without LIBs

* [hyperscan] Only static library

* [python3] Revert changes that cause regression in boost-python

* [python3] Revert changes that cause regression in boost-python
This commit is contained in:
Bobby Martin 2019-02-06 17:21:23 -08:00 committed by Victor Romero
parent 846625e480
commit aa09555991
4 changed files with 47 additions and 1 deletions

4
ports/hyperscan/CONTROL Normal file
View File

@ -0,0 +1,4 @@
Source: hyperscan
Version: 5.0.1-1
Description: A regular expression library with O(length of input) match times that takes advantage of Intel hardware to provide blazing speed.
Build-Depends: boost-array, boost-chrono, boost-config, boost-core, boost-detail, boost-functional, boost-regex, boost-system, boost-thread, boost-type-traits, boost-unordered, boost-utility, boost-dynamic-bitset, boost-random, boost-graph, boost-multi-array, boost-icl, boost-ptr-container, python3, ragel

View File

@ -0,0 +1,41 @@
# Build with 'vcpkg.exe install hyperscan:x86-windows-static-release'; Hyperscan doesn't support dynamic libraries on Windows.
include(vcpkg_common_functions)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
set(HYPERSCAN_VERSION 5.1.0)
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/intel/hyperscan/archive/v${HYPERSCAN_VERSION}.zip"
FILENAME "v${HYPERSCAN_VERSION}.zip"
SHA512 89a826c1e66175f1781f57d0d430f2d5d245ab590acc4b5df6638c5f6fe43914db028f8bc86e566ea27b55883c91be0d8da079b3d7547899f7cf540b52a3cf0a
)
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
REF ${HYPERSCAN_VERSION})
vcpkg_find_acquire_program(PYTHON3)
# Add python3 to path
get_filename_component(PYTHON_PATH ${PYTHON3} DIRECTORY)
vcpkg_add_to_path(PREPEND ${PYTHON_PATH})
vcpkg_add_to_path(${CURRENT_INSTALLED_DIR}/bin)
vcpkg_add_to_path(${CURRENT_INSTALLED_DIR}/debug/bin)
vcpkg_find_acquire_program(PYTHON3)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)
vcpkg_install_cmake()
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/hyperscan RENAME copyright)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Post-build test for cmake libraries
# vcpkg_test_cmake(PACKAGE_NAME hs)

View File

@ -1,3 +1,3 @@
Source: python3
Version: 3.6.4-3
Version: 3.6.4-5
Description: The Python programming language as an embeddable library

View File

@ -73,6 +73,7 @@ file(COPY ${SOURCE_PATH}/Lib DESTINATION ${CURRENT_PACKAGES_DIR}/share/python${P
file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}_d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}_d.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)