diff options
Diffstat (limited to 'vcpkg/ports/marisa-trie')
| -rw-r--r-- | vcpkg/ports/marisa-trie/enable-debug.patch | 20 | ||||
| -rw-r--r-- | vcpkg/ports/marisa-trie/fix-install.patch | 28 | ||||
| -rw-r--r-- | vcpkg/ports/marisa-trie/portfile.cmake | 43 | ||||
| -rw-r--r-- | vcpkg/ports/marisa-trie/vcpkg.json | 23 |
4 files changed, 114 insertions, 0 deletions
diff --git a/vcpkg/ports/marisa-trie/enable-debug.patch b/vcpkg/ports/marisa-trie/enable-debug.patch new file mode 100644 index 0000000..e9bbb49 --- /dev/null +++ b/vcpkg/ports/marisa-trie/enable-debug.patch @@ -0,0 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a00be40..1fce4fb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -256,7 +256,6 @@ endif() + install( + TARGETS marisa + EXPORT MarisaTargets +- CONFIGURATIONS Release + DESTINATION ${LIB_INSTALL_DIR} + COMPONENT Library + ) +@@ -270,7 +269,6 @@ install( + if(ENABLE_TOOLS) + install( + TARGETS ${MARISA_TOOLS} +- CONFIGURATIONS Release + COMPONENT Binaries + ) + endif() diff --git a/vcpkg/ports/marisa-trie/fix-install.patch b/vcpkg/ports/marisa-trie/fix-install.patch new file mode 100644 index 0000000..1465f38 --- /dev/null +++ b/vcpkg/ports/marisa-trie/fix-install.patch @@ -0,0 +1,28 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1fce4fb..e56f0a2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -256,20 +256,21 @@ endif() + install( + TARGETS marisa + EXPORT MarisaTargets +- DESTINATION ${LIB_INSTALL_DIR} +- COMPONENT Library ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION ${LIB_INSTALL_DIR} ++ ARCHIVE DESTINATION ${LIB_INSTALL_DIR} + ) + install( + DIRECTORY include/ + DESTINATION include + COMPONENT Library + FILES_MATCHING PATTERN "*.h" + ) + + if(ENABLE_TOOLS) + install( + TARGETS ${MARISA_TOOLS} + COMPONENT Binaries + ) + endif() + diff --git a/vcpkg/ports/marisa-trie/portfile.cmake b/vcpkg/ports/marisa-trie/portfile.cmake new file mode 100644 index 0000000..61f23c8 --- /dev/null +++ b/vcpkg/ports/marisa-trie/portfile.cmake @@ -0,0 +1,43 @@ +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO s-yata/marisa-trie + REF v${VERSION} + SHA512 60757e354e4f0ff47662930af5c32a762c5f348c60019abb2d502c6c21ec220731edd9be8ea36e3ec68df90a6584eb311fe1e3d4258b3392609a87b0ef427121 + HEAD_REF master + PATCHES + enable-debug.patch + fix-install.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS options + FEATURES + tools ENABLE_TOOLS +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${options} +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Marisa) +vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() + +if ("tools" IN_LIST FEATURES) + set(TOOL_NAMES marisa-benchmark marisa-build marisa-common-prefix-search marisa-dump marisa-lookup marisa-predictive-search marisa-reverse-lookup) + vcpkg_copy_tools(TOOL_NAMES ${TOOL_NAMES} AUTO_CLEAN) +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin" "${CURRENT_PACKAGES_DIR}/bin") +endif() + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING.md") diff --git a/vcpkg/ports/marisa-trie/vcpkg.json b/vcpkg/ports/marisa-trie/vcpkg.json new file mode 100644 index 0000000..efdfbcd --- /dev/null +++ b/vcpkg/ports/marisa-trie/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "marisa-trie", + "version": "0.3.1", + "description": "Matching Algorithm with Recursively Implemented StorAge (MARISA) is a space-efficient trie data structure. This is a C++ library for an implementation of MARISA.", + "homepage": "https://github.com/s-yata/marisa-trie", + "license": "BSD-2-Clause OR LGPL-2.1-or-later", + "supports": "!windows | mingw | (windows & static)", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "tools": { + "description": "Enables command-line tools" + } + } +} |