diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-03-20 00:40:44 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-03-20 00:40:44 +0000 |
commit | 4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch) | |
tree | 356496503d52354aa6d9f2d36126302fed5f3a73 /app-i18n/librime | |
parent | fcc5224904648a8e6eb528d7603154160a20022f (diff) |
gentoo resync : 20.03.2022
Diffstat (limited to 'app-i18n/librime')
-rw-r--r-- | app-i18n/librime/Manifest | 11 | ||||
-rw-r--r-- | app-i18n/librime/files/librime-1.5.3-log_files_mode.patch | 14 | ||||
-rw-r--r-- | app-i18n/librime/files/librime-1.6.0-plugins.patch | 247 | ||||
-rw-r--r-- | app-i18n/librime/files/librime-1.6.1-plugins.patch | 247 | ||||
-rw-r--r-- | app-i18n/librime/librime-1.5.3-r2.ebuild | 74 | ||||
-rw-r--r-- | app-i18n/librime/librime-1.6.0-r1.ebuild | 74 | ||||
-rw-r--r-- | app-i18n/librime/librime-1.6.1-r1.ebuild | 74 | ||||
-rw-r--r-- | app-i18n/librime/librime-1.7.3-r1.ebuild | 4 |
8 files changed, 3 insertions, 742 deletions
diff --git a/app-i18n/librime/Manifest b/app-i18n/librime/Manifest index 50548d829d7d..477e841c68ca 100644 --- a/app-i18n/librime/Manifest +++ b/app-i18n/librime/Manifest @@ -1,13 +1,4 @@ -AUX librime-1.5.3-log_files_mode.patch 458 BLAKE2B acd2f59f409b3643807ea845fd08bfcfe730cfedaacb7d70a4b1ba017a299cb95b8d815bbbf53b2c0e3c86c4482a2d71a97fef362a6f0404dd45e96b57f78be7 SHA512 d8b12367916ed1ad5deb2e982437d3e5e04592baa6c1e12f6b78ff99b8cc407f2c9fc6f47c0715054572f6f8a5edafcb6f6da033902175cc4357a07faad04420 AUX librime-1.6.0-boost-1.76.patch 717 BLAKE2B 9abca897e4a3a23ec7ea2355148e34ef93b331b084634b0011815ec0d7d231626ebc0af53c71cd0b76ee3a5de50e1779a79de118433eca399e17ad06026d0eb2 SHA512 f2dad5927e7c0c95a09900581dff04f99d26ebc877ed4cd2c0fc3f226cb072fbe769fe67166976cbb848599a19b9a8ece926b2538ae2df0cb09a4e5b7b83fe11 -AUX librime-1.6.0-plugins.patch 7447 BLAKE2B c2429bedb7eeabfeafeee310e5380ef22f65c3590f70f387376cdb9ea1c9a9a6c072d87bf2174067378104d31c7de6b2f4ea1fd37f8db3a76343e1849fb6d737 SHA512 dc39a5e9d8cb432b232ce82af31994912c24d446a9b0db908c543a605a047434d5afb7fd79aa8a6ea74d0b4431e2af67a48081e3edc338de75a3b2eafc28dbf9 -AUX librime-1.6.1-plugins.patch 7447 BLAKE2B 95f1b8f412e6e12c8c702d2295966831d4c2d06fd75a691460a2cd83b73ab033ae495a6d51ff2c0f5115b366ca33079159f5d9a026165acde7ca9c0e9c936983 SHA512 b32e6d736a0d26cc4dc5b6ac54f51a737e93f52a356e59d54d51523884eca64066a413cd3f9caa2d4db4574d96524c2688810921555ada0018c064afb1827307 -DIST librime-1.5.3.tar.gz 2847083 BLAKE2B 4ffb2c5ddaf52f9c9227fa4ea019ef2965e61139f678798c08ef37dc52b863763651b63ed820caad0de1b06f48ab5c1a7a2682653340d2ae7f5f9eec3cec80b2 SHA512 4d7f6ec43bd5728f59f0b3581bcd8a46128651430b6873017d80659942b8f6aa1a2f25f439ba8fba461fe22acbf701c2da7a786104a2e4852a70a89cdc0452d3 -DIST librime-1.6.0.tar.gz 2856645 BLAKE2B de6d843a5028f6b0308c3432ada7dd00c08a71e73fe799b157fd71a4054c757a00d3b0fdc7743d94d6e87b03f256e822ee29c16c86f96f5d24c7d864266c4f78 SHA512 4aeace0f1628293d4b607483ab976841093a1ff03df8bf63d545715af00254d1f0b1bdcd120795ea688d152287069881e0740372f40e2174a14ae6f53b7f950b -DIST librime-1.6.1.tar.gz 2856751 BLAKE2B c6b01342dcc9e8ee571cb14a36b851a50bf7b191211197421647ab05e6fa64c676f8936920870dcc335d06c635e354fed706832e41192bccd0a17aff02df1a43 SHA512 944361e9459662bb97b97ce9e2651acf0beb368b3769d1b9576cf4e5c2779302cae470fa39f5bc262cabb6a0e8590bcb77d32ffc87d7385b9465869fe7d5bcb3 DIST librime-1.7.3.tar.gz 2859513 BLAKE2B 834622860cdc3038d1b983f476bca70f211dfbc3bc2b565a998163e22688841ee3a0c7f9a64bce285e2f3f5b5a9a802bd5506f17904ccb3291babf80d4748fb5 SHA512 8767d17c3d14a5a1bbb8269fab1627b907de72c288b362fdbc6191223937da21e8b18471b4ae8f83ce5afc0ec5c3ab12fbcb49930eb9969c1764c7390d9ee4b0 -EBUILD librime-1.5.3-r2.ebuild 1601 BLAKE2B d7ab84518a7a37902153c06dd0c981e19e18f2a0ca73794a00a1194149746a93e6ade1e38138dc401b61e6f891da71ebcea709a3c4d2ec8e4fac302121cdb71b SHA512 9d8d92d930c405e070a6b9f62b19ed53e3a62a93ea758544c0016dbc62c23a3eed1e69a7e0c0fa09db642080cfe7c28494b253782c6c33f9becf752e3b5b288d -EBUILD librime-1.6.0-r1.ebuild 1638 BLAKE2B 2155119e681abc5ab398b4f57d58e76af843e6fb17c0da5d5f245fa0c989dc888e6b428498b4018169dcce006398750fc312ce5b13c24130cefb662feae53dfc SHA512 e0992fec585f86ffefd35f010f60d409b00f24b231ffabb6a3b399ef23a1c158e9c4b7ac37e8afde105d6f8e314bd5d107f0f47c074d5ba31f5146ed6ba1879f -EBUILD librime-1.6.1-r1.ebuild 1638 BLAKE2B c6fe9446a4dd687eb08eb5cf1aeee48fa45d07591332abb1bf0cc4950da1052074f62ac3ef6421b4c184a98dfacb0cbde943dbf5568988c286bd9bd64941b624 SHA512 9eb3c343c7ee4594efce9b2d653fd07f37c987fd8e0be36dd745a339262c4212235b83e4637cb4c2c6af2acbd990fd51dc6c359d4aa115311ff7ff1c602112a8 -EBUILD librime-1.7.3-r1.ebuild 1599 BLAKE2B cfa7290710bcf8cad62a6480a27993c849d8ba5f1a29af51cb22d05c69a735609b78d28c7b50af7b7e35b2cf96ff84921577bad948e1ba70bb226f406606814d SHA512 154371aba461ac6e01db7b02dcffd5a86bfa777b4d587c7ce5ed80f3c3869c5a425920f75715c96fa0453eb6f72afbd41fdd16a391e8a270e34268d2d38c648c +EBUILD librime-1.7.3-r1.ebuild 1597 BLAKE2B b2e53762c6758f74b7460c8e7c08db67e24bc3bd049e234acc3f6262d2477554f0f115c1c764ea9811346d02d3476601f80d73a93a6517e5b2c3a573e539d020 SHA512 2242e5ae4a4abe835725378583603fd1267dc5eee8a412617015f0bd6a585b9cb114fc944bc78ab3325f3755cf19d209706a28b25a9928491cef138dd5a5e996 MISC metadata.xml 777 BLAKE2B 1ac91ae089dff08373d0e0c7a4b95e952a9e697c8ea462f08d3894e01ffeace211eaccafe5d9737912418d254c8343e7b999dd02e79eba3feaeef35191d74d5b SHA512 d06cdebe5baa6d639074a739b9e996deb29f6e553d333f3d852dce03b3e4eef44690a610d6d358493bf91836d9d6a6cb471779ba8eada084528416405a0240b2 diff --git a/app-i18n/librime/files/librime-1.5.3-log_files_mode.patch b/app-i18n/librime/files/librime-1.5.3-log_files_mode.patch deleted file mode 100644 index 7a36dea64d24..000000000000 --- a/app-i18n/librime/files/librime-1.5.3-log_files_mode.patch +++ /dev/null @@ -1,14 +0,0 @@ -https://github.com/rime/librime/issues/316 -https://github.com/rime/librime/commit/90839b0b3d47cbfef715ea5f061c7505666ff75d - ---- /src/rime/setup.cc -+++ /src/rime/setup.cc -@@ -35,6 +35,8 @@ - - RIME_API void SetupLogging(const char* app_name) { - #ifdef RIME_ENABLE_LOGGING -+ // Do not allow other users to read/write log files created by current process. -+ FLAGS_logfile_mode = 0600; - google::InitGoogleLogging(app_name); - #endif // RIME_ENABLE_LOGGING - } diff --git a/app-i18n/librime/files/librime-1.6.0-plugins.patch b/app-i18n/librime/files/librime-1.6.0-plugins.patch deleted file mode 100644 index c79072f31cbb..000000000000 --- a/app-i18n/librime/files/librime-1.6.0-plugins.patch +++ /dev/null @@ -1,247 +0,0 @@ -https://github.com/rime/librime/issues/431 - ---- /CMakeLists.txt -+++ /CMakeLists.txt -@@ -11,6 +11,14 @@ - - include(GNUInstallDirs) - -+if(NOT DEFINED BIN_INSTALL_DIR) -+ set(BIN_INSTALL_DIR ${CMAKE_INSTALL_BINDIR}) -+endif() -+ -+if(NOT DEFINED LIB_INSTALL_DIR) -+ set(LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}) -+endif() -+ - option(BUILD_SHARED_LIBS "Build Rime as shared library" ON) - option(BUILD_MERGED_PLUGINS "Merge plugins into one Rime library" ON) - option(BUILD_STATIC "Build with dependencies as static libraries" OFF) -@@ -22,8 +30,11 @@ - option(BOOST_USE_CXX11 "Boost has been built with C++11 support" OFF) - option(BOOST_USE_SIGNALS2 "Boost use signals2 instead of signals" ON) - option(ENABLE_ASAN "Enable Address Sanitizer (Unix Only)" OFF) -+option(INSTALL_PRIVATE_HEADERS "Install private headers (usually needed for externally built Rime plugins)" OFF) -+option(ENABLE_EXTERNAL_PLUGINS "Enable loading of externally built Rime plugins (from directory set by RIME_PLUGINS_DIR variable)" OFF) - --set(rime_data_dir "/share/rime-data" CACHE STRING "Target directory for Rime data") -+set(RIME_DATA_DIR "share/rime-data" CACHE STRING "Target directory for Rime data") -+set(RIME_PLUGINS_DIR "${LIB_INSTALL_DIR}/rime-plugins" CACHE STRING "Target directory for externally built Rime plugins") - - if(WIN32) - set(ext ".exe") -@@ -61,7 +72,7 @@ - set(BOOST_COMPONENTS filesystem regex system) - - if(BOOST_USE_SIGNALS2) -- add_definitions("-DBOOST_SIGNALS2") -+ set(RIME_BOOST_SIGNALS2 1) - else() - set(BOOST_COMPONENTS ${BOOST_COMPONENTS} signals) - endif() -@@ -89,7 +100,7 @@ - add_definitions(-DGOOGLE_GLOG_DLL_DECL=) - endif() - -- add_definitions(-DRIME_ENABLE_LOGGING) -+ set(RIME_ENABLE_LOGGING 1) - - endif() - -@@ -134,6 +145,11 @@ - message(WARNING "X11/keysym.h not found.") - endif() - -+configure_file( -+ "${PROJECT_SOURCE_DIR}/src/rime/build_config.h.in" -+ "${PROJECT_BINARY_DIR}/src/rime/build_config.h") -+ -+include_directories(${PROJECT_BINARY_DIR}/src) - include_directories(${PROJECT_SOURCE_DIR}/src) - include_directories(${PROJECT_SOURCE_DIR}/thirdparty/include) - link_directories(${PROJECT_SOURCE_DIR}/thirdparty/lib) -@@ -154,14 +170,6 @@ - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") - endif() - --if(NOT DEFINED LIB_INSTALL_DIR) -- set(LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}) --endif() -- --if(NOT DEFINED BIN_INSTALL_DIR) -- set(BIN_INSTALL_DIR ${CMAKE_INSTALL_BINDIR}) --endif() -- - # uninstall target - configure_file( - "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in" -@@ -175,7 +183,8 @@ - set(exec_prefix "${CMAKE_INSTALL_PREFIX}") - set(bindir "${exec_prefix}/${BIN_INSTALL_DIR}") - set(libdir "${exec_prefix}/${LIB_INSTALL_DIR}") -- set(pkgdatadir "${prefix}${rime_data_dir}") -+ set(pkgdatadir "${prefix}/${RIME_DATA_DIR}") -+ set(pluginsdir "${exec_prefix}/${RIME_PLUGINS_DIR}") - set(includedir "${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") - configure_file( - ${PROJECT_SOURCE_DIR}/rime.pc.in -@@ -189,11 +198,19 @@ - - file(GLOB rime_public_header_files ${PROJECT_SOURCE_DIR}/src/*.h) - install(FILES ${rime_public_header_files} DESTINATION include) -+if(INSTALL_PRIVATE_HEADERS) -+ file(GLOB rime_private_header_files ${PROJECT_SOURCE_DIR}/src/rime/*.h ${PROJECT_BINARY_DIR}/src/rime/*.h) -+ install(FILES ${rime_private_header_files} DESTINATION include/rime) -+ foreach(rime_private_header_files_dir algo config dict gear lever) -+ file(GLOB rime_private_header_files ${PROJECT_SOURCE_DIR}/src/rime/${rime_private_header_files_dir}/*.h) -+ install(FILES ${rime_private_header_files} DESTINATION include/rime/${rime_private_header_files_dir}) -+ endforeach() -+endif() - - if(BUILD_DATA) - file(GLOB rime_preset_data_files ${PROJECT_SOURCE_DIR}/data/preset/*.yaml) - install(FILES ${rime_preset_data_files} -- DESTINATION ${CMAKE_INSTALL_PREFIX}${rime_data_dir}) -+ DESTINATION ${CMAKE_INSTALL_PREFIX}/${RIME_DATA_DIR}) - endif() - - if(BUILD_SHARED_LIBS) -@@ -223,6 +240,11 @@ - set(rime_plugins_library rime-plugins) - endif() - -+add_definitions("-DRIME_PLUGINS_DIR=\"${CMAKE_INSTALL_PREFIX}/${RIME_PLUGINS_DIR}\"") -+if(ENABLE_EXTERNAL_PLUGINS) -+ add_definitions(-DRIME_ENABLE_EXTERNAL_PLUGINS) -+endif() -+ - add_subdirectory(src) - - if(BUILD_SHARED_LIBS) ---- /rime.pc.in -+++ /rime.pc.in -@@ -2,6 +2,8 @@ - exec_prefix=@exec_prefix@ - libdir=@libdir@ - includedir=@includedir@ -+pkgdatadir=@pkgdatadir@ -+pluginsdir=@pluginsdir@ - - Name: Rime - Description: Rime Input Method Engine ---- /src/CMakeLists.txt -+++ /src/CMakeLists.txt -@@ -36,6 +36,9 @@ - if(Gflags_FOUND) - set(rime_optional_deps ${rime_optional_deps} ${Gflags_LIBRARY}) - endif() -+if(ENABLE_EXTERNAL_PLUGINS) -+ set(rime_optional_deps ${rime_optional_deps} dl) -+endif() - - set(rime_core_deps - ${Boost_LIBRARIES} ---- /src/rime/build_config.h.in -+++ /src/rime/build_config.h.in -@@ -0,0 +1,11 @@ -+// -+// Copyright RIME Developers -+// Distributed under the BSD License -+// -+#ifndef RIME_BUILD_CONFIG_H_ -+#define RIME_BUILD_CONFIG_H_ -+ -+#cmakedefine RIME_BOOST_SIGNALS2 -+#cmakedefine RIME_ENABLE_LOGGING -+ -+#endif // RIME_BUILD_CONFIG_H_ ---- /src/rime/common.h -+++ /src/rime/common.h -@@ -7,6 +7,8 @@ - #ifndef RIME_COMMON_H_ - #define RIME_COMMON_H_ - -+#include <rime/build_config.h> -+ - #include <functional> - #include <list> - #include <map> -@@ -20,7 +22,7 @@ - #include <vector> - #include <boost/optional.hpp> - #define BOOST_BIND_NO_PLACEHOLDERS --#ifdef BOOST_SIGNALS2 -+#ifdef RIME_BOOST_SIGNALS2 - #include <boost/signals2/connection.hpp> - #include <boost/signals2/signal.hpp> - #else -@@ -79,7 +81,7 @@ - return std::make_shared<T>(std::forward<Args>(args)...); - } - --#ifdef BOOST_SIGNALS2 -+#ifdef RIME_BOOST_SIGNALS2 - using boost::signals2::connection; - using boost::signals2::signal; - #else ---- /src/rime/lever/deployment_tasks.cc -+++ /src/rime/lever/deployment_tasks.cc -@@ -4,6 +4,9 @@ - // - // 2011-12-10 GONG Chen <chen.sst@gmail.com> - // -+ -+#include <rime/build_config.h> -+ - #include <algorithm> - #include <boost/algorithm/string.hpp> - #include <boost/filesystem.hpp> ---- /src/rime/setup.cc -+++ /src/rime/setup.cc -@@ -5,6 +5,13 @@ - // 2011-10-02 GONG Chen <chen.sst@gmail.com> - // - -+#include <rime/build_config.h> -+ -+#ifdef RIME_ENABLE_EXTERNAL_PLUGINS -+#include <dlfcn.h> -+#include <glob.h> -+#endif // RIME_ENABLE_EXTERNAL_PLUGINS -+ - #ifdef RIME_ENABLE_LOGGING - #include <glog/logging.h> - #endif // RIME_ENABLE_LOGGING -@@ -33,6 +40,32 @@ - mm.LoadModule(module); - } - } -+ -+#ifdef RIME_ENABLE_EXTERNAL_PLUGINS -+ fs::path plugins_dir = fs::path(RIME_PLUGINS_DIR); -+ fs::path plugins_files = plugins_dir / "*.so"; -+ glob_t glob_buffer; -+ if (glob(plugins_files.string().c_str(), 0, NULL, &glob_buffer) == 0) { -+ for (size_t i = 0; i < glob_buffer.gl_pathc; i++) { -+ fs::path plugin_file(glob_buffer.gl_pathv[i]); -+ fs::path plugin_name = plugin_file.stem(); -+ fs::file_status plugin_file_status = fs::status(plugin_file); -+ if (fs::is_regular_file(plugin_file) && -+ plugin_file_status.permissions() & (fs::owner_exe | fs::group_exe | fs::others_exe)) { -+ void* handle = dlopen(plugin_file.string().c_str(), RTLD_LAZY); -+ if (handle) { -+ if (RimeModule* module = mm.Find(plugin_name.string())) { -+ mm.LoadModule(module); -+ } -+ } -+ else { -+ LOG(ERROR) << "dlopen error: " << dlerror(); -+ } -+ } -+ } -+ globfree(&glob_buffer); -+ } -+#endif - } - - // assume member is a non-null pointer in struct *p. diff --git a/app-i18n/librime/files/librime-1.6.1-plugins.patch b/app-i18n/librime/files/librime-1.6.1-plugins.patch deleted file mode 100644 index 68099d618693..000000000000 --- a/app-i18n/librime/files/librime-1.6.1-plugins.patch +++ /dev/null @@ -1,247 +0,0 @@ -https://github.com/rime/librime/issues/431 - ---- /CMakeLists.txt -+++ /CMakeLists.txt -@@ -11,6 +11,14 @@ - - include(GNUInstallDirs) - -+if(NOT DEFINED BIN_INSTALL_DIR) -+ set(BIN_INSTALL_DIR ${CMAKE_INSTALL_BINDIR}) -+endif() -+ -+if(NOT DEFINED LIB_INSTALL_DIR) -+ set(LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}) -+endif() -+ - option(BUILD_SHARED_LIBS "Build Rime as shared library" ON) - option(BUILD_MERGED_PLUGINS "Merge plugins into one Rime library" ON) - option(BUILD_STATIC "Build with dependencies as static libraries" OFF) -@@ -22,8 +30,11 @@ - option(BOOST_USE_CXX11 "Boost has been built with C++11 support" OFF) - option(BOOST_USE_SIGNALS2 "Boost use signals2 instead of signals" ON) - option(ENABLE_ASAN "Enable Address Sanitizer (Unix Only)" OFF) -+option(INSTALL_PRIVATE_HEADERS "Install private headers (usually needed for externally built Rime plugins)" OFF) -+option(ENABLE_EXTERNAL_PLUGINS "Enable loading of externally built Rime plugins (from directory set by RIME_PLUGINS_DIR variable)" OFF) - --set(rime_data_dir "/share/rime-data" CACHE STRING "Target directory for Rime data") -+set(RIME_DATA_DIR "share/rime-data" CACHE STRING "Target directory for Rime data") -+set(RIME_PLUGINS_DIR "${LIB_INSTALL_DIR}/rime-plugins" CACHE STRING "Target directory for externally built Rime plugins") - - if(WIN32) - set(ext ".exe") -@@ -61,7 +72,7 @@ - set(BOOST_COMPONENTS filesystem regex system) - - if(BOOST_USE_SIGNALS2) -- add_definitions("-DBOOST_SIGNALS2") -+ set(RIME_BOOST_SIGNALS2 1) - else() - set(BOOST_COMPONENTS ${BOOST_COMPONENTS} signals) - endif() -@@ -89,7 +100,7 @@ - add_definitions(-DGOOGLE_GLOG_DLL_DECL=) - endif() - -- add_definitions(-DRIME_ENABLE_LOGGING) -+ set(RIME_ENABLE_LOGGING 1) - - endif() - -@@ -134,6 +145,11 @@ - message(WARNING "X11/keysym.h not found.") - endif() - -+configure_file( -+ "${PROJECT_SOURCE_DIR}/src/rime/build_config.h.in" -+ "${PROJECT_BINARY_DIR}/src/rime/build_config.h") -+ -+include_directories(${PROJECT_BINARY_DIR}/src) - include_directories(${PROJECT_SOURCE_DIR}/src) - include_directories(${PROJECT_SOURCE_DIR}/thirdparty/include) - link_directories(${PROJECT_SOURCE_DIR}/thirdparty/lib) -@@ -154,14 +170,6 @@ - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") - endif() - --if(NOT DEFINED LIB_INSTALL_DIR) -- set(LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}) --endif() -- --if(NOT DEFINED BIN_INSTALL_DIR) -- set(BIN_INSTALL_DIR ${CMAKE_INSTALL_BINDIR}) --endif() -- - # uninstall target - configure_file( - "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in" -@@ -175,7 +183,8 @@ - set(exec_prefix "${CMAKE_INSTALL_PREFIX}") - set(bindir "${exec_prefix}/${BIN_INSTALL_DIR}") - set(libdir "${exec_prefix}/${LIB_INSTALL_DIR}") -- set(pkgdatadir "${prefix}${rime_data_dir}") -+ set(pkgdatadir "${prefix}/${RIME_DATA_DIR}") -+ set(pluginsdir "${exec_prefix}/${RIME_PLUGINS_DIR}") - set(includedir "${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") - configure_file( - ${PROJECT_SOURCE_DIR}/rime.pc.in -@@ -189,11 +198,19 @@ - - file(GLOB rime_public_header_files ${PROJECT_SOURCE_DIR}/src/*.h) - install(FILES ${rime_public_header_files} DESTINATION include) -+if(INSTALL_PRIVATE_HEADERS) -+ file(GLOB rime_private_header_files ${PROJECT_SOURCE_DIR}/src/rime/*.h ${PROJECT_BINARY_DIR}/src/rime/*.h) -+ install(FILES ${rime_private_header_files} DESTINATION include/rime) -+ foreach(rime_private_header_files_dir algo config dict gear lever) -+ file(GLOB rime_private_header_files ${PROJECT_SOURCE_DIR}/src/rime/${rime_private_header_files_dir}/*.h) -+ install(FILES ${rime_private_header_files} DESTINATION include/rime/${rime_private_header_files_dir}) -+ endforeach() -+endif() - - if(BUILD_DATA) - file(GLOB rime_preset_data_files ${PROJECT_SOURCE_DIR}/data/preset/*.yaml) - install(FILES ${rime_preset_data_files} -- DESTINATION ${CMAKE_INSTALL_PREFIX}${rime_data_dir}) -+ DESTINATION ${CMAKE_INSTALL_PREFIX}/${RIME_DATA_DIR}) - endif() - - if(BUILD_SHARED_LIBS) -@@ -223,6 +240,11 @@ - set(rime_plugins_library rime-plugins) - endif() - -+add_definitions("-DRIME_PLUGINS_DIR=\"${CMAKE_INSTALL_PREFIX}/${RIME_PLUGINS_DIR}\"") -+if(ENABLE_EXTERNAL_PLUGINS) -+ add_definitions(-DRIME_ENABLE_EXTERNAL_PLUGINS) -+endif() -+ - add_subdirectory(src) - - if(BUILD_SHARED_LIBS) ---- /rime.pc.in -+++ /rime.pc.in -@@ -2,6 +2,8 @@ - exec_prefix=@exec_prefix@ - libdir=@libdir@ - includedir=@includedir@ -+pkgdatadir=@pkgdatadir@ -+pluginsdir=@pluginsdir@ - - Name: Rime - Description: Rime Input Method Engine ---- /src/CMakeLists.txt -+++ /src/CMakeLists.txt -@@ -36,6 +36,9 @@ - if(Gflags_FOUND) - set(rime_optional_deps ${rime_optional_deps} ${Gflags_LIBRARY}) - endif() -+if(ENABLE_EXTERNAL_PLUGINS) -+ set(rime_optional_deps ${rime_optional_deps} dl) -+endif() - - set(rime_core_deps - ${Boost_LIBRARIES} ---- /src/rime/build_config.h.in -+++ /src/rime/build_config.h.in -@@ -0,0 +1,11 @@ -+// -+// Copyright RIME Developers -+// Distributed under the BSD License -+// -+#ifndef RIME_BUILD_CONFIG_H_ -+#define RIME_BUILD_CONFIG_H_ -+ -+#cmakedefine RIME_BOOST_SIGNALS2 -+#cmakedefine RIME_ENABLE_LOGGING -+ -+#endif // RIME_BUILD_CONFIG_H_ ---- /src/rime/common.h -+++ /src/rime/common.h -@@ -7,6 +7,8 @@ - #ifndef RIME_COMMON_H_ - #define RIME_COMMON_H_ - -+#include <rime/build_config.h> -+ - #include <functional> - #include <list> - #include <map> -@@ -20,7 +22,7 @@ - #include <vector> - #include <boost/optional.hpp> - #define BOOST_BIND_NO_PLACEHOLDERS --#ifdef BOOST_SIGNALS2 -+#ifdef RIME_BOOST_SIGNALS2 - #include <boost/signals2/connection.hpp> - #include <boost/signals2/signal.hpp> - #else -@@ -79,7 +81,7 @@ - return std::make_shared<T>(std::forward<Args>(args)...); - } - --#ifdef BOOST_SIGNALS2 -+#ifdef RIME_BOOST_SIGNALS2 - using boost::signals2::connection; - using boost::signals2::signal; - #else ---- /src/rime/lever/deployment_tasks.cc -+++ /src/rime/lever/deployment_tasks.cc -@@ -4,6 +4,9 @@ - // - // 2011-12-10 GONG Chen <chen.sst@gmail.com> - // -+ -+#include <rime/build_config.h> -+ - #include <algorithm> - #include <boost/algorithm/string.hpp> - #include <boost/filesystem.hpp> ---- /src/rime/setup.cc -+++ /src/rime/setup.cc -@@ -5,6 +5,13 @@ - // 2011-10-02 GONG Chen <chen.sst@gmail.com> - // - -+#include <rime/build_config.h> -+ -+#ifdef RIME_ENABLE_EXTERNAL_PLUGINS -+#include <dlfcn.h> -+#include <glob.h> -+#endif // RIME_ENABLE_EXTERNAL_PLUGINS -+ - #ifdef RIME_ENABLE_LOGGING - #include <glog/logging.h> - #endif // RIME_ENABLE_LOGGING -@@ -36,6 +43,32 @@ - mm.LoadModule(module); - } - } -+ -+#ifdef RIME_ENABLE_EXTERNAL_PLUGINS -+ fs::path plugins_dir = fs::path(RIME_PLUGINS_DIR); -+ fs::path plugins_files = plugins_dir / "*.so"; -+ glob_t glob_buffer; -+ if (glob(plugins_files.string().c_str(), 0, NULL, &glob_buffer) == 0) { -+ for (size_t i = 0; i < glob_buffer.gl_pathc; i++) { -+ fs::path plugin_file(glob_buffer.gl_pathv[i]); -+ fs::path plugin_name = plugin_file.stem(); -+ fs::file_status plugin_file_status = fs::status(plugin_file); -+ if (fs::is_regular_file(plugin_file) && -+ plugin_file_status.permissions() & (fs::owner_exe | fs::group_exe | fs::others_exe)) { -+ void* handle = dlopen(plugin_file.string().c_str(), RTLD_LAZY); -+ if (handle) { -+ if (RimeModule* module = mm.Find(plugin_name.string())) { -+ mm.LoadModule(module); -+ } -+ } -+ else { -+ LOG(ERROR) << "dlopen error: " << dlerror(); -+ } -+ } -+ } -+ globfree(&glob_buffer); -+ } -+#endif - } - - // assume member is a non-null pointer in struct *p. diff --git a/app-i18n/librime/librime-1.5.3-r2.ebuild b/app-i18n/librime/librime-1.5.3-r2.ebuild deleted file mode 100644 index bec00f1025a0..000000000000 --- a/app-i18n/librime/librime-1.5.3-r2.ebuild +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright 2012-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -inherit cmake-utils - -if [[ "${PV}" == "9999" ]]; then - inherit git-r3 - - EGIT_REPO_URI="https://github.com/rime/librime" - EGIT_SUBMODULES=() -fi - -DESCRIPTION="RIME (Rime Input Method Engine) core library" -HOMEPAGE="https://rime.im/ https://github.com/rime/librime" -if [[ "${PV}" == "9999" ]]; then - SRC_URI="" -else - SRC_URI="https://github.com/rime/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" -fi - -LICENSE="BSD" -SLOT="0/1" -KEYWORDS="amd64 arm64 ppc ppc64 x86" -IUSE="debug test" -RESTRICT="!test? ( test )" - -BDEPEND="" -RDEPEND="app-i18n/opencc:0= - >=dev-cpp/glog-0.3.5:0= - dev-cpp/yaml-cpp:0= - dev-libs/boost:0=[nls,threads(+)] - dev-libs/leveldb:0= - dev-libs/marisa:0=" -DEPEND="${RDEPEND} - dev-libs/darts - dev-libs/utfcpp - x11-base/xorg-proto - test? ( dev-cpp/gtest )" - -PATCHES=( - "${FILESDIR}/${P}-log_files_mode.patch" -) - -DOCS=(CHANGELOG.md README.md) - -src_prepare() { - # Use headers of dev-libs/darts, dev-libs/utfcpp and x11-base/xorg-proto. - sed -e "/\${PROJECT_SOURCE_DIR}\/thirdparty/d" -i CMakeLists.txt || die - rm -r thirdparty || die - - cmake-utils_src_prepare -} - -src_configure() { - local -x CXXFLAGS="${CXXFLAGS} -I${ESYSROOT}/usr/include/utf8cpp" - - if use debug; then - CXXFLAGS+=" -DDCHECK_ALWAYS_ON" - else - CXXFLAGS+=" -DNDEBUG" - fi - - local mycmakeargs=( - -DBOOST_USE_CXX11=ON - -DBUILD_TEST=$(usex test ON OFF) - -DCMAKE_DISABLE_FIND_PACKAGE_Gflags=ON - -DCMAKE_DISABLE_FIND_PACKAGE_Iconv=ON - -DLIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)" - ) - - cmake-utils_src_configure -} diff --git a/app-i18n/librime/librime-1.6.0-r1.ebuild b/app-i18n/librime/librime-1.6.0-r1.ebuild deleted file mode 100644 index 77cc61ea01a8..000000000000 --- a/app-i18n/librime/librime-1.6.0-r1.ebuild +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright 2012-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -inherit cmake - -if [[ "${PV}" == "9999" ]]; then - inherit git-r3 - - EGIT_REPO_URI="https://github.com/rime/librime" - EGIT_SUBMODULES=() -fi - -DESCRIPTION="RIME (Rime Input Method Engine) core library" -HOMEPAGE="https://rime.im/ https://github.com/rime/librime" -if [[ "${PV}" == "9999" ]]; then - SRC_URI="" -else - SRC_URI="https://github.com/rime/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" -fi - -LICENSE="BSD" -SLOT="0/1-${PV}" -KEYWORDS="~amd64 ~arm64 ~x86" -IUSE="debug test" -RESTRICT="!test? ( test )" - -BDEPEND="dev-libs/capnproto:0" -RDEPEND="app-i18n/opencc:0= - >=dev-cpp/glog-0.3.5:0= - dev-cpp/yaml-cpp:0= - dev-libs/boost:0=[threads(+)] - dev-libs/capnproto:0= - dev-libs/leveldb:0= - dev-libs/marisa:0=" -DEPEND="${RDEPEND} - dev-libs/darts - dev-libs/utfcpp - x11-base/xorg-proto - test? ( dev-cpp/gtest )" - -DOCS=(CHANGELOG.md README.md) - -src_prepare() { - eapply "${FILESDIR}/${PN}-1.6.0-boost-1.76.patch" - eapply "${FILESDIR}/${PN}-1.6.0-plugins.patch" - - # Use headers of dev-libs/darts, dev-libs/utfcpp and x11-base/xorg-proto. - sed -e "/\${PROJECT_SOURCE_DIR}\/thirdparty/d" -i CMakeLists.txt || die - rm -r thirdparty || die - - cmake_src_prepare -} - -src_configure() { - local -x CXXFLAGS="${CXXFLAGS} -I${ESYSROOT}/usr/include/utf8cpp" - - if use debug; then - CXXFLAGS+=" -DDCHECK_ALWAYS_ON" - else - CXXFLAGS+=" -DNDEBUG" - fi - - local mycmakeargs=( - -DBOOST_USE_CXX11=ON - -DBUILD_TEST=$(usex test ON OFF) - -DCMAKE_DISABLE_FIND_PACKAGE_Gflags=ON - -DENABLE_EXTERNAL_PLUGINS=ON - -DINSTALL_PRIVATE_HEADERS=ON - ) - - cmake_src_configure -} diff --git a/app-i18n/librime/librime-1.6.1-r1.ebuild b/app-i18n/librime/librime-1.6.1-r1.ebuild deleted file mode 100644 index 0f2a5d3dbec4..000000000000 --- a/app-i18n/librime/librime-1.6.1-r1.ebuild +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright 2012-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -inherit cmake - -if [[ "${PV}" == "9999" ]]; then - inherit git-r3 - - EGIT_REPO_URI="https://github.com/rime/librime" - EGIT_SUBMODULES=() -fi - -DESCRIPTION="RIME (Rime Input Method Engine) core library" -HOMEPAGE="https://rime.im/ https://github.com/rime/librime" -if [[ "${PV}" == "9999" ]]; then - SRC_URI="" -else - SRC_URI="https://github.com/rime/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" -fi - -LICENSE="BSD" -SLOT="0/1-${PV}" -KEYWORDS="~amd64 ~arm64 ~x86" -IUSE="debug test" -RESTRICT="!test? ( test )" - -BDEPEND="dev-libs/capnproto:0" -RDEPEND="app-i18n/opencc:0= - >=dev-cpp/glog-0.3.5:0= - dev-cpp/yaml-cpp:0= - dev-libs/boost:0=[threads(+)] - dev-libs/capnproto:0= - dev-libs/leveldb:0= - dev-libs/marisa:0=" -DEPEND="${RDEPEND} - dev-libs/darts - dev-libs/utfcpp - x11-base/xorg-proto - test? ( dev-cpp/gtest )" - -DOCS=(CHANGELOG.md README.md) - -src_prepare() { - eapply "${FILESDIR}/${PN}-1.6.0-boost-1.76.patch" - eapply "${FILESDIR}/${PN}-1.6.1-plugins.patch" - - # Use headers of dev-libs/darts, dev-libs/utfcpp and x11-base/xorg-proto. - sed -e "/\${PROJECT_SOURCE_DIR}\/thirdparty/d" -i CMakeLists.txt || die - rm -r thirdparty || die - - cmake_src_prepare -} - -src_configure() { - local -x CXXFLAGS="${CXXFLAGS} -I${ESYSROOT}/usr/include/utf8cpp" - - if use debug; then - CXXFLAGS+=" -DDCHECK_ALWAYS_ON" - else - CXXFLAGS+=" -DNDEBUG" - fi - - local mycmakeargs=( - -DBOOST_USE_CXX11=ON - -DBUILD_TEST=$(usex test ON OFF) - -DCMAKE_DISABLE_FIND_PACKAGE_Gflags=ON - -DENABLE_EXTERNAL_PLUGINS=ON - -DINSTALL_PRIVATE_HEADERS=ON - ) - - cmake_src_configure -} diff --git a/app-i18n/librime/librime-1.7.3-r1.ebuild b/app-i18n/librime/librime-1.7.3-r1.ebuild index a500978314ad..a33d6624dedd 100644 --- a/app-i18n/librime/librime-1.7.3-r1.ebuild +++ b/app-i18n/librime/librime-1.7.3-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 2012-2021 Gentoo Authors +# Copyright 2012-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="7" @@ -22,7 +22,7 @@ fi LICENSE="BSD" SLOT="0/1-${PV}" -KEYWORDS="amd64 arm64 ~ppc ~ppc64 x86" +KEYWORDS="amd64 arm64 ppc ppc64 x86" IUSE="debug test" RESTRICT="!test? ( test )" |