Skip to content

Commit b227dba

Browse files
committed
Update fcitx5 submodules and prebuilt
libevent -> libuv
1 parent 319bea9 commit b227dba

File tree

9 files changed

+19
-18
lines changed

9 files changed

+19
-18
lines changed

app/src/main/cpp/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ set(PREBUILT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../lib/fcitx5/src/main/cp
3838
set(fmt_DIR "${PREBUILT_DIR}/fmt/${ANDROID_ABI}/lib/cmake/fmt")
3939
find_package(fmt)
4040

41-
# prebuilt libevent
42-
set(Libevent_DIR "${PREBUILT_DIR}/libevent/${ANDROID_ABI}/lib/cmake/libevent")
43-
find_package(Libevent)
41+
# prebuilt libuv
42+
set(libuv_DIR "${PREBUILT_DIR}/libuv/${ANDROID_ABI}/lib/cmake/libuv")
43+
find_package(libuv)
4444

4545
# prebuilt boost
4646
list(APPEND CMAKE_FIND_ROOT_PATH "${PREBUILT_DIR}/boost/${ANDROID_ABI}/lib/cmake")
@@ -54,7 +54,7 @@ target_link_libraries(pinyin-customphrase PRIVATE fmt::fmt-header-only Fcitx5::U
5454
add_library(native-lib SHARED native-lib.cpp androidaddonloader/androidaddonloader.cpp)
5555
target_link_libraries(native-lib
5656
log
57-
libevent::core
57+
libuv::uv_a
5858
Fcitx5::Utils
5959
Fcitx5::Config
6060
Fcitx5::Core

app/src/main/cpp/native-lib.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
#include <android/log.h>
1414

15-
#include <event2/event.h>
15+
#include <uv.h>
1616

1717
#include <fcitx/instance.h>
1818
#include <fcitx/addonmanager.h>
@@ -72,13 +72,13 @@ class Fcitx {
7272
return p_instance != nullptr && p_dispatcher != nullptr && p_frontend != nullptr;
7373
}
7474

75-
event_base *get_event_base() {
75+
uv_loop_t *get_event_base() {
7676
fcitx::EventLoop &event_loop = p_instance->eventLoop();
77-
return static_cast<event_base *>(event_loop.nativeHandle());
77+
return static_cast<uv_loop_t *>(event_loop.nativeHandle());
7878
}
7979

8080
int loopOnce() {
81-
return event_base_loop(get_event_base(), EVLOOP_ONCE);
81+
return uv_run(get_event_base(), UV_RUN_ONCE);
8282
}
8383

8484
void startup(fcitx::AndroidLibraryDependency dependency,
@@ -421,7 +421,7 @@ class Fcitx {
421421

422422
void exit() {
423423
// Make sure that the exec doesn't get blocked
424-
event_base_loopexit(get_event_base(), nullptr);
424+
uv_stop(get_event_base());
425425
// Normally, we would use exec to drive the event loop.
426426
// Since we are calling loopOnce in JVM repeatedly, we shouldn't have used this function.
427427
// However, exit events would lose chance to be called in this case.

lib/fcitx5/src/main/cpp/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ find_package(fmt)
2626
set(LibIntl_DIR "${PREBUILT_DIR}/libintl-lite/${ANDROID_ABI}/lib/cmake")
2727
find_package(LibIntl)
2828

29-
# prebuilt libevent
30-
set(Libevent_DIR "${PREBUILT_DIR}/libevent/${ANDROID_ABI}/lib/cmake/libevent")
31-
find_package(Libevent)
29+
# prebuilt libuv
30+
set(libuv_DIR "${PREBUILT_DIR}/libuv/${ANDROID_ABI}/lib/cmake/libuv")
31+
find_package(libuv)
32+
set(LIBUV_TARGET libuv::uv_a)
3233

3334
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/Fcitx5AndroidInstallDirs.cmake")
3435
# LIBDATADIR is not a standard CMake install dir, defined in fcitx5/CMakeLists.txt#L169

lib/fcitx5/src/main/cpp/fcitx5

Submodule fcitx5 updated 94 files

lib/fcitx5/src/main/cpp/prebuilt

Submodule prebuilt updated 233 files

plugin/rime/src/main/cpp/fcitx5-rime

Submodule fcitx5-rime updated 44 files

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy