1 |
commit: f00fefd616073ccaf0eb8b1d309f5fdad59a361d |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 28 13:09:17 2022 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 28 21:12:16 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f00fefd6 |
7 |
|
8 |
app-i18n/librime: Drop 1.5.3-r2, 1.6.0-r1 and 1.6.1-r1 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/793926 |
11 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
12 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
13 |
|
14 |
app-i18n/librime/Manifest | 3 - |
15 |
.../files/librime-1.5.3-log_files_mode.patch | 14 -- |
16 |
app-i18n/librime/files/librime-1.6.0-plugins.patch | 247 --------------------- |
17 |
app-i18n/librime/files/librime-1.6.1-plugins.patch | 247 --------------------- |
18 |
app-i18n/librime/librime-1.5.3-r2.ebuild | 74 ------ |
19 |
app-i18n/librime/librime-1.6.0-r1.ebuild | 74 ------ |
20 |
app-i18n/librime/librime-1.6.1-r1.ebuild | 74 ------ |
21 |
7 files changed, 733 deletions(-) |
22 |
|
23 |
diff --git a/app-i18n/librime/Manifest b/app-i18n/librime/Manifest |
24 |
index f2e2c6fc1359..155c1c2574ff 100644 |
25 |
--- a/app-i18n/librime/Manifest |
26 |
+++ b/app-i18n/librime/Manifest |
27 |
@@ -1,4 +1 @@ |
28 |
-DIST librime-1.5.3.tar.gz 2847083 BLAKE2B 4ffb2c5ddaf52f9c9227fa4ea019ef2965e61139f678798c08ef37dc52b863763651b63ed820caad0de1b06f48ab5c1a7a2682653340d2ae7f5f9eec3cec80b2 SHA512 4d7f6ec43bd5728f59f0b3581bcd8a46128651430b6873017d80659942b8f6aa1a2f25f439ba8fba461fe22acbf701c2da7a786104a2e4852a70a89cdc0452d3 |
29 |
-DIST librime-1.6.0.tar.gz 2856645 BLAKE2B de6d843a5028f6b0308c3432ada7dd00c08a71e73fe799b157fd71a4054c757a00d3b0fdc7743d94d6e87b03f256e822ee29c16c86f96f5d24c7d864266c4f78 SHA512 4aeace0f1628293d4b607483ab976841093a1ff03df8bf63d545715af00254d1f0b1bdcd120795ea688d152287069881e0740372f40e2174a14ae6f53b7f950b |
30 |
-DIST librime-1.6.1.tar.gz 2856751 BLAKE2B c6b01342dcc9e8ee571cb14a36b851a50bf7b191211197421647ab05e6fa64c676f8936920870dcc335d06c635e354fed706832e41192bccd0a17aff02df1a43 SHA512 944361e9459662bb97b97ce9e2651acf0beb368b3769d1b9576cf4e5c2779302cae470fa39f5bc262cabb6a0e8590bcb77d32ffc87d7385b9465869fe7d5bcb3 |
31 |
DIST librime-1.7.3.tar.gz 2859513 BLAKE2B 834622860cdc3038d1b983f476bca70f211dfbc3bc2b565a998163e22688841ee3a0c7f9a64bce285e2f3f5b5a9a802bd5506f17904ccb3291babf80d4748fb5 SHA512 8767d17c3d14a5a1bbb8269fab1627b907de72c288b362fdbc6191223937da21e8b18471b4ae8f83ce5afc0ec5c3ab12fbcb49930eb9969c1764c7390d9ee4b0 |
32 |
|
33 |
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 |
34 |
deleted file mode 100644 |
35 |
index 7a36dea64d24..000000000000 |
36 |
--- a/app-i18n/librime/files/librime-1.5.3-log_files_mode.patch |
37 |
+++ /dev/null |
38 |
@@ -1,14 +0,0 @@ |
39 |
-https://github.com/rime/librime/issues/316 |
40 |
-https://github.com/rime/librime/commit/90839b0b3d47cbfef715ea5f061c7505666ff75d |
41 |
- |
42 |
---- /src/rime/setup.cc |
43 |
-+++ /src/rime/setup.cc |
44 |
-@@ -35,6 +35,8 @@ |
45 |
- |
46 |
- RIME_API void SetupLogging(const char* app_name) { |
47 |
- #ifdef RIME_ENABLE_LOGGING |
48 |
-+ // Do not allow other users to read/write log files created by current process. |
49 |
-+ FLAGS_logfile_mode = 0600; |
50 |
- google::InitGoogleLogging(app_name); |
51 |
- #endif // RIME_ENABLE_LOGGING |
52 |
- } |
53 |
|
54 |
diff --git a/app-i18n/librime/files/librime-1.6.0-plugins.patch b/app-i18n/librime/files/librime-1.6.0-plugins.patch |
55 |
deleted file mode 100644 |
56 |
index c79072f31cbb..000000000000 |
57 |
--- a/app-i18n/librime/files/librime-1.6.0-plugins.patch |
58 |
+++ /dev/null |
59 |
@@ -1,247 +0,0 @@ |
60 |
-https://github.com/rime/librime/issues/431 |
61 |
- |
62 |
---- /CMakeLists.txt |
63 |
-+++ /CMakeLists.txt |
64 |
-@@ -11,6 +11,14 @@ |
65 |
- |
66 |
- include(GNUInstallDirs) |
67 |
- |
68 |
-+if(NOT DEFINED BIN_INSTALL_DIR) |
69 |
-+ set(BIN_INSTALL_DIR ${CMAKE_INSTALL_BINDIR}) |
70 |
-+endif() |
71 |
-+ |
72 |
-+if(NOT DEFINED LIB_INSTALL_DIR) |
73 |
-+ set(LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}) |
74 |
-+endif() |
75 |
-+ |
76 |
- option(BUILD_SHARED_LIBS "Build Rime as shared library" ON) |
77 |
- option(BUILD_MERGED_PLUGINS "Merge plugins into one Rime library" ON) |
78 |
- option(BUILD_STATIC "Build with dependencies as static libraries" OFF) |
79 |
-@@ -22,8 +30,11 @@ |
80 |
- option(BOOST_USE_CXX11 "Boost has been built with C++11 support" OFF) |
81 |
- option(BOOST_USE_SIGNALS2 "Boost use signals2 instead of signals" ON) |
82 |
- option(ENABLE_ASAN "Enable Address Sanitizer (Unix Only)" OFF) |
83 |
-+option(INSTALL_PRIVATE_HEADERS "Install private headers (usually needed for externally built Rime plugins)" OFF) |
84 |
-+option(ENABLE_EXTERNAL_PLUGINS "Enable loading of externally built Rime plugins (from directory set by RIME_PLUGINS_DIR variable)" OFF) |
85 |
- |
86 |
--set(rime_data_dir "/share/rime-data" CACHE STRING "Target directory for Rime data") |
87 |
-+set(RIME_DATA_DIR "share/rime-data" CACHE STRING "Target directory for Rime data") |
88 |
-+set(RIME_PLUGINS_DIR "${LIB_INSTALL_DIR}/rime-plugins" CACHE STRING "Target directory for externally built Rime plugins") |
89 |
- |
90 |
- if(WIN32) |
91 |
- set(ext ".exe") |
92 |
-@@ -61,7 +72,7 @@ |
93 |
- set(BOOST_COMPONENTS filesystem regex system) |
94 |
- |
95 |
- if(BOOST_USE_SIGNALS2) |
96 |
-- add_definitions("-DBOOST_SIGNALS2") |
97 |
-+ set(RIME_BOOST_SIGNALS2 1) |
98 |
- else() |
99 |
- set(BOOST_COMPONENTS ${BOOST_COMPONENTS} signals) |
100 |
- endif() |
101 |
-@@ -89,7 +100,7 @@ |
102 |
- add_definitions(-DGOOGLE_GLOG_DLL_DECL=) |
103 |
- endif() |
104 |
- |
105 |
-- add_definitions(-DRIME_ENABLE_LOGGING) |
106 |
-+ set(RIME_ENABLE_LOGGING 1) |
107 |
- |
108 |
- endif() |
109 |
- |
110 |
-@@ -134,6 +145,11 @@ |
111 |
- message(WARNING "X11/keysym.h not found.") |
112 |
- endif() |
113 |
- |
114 |
-+configure_file( |
115 |
-+ "${PROJECT_SOURCE_DIR}/src/rime/build_config.h.in" |
116 |
-+ "${PROJECT_BINARY_DIR}/src/rime/build_config.h") |
117 |
-+ |
118 |
-+include_directories(${PROJECT_BINARY_DIR}/src) |
119 |
- include_directories(${PROJECT_SOURCE_DIR}/src) |
120 |
- include_directories(${PROJECT_SOURCE_DIR}/thirdparty/include) |
121 |
- link_directories(${PROJECT_SOURCE_DIR}/thirdparty/lib) |
122 |
-@@ -154,14 +170,6 @@ |
123 |
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") |
124 |
- endif() |
125 |
- |
126 |
--if(NOT DEFINED LIB_INSTALL_DIR) |
127 |
-- set(LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}) |
128 |
--endif() |
129 |
-- |
130 |
--if(NOT DEFINED BIN_INSTALL_DIR) |
131 |
-- set(BIN_INSTALL_DIR ${CMAKE_INSTALL_BINDIR}) |
132 |
--endif() |
133 |
-- |
134 |
- # uninstall target |
135 |
- configure_file( |
136 |
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in" |
137 |
-@@ -175,7 +183,8 @@ |
138 |
- set(exec_prefix "${CMAKE_INSTALL_PREFIX}") |
139 |
- set(bindir "${exec_prefix}/${BIN_INSTALL_DIR}") |
140 |
- set(libdir "${exec_prefix}/${LIB_INSTALL_DIR}") |
141 |
-- set(pkgdatadir "${prefix}${rime_data_dir}") |
142 |
-+ set(pkgdatadir "${prefix}/${RIME_DATA_DIR}") |
143 |
-+ set(pluginsdir "${exec_prefix}/${RIME_PLUGINS_DIR}") |
144 |
- set(includedir "${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") |
145 |
- configure_file( |
146 |
- ${PROJECT_SOURCE_DIR}/rime.pc.in |
147 |
-@@ -189,11 +198,19 @@ |
148 |
- |
149 |
- file(GLOB rime_public_header_files ${PROJECT_SOURCE_DIR}/src/*.h) |
150 |
- install(FILES ${rime_public_header_files} DESTINATION include) |
151 |
-+if(INSTALL_PRIVATE_HEADERS) |
152 |
-+ file(GLOB rime_private_header_files ${PROJECT_SOURCE_DIR}/src/rime/*.h ${PROJECT_BINARY_DIR}/src/rime/*.h) |
153 |
-+ install(FILES ${rime_private_header_files} DESTINATION include/rime) |
154 |
-+ foreach(rime_private_header_files_dir algo config dict gear lever) |
155 |
-+ file(GLOB rime_private_header_files ${PROJECT_SOURCE_DIR}/src/rime/${rime_private_header_files_dir}/*.h) |
156 |
-+ install(FILES ${rime_private_header_files} DESTINATION include/rime/${rime_private_header_files_dir}) |
157 |
-+ endforeach() |
158 |
-+endif() |
159 |
- |
160 |
- if(BUILD_DATA) |
161 |
- file(GLOB rime_preset_data_files ${PROJECT_SOURCE_DIR}/data/preset/*.yaml) |
162 |
- install(FILES ${rime_preset_data_files} |
163 |
-- DESTINATION ${CMAKE_INSTALL_PREFIX}${rime_data_dir}) |
164 |
-+ DESTINATION ${CMAKE_INSTALL_PREFIX}/${RIME_DATA_DIR}) |
165 |
- endif() |
166 |
- |
167 |
- if(BUILD_SHARED_LIBS) |
168 |
-@@ -223,6 +240,11 @@ |
169 |
- set(rime_plugins_library rime-plugins) |
170 |
- endif() |
171 |
- |
172 |
-+add_definitions("-DRIME_PLUGINS_DIR=\"${CMAKE_INSTALL_PREFIX}/${RIME_PLUGINS_DIR}\"") |
173 |
-+if(ENABLE_EXTERNAL_PLUGINS) |
174 |
-+ add_definitions(-DRIME_ENABLE_EXTERNAL_PLUGINS) |
175 |
-+endif() |
176 |
-+ |
177 |
- add_subdirectory(src) |
178 |
- |
179 |
- if(BUILD_SHARED_LIBS) |
180 |
---- /rime.pc.in |
181 |
-+++ /rime.pc.in |
182 |
-@@ -2,6 +2,8 @@ |
183 |
- exec_prefix=@exec_prefix@ |
184 |
- libdir=@libdir@ |
185 |
- includedir=@includedir@ |
186 |
-+pkgdatadir=@pkgdatadir@ |
187 |
-+pluginsdir=@pluginsdir@ |
188 |
- |
189 |
- Name: Rime |
190 |
- Description: Rime Input Method Engine |
191 |
---- /src/CMakeLists.txt |
192 |
-+++ /src/CMakeLists.txt |
193 |
-@@ -36,6 +36,9 @@ |
194 |
- if(Gflags_FOUND) |
195 |
- set(rime_optional_deps ${rime_optional_deps} ${Gflags_LIBRARY}) |
196 |
- endif() |
197 |
-+if(ENABLE_EXTERNAL_PLUGINS) |
198 |
-+ set(rime_optional_deps ${rime_optional_deps} dl) |
199 |
-+endif() |
200 |
- |
201 |
- set(rime_core_deps |
202 |
- ${Boost_LIBRARIES} |
203 |
---- /src/rime/build_config.h.in |
204 |
-+++ /src/rime/build_config.h.in |
205 |
-@@ -0,0 +1,11 @@ |
206 |
-+// |
207 |
-+// Copyright RIME Developers |
208 |
-+// Distributed under the BSD License |
209 |
-+// |
210 |
-+#ifndef RIME_BUILD_CONFIG_H_ |
211 |
-+#define RIME_BUILD_CONFIG_H_ |
212 |
-+ |
213 |
-+#cmakedefine RIME_BOOST_SIGNALS2 |
214 |
-+#cmakedefine RIME_ENABLE_LOGGING |
215 |
-+ |
216 |
-+#endif // RIME_BUILD_CONFIG_H_ |
217 |
---- /src/rime/common.h |
218 |
-+++ /src/rime/common.h |
219 |
-@@ -7,6 +7,8 @@ |
220 |
- #ifndef RIME_COMMON_H_ |
221 |
- #define RIME_COMMON_H_ |
222 |
- |
223 |
-+#include <rime/build_config.h> |
224 |
-+ |
225 |
- #include <functional> |
226 |
- #include <list> |
227 |
- #include <map> |
228 |
-@@ -20,7 +22,7 @@ |
229 |
- #include <vector> |
230 |
- #include <boost/optional.hpp> |
231 |
- #define BOOST_BIND_NO_PLACEHOLDERS |
232 |
--#ifdef BOOST_SIGNALS2 |
233 |
-+#ifdef RIME_BOOST_SIGNALS2 |
234 |
- #include <boost/signals2/connection.hpp> |
235 |
- #include <boost/signals2/signal.hpp> |
236 |
- #else |
237 |
-@@ -79,7 +81,7 @@ |
238 |
- return std::make_shared<T>(std::forward<Args>(args)...); |
239 |
- } |
240 |
- |
241 |
--#ifdef BOOST_SIGNALS2 |
242 |
-+#ifdef RIME_BOOST_SIGNALS2 |
243 |
- using boost::signals2::connection; |
244 |
- using boost::signals2::signal; |
245 |
- #else |
246 |
---- /src/rime/lever/deployment_tasks.cc |
247 |
-+++ /src/rime/lever/deployment_tasks.cc |
248 |
-@@ -4,6 +4,9 @@ |
249 |
- // |
250 |
- // 2011-12-10 GONG Chen <chen.sst@×××××.com> |
251 |
- // |
252 |
-+ |
253 |
-+#include <rime/build_config.h> |
254 |
-+ |
255 |
- #include <algorithm> |
256 |
- #include <boost/algorithm/string.hpp> |
257 |
- #include <boost/filesystem.hpp> |
258 |
---- /src/rime/setup.cc |
259 |
-+++ /src/rime/setup.cc |
260 |
-@@ -5,6 +5,13 @@ |
261 |
- // 2011-10-02 GONG Chen <chen.sst@×××××.com> |
262 |
- // |
263 |
- |
264 |
-+#include <rime/build_config.h> |
265 |
-+ |
266 |
-+#ifdef RIME_ENABLE_EXTERNAL_PLUGINS |
267 |
-+#include <dlfcn.h> |
268 |
-+#include <glob.h> |
269 |
-+#endif // RIME_ENABLE_EXTERNAL_PLUGINS |
270 |
-+ |
271 |
- #ifdef RIME_ENABLE_LOGGING |
272 |
- #include <glog/logging.h> |
273 |
- #endif // RIME_ENABLE_LOGGING |
274 |
-@@ -33,6 +40,32 @@ |
275 |
- mm.LoadModule(module); |
276 |
- } |
277 |
- } |
278 |
-+ |
279 |
-+#ifdef RIME_ENABLE_EXTERNAL_PLUGINS |
280 |
-+ fs::path plugins_dir = fs::path(RIME_PLUGINS_DIR); |
281 |
-+ fs::path plugins_files = plugins_dir / "*.so"; |
282 |
-+ glob_t glob_buffer; |
283 |
-+ if (glob(plugins_files.string().c_str(), 0, NULL, &glob_buffer) == 0) { |
284 |
-+ for (size_t i = 0; i < glob_buffer.gl_pathc; i++) { |
285 |
-+ fs::path plugin_file(glob_buffer.gl_pathv[i]); |
286 |
-+ fs::path plugin_name = plugin_file.stem(); |
287 |
-+ fs::file_status plugin_file_status = fs::status(plugin_file); |
288 |
-+ if (fs::is_regular_file(plugin_file) && |
289 |
-+ plugin_file_status.permissions() & (fs::owner_exe | fs::group_exe | fs::others_exe)) { |
290 |
-+ void* handle = dlopen(plugin_file.string().c_str(), RTLD_LAZY); |
291 |
-+ if (handle) { |
292 |
-+ if (RimeModule* module = mm.Find(plugin_name.string())) { |
293 |
-+ mm.LoadModule(module); |
294 |
-+ } |
295 |
-+ } |
296 |
-+ else { |
297 |
-+ LOG(ERROR) << "dlopen error: " << dlerror(); |
298 |
-+ } |
299 |
-+ } |
300 |
-+ } |
301 |
-+ globfree(&glob_buffer); |
302 |
-+ } |
303 |
-+#endif |
304 |
- } |
305 |
- |
306 |
- // assume member is a non-null pointer in struct *p. |
307 |
|
308 |
diff --git a/app-i18n/librime/files/librime-1.6.1-plugins.patch b/app-i18n/librime/files/librime-1.6.1-plugins.patch |
309 |
deleted file mode 100644 |
310 |
index 68099d618693..000000000000 |
311 |
--- a/app-i18n/librime/files/librime-1.6.1-plugins.patch |
312 |
+++ /dev/null |
313 |
@@ -1,247 +0,0 @@ |
314 |
-https://github.com/rime/librime/issues/431 |
315 |
- |
316 |
---- /CMakeLists.txt |
317 |
-+++ /CMakeLists.txt |
318 |
-@@ -11,6 +11,14 @@ |
319 |
- |
320 |
- include(GNUInstallDirs) |
321 |
- |
322 |
-+if(NOT DEFINED BIN_INSTALL_DIR) |
323 |
-+ set(BIN_INSTALL_DIR ${CMAKE_INSTALL_BINDIR}) |
324 |
-+endif() |
325 |
-+ |
326 |
-+if(NOT DEFINED LIB_INSTALL_DIR) |
327 |
-+ set(LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}) |
328 |
-+endif() |
329 |
-+ |
330 |
- option(BUILD_SHARED_LIBS "Build Rime as shared library" ON) |
331 |
- option(BUILD_MERGED_PLUGINS "Merge plugins into one Rime library" ON) |
332 |
- option(BUILD_STATIC "Build with dependencies as static libraries" OFF) |
333 |
-@@ -22,8 +30,11 @@ |
334 |
- option(BOOST_USE_CXX11 "Boost has been built with C++11 support" OFF) |
335 |
- option(BOOST_USE_SIGNALS2 "Boost use signals2 instead of signals" ON) |
336 |
- option(ENABLE_ASAN "Enable Address Sanitizer (Unix Only)" OFF) |
337 |
-+option(INSTALL_PRIVATE_HEADERS "Install private headers (usually needed for externally built Rime plugins)" OFF) |
338 |
-+option(ENABLE_EXTERNAL_PLUGINS "Enable loading of externally built Rime plugins (from directory set by RIME_PLUGINS_DIR variable)" OFF) |
339 |
- |
340 |
--set(rime_data_dir "/share/rime-data" CACHE STRING "Target directory for Rime data") |
341 |
-+set(RIME_DATA_DIR "share/rime-data" CACHE STRING "Target directory for Rime data") |
342 |
-+set(RIME_PLUGINS_DIR "${LIB_INSTALL_DIR}/rime-plugins" CACHE STRING "Target directory for externally built Rime plugins") |
343 |
- |
344 |
- if(WIN32) |
345 |
- set(ext ".exe") |
346 |
-@@ -61,7 +72,7 @@ |
347 |
- set(BOOST_COMPONENTS filesystem regex system) |
348 |
- |
349 |
- if(BOOST_USE_SIGNALS2) |
350 |
-- add_definitions("-DBOOST_SIGNALS2") |
351 |
-+ set(RIME_BOOST_SIGNALS2 1) |
352 |
- else() |
353 |
- set(BOOST_COMPONENTS ${BOOST_COMPONENTS} signals) |
354 |
- endif() |
355 |
-@@ -89,7 +100,7 @@ |
356 |
- add_definitions(-DGOOGLE_GLOG_DLL_DECL=) |
357 |
- endif() |
358 |
- |
359 |
-- add_definitions(-DRIME_ENABLE_LOGGING) |
360 |
-+ set(RIME_ENABLE_LOGGING 1) |
361 |
- |
362 |
- endif() |
363 |
- |
364 |
-@@ -134,6 +145,11 @@ |
365 |
- message(WARNING "X11/keysym.h not found.") |
366 |
- endif() |
367 |
- |
368 |
-+configure_file( |
369 |
-+ "${PROJECT_SOURCE_DIR}/src/rime/build_config.h.in" |
370 |
-+ "${PROJECT_BINARY_DIR}/src/rime/build_config.h") |
371 |
-+ |
372 |
-+include_directories(${PROJECT_BINARY_DIR}/src) |
373 |
- include_directories(${PROJECT_SOURCE_DIR}/src) |
374 |
- include_directories(${PROJECT_SOURCE_DIR}/thirdparty/include) |
375 |
- link_directories(${PROJECT_SOURCE_DIR}/thirdparty/lib) |
376 |
-@@ -154,14 +170,6 @@ |
377 |
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") |
378 |
- endif() |
379 |
- |
380 |
--if(NOT DEFINED LIB_INSTALL_DIR) |
381 |
-- set(LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}) |
382 |
--endif() |
383 |
-- |
384 |
--if(NOT DEFINED BIN_INSTALL_DIR) |
385 |
-- set(BIN_INSTALL_DIR ${CMAKE_INSTALL_BINDIR}) |
386 |
--endif() |
387 |
-- |
388 |
- # uninstall target |
389 |
- configure_file( |
390 |
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in" |
391 |
-@@ -175,7 +183,8 @@ |
392 |
- set(exec_prefix "${CMAKE_INSTALL_PREFIX}") |
393 |
- set(bindir "${exec_prefix}/${BIN_INSTALL_DIR}") |
394 |
- set(libdir "${exec_prefix}/${LIB_INSTALL_DIR}") |
395 |
-- set(pkgdatadir "${prefix}${rime_data_dir}") |
396 |
-+ set(pkgdatadir "${prefix}/${RIME_DATA_DIR}") |
397 |
-+ set(pluginsdir "${exec_prefix}/${RIME_PLUGINS_DIR}") |
398 |
- set(includedir "${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") |
399 |
- configure_file( |
400 |
- ${PROJECT_SOURCE_DIR}/rime.pc.in |
401 |
-@@ -189,11 +198,19 @@ |
402 |
- |
403 |
- file(GLOB rime_public_header_files ${PROJECT_SOURCE_DIR}/src/*.h) |
404 |
- install(FILES ${rime_public_header_files} DESTINATION include) |
405 |
-+if(INSTALL_PRIVATE_HEADERS) |
406 |
-+ file(GLOB rime_private_header_files ${PROJECT_SOURCE_DIR}/src/rime/*.h ${PROJECT_BINARY_DIR}/src/rime/*.h) |
407 |
-+ install(FILES ${rime_private_header_files} DESTINATION include/rime) |
408 |
-+ foreach(rime_private_header_files_dir algo config dict gear lever) |
409 |
-+ file(GLOB rime_private_header_files ${PROJECT_SOURCE_DIR}/src/rime/${rime_private_header_files_dir}/*.h) |
410 |
-+ install(FILES ${rime_private_header_files} DESTINATION include/rime/${rime_private_header_files_dir}) |
411 |
-+ endforeach() |
412 |
-+endif() |
413 |
- |
414 |
- if(BUILD_DATA) |
415 |
- file(GLOB rime_preset_data_files ${PROJECT_SOURCE_DIR}/data/preset/*.yaml) |
416 |
- install(FILES ${rime_preset_data_files} |
417 |
-- DESTINATION ${CMAKE_INSTALL_PREFIX}${rime_data_dir}) |
418 |
-+ DESTINATION ${CMAKE_INSTALL_PREFIX}/${RIME_DATA_DIR}) |
419 |
- endif() |
420 |
- |
421 |
- if(BUILD_SHARED_LIBS) |
422 |
-@@ -223,6 +240,11 @@ |
423 |
- set(rime_plugins_library rime-plugins) |
424 |
- endif() |
425 |
- |
426 |
-+add_definitions("-DRIME_PLUGINS_DIR=\"${CMAKE_INSTALL_PREFIX}/${RIME_PLUGINS_DIR}\"") |
427 |
-+if(ENABLE_EXTERNAL_PLUGINS) |
428 |
-+ add_definitions(-DRIME_ENABLE_EXTERNAL_PLUGINS) |
429 |
-+endif() |
430 |
-+ |
431 |
- add_subdirectory(src) |
432 |
- |
433 |
- if(BUILD_SHARED_LIBS) |
434 |
---- /rime.pc.in |
435 |
-+++ /rime.pc.in |
436 |
-@@ -2,6 +2,8 @@ |
437 |
- exec_prefix=@exec_prefix@ |
438 |
- libdir=@libdir@ |
439 |
- includedir=@includedir@ |
440 |
-+pkgdatadir=@pkgdatadir@ |
441 |
-+pluginsdir=@pluginsdir@ |
442 |
- |
443 |
- Name: Rime |
444 |
- Description: Rime Input Method Engine |
445 |
---- /src/CMakeLists.txt |
446 |
-+++ /src/CMakeLists.txt |
447 |
-@@ -36,6 +36,9 @@ |
448 |
- if(Gflags_FOUND) |
449 |
- set(rime_optional_deps ${rime_optional_deps} ${Gflags_LIBRARY}) |
450 |
- endif() |
451 |
-+if(ENABLE_EXTERNAL_PLUGINS) |
452 |
-+ set(rime_optional_deps ${rime_optional_deps} dl) |
453 |
-+endif() |
454 |
- |
455 |
- set(rime_core_deps |
456 |
- ${Boost_LIBRARIES} |
457 |
---- /src/rime/build_config.h.in |
458 |
-+++ /src/rime/build_config.h.in |
459 |
-@@ -0,0 +1,11 @@ |
460 |
-+// |
461 |
-+// Copyright RIME Developers |
462 |
-+// Distributed under the BSD License |
463 |
-+// |
464 |
-+#ifndef RIME_BUILD_CONFIG_H_ |
465 |
-+#define RIME_BUILD_CONFIG_H_ |
466 |
-+ |
467 |
-+#cmakedefine RIME_BOOST_SIGNALS2 |
468 |
-+#cmakedefine RIME_ENABLE_LOGGING |
469 |
-+ |
470 |
-+#endif // RIME_BUILD_CONFIG_H_ |
471 |
---- /src/rime/common.h |
472 |
-+++ /src/rime/common.h |
473 |
-@@ -7,6 +7,8 @@ |
474 |
- #ifndef RIME_COMMON_H_ |
475 |
- #define RIME_COMMON_H_ |
476 |
- |
477 |
-+#include <rime/build_config.h> |
478 |
-+ |
479 |
- #include <functional> |
480 |
- #include <list> |
481 |
- #include <map> |
482 |
-@@ -20,7 +22,7 @@ |
483 |
- #include <vector> |
484 |
- #include <boost/optional.hpp> |
485 |
- #define BOOST_BIND_NO_PLACEHOLDERS |
486 |
--#ifdef BOOST_SIGNALS2 |
487 |
-+#ifdef RIME_BOOST_SIGNALS2 |
488 |
- #include <boost/signals2/connection.hpp> |
489 |
- #include <boost/signals2/signal.hpp> |
490 |
- #else |
491 |
-@@ -79,7 +81,7 @@ |
492 |
- return std::make_shared<T>(std::forward<Args>(args)...); |
493 |
- } |
494 |
- |
495 |
--#ifdef BOOST_SIGNALS2 |
496 |
-+#ifdef RIME_BOOST_SIGNALS2 |
497 |
- using boost::signals2::connection; |
498 |
- using boost::signals2::signal; |
499 |
- #else |
500 |
---- /src/rime/lever/deployment_tasks.cc |
501 |
-+++ /src/rime/lever/deployment_tasks.cc |
502 |
-@@ -4,6 +4,9 @@ |
503 |
- // |
504 |
- // 2011-12-10 GONG Chen <chen.sst@×××××.com> |
505 |
- // |
506 |
-+ |
507 |
-+#include <rime/build_config.h> |
508 |
-+ |
509 |
- #include <algorithm> |
510 |
- #include <boost/algorithm/string.hpp> |
511 |
- #include <boost/filesystem.hpp> |
512 |
---- /src/rime/setup.cc |
513 |
-+++ /src/rime/setup.cc |
514 |
-@@ -5,6 +5,13 @@ |
515 |
- // 2011-10-02 GONG Chen <chen.sst@×××××.com> |
516 |
- // |
517 |
- |
518 |
-+#include <rime/build_config.h> |
519 |
-+ |
520 |
-+#ifdef RIME_ENABLE_EXTERNAL_PLUGINS |
521 |
-+#include <dlfcn.h> |
522 |
-+#include <glob.h> |
523 |
-+#endif // RIME_ENABLE_EXTERNAL_PLUGINS |
524 |
-+ |
525 |
- #ifdef RIME_ENABLE_LOGGING |
526 |
- #include <glog/logging.h> |
527 |
- #endif // RIME_ENABLE_LOGGING |
528 |
-@@ -36,6 +43,32 @@ |
529 |
- mm.LoadModule(module); |
530 |
- } |
531 |
- } |
532 |
-+ |
533 |
-+#ifdef RIME_ENABLE_EXTERNAL_PLUGINS |
534 |
-+ fs::path plugins_dir = fs::path(RIME_PLUGINS_DIR); |
535 |
-+ fs::path plugins_files = plugins_dir / "*.so"; |
536 |
-+ glob_t glob_buffer; |
537 |
-+ if (glob(plugins_files.string().c_str(), 0, NULL, &glob_buffer) == 0) { |
538 |
-+ for (size_t i = 0; i < glob_buffer.gl_pathc; i++) { |
539 |
-+ fs::path plugin_file(glob_buffer.gl_pathv[i]); |
540 |
-+ fs::path plugin_name = plugin_file.stem(); |
541 |
-+ fs::file_status plugin_file_status = fs::status(plugin_file); |
542 |
-+ if (fs::is_regular_file(plugin_file) && |
543 |
-+ plugin_file_status.permissions() & (fs::owner_exe | fs::group_exe | fs::others_exe)) { |
544 |
-+ void* handle = dlopen(plugin_file.string().c_str(), RTLD_LAZY); |
545 |
-+ if (handle) { |
546 |
-+ if (RimeModule* module = mm.Find(plugin_name.string())) { |
547 |
-+ mm.LoadModule(module); |
548 |
-+ } |
549 |
-+ } |
550 |
-+ else { |
551 |
-+ LOG(ERROR) << "dlopen error: " << dlerror(); |
552 |
-+ } |
553 |
-+ } |
554 |
-+ } |
555 |
-+ globfree(&glob_buffer); |
556 |
-+ } |
557 |
-+#endif |
558 |
- } |
559 |
- |
560 |
- // assume member is a non-null pointer in struct *p. |
561 |
|
562 |
diff --git a/app-i18n/librime/librime-1.5.3-r2.ebuild b/app-i18n/librime/librime-1.5.3-r2.ebuild |
563 |
deleted file mode 100644 |
564 |
index bec00f1025a0..000000000000 |
565 |
--- a/app-i18n/librime/librime-1.5.3-r2.ebuild |
566 |
+++ /dev/null |
567 |
@@ -1,74 +0,0 @@ |
568 |
-# Copyright 2012-2021 Gentoo Authors |
569 |
-# Distributed under the terms of the GNU General Public License v2 |
570 |
- |
571 |
-EAPI="7" |
572 |
- |
573 |
-inherit cmake-utils |
574 |
- |
575 |
-if [[ "${PV}" == "9999" ]]; then |
576 |
- inherit git-r3 |
577 |
- |
578 |
- EGIT_REPO_URI="https://github.com/rime/librime" |
579 |
- EGIT_SUBMODULES=() |
580 |
-fi |
581 |
- |
582 |
-DESCRIPTION="RIME (Rime Input Method Engine) core library" |
583 |
-HOMEPAGE="https://rime.im/ https://github.com/rime/librime" |
584 |
-if [[ "${PV}" == "9999" ]]; then |
585 |
- SRC_URI="" |
586 |
-else |
587 |
- SRC_URI="https://github.com/rime/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
588 |
-fi |
589 |
- |
590 |
-LICENSE="BSD" |
591 |
-SLOT="0/1" |
592 |
-KEYWORDS="amd64 arm64 ppc ppc64 x86" |
593 |
-IUSE="debug test" |
594 |
-RESTRICT="!test? ( test )" |
595 |
- |
596 |
-BDEPEND="" |
597 |
-RDEPEND="app-i18n/opencc:0= |
598 |
- >=dev-cpp/glog-0.3.5:0= |
599 |
- dev-cpp/yaml-cpp:0= |
600 |
- dev-libs/boost:0=[nls,threads(+)] |
601 |
- dev-libs/leveldb:0= |
602 |
- dev-libs/marisa:0=" |
603 |
-DEPEND="${RDEPEND} |
604 |
- dev-libs/darts |
605 |
- dev-libs/utfcpp |
606 |
- x11-base/xorg-proto |
607 |
- test? ( dev-cpp/gtest )" |
608 |
- |
609 |
-PATCHES=( |
610 |
- "${FILESDIR}/${P}-log_files_mode.patch" |
611 |
-) |
612 |
- |
613 |
-DOCS=(CHANGELOG.md README.md) |
614 |
- |
615 |
-src_prepare() { |
616 |
- # Use headers of dev-libs/darts, dev-libs/utfcpp and x11-base/xorg-proto. |
617 |
- sed -e "/\${PROJECT_SOURCE_DIR}\/thirdparty/d" -i CMakeLists.txt || die |
618 |
- rm -r thirdparty || die |
619 |
- |
620 |
- cmake-utils_src_prepare |
621 |
-} |
622 |
- |
623 |
-src_configure() { |
624 |
- local -x CXXFLAGS="${CXXFLAGS} -I${ESYSROOT}/usr/include/utf8cpp" |
625 |
- |
626 |
- if use debug; then |
627 |
- CXXFLAGS+=" -DDCHECK_ALWAYS_ON" |
628 |
- else |
629 |
- CXXFLAGS+=" -DNDEBUG" |
630 |
- fi |
631 |
- |
632 |
- local mycmakeargs=( |
633 |
- -DBOOST_USE_CXX11=ON |
634 |
- -DBUILD_TEST=$(usex test ON OFF) |
635 |
- -DCMAKE_DISABLE_FIND_PACKAGE_Gflags=ON |
636 |
- -DCMAKE_DISABLE_FIND_PACKAGE_Iconv=ON |
637 |
- -DLIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)" |
638 |
- ) |
639 |
- |
640 |
- cmake-utils_src_configure |
641 |
-} |
642 |
|
643 |
diff --git a/app-i18n/librime/librime-1.6.0-r1.ebuild b/app-i18n/librime/librime-1.6.0-r1.ebuild |
644 |
deleted file mode 100644 |
645 |
index 77cc61ea01a8..000000000000 |
646 |
--- a/app-i18n/librime/librime-1.6.0-r1.ebuild |
647 |
+++ /dev/null |
648 |
@@ -1,74 +0,0 @@ |
649 |
-# Copyright 2012-2021 Gentoo Authors |
650 |
-# Distributed under the terms of the GNU General Public License v2 |
651 |
- |
652 |
-EAPI="7" |
653 |
- |
654 |
-inherit cmake |
655 |
- |
656 |
-if [[ "${PV}" == "9999" ]]; then |
657 |
- inherit git-r3 |
658 |
- |
659 |
- EGIT_REPO_URI="https://github.com/rime/librime" |
660 |
- EGIT_SUBMODULES=() |
661 |
-fi |
662 |
- |
663 |
-DESCRIPTION="RIME (Rime Input Method Engine) core library" |
664 |
-HOMEPAGE="https://rime.im/ https://github.com/rime/librime" |
665 |
-if [[ "${PV}" == "9999" ]]; then |
666 |
- SRC_URI="" |
667 |
-else |
668 |
- SRC_URI="https://github.com/rime/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
669 |
-fi |
670 |
- |
671 |
-LICENSE="BSD" |
672 |
-SLOT="0/1-${PV}" |
673 |
-KEYWORDS="~amd64 ~arm64 ~x86" |
674 |
-IUSE="debug test" |
675 |
-RESTRICT="!test? ( test )" |
676 |
- |
677 |
-BDEPEND="dev-libs/capnproto:0" |
678 |
-RDEPEND="app-i18n/opencc:0= |
679 |
- >=dev-cpp/glog-0.3.5:0= |
680 |
- dev-cpp/yaml-cpp:0= |
681 |
- dev-libs/boost:0=[threads(+)] |
682 |
- dev-libs/capnproto:0= |
683 |
- dev-libs/leveldb:0= |
684 |
- dev-libs/marisa:0=" |
685 |
-DEPEND="${RDEPEND} |
686 |
- dev-libs/darts |
687 |
- dev-libs/utfcpp |
688 |
- x11-base/xorg-proto |
689 |
- test? ( dev-cpp/gtest )" |
690 |
- |
691 |
-DOCS=(CHANGELOG.md README.md) |
692 |
- |
693 |
-src_prepare() { |
694 |
- eapply "${FILESDIR}/${PN}-1.6.0-boost-1.76.patch" |
695 |
- eapply "${FILESDIR}/${PN}-1.6.0-plugins.patch" |
696 |
- |
697 |
- # Use headers of dev-libs/darts, dev-libs/utfcpp and x11-base/xorg-proto. |
698 |
- sed -e "/\${PROJECT_SOURCE_DIR}\/thirdparty/d" -i CMakeLists.txt || die |
699 |
- rm -r thirdparty || die |
700 |
- |
701 |
- cmake_src_prepare |
702 |
-} |
703 |
- |
704 |
-src_configure() { |
705 |
- local -x CXXFLAGS="${CXXFLAGS} -I${ESYSROOT}/usr/include/utf8cpp" |
706 |
- |
707 |
- if use debug; then |
708 |
- CXXFLAGS+=" -DDCHECK_ALWAYS_ON" |
709 |
- else |
710 |
- CXXFLAGS+=" -DNDEBUG" |
711 |
- fi |
712 |
- |
713 |
- local mycmakeargs=( |
714 |
- -DBOOST_USE_CXX11=ON |
715 |
- -DBUILD_TEST=$(usex test ON OFF) |
716 |
- -DCMAKE_DISABLE_FIND_PACKAGE_Gflags=ON |
717 |
- -DENABLE_EXTERNAL_PLUGINS=ON |
718 |
- -DINSTALL_PRIVATE_HEADERS=ON |
719 |
- ) |
720 |
- |
721 |
- cmake_src_configure |
722 |
-} |
723 |
|
724 |
diff --git a/app-i18n/librime/librime-1.6.1-r1.ebuild b/app-i18n/librime/librime-1.6.1-r1.ebuild |
725 |
deleted file mode 100644 |
726 |
index 0f2a5d3dbec4..000000000000 |
727 |
--- a/app-i18n/librime/librime-1.6.1-r1.ebuild |
728 |
+++ /dev/null |
729 |
@@ -1,74 +0,0 @@ |
730 |
-# Copyright 2012-2021 Gentoo Authors |
731 |
-# Distributed under the terms of the GNU General Public License v2 |
732 |
- |
733 |
-EAPI="7" |
734 |
- |
735 |
-inherit cmake |
736 |
- |
737 |
-if [[ "${PV}" == "9999" ]]; then |
738 |
- inherit git-r3 |
739 |
- |
740 |
- EGIT_REPO_URI="https://github.com/rime/librime" |
741 |
- EGIT_SUBMODULES=() |
742 |
-fi |
743 |
- |
744 |
-DESCRIPTION="RIME (Rime Input Method Engine) core library" |
745 |
-HOMEPAGE="https://rime.im/ https://github.com/rime/librime" |
746 |
-if [[ "${PV}" == "9999" ]]; then |
747 |
- SRC_URI="" |
748 |
-else |
749 |
- SRC_URI="https://github.com/rime/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
750 |
-fi |
751 |
- |
752 |
-LICENSE="BSD" |
753 |
-SLOT="0/1-${PV}" |
754 |
-KEYWORDS="~amd64 ~arm64 ~x86" |
755 |
-IUSE="debug test" |
756 |
-RESTRICT="!test? ( test )" |
757 |
- |
758 |
-BDEPEND="dev-libs/capnproto:0" |
759 |
-RDEPEND="app-i18n/opencc:0= |
760 |
- >=dev-cpp/glog-0.3.5:0= |
761 |
- dev-cpp/yaml-cpp:0= |
762 |
- dev-libs/boost:0=[threads(+)] |
763 |
- dev-libs/capnproto:0= |
764 |
- dev-libs/leveldb:0= |
765 |
- dev-libs/marisa:0=" |
766 |
-DEPEND="${RDEPEND} |
767 |
- dev-libs/darts |
768 |
- dev-libs/utfcpp |
769 |
- x11-base/xorg-proto |
770 |
- test? ( dev-cpp/gtest )" |
771 |
- |
772 |
-DOCS=(CHANGELOG.md README.md) |
773 |
- |
774 |
-src_prepare() { |
775 |
- eapply "${FILESDIR}/${PN}-1.6.0-boost-1.76.patch" |
776 |
- eapply "${FILESDIR}/${PN}-1.6.1-plugins.patch" |
777 |
- |
778 |
- # Use headers of dev-libs/darts, dev-libs/utfcpp and x11-base/xorg-proto. |
779 |
- sed -e "/\${PROJECT_SOURCE_DIR}\/thirdparty/d" -i CMakeLists.txt || die |
780 |
- rm -r thirdparty || die |
781 |
- |
782 |
- cmake_src_prepare |
783 |
-} |
784 |
- |
785 |
-src_configure() { |
786 |
- local -x CXXFLAGS="${CXXFLAGS} -I${ESYSROOT}/usr/include/utf8cpp" |
787 |
- |
788 |
- if use debug; then |
789 |
- CXXFLAGS+=" -DDCHECK_ALWAYS_ON" |
790 |
- else |
791 |
- CXXFLAGS+=" -DNDEBUG" |
792 |
- fi |
793 |
- |
794 |
- local mycmakeargs=( |
795 |
- -DBOOST_USE_CXX11=ON |
796 |
- -DBUILD_TEST=$(usex test ON OFF) |
797 |
- -DCMAKE_DISABLE_FIND_PACKAGE_Gflags=ON |
798 |
- -DENABLE_EXTERNAL_PLUGINS=ON |
799 |
- -DINSTALL_PRIVATE_HEADERS=ON |
800 |
- ) |
801 |
- |
802 |
- cmake_src_configure |
803 |
-} |