Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 23 additions & 27 deletions ports/opencc/portfile.cmake
Original file line number Diff line number Diff line change
@@ -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_fixup_pkgconfig()

vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
set(tool_names "opencc" "opencc_dict" "opencc_phrase_extract")
if("tools" IN_LIST FEATURES)
vcpkg_copy_tools(TOOL_NAMES ${tool_names} AUTO_CLEAN)
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()
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 ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")

file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
vcpkg_fixup_pkgconfig()
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
16 changes: 13 additions & 3 deletions ports/opencc/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5145,8 +5145,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",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/opencc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "9c886059bbc8c7c14a7d7290b22e2036c3ff8fe6",
"version": "1.1.4",
"port-version": 0
},
{
"git-tree": "10bc4f21926d1c116227ba57e954c4f8a6c9e999",
"version-date": "2020-04-26",
Expand Down