mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[opencc] Update to 1.1.4, fix x64-linux-dynamic build (#25821)
* [opencc] Update to 1.1.4, fix x64-linux-dynamic build * Use vcpkg_copy_tools * v db Co-authored-by: Osyotr <8740768+Osyotr@users.noreply.github.com>
This commit is contained in:
parent
acb370dd6d
commit
eb40ddf467
@ -1,51 +1,47 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO BYVoid/OpenCC
|
||||
REF e8ec6d59f264a4a42e310148a9534a8cc0123928
|
||||
SHA512 e6b3f6d681223b299795c324a48e82609abd1f411d3cbd5f9d8607284ec04717fa9878953d037c25a931a0857f50a5c0e883e0d44ddbea18c50830ad49514c59
|
||||
REF ver.1.1.4
|
||||
SHA512 ab8e7e6a0cc71106cf09eb32899fa8620b946a406f042d75a2444096e0b383cb1993d6c2d12cd7862e71854da4cd5893442bce51df84c32ed09fdfb4a2846f46
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_DIR ${PYTHON3} DIRECTORY)
|
||||
vcpkg_add_to_path(${PYTHON3_DIR})
|
||||
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
|
||||
vcpkg_add_to_path("${PYTHON3_DIR}")
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DBUILD_DOCUMENTATION=OFF
|
||||
-DENABLE_GTEST=OFF
|
||||
)
|
||||
|
||||
vcpkg_install_cmake(
|
||||
vcpkg_cmake_install(
|
||||
DISABLE_PARALLEL
|
||||
)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
if(tools IN_LIST FEATURES)
|
||||
foreach(opencc_tool opencc opencc_dict opencc_phrase_extract)
|
||||
file(COPY
|
||||
${CURRENT_PACKAGES_DIR}/bin/${opencc_tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}
|
||||
)
|
||||
endforeach()
|
||||
|
||||
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
|
||||
endif()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
else()
|
||||
foreach(opencc_tool opencc opencc_dict opencc_phrase_extract)
|
||||
file(REMOVE
|
||||
${CURRENT_PACKAGES_DIR}/bin/${opencc_tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}
|
||||
${CURRENT_PACKAGES_DIR}/debug/bin/${opencc_tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}
|
||||
)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
set(tool_names "opencc" "opencc_dict" "opencc_phrase_extract")
|
||||
if("tools" IN_LIST FEATURES)
|
||||
vcpkg_copy_tools(TOOL_NAMES ${tool_names} AUTO_CLEAN)
|
||||
endif()
|
||||
|
||||
foreach(opencc_tool IN LISTS tool_names)
|
||||
file(REMOVE
|
||||
"${CURRENT_PACKAGES_DIR}/bin/${opencc_tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/bin/${opencc_tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}"
|
||||
)
|
||||
endforeach()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR NOT VCPKG_TARGET_IS_WINDOWS)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
||||
|
@ -1,10 +1,20 @@
|
||||
{
|
||||
"name": "opencc",
|
||||
"version-date": "2020-04-26",
|
||||
"port-version": 10,
|
||||
"description": "A project for conversion between Traditional and Simplified Chinese",
|
||||
"version": "1.1.4",
|
||||
"description": "A project for conversions between Traditional Chinese, Simplified Chinese and Japanese Kanji (Shinjitai)",
|
||||
"homepage": "https://github.com/BYVoid/OpenCC",
|
||||
"license": "Apache-2.0",
|
||||
"supports": "!(arm | uwp)",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"features": {
|
||||
"tools": {
|
||||
"description": "Build OpenCC command-line tools"
|
||||
|
@ -5161,8 +5161,8 @@
|
||||
"port-version": 1
|
||||
},
|
||||
"opencc": {
|
||||
"baseline": "2020-04-26",
|
||||
"port-version": 10
|
||||
"baseline": "1.1.4",
|
||||
"port-version": 0
|
||||
},
|
||||
"opencensus-cpp": {
|
||||
"baseline": "2021-08-26",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "9c886059bbc8c7c14a7d7290b22e2036c3ff8fe6",
|
||||
"version": "1.1.4",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "10bc4f21926d1c116227ba57e954c4f8a6c9e999",
|
||||
"version-date": "2020-04-26",
|
||||
|
Loading…
x
Reference in New Issue
Block a user