[opencc] update to 1.1.9 (#41539)

This commit is contained in:
Jia Yue Hua 2024-10-17 18:02:21 +08:00 committed by GitHub
parent 1f4e8c6d0a
commit b2a47d316d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 20 additions and 39 deletions

View File

@ -1,42 +1,17 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ee08591..c8c6b61 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -185,12 +185,14 @@ if(NOT USE_SYSTEM_MARISA)
message(STATUS "Use bundled marisa library.")
add_subdirectory(deps/marisa-0.2.6)
else()
- find_library(LIBMARISA NAMES marisa)
- if (LIBMARISA)
- message(STATUS "libmarisa found: ${LIBMARISA}")
- else()
- message(FATAL_ERROR "libmarisa not found.")
- endif()
+ find_package(PkgConfig REQUIRED)
+ pkg_check_modules(marisa REQUIRED IMPORTED_TARGET marisa)
+ # find_library(LIBMARISA NAMES marisa)
+ # if (LIBMARISA)
+ # message(STATUS "libmarisa found: ${LIBMARISA}")
+ # else()
+ # message(FATAL_ERROR "libmarisa not found.")
+ # endif()
endif()
######## Subdirectories
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c0a0b10..91b4037 100644 index 7768c89..70292d6 100644
--- a/src/CMakeLists.txt --- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt +++ b/src/CMakeLists.txt
@@ -114,7 +114,7 @@ configure_file( @@ -115,7 +115,7 @@ add_library(libopencc ${LIBOPENCC_SOURCES} ${LIBOPENCC_HEADERS})
add_library(libopencc ${LIBOPENCC_SOURCES} ${LIBOPENCC_HEADERS}) add_library(OpenCC::OpenCC ALIAS libopencc)
set_target_properties(libopencc PROPERTIES POSITION_INDEPENDENT_CODE ON) set_target_properties(libopencc PROPERTIES POSITION_INDEPENDENT_CODE ON)
source_group(libopencc FILES ${LIBOPENCC_SOURCES} ${LIBOPENCC_HEADERS}) source_group(libopencc FILES ${LIBOPENCC_SOURCES} ${LIBOPENCC_HEADERS})
-target_link_libraries(libopencc marisa) -target_link_libraries(libopencc marisa)
+target_link_libraries(libopencc PkgConfig::marisa) +target_link_libraries(libopencc ${LIBMARISA})
target_include_directories(libopencc PUBLIC
GENERATE_EXPORT_HEADER( $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
libopencc $<INSTALL_INTERFACE:${DIR_INCLUDE}/opencc>
@@ -137,6 +137,21 @@ set_target_properties( @@ -144,6 +144,21 @@ set_target_properties(
${OPENCC_VERSION_MAJOR}.${OPENCC_VERSION_MINOR} ${OPENCC_VERSION_MAJOR}.${OPENCC_VERSION_MINOR}
) )
@ -57,4 +32,4 @@ index c0a0b10..91b4037 100644
+ +
# Installation # Installation
install( if (USE_SYSTEM_MARISA)

View File

@ -2,7 +2,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
REPO BYVoid/OpenCC REPO BYVoid/OpenCC
REF "ver.${VERSION}" REF "ver.${VERSION}"
SHA512 bfc40bdf1348e6a265b3304ab1e8acee2f4b6ac9c377ff3d8c996435a92dee98c3758503186b4fd424653faf44db339f8a90300e3290c59942ccf04b1bbb2a30 SHA512 713cf00931d7616994eb455eef3bc893096b5cd6d42b346aa1130591752d9612891ea3ed035bd7bd4ec7df1c90425e86375f5b3337fac11663c656c79a8f33e9
HEAD_REF master HEAD_REF master
PATCHES PATCHES
fix-dependencies.patch fix-dependencies.patch
@ -30,6 +30,8 @@ vcpkg_cmake_install(
vcpkg_copy_pdbs() vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/opencc)
vcpkg_fixup_pkgconfig() vcpkg_fixup_pkgconfig()
set(tool_names "opencc" "opencc_dict" "opencc_phrase_extract") set(tool_names "opencc" "opencc_dict" "opencc_phrase_extract")

View File

@ -1,7 +1,6 @@
{ {
"name": "opencc", "name": "opencc",
"version": "1.1.6", "version": "1.1.9",
"port-version": 1,
"description": "A project for conversions between Traditional Chinese, Simplified Chinese and Japanese Kanji (Shinjitai)", "description": "A project for conversions between Traditional Chinese, Simplified Chinese and Japanese Kanji (Shinjitai)",
"homepage": "https://github.com/BYVoid/OpenCC", "homepage": "https://github.com/BYVoid/OpenCC",
"license": "Apache-2.0", "license": "Apache-2.0",

View File

@ -6585,8 +6585,8 @@
"port-version": 1 "port-version": 1
}, },
"opencc": { "opencc": {
"baseline": "1.1.6", "baseline": "1.1.9",
"port-version": 1 "port-version": 0
}, },
"opencensus-cpp": { "opencensus-cpp": {
"baseline": "2021-08-26", "baseline": "2021-08-26",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "e6bdb1f36889a641312f0f0dc91e8be0d800dcd5",
"version": "1.1.9",
"port-version": 0
},
{ {
"git-tree": "85a9b30209f5cd7460d2be2c8e1cc206fab66aaa", "git-tree": "85a9b30209f5cd7460d2be2c8e1cc206fab66aaa",
"version": "1.1.6", "version": "1.1.6",