[sqlite3] Add unicode support (#41753)

Co-authored-by: Cheney-Wang <850426846@qq.com>
This commit is contained in:
Egor Krugletsov 2024-10-31 12:43:35 +03:00 committed by GitHub
parent e6cedc78ba
commit b505fa789f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 24 additions and 1 deletions

View File

@ -6,6 +6,7 @@ option(WITH_ZLIB "Build sqlite3 with zlib support" OFF)
option(SQLITE3_SKIP_TOOLS "Disable build sqlite3 executable" OFF)
set(PKGCONFIG_LIBS_PRIVATE "")
set(PKGCONFIG_REQUIRES_PRIVATE "")
add_library(sqlite3 sqlite3.c sqlite3.rc)
@ -45,6 +46,13 @@ if (NOT WIN32)
endif()
endif()
if(SQLITE_ENABLE_ICU)
find_package(ICU COMPONENTS uc i18n REQUIRED)
target_link_libraries(sqlite3 PRIVATE ICU::uc ICU::i18n)
string(APPEND PKGCONFIG_REQUIRES_PRIVATE "icu-uc icu-i18n")
endif()
if(NOT SQLITE3_SKIP_TOOLS)
add_executable(sqlite3-bin shell.c)
set_target_properties(sqlite3-bin PROPERTIES

View File

@ -30,6 +30,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
fts5 SQLITE_ENABLE_FTS5
math SQLITE_ENABLE_MATH_FUNCTIONS
zlib WITH_ZLIB
unicode SQLITE_ENABLE_ICU
INVERTED_FEATURES
tool SQLITE3_SKIP_TOOLS
)

View File

@ -30,3 +30,4 @@
#define SQLITE_ENABLE_COLUMN_METADATA 1
#cmakedefine SQLITE_OS_UNIX @SQLITE_OS_UNIX@
#cmakedefine SQLITE_ENABLE_DBSTAT_VTAB
#cmakedefine SQLITE_ENABLE_ICU

View File

@ -8,4 +8,5 @@ Description: SQL database engine
Version: @PKGCONFIG_VERSION@
Libs: -L${libdir} -lsqlite3
Libs.private: @PKGCONFIG_LIBS_PRIVATE@
Requires.private: @PKGCONFIG_REQUIRES_PRIVATE@
Cflags: -I${includedir}

View File

@ -1,6 +1,7 @@
{
"name": "sqlite3",
"version": "3.47.0",
"port-version": 1,
"description": "SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.",
"homepage": "https://sqlite.org/",
"license": "blessing",
@ -70,6 +71,12 @@
"description": "Build sqlite3 executable",
"supports": "!uwp"
},
"unicode": {
"description": "Enable unicode support",
"dependencies": [
"icu"
]
},
"zlib": {
"description": "Build sqlite3 command line tool with zlib support; has no effect on the library itself",
"dependencies": [

View File

@ -8598,7 +8598,7 @@
},
"sqlite3": {
"baseline": "3.47.0",
"port-version": 0
"port-version": 1
},
"sqlitecpp": {
"baseline": "3.3.2",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "a28f9bb5f7c9a1b985a6ad77d1f3b22e9a543fcb",
"version": "3.47.0",
"port-version": 1
},
{
"git-tree": "e1627228f6b8f4dd39e51e29b34c7b5ea1c304ba",
"version": "3.47.0",