From 352b9d43f9a30870768664f9ac6f0d685f2e23e6 Mon Sep 17 00:00:00 2001 From: Rocka Date: Sat, 1 Jun 2024 16:03:34 +0800 Subject: [PATCH 1/8] Update libraries anthy-unicode main boost 1.85.0 fmt 10.2.1 libime master libintl-lite master libuv 1.48.0 zstd 1.5.6 --- anthy-unicode | 2 +- build.cfg | 4 +-- fmt | 2 +- libime-jyutping | 2 +- libintl-lite | 2 +- libuv | 2 +- patches/libuv.patch | 63 ++++++++++++++++++--------------------------- src/Rules/Boost.hs | 2 +- zstd | 2 +- 9 files changed, 34 insertions(+), 47 deletions(-) diff --git a/anthy-unicode b/anthy-unicode index 360c112c..e63d1d67 160000 --- a/anthy-unicode +++ b/anthy-unicode @@ -1 +1 @@ -Subproject commit 360c112cff27fe82fff07bb255a48e40ab7a0849 +Subproject commit e63d1d67caa95886076ac1f6033469e03b36c990 diff --git a/build.cfg b/build.cfg index da95b3a7..4876ee0e 100644 --- a/build.cfg +++ b/build.cfg @@ -27,8 +27,8 @@ py_table = py_table-20121124.tar.gz py_table_sha256 = 42146ac97de6c13d55f9e99ed873915f4c66739e9c11532a34556badf9792c04 # boost -boost_version = 1.83.0 -boost_sha256 = c5a0688e1f0c05f354bbd0b32244d36085d9ffc9f932e8a18983a9908096f614 +boost_version = 1.85.0 +boost_sha256 = 0a9cc56ceae46986f5f4d43fe0311d90cf6d2fa9028258a95cab49ffdacf92ad # jyutping dict jyutping_dict = jyutping-dict-20180104.tar.xz diff --git a/fmt b/fmt index a3370119..e69e5f97 160000 --- a/fmt +++ b/fmt @@ -1 +1 @@ -Subproject commit a33701196adfad74917046096bf5a2aa0ab0bb50 +Subproject commit e69e5f977d458f2650bb346dadf2ad30c5320281 diff --git a/libime-jyutping b/libime-jyutping index 3cbd2fc2..25231d82 160000 --- a/libime-jyutping +++ b/libime-jyutping @@ -1 +1 @@ -Subproject commit 3cbd2fc2d43bee266f85c44a739b06f1e3010493 +Subproject commit 25231d82c658753209f7b675273f2918d6be4f82 diff --git a/libintl-lite b/libintl-lite index fd4bfa82..ba151460 160000 --- a/libintl-lite +++ b/libintl-lite @@ -1 +1 @@ -Subproject commit fd4bfa82df1d67c4c657cbe4595772fad894d039 +Subproject commit ba1514607d02ce3711d828e784a7e9e2bb25aa84 diff --git a/libuv b/libuv index be6b81a3..e9f29cb9 160000 --- a/libuv +++ b/libuv @@ -1 +1 @@ -Subproject commit be6b81a352d17513c95be153afcb3148f1a451cd +Subproject commit e9f29cb984231524e3931aa0ae2c5dae1a32884e diff --git a/patches/libuv.patch b/patches/libuv.patch index c945a05a..e3e8d00b 100644 --- a/patches/libuv.patch +++ b/patches/libuv.patch @@ -1,25 +1,25 @@ -From f141a24f570e12f26677e99faf4b3ed53c678bb8 Mon Sep 17 00:00:00 2001 +From ee70fe48d8c642ff3e200aa952288c9617f1e2b9 Mon Sep 17 00:00:00 2001 From: Rocka -Date: Sun, 31 Dec 2023 15:37:22 +0800 +Date: Sat, 1 Jun 2024 15:43:34 +0800 Subject: [PATCH] android: revive support for api level 21 -reverts c8cbdbd and rebased to v1.47.0 +reverts c8cbdbd and rebased to v1.48.0 --- CMakeLists.txt | 4 + Makefile.am | 2 + include/uv/android-ifaddrs.h | 54 +++ src/unix/android-ifaddrs.c | 713 +++++++++++++++++++++++++++++++++++ - src/unix/fs.c | 3 +- - src/unix/linux.c | 10 +- - 6 files changed, 780 insertions(+), 6 deletions(-) + src/unix/fs.c | 1 + + src/unix/linux.c | 6 +- + 6 files changed, 779 insertions(+), 1 deletion(-) create mode 100644 include/uv/android-ifaddrs.h create mode 100644 src/unix/android-ifaddrs.c diff --git a/CMakeLists.txt b/CMakeLists.txt -index 72377851b..659414105 100644 +index 5e8e0166d..aadc77d00 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -268,6 +268,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Android") +@@ -272,6 +272,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Android") src/unix/random-getentropy.c src/unix/random-getrandom.c src/unix/random-sysctl-linux.c) @@ -31,10 +31,10 @@ index 72377851b..659414105 100644 if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "Android|Linux") diff --git a/Makefile.am b/Makefile.am -index 1dca3dd1f..8f7d806d0 100644 +index a14228da3..b097f1f2d 100644 --- a/Makefile.am +++ b/Makefile.am -@@ -396,7 +396,9 @@ libuv_la_SOURCES += src/unix/aix-common.c \ +@@ -403,7 +403,9 @@ libuv_la_SOURCES += src/unix/aix-common.c \ endif if ANDROID @@ -824,47 +824,34 @@ index 000000000..4765cc06b + } +} diff --git a/src/unix/fs.c b/src/unix/fs.c -index 891306dae..59e3d1cbc 100644 +index 3a74350f0..f0a65db40 100644 --- a/src/unix/fs.c +++ b/src/unix/fs.c -@@ -84,7 +84,8 @@ - +@@ -85,6 +85,7 @@ #if defined(__CYGWIN__) || \ (defined(__HAIKU__) && B_HAIKU_VERSION < B_HAIKU_VERSION_1_PRE_BETA_5) || \ -- (defined(__sun) && !defined(__illumos__)) -+ (defined(__sun) && !defined(__illumos__)) || \ -+ (defined(__ANDROID__) && __ANDROID_API__ < __ANDROID_API_N__) + (defined(__sun) && !defined(__illumos__)) || \ ++ (defined(__ANDROID__) && __ANDROID_API__ < __ANDROID_API_N__) || \ + (defined(__APPLE__) && !TARGET_OS_IPHONE && \ + MAC_OS_X_VERSION_MIN_REQUIRED < 110000) #define preadv(fd, bufs, nbufs, off) \ - pread(fd, (bufs)->iov_base, (bufs)->iov_len, off) - #define pwritev(fd, bufs, nbufs, off) \ diff --git a/src/unix/linux.c b/src/unix/linux.c -index 8eeb352e6..84cf7ead9 100644 +index 4164e90db..97480b370 100644 --- a/src/unix/linux.c +++ b/src/unix/linux.c -@@ -122,10 +122,6 @@ - - #define HAVE_IFADDRS_H 1 - --# if defined(__ANDROID_API__) && __ANDROID_API__ < 24 --# undef HAVE_IFADDRS_H --#endif -- - #ifdef __UCLIBC__ - # if __UCLIBC_MAJOR__ < 0 && __UCLIBC_MINOR__ < 9 && __UCLIBC_SUBLEVEL__ < 32 - # undef HAVE_IFADDRS_H -@@ -133,7 +129,11 @@ - #endif +@@ -37,7 +37,11 @@ + #include - #ifdef HAVE_IFADDRS_H --# include + #include +-#include +# if defined(__ANDROID__) && __ANDROID_API__ < __ANDROID_API_N__ +# include "uv/android-ifaddrs.h" +# else +# include +# endif - # include - # include - # include + #include + #include + #include -- -2.43.0 +2.45.1 diff --git a/src/Rules/Boost.hs b/src/Rules/Boost.hs index 2a9077fd..f9d28583 100644 --- a/src/Rules/Boost.hs +++ b/src/Rules/Boost.hs @@ -24,7 +24,7 @@ boostRule = do boostVersion <- getConfig' "boost_version" sha256 <- getConfig' "boost_sha256" let boostTag = "boost-" <> boostVersion - boostTar = boostTag <.> "tar" <.> "xz" + boostTar = boostTag <> "-cmake" <.> "tar" <.> "xz" boostUrl = "https://github.com/boostorg/boost/releases/download" boostTag <> "/" _ <- download boostUrl boostTar sha256 cmd_ (Cwd out) "tar" "xf" boostTar diff --git a/zstd b/zstd index 63779c79..794ea1b0 160000 --- a/zstd +++ b/zstd @@ -1 +1 @@ -Subproject commit 63779c798237346c2b245c546c40b72a5a5913fe +Subproject commit 794ea1b0afca0f020f4e57b6732332231fb23c70 From b3004573634e49534a3dc8097e1680e5f4576347 Mon Sep 17 00:00:00 2001 From: Rocka Date: Tue, 12 Nov 2024 00:22:18 +0800 Subject: [PATCH 2/8] Update libraries --- Lua | 2 +- OpenCC | 2 +- fmt | 2 +- glog | 2 +- libchewing | 2 +- libime | 2 +- librime | 2 +- librime-lua | 2 +- librime-predict | 2 +- patches/glog.patch | 24 ------------------------ 10 files changed, 9 insertions(+), 33 deletions(-) diff --git a/Lua b/Lua index 88246d62..52674cd1 160000 --- a/Lua +++ b/Lua @@ -1 +1 @@ -Subproject commit 88246d621abf7b6fba9332f49229d507f020e450 +Subproject commit 52674cd192943015b99f51225f8cf8a116aa7293 diff --git a/OpenCC b/OpenCC index e5d6c5f1..556ed224 160000 --- a/OpenCC +++ b/OpenCC @@ -1 +1 @@ -Subproject commit e5d6c5f1b78e28a5797e7ad3ede3513314e544b7 +Subproject commit 556ed22496d650bd0b13b6c163be9814637970ae diff --git a/fmt b/fmt index e69e5f97..0c9fce2f 160000 --- a/fmt +++ b/fmt @@ -1 +1 @@ -Subproject commit e69e5f977d458f2650bb346dadf2ad30c5320281 +Subproject commit 0c9fce2ffefecfdce794e1859584e25877b7b592 diff --git a/glog b/glog index 34b8da64..7b134a5c 160000 --- a/glog +++ b/glog @@ -1 +1 @@ -Subproject commit 34b8da6496aec6a98277808701cfa834fae9801f +Subproject commit 7b134a5c82c0c0b5698bb6bf7a835b230c5638e4 diff --git a/libchewing b/libchewing index 9199c9e5..bab02503 160000 --- a/libchewing +++ b/libchewing @@ -1 +1 @@ -Subproject commit 9199c9e552e2d0944a10217a86bc83a281c1388f +Subproject commit bab025039a24d610d5c327d6894356a3d645e441 diff --git a/libime b/libime index d4f53136..ba9ffac9 160000 --- a/libime +++ b/libime @@ -1 +1 @@ -Subproject commit d4f531360ddca9b9784c9b4f02411e6c10de433d +Subproject commit ba9ffac90250e407afdf05c74543c6837c610eb4 diff --git a/librime b/librime index 5b09f35b..c7ab6390 160000 --- a/librime +++ b/librime @@ -1 +1 @@ -Subproject commit 5b09f35bab12683d8ed5e8663c18c940e971b954 +Subproject commit c7ab6390c143a11d670f3add41218111edb883c9 diff --git a/librime-lua b/librime-lua index 7be6974b..b210d0cf 160000 --- a/librime-lua +++ b/librime-lua @@ -1 +1 @@ -Subproject commit 7be6974b6d81c116bba39f6707dc640f6636fa4e +Subproject commit b210d0cfbd2a3cc6edd4709dd0a92c479bfca10b diff --git a/librime-predict b/librime-predict index 72e4d717..591c80a8 160000 --- a/librime-predict +++ b/librime-predict @@ -1 +1 @@ -Subproject commit 72e4d717e56c6542569c88b317700b3471164c42 +Subproject commit 591c80a8d0481be99c44d008c15acd55074d8c68 diff --git a/patches/glog.patch b/patches/glog.patch index 041445c7..5e54c9bb 100644 --- a/patches/glog.patch +++ b/patches/glog.patch @@ -10,27 +10,3 @@ index b787631..1fc8cf4 100644 add_library (glog $ ${_glog_EMPTY_SOURCE} -diff --git a/src/glog/platform.h b/src/glog/platform.h -index 4aaf5b0..f118ca8 100644 ---- a/src/glog/platform.h -+++ b/src/glog/platform.h -@@ -42,6 +42,9 @@ - # ifndef GLOG_OS_LINUX - # define GLOG_OS_LINUX - # endif -+# if defined(__ANDROID__) -+# define GLOG_OS_ANDROID -+# endif - #elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) - # define GLOG_OS_MACOSX - #elif defined(__FreeBSD__) -@@ -52,9 +55,6 @@ - # define GLOG_OS_OPENBSD - #elif defined(__EMSCRIPTEN__) - # define GLOG_OS_EMSCRIPTEN --#elif defined(__ANDROID__) --# define GLOG_OS_ANDROID --#else - // TODO(hamaji): Add other platforms. - #error Platform not supported by glog. Please consider to contribute platform information by submitting a pull request on Github. - #endif From 3c75024994c094794fc1ca81500d1b17f2917faf Mon Sep 17 00:00:00 2001 From: Rocka Date: Tue, 12 Nov 2024 01:29:17 +0800 Subject: [PATCH 3/8] boost 1.86.0; libchewing 0.8.5 --- build.cfg | 4 ++-- libchewing | 2 +- patches/libchewing-host.patch | 8 ++++++++ src/Base.hs | 2 +- src/CMakeBuilder.hs | 2 +- src/Rules/Boost.hs | 8 +++++++- src/Rules/LibChewing.hs | 2 ++ 7 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 patches/libchewing-host.patch diff --git a/build.cfg b/build.cfg index 4876ee0e..932c0b14 100644 --- a/build.cfg +++ b/build.cfg @@ -27,8 +27,8 @@ py_table = py_table-20121124.tar.gz py_table_sha256 = 42146ac97de6c13d55f9e99ed873915f4c66739e9c11532a34556badf9792c04 # boost -boost_version = 1.85.0 -boost_sha256 = 0a9cc56ceae46986f5f4d43fe0311d90cf6d2fa9028258a95cab49ffdacf92ad +boost_version = 1.86.0 +boost_sha256 = 2c5ec5edcdff47ff55e27ed9560b0a0b94b07bd07ed9928b476150e16b0efc57 # jyutping dict jyutping_dict = jyutping-dict-20180104.tar.xz diff --git a/libchewing b/libchewing index bab02503..9be48513 160000 --- a/libchewing +++ b/libchewing @@ -1 +1 @@ -Subproject commit bab025039a24d610d5c327d6894356a3d645e441 +Subproject commit 9be48513bc46bafa134eef4b2bfde6a533470d33 diff --git a/patches/libchewing-host.patch b/patches/libchewing-host.patch new file mode 100644 index 00000000..5f95228a --- /dev/null +++ b/patches/libchewing-host.patch @@ -0,0 +1,8 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ae1d14b7..5d03df35 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,2 +1,2 @@ +-cmake_minimum_required(VERSION 3.24.0) ++cmake_minimum_required(VERSION 3.22.1) + project(libchewing LANGUAGES C) diff --git a/src/Base.hs b/src/Base.hs index ddbe8e7c..4b6d4cbb 100644 --- a/src/Base.hs +++ b/src/Base.hs @@ -119,7 +119,7 @@ getSdkCMake :: AndroidEnv -> FilePath getSdkCMake AndroidEnv {..} = sdkRoot "cmake" sdkCMakeVersion "bin" "cmake" getSdkNinja :: AndroidEnv -> FilePath -getSdkNinja AndroidEnv {..} = sdkRoot "cmake" sdkCMakeVersion "bin" "ninja" +getSdkNinja AndroidEnv {..} = sdkRoot "cmake" sdkCMakeVersion "bin" getABIList :: AndroidEnv -> [String] getABIList AndroidEnv {..} = split (== ',') abi diff --git a/src/CMakeBuilder.hs b/src/CMakeBuilder.hs index 0a19cf20..1f49df81 100644 --- a/src/CMakeBuilder.hs +++ b/src/CMakeBuilder.hs @@ -109,12 +109,12 @@ useCMake CmakeBuilder {..} = addOracle $ \(WithAndroidEnv q env) -> do unBuildActionABI preBuildEachABI q bEnv cmd_ (Cwd src) + (AddPath [] [ ninja ]) cmake "-B" buildEnvBuildDir "-GNinja" ( [ "-DCMAKE_TOOLCHAIN_FILE=" <> toolchain, - "-DCMAKE_MAKE_PROGRAM=" <> ninja, "-DANDROID_ABI=" <> a, "-DANDROID_PLATFORM=" <> show (platform env), "-DANDROID_STL=c++_shared", diff --git a/src/Rules/Boost.hs b/src/Rules/Boost.hs index f9d28583..75f903c0 100644 --- a/src/Rules/Boost.hs +++ b/src/Rules/Boost.hs @@ -35,7 +35,8 @@ boostRule = do "-DBOOST_EXCLUDE_LIBRARIES=" <> intercalate ";" - [ "chrono", + [ "charconv", + "chrono", "context", "contract", "coroutine", @@ -46,6 +47,7 @@ boostRule = do "log", "math", "nowide", + "process", "program_options", "serialization", "stacktrace", @@ -57,6 +59,10 @@ boostRule = do "wave", "wserialization" ], + "-DBOOST_IOSTREAMS_ENABLE_BZIP2=OFF", + "-DBOOST_IOSTREAMS_ENABLE_ZLIB=OFF", + "-DBOOST_IOSTREAMS_ENABLE_LZMA=OFF", + "-DBOOST_IOSTREAMS_ENABLE_ZSTD=OFF", "-DBOOST_INSTALL_LAYOUT=system" ] } diff --git a/src/Rules/LibChewing.hs b/src/Rules/LibChewing.hs index 2eeead34..1a01f47e 100644 --- a/src/Rules/LibChewing.hs +++ b/src/Rules/LibChewing.hs @@ -43,6 +43,7 @@ libchewingRule = do let libchewingBuildHost = outputDir "libchewing-build-host" dictSrcDir = libchewingBuildHost "data" cmd_ (Cwd libchewingSrc) Shell "git checkout ." + cmd_ (Cwd libchewingSrc) "git apply ../patches/libchewing-host.patch" cmd_ "cmake" "-B" @@ -50,6 +51,7 @@ libchewingRule = do "-G" "Ninja" [ "-DBUILD_SHARED_LIBS=OFF", + "-DBUILD_TESTING=OFF", "-DWITH_SQLITE3=OFF", "-DWITH_RUST=OFF" ] From 32bc9ddff1905e210565e88a6bee413f57f44c41 Mon Sep 17 00:00:00 2001 From: Rocka Date: Tue, 12 Nov 2024 22:49:29 +0800 Subject: [PATCH 4/8] update librime patch --- patches/librime-lua.patch | 64 +++++++++++++++++++-------------------- patches/librime.patch | 54 ++++++++++++++++----------------- 2 files changed, 59 insertions(+), 59 deletions(-) diff --git a/patches/librime-lua.patch b/patches/librime-lua.patch index 883eab76..5eb8c099 100644 --- a/patches/librime-lua.patch +++ b/patches/librime-lua.patch @@ -1,21 +1,46 @@ -From 35d353519e34a0af14bdf8b3e504b16285371093 Mon Sep 17 00:00:00 2001 +From 1a7a8972bb06060bf61c44e06fda3d3bf928abf5 Mon Sep 17 00:00:00 2001 From: Rocka -Date: Wed, 24 Jan 2024 19:39:09 +0800 -Subject: [PATCH 1/2] find lua with find_package +Date: Tue, 12 Nov 2024 22:47:19 +0800 +Subject: [PATCH 1/2] set file-prefix-map to relative path + +--- + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 42f2ebb..4f068d0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -40,6 +40,7 @@ aux_source_directory(src RIME_LUA_SRC) + aux_source_directory(src/lib RIME_LUA_LIB_SRC) + + add_library(rime-lua-objs OBJECT ${RIME_LUA_SRC} ${RIME_LUA_LIB_SRC} ${LUA_SRC}) ++target_compile_options(rime-lua-objs PRIVATE "-ffile-prefix-map=${CMAKE_SOURCE_DIR}=.") + if(BUILD_SHARED_LIBS) + set_target_properties(rime-lua-objs PROPERTIES POSITION_INDEPENDENT_CODE ON) + endif() +-- +2.47.0 + +From 2a3f9504f25320b598022ded2f8e97522390a507 Mon Sep 17 00:00:00 2001 +From: Rocka +Date: Tue, 12 Nov 2024 22:47:28 +0800 +Subject: [PATCH 2/2] find lua with find_package --- CMakeLists.txt | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 356731e..0d5d1be 100644 +index 4f068d0..187b24a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -1,19 +1,7 @@ +@@ -1,20 +1,8 @@ + set(LUA_VERSION "lua" CACHE STRING "lua version") if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/lua5.4/lua.h") - find_package(PkgConfig) - if(PkgConfig_FOUND) -- foreach(pkg lua lua54 lua53 lua52 luajit lua51) +- foreach(pkg ${LUA_VERSION} lua54 lua53 lua52 luajit lua51) - pkg_check_modules(LUA IMPORTED_TARGET GLOBAL ${pkg}) - if(LUA_FOUND) - break() @@ -35,30 +60,5 @@ index 356731e..0d5d1be 100644 message(STATUS "Using in-tree lua source") include_directories(thirdparty/lua5.4) -- -2.43.0 - - -From 7207ea10cb6fd945374432c0b8c0a608514cb34d Mon Sep 17 00:00:00 2001 -From: Rocka -Date: Wed, 24 Jan 2024 19:39:22 +0800 -Subject: [PATCH 2/2] set file-prefix-map to relative path - ---- - CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0d5d1be..9cdb241 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -27,6 +27,7 @@ aux_source_directory(src RIME_LUA_SRC) - aux_source_directory(src/lib RIME_LUA_LIB_SRC) - - add_library(rime-lua-objs OBJECT ${RIME_LUA_SRC} ${RIME_LUA_LIB_SRC} ${LUA_SRC}) -+target_compile_options(rime-lua-objs PRIVATE "-ffile-prefix-map=${CMAKE_SOURCE_DIR}=.") - if(BUILD_SHARED_LIBS) - set_target_properties(rime-lua-objs PROPERTIES POSITION_INDEPENDENT_CODE ON) - endif() --- -2.43.0 +2.47.0 diff --git a/patches/librime.patch b/patches/librime.patch index ecc38120..1ad76bf1 100644 --- a/patches/librime.patch +++ b/patches/librime.patch @@ -1,17 +1,17 @@ -From 8fd82c000e277d30c087b6dd29b5a76a8b55db25 Mon Sep 17 00:00:00 2001 +From 15a8b479e66ac597a0fca4bede8012f5bb9df151 Mon Sep 17 00:00:00 2001 From: Rocka -Date: Tue, 2 Jan 2024 22:19:25 +0800 -Subject: [PATCH] set file-prefix-map to relative path +Date: Tue, 12 Nov 2024 22:16:16 +0800 +Subject: [PATCH 1/2] set file-prefix-map to relative path --- - src/CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) + src/CMakeLists.txt | 2 ++ + 1 file changed, 2 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 6364e1c8..347107f0 100644 +index 16082869..c4a5b5ca 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt -@@ -162,6 +162,8 @@ if(BUILD_SHARED_LIBS) +@@ -166,6 +166,8 @@ if(BUILD_SHARED_LIBS) else() add_library(rime-static STATIC ${rime_src}) target_link_libraries(rime-static ${rime_deps}) @@ -21,23 +21,23 @@ index 6364e1c8..347107f0 100644 OUTPUT_NAME "rime" PREFIX "lib" ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) -- -2.43.0 +2.47.0 -From 7b5c910557dcc45f4abc7b6a8d65da4ac3bff920 Mon Sep 17 00:00:00 2001 +From 25608d1ea7a246b3ac4e7ccc02b1b6dfbb468869 Mon Sep 17 00:00:00 2001 From: Rocka -Date: Wed, 24 Jan 2024 19:21:20 +0800 +Date: Tue, 12 Nov 2024 22:20:33 +0800 Subject: [PATCH 2/2] Persist options to user.yaml in RimeSetOption --- - src/rime/engine.cc | 1 - - src/rime/engine.h | 2 ++ - src/rime/service.h | 8 ++++---- - src/rime_api.cc | 9 +++++++++ + src/rime/engine.cc | 1 - + src/rime/engine.h | 2 ++ + src/rime/service.h | 8 ++++---- + src/rime_api_impl.h | 9 +++++++++ 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/rime/engine.cc b/src/rime/engine.cc -index 64c0fb68..549a8112 100644 +index 07aa6b7d..7360e0b5 100644 --- a/src/rime/engine.cc +++ b/src/rime/engine.cc @@ -52,7 +52,6 @@ class ConcreteEngine : public Engine { @@ -49,7 +49,7 @@ index 64c0fb68..549a8112 100644 // implementations diff --git a/src/rime/engine.h b/src/rime/engine.h -index 2e1c8b81..47c39544 100644 +index 2e1c8b81..94a6b500 100644 --- a/src/rime/engine.h +++ b/src/rime/engine.h @@ -16,6 +16,7 @@ namespace rime { @@ -88,20 +88,20 @@ index 2b3111af..95ca87dc 100644 time_t last_active_time_ = 0; string commit_text_; }; -diff --git a/src/rime_api.cc b/src/rime_api.cc -index 678169c0..1085fe5c 100644 ---- a/src/rime_api.cc -+++ b/src/rime_api.cc -@@ -21,6 +21,8 @@ +diff --git a/src/rime_api_impl.h b/src/rime_api_impl.h +index 7749ce98..b0200a67 100644 +--- a/src/rime_api_impl.h ++++ b/src/rime_api_impl.h +@@ -15,6 +15,8 @@ + #include #include #include - #include +#include +#include - using namespace rime; - using namespace std::placeholders; -@@ -441,6 +443,13 @@ RIME_API void RimeSetOption(RimeSessionId session_id, + #include "rime_api.h" + +@@ -426,6 +428,13 @@ RIME_DEPRECATED void RimeSetOption(RimeSessionId session_id, if (!ctx) return; ctx->set_option(option, !!value); @@ -114,7 +114,7 @@ index 678169c0..1085fe5c 100644 + } } - RIME_API Bool RimeGetOption(RimeSessionId session_id, const char* option) { + RIME_DEPRECATED Bool RimeGetOption(RimeSessionId session_id, -- -2.43.0 +2.47.0 From f0d1b55404ae73ce0b0097943be1862ea3517e37 Mon Sep 17 00:00:00 2001 From: Rocka Date: Tue, 12 Nov 2024 23:02:58 +0800 Subject: [PATCH 5/8] update libuv and patch --- libime | 2 +- libuv | 2 +- patches/libuv.patch | 33 ++++++++++----------------------- 3 files changed, 12 insertions(+), 25 deletions(-) diff --git a/libime b/libime index ba9ffac9..2f5fb82c 160000 --- a/libime +++ b/libime @@ -1 +1 @@ -Subproject commit ba9ffac90250e407afdf05c74543c6837c610eb4 +Subproject commit 2f5fb82c386ffc2e2be0a2dd3e7db18acd6e8c43 diff --git a/libuv b/libuv index e9f29cb9..0b34eef8 160000 --- a/libuv +++ b/libuv @@ -1 +1 @@ -Subproject commit e9f29cb984231524e3931aa0ae2c5dae1a32884e +Subproject commit 0b34eef8cec4571aa9c92288ecfc544fbcb74463 diff --git a/patches/libuv.patch b/patches/libuv.patch index e3e8d00b..ad755281 100644 --- a/patches/libuv.patch +++ b/patches/libuv.patch @@ -1,25 +1,24 @@ -From ee70fe48d8c642ff3e200aa952288c9617f1e2b9 Mon Sep 17 00:00:00 2001 +From 0b34eef8cec4571aa9c92288ecfc544fbcb74463 Mon Sep 17 00:00:00 2001 From: Rocka -Date: Sat, 1 Jun 2024 15:43:34 +0800 +Date: Tue, 12 Nov 2024 23:01:06 +0800 Subject: [PATCH] android: revive support for api level 21 -reverts c8cbdbd and rebased to v1.48.0 +reverts c8cbdbd and rebased to v1.49.2 --- CMakeLists.txt | 4 + Makefile.am | 2 + include/uv/android-ifaddrs.h | 54 +++ src/unix/android-ifaddrs.c | 713 +++++++++++++++++++++++++++++++++++ - src/unix/fs.c | 1 + src/unix/linux.c | 6 +- - 6 files changed, 779 insertions(+), 1 deletion(-) + 5 files changed, 778 insertions(+), 1 deletion(-) create mode 100644 include/uv/android-ifaddrs.h create mode 100644 src/unix/android-ifaddrs.c diff --git a/CMakeLists.txt b/CMakeLists.txt -index 5e8e0166d..aadc77d00 100644 +index 28c6df256..3ec932e54 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -272,6 +272,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Android") +@@ -277,6 +277,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Android") src/unix/random-getentropy.c src/unix/random-getrandom.c src/unix/random-sysctl-linux.c) @@ -31,10 +30,10 @@ index 5e8e0166d..aadc77d00 100644 if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "Android|Linux") diff --git a/Makefile.am b/Makefile.am -index a14228da3..b097f1f2d 100644 +index f85a41316..31d4d040b 100644 --- a/Makefile.am +++ b/Makefile.am -@@ -403,7 +403,9 @@ libuv_la_SOURCES += src/unix/aix-common.c \ +@@ -406,7 +406,9 @@ libuv_la_SOURCES += src/unix/aix-common.c \ endif if ANDROID @@ -823,20 +822,8 @@ index 000000000..4765cc06b + uv__free(l_cur); + } +} -diff --git a/src/unix/fs.c b/src/unix/fs.c -index 3a74350f0..f0a65db40 100644 ---- a/src/unix/fs.c -+++ b/src/unix/fs.c -@@ -85,6 +85,7 @@ - #if defined(__CYGWIN__) || \ - (defined(__HAIKU__) && B_HAIKU_VERSION < B_HAIKU_VERSION_1_PRE_BETA_5) || \ - (defined(__sun) && !defined(__illumos__)) || \ -+ (defined(__ANDROID__) && __ANDROID_API__ < __ANDROID_API_N__) || \ - (defined(__APPLE__) && !TARGET_OS_IPHONE && \ - MAC_OS_X_VERSION_MIN_REQUIRED < 110000) - #define preadv(fd, bufs, nbufs, off) \ diff --git a/src/unix/linux.c b/src/unix/linux.c -index 4164e90db..97480b370 100644 +index 857a4ef8a..9deec0ef5 100644 --- a/src/unix/linux.c +++ b/src/unix/linux.c @@ -37,7 +37,11 @@ @@ -853,5 +840,5 @@ index 4164e90db..97480b370 100644 #include #include -- -2.45.1 +2.47.0 From 4e00c569aaa104cfcb0b2f8381a2bf014a63b4f9 Mon Sep 17 00:00:00 2001 From: Rocka Date: Tue, 12 Nov 2024 23:06:24 +0800 Subject: [PATCH 6/8] update libuv --- libuv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libuv b/libuv index 0b34eef8..e1095c7a 160000 --- a/libuv +++ b/libuv @@ -1 +1 @@ -Subproject commit 0b34eef8cec4571aa9c92288ecfc544fbcb74463 +Subproject commit e1095c7a4373ce00cd8874d8e820de5afb25776e From 1252caa1cb58ac79aa467a2dfed429f05fdf014d Mon Sep 17 00:00:00 2001 From: Rocka Date: Mon, 18 Nov 2024 23:55:00 +0800 Subject: [PATCH 7/8] update and remove some patches --- librime-octagram | 2 +- librime-predict | 2 +- patches/libchewing-host.patch | 8 -------- patches/librime-octagram.patch | 35 ---------------------------------- patches/librime-predict.patch | 6 ------ src/Rules/LibChewing.hs | 1 - src/Rules/LibRime.hs | 1 + 7 files changed, 3 insertions(+), 52 deletions(-) delete mode 100644 patches/libchewing-host.patch diff --git a/librime-octagram b/librime-octagram index bd12863f..dfcc1511 160000 --- a/librime-octagram +++ b/librime-octagram @@ -1 +1 @@ -Subproject commit bd12863f45fbbd5c7db06d5ec8be8987b10253bf +Subproject commit dfcc15115788c828d9dd7b4bff68067d3ce2ffb8 diff --git a/librime-predict b/librime-predict index 591c80a8..920bd41e 160000 --- a/librime-predict +++ b/librime-predict @@ -1 +1 @@ -Subproject commit 591c80a8d0481be99c44d008c15acd55074d8c68 +Subproject commit 920bd41ebf6f9bf6855d14fbe80212e54e749791 diff --git a/patches/libchewing-host.patch b/patches/libchewing-host.patch deleted file mode 100644 index 5f95228a..00000000 --- a/patches/libchewing-host.patch +++ /dev/null @@ -1,8 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index ae1d14b7..5d03df35 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,2 +1,2 @@ --cmake_minimum_required(VERSION 3.24.0) -+cmake_minimum_required(VERSION 3.22.1) - project(libchewing LANGUAGES C) diff --git a/patches/librime-octagram.patch b/patches/librime-octagram.patch index 12ea3178..3ac4201b 100644 --- a/patches/librime-octagram.patch +++ b/patches/librime-octagram.patch @@ -1,35 +1,3 @@ -From 8780e27f0fe35fd637a883ea0ab8ceda1bb42580 Mon Sep 17 00:00:00 2001 -From: Rocka -Date: Tue, 2 Jan 2024 22:21:41 +0800 -Subject: [PATCH 1/2] disable building command line tools - ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7f9c34e..4115fa7 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -15,4 +15,4 @@ set(plugin_objs $ PARENT_SCOPE) - set(plugin_deps ${rime_library} PARENT_SCOPE) - set(plugin_modules "octagram" PARENT_SCOPE) - --add_subdirectory(tools) -+# add_subdirectory(tools) --- -2.43.0 - - -From f2013e501dd0653c09b9456b2287aed7ef0e91ee Mon Sep 17 00:00:00 2001 -From: Rocka -Date: Tue, 2 Jan 2024 22:21:47 +0800 -Subject: [PATCH 2/2] set file-prefix-map to relative path - ---- - CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - diff --git a/CMakeLists.txt b/CMakeLists.txt index 4115fa7..162ffb5 100644 --- a/CMakeLists.txt @@ -42,6 +10,3 @@ index 4115fa7..162ffb5 100644 if(BUILD_SHARED_LIBS) set_target_properties(rime-octagram-objs PROPERTIES --- -2.43.0 - diff --git a/patches/librime-predict.patch b/patches/librime-predict.patch index c726e0ba..229b0e3f 100644 --- a/patches/librime-predict.patch +++ b/patches/librime-predict.patch @@ -10,9 +10,3 @@ index 07703bf..5ab6d3b 100644 if(BUILD_SHARED_LIBS) set_target_properties(rime-predict-objs PROPERTIES -@@ -15,4 +16,4 @@ set(plugin_objs $ PARENT_SCOPE) - set(plugin_deps ${rime_library} PARENT_SCOPE) - set(plugin_modules "predict" PARENT_SCOPE) - --add_subdirectory(tools) -+# add_subdirectory(tools) diff --git a/src/Rules/LibChewing.hs b/src/Rules/LibChewing.hs index 1a01f47e..53216704 100644 --- a/src/Rules/LibChewing.hs +++ b/src/Rules/LibChewing.hs @@ -43,7 +43,6 @@ libchewingRule = do let libchewingBuildHost = outputDir "libchewing-build-host" dictSrcDir = libchewingBuildHost "data" cmd_ (Cwd libchewingSrc) Shell "git checkout ." - cmd_ (Cwd libchewingSrc) "git apply ../patches/libchewing-host.patch" cmd_ "cmake" "-B" diff --git a/src/Rules/LibRime.hs b/src/Rules/LibRime.hs index 5723ab41..c1cf04cf 100644 --- a/src/Rules/LibRime.hs +++ b/src/Rules/LibRime.hs @@ -49,6 +49,7 @@ librimeRule = do [ "-DBUILD_SHARED_LIBS=OFF", "-DBUILD_STATIC=ON", "-DBUILD_TEST=OFF", + "-DBUILD_TOOLS=OFF", "-DALSO_LOG_TO_STDERR=ON", "-DCMAKE_FIND_ROOT_PATH=" <> intercalate From 4278d501687dfb05d912f1527295f3fd5a229c71 Mon Sep 17 00:00:00 2001 From: Rocka Date: Wed, 20 Nov 2024 02:31:21 +0800 Subject: [PATCH 8/8] update; remove unnecessary boost libs --- libime | 2 +- librime | 2 +- src/Rules/Boost.hs | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/libime b/libime index 2f5fb82c..86d1651d 160000 --- a/libime +++ b/libime @@ -1 +1 @@ -Subproject commit 2f5fb82c386ffc2e2be0a2dd3e7db18acd6e8c43 +Subproject commit 86d1651d84d0ca81480ffd742de89526c283f3ec diff --git a/librime b/librime index c7ab6390..0a983b4e 160000 --- a/librime +++ b/librime @@ -1 +1 @@ -Subproject commit c7ab6390c143a11d670f3add41218111edb883c9 +Subproject commit 0a983b4ea8ae69546313287c1d2651ac2e742b4c diff --git a/src/Rules/Boost.hs b/src/Rules/Boost.hs index 75f903c0..2aaa4228 100644 --- a/src/Rules/Boost.hs +++ b/src/Rules/Boost.hs @@ -35,12 +35,16 @@ boostRule = do "-DBOOST_EXCLUDE_LIBRARIES=" <> intercalate ";" - [ "charconv", + [ "atomic", + "charconv", "chrono", + "container", "context", "contract", "coroutine", + "date_time", "fiber", + "filesystem", "graph", "json", "locale",