2019-02-28 03:49:56 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO kkos/oniguruma
|
2021-10-12 11:23:56 +08:00
|
|
|
REF v6.9.7.1
|
|
|
|
SHA512 CE22050E04E51843E894D2D534D062FDD23CC2BAAC9BA43DA1843EC928F6CE5ED3D4407FE945F4D34ADADF3167DFD943CD81AE4556F7C5EC51E7331C35EAD479
|
2019-02-28 03:49:56 +08:00
|
|
|
HEAD_REF master
|
2020-02-12 08:27:17 +08:00
|
|
|
PATCHES fix-uwp.patch
|
2019-02-28 03:49:56 +08:00
|
|
|
)
|
|
|
|
|
2019-08-14 11:13:55 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
INVERTED_FEATURES
|
|
|
|
"non-posix" ENABLE_POSIX_API
|
|
|
|
)
|
2019-02-28 03:49:56 +08:00
|
|
|
|
2021-10-12 11:23:56 +08:00
|
|
|
if(VCPKG_CRT_LINKAGE STREQUAL "static")
|
|
|
|
set(MSVC_STATIC_RUNTIME ON)
|
|
|
|
else()
|
|
|
|
set(MSVC_STATIC_RUNTIME OFF)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2019-02-28 03:49:56 +08:00
|
|
|
OPTIONS
|
2019-08-14 11:13:55 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2021-10-12 11:23:56 +08:00
|
|
|
-DMSVC_STATIC_RUNTIME=${MSVC_STATIC_RUNTIME}
|
2019-02-28 03:49:56 +08:00
|
|
|
)
|
|
|
|
|
2021-10-12 11:23:56 +08:00
|
|
|
vcpkg_cmake_install()
|
2019-02-28 03:49:56 +08:00
|
|
|
|
2019-05-13 15:13:18 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2021-10-12 11:23:56 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
|
2019-02-28 03:49:56 +08:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE
|
2021-10-12 11:23:56 +08:00
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
2019-02-28 03:49:56 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
2021-10-12 11:23:56 +08:00
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/oniguruma.h"
|
2019-02-28 03:49:56 +08:00
|
|
|
"#if defined(ONIGURUMA_EXPORT)"
|
|
|
|
"#if 0 // defined(ONIGURUMA_EXPORT)"
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
# oniguruma.h uses `\n` as line break.
|
2021-10-12 11:23:56 +08:00
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/oniguruma.h"
|
2019-02-28 03:49:56 +08:00
|
|
|
"#ifndef ONIG_EXTERN\n#if defined(_WIN32) && !defined(__GNUC__)"
|
|
|
|
"#if 0\n#if defined(_WIN32) && !defined(__GNUC__)"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2021-10-12 11:23:56 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
2021-10-28 06:19:28 +08:00
|
|
|
|
|
|
|
vcpkg_fixup_pkgconfig()
|