Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove charcode plugin, etc. #1533

Merged
merged 3 commits into from
Dec 16, 2024
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
6 changes: 0 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
path = app/src/main/jni/librime
url = https://github.com/rime/librime.git
ignore = dirty
[submodule "libiconv"]
path = app/src/main/jni/libiconv
url = https://github.com/osfans/libiconv-gnu.git
[submodule "librime-lua"]
path = app/src/main/jni/librime-lua
url = https://github.com/hchunhui/librime-lua
Expand All @@ -26,9 +23,6 @@
[submodule "librime-octagram"]
path = app/src/main/jni/librime-octagram
url = https://github.com/lotem/librime-octagram.git
[submodule "librime-charcode"]
path = app/src/main/jni/librime-charcode
url = https://github.com/rime/librime-charcode
[submodule "librime-predict"]
path = app/src/main/jni/librime-predict
url = https://github.com/rime/librime-predict
Expand Down
12 changes: 4 additions & 8 deletions app/src/main/jni/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,14 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
option(BUILD_SHARED_LIBS "" OFF)
option(BUILD_TESTING "" OFF)

# iconv for Boost::locale
include(Iconv)
# workaround for boost install
install(TARGETS iconv EXPORT boost_locale-targets)

include(Boost)

option(WITH_GFLAGS "Use gflags" OFF)
option(WITH_GTEST "Use googletest" OFF)
option(WITH_UNWIND "Enable libunwind support" OFF)
add_subdirectory(librime/deps/glog)
target_compile_options(glog_internal PRIVATE "-ffile-prefix-map=${CMAKE_CURRENT_SOURCE_DIR}=.")
target_compile_definitions(glog PRIVATE GLOG_OS_ANDROID) # remove when glog 0.8.0
target_compile_options(
glog_internal PRIVATE "-ffile-prefix-map=${CMAKE_CURRENT_SOURCE_DIR}=.")

option(YAML_CPP_BUILD_TOOLS "" OFF)
option(YAML_CPP_BUILD_TESTS "" OFF)
Expand All @@ -50,7 +45,8 @@ option(LEVELDB_INSTALL "" OFF)
add_subdirectory(librime/deps/leveldb)

add_subdirectory(librime/deps/marisa-trie)
target_compile_options(marisa PRIVATE "-ffile-prefix-map=${CMAKE_CURRENT_SOURCE_DIR}=.")
target_compile_options(
marisa PRIVATE "-ffile-prefix-map=${CMAKE_CURRENT_SOURCE_DIR}=.")

set(LIBMARISA marisa)
option(USE_SYSTEM_MARISA "" ON)
Expand Down
4 changes: 1 addition & 3 deletions app/src/main/jni/cmake/Boost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ set(BOOST_INCLUDE_LIBRARIES
scope_exit
signals2
utility
uuid
# librime-charcode
locale)
uuid)

add_subdirectory(boost EXCLUDE_FROM_ALL)
3 changes: 0 additions & 3 deletions app/src/main/jni/cmake/FindBoost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,3 @@ foreach(__lib ${__boost_installed_libs})
set(__full_dir "${CMAKE_SOURCE_DIR}/${__lib}/include")
list(APPEND Boost_INCLUDE_DIRS "${__full_dir}")
endforeach()

# for librime-charcode
set(Boost_LOCALE_LIBRARIES Boost::locale)
8 changes: 0 additions & 8 deletions app/src/main/jni/cmake/FindIconv.cmake

This file was deleted.

14 changes: 0 additions & 14 deletions app/src/main/jni/cmake/Iconv.cmake

This file was deleted.

16 changes: 7 additions & 9 deletions app/src/main/jni/cmake/Rime.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# SPDX-License-Identifier: GPL-3.0-or-later

# if you want to add some new plugins, add them to librime_jni/rime_jni.cc too
set(RIME_PLUGINS librime-lua librime-charcode librime-octagram librime-predict)
set(RIME_PLUGINS librime-lua librime-octagram librime-predict)

# symlink plugins
foreach(plugin ${RIME_PLUGINS})
Expand All @@ -20,16 +20,14 @@ if(NOT EXISTS "${CMAKE_SOURCE_DIR}/librime/plugins/librime-lua/thirdparty")
COPY_ON_ERROR SYMBOLIC)
endif()

# librime-charcode
option(BUILD_WITH_ICU "" OFF)

option(BUILD_TEST "" OFF)
option(BUILD_STATIC "" ON)
add_subdirectory(librime)
target_compile_options(rime-static PRIVATE "-ffile-prefix-map=${CMAKE_CURRENT_SOURCE_DIR}=.")

target_link_libraries(rime-charcode-objs Boost::locale)
target_compile_options(
rime-static PRIVATE "-ffile-prefix-map=${CMAKE_CURRENT_SOURCE_DIR}=.")

target_compile_options(rime-lua-objs PRIVATE "-ffile-prefix-map=${CMAKE_CURRENT_SOURCE_DIR}=.")
target_compile_options(
rime-lua-objs PRIVATE "-ffile-prefix-map=${CMAKE_CURRENT_SOURCE_DIR}=.")

target_compile_options(rime-octagram-objs PRIVATE "-ffile-prefix-map=${CMAKE_CURRENT_SOURCE_DIR}=.")
target_compile_options(
rime-octagram-objs PRIVATE "-ffile-prefix-map=${CMAKE_CURRENT_SOURCE_DIR}=.")
1 change: 0 additions & 1 deletion app/src/main/jni/libiconv
Submodule libiconv deleted from 51aade
2 changes: 1 addition & 1 deletion app/src/main/jni/librime
1 change: 0 additions & 1 deletion app/src/main/jni/librime-charcode
Submodule librime-charcode deleted from c202c8
2 changes: 0 additions & 2 deletions app/src/main/jni/librime_jni/rime_jni.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@
#define MAX_BUFFER_LENGTH 2048

extern void rime_require_module_lua();
extern void rime_require_module_charcode();
extern void rime_require_module_octagram();
extern void rime_require_module_predict();
// librime is compiled as a static library, we have to link modules explicitly
static void declare_librime_module_dependencies() {
rime_require_module_lua();
rime_require_module_charcode();
rime_require_module_octagram();
rime_require_module_predict();
}
Expand Down
Loading