1 |
commit: 3baafff326dfe64a021b28d36a48751e81e95c32 |
2 |
Author: Mark Wright <gienah <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon May 25 11:58:49 2020 +0000 |
4 |
Commit: Mark Wright <gienah <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon May 25 11:59:45 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3baafff3 |
7 |
|
8 |
sci-mathematics/rstudio: Bump to 1.3.959 |
9 |
|
10 |
Package-Manager: Portage-2.3.100, Repoman-2.3.22 |
11 |
Signed-off-by: Mark Wright <gienah <AT> gentoo.org> |
12 |
|
13 |
sci-mathematics/rstudio/Manifest | 1 + |
14 |
.../rstudio/files/rstudio-1.3.959-R-4.0.0.patch | 106 ++++++++++ |
15 |
.../rstudio/files/rstudio-1.3.959-core.patch | 184 ++++++++++++++++ |
16 |
.../files/rstudio-1.3.959-pandoc-mathjax.patch | 42 ++++ |
17 |
.../rstudio/files/rstudio-1.3.959-paths.patch | 118 +++++++++++ |
18 |
.../rstudio/files/rstudio-1.3.959-prefs.patch | 68 ++++++ |
19 |
.../rstudio-1.3.959-qtsingleapplication.patch | 60 ++++++ |
20 |
sci-mathematics/rstudio/rstudio-1.3.959.ebuild | 231 +++++++++++++++++++++ |
21 |
8 files changed, 810 insertions(+) |
22 |
|
23 |
diff --git a/sci-mathematics/rstudio/Manifest b/sci-mathematics/rstudio/Manifest |
24 |
index 6821cacc59b..063f6280255 100644 |
25 |
--- a/sci-mathematics/rstudio/Manifest |
26 |
+++ b/sci-mathematics/rstudio/Manifest |
27 |
@@ -1,3 +1,4 @@ |
28 |
DIST core-dictionaries.zip 876339 BLAKE2B f29afcbf5a7f8ec635e5a5b248d978af286d18488f54c9a09a2b95fde19b796e4473e5846402a46dd24b71c6e4167512539aaa32ab6d99713d500a80aaf46796 SHA512 9c5830cc9fed575e223f1c61f02e48c5aea6801bb0cd2586f02437c17fdffdb1d36c396d5a8ecbe02ba01196e73458304345b1f6b92c052bc7a7d05961fac2c9 |
29 |
DIST rstudio-1.2.5033.tar.gz 20456976 BLAKE2B 3cbca6a5180690104dddf1456168bd38708d4152ed9b7a167035dd66e270aeb6405169d34461cbd899738be1872607e3f3b6f81ff0b3c9e6a9ed965a889b1393 SHA512 3569d4fed342275a9905c87e4f97be63b6391d2c37f75397e06201a7c31f80d94799214f51ff8e57d458ef18d5e54afe1ec8a7c56ac05ed8b8225ecca72d1daf |
30 |
DIST rstudio-1.2.5042.tar.gz 20456999 BLAKE2B 3251ab2511daefefa395256fedb273ecc36dbc8118457474e3647f7616baea91301e597896582ad4b191195fc7baf17645c4c25b9a957a0c17a6251151b1dd87 SHA512 e09f2360abecde0c16e240e6838efb270a355bec3d3982ffde2b01b32b21e9281fef465734edbfeb5e05375529cc7f06d5b5d41304f367982f53ae7ad98e20f9 |
31 |
+DIST rstudio-1.3.959.tar.gz 89639419 BLAKE2B d45b2c1b0e426ddb5a945e59a8127ddfd47f6230ef0929639c4b525382ae57437a273df6ade85cfbf3a29911cf0158ee2e0808bfa94e783d70d4615f6c228f31 SHA512 e5d8bfe16011790ff4723c731043f44070d8fe48f85c5a9ab8389c9a2b7a1d3813e9362063ec4c6a6ca3b0a0857e2190481cbb74191650a129c0d2e10b342fac |
32 |
|
33 |
diff --git a/sci-mathematics/rstudio/files/rstudio-1.3.959-R-4.0.0.patch b/sci-mathematics/rstudio/files/rstudio-1.3.959-R-4.0.0.patch |
34 |
new file mode 100644 |
35 |
index 00000000000..dc35d0ce008 |
36 |
--- /dev/null |
37 |
+++ b/sci-mathematics/rstudio/files/rstudio-1.3.959-R-4.0.0.patch |
38 |
@@ -0,0 +1,106 @@ |
39 |
+From 71b1a935762efd24a79de193662450de5a89f67e Mon Sep 17 00:00:00 2001 |
40 |
+From: Jonathan McPherson <jonathan@×××××××.com> |
41 |
+Date: Tue, 14 Jan 2020 12:53:20 -0800 |
42 |
+Subject: [PATCH] use R_NoSave over R_Slave for R 4.0+ |
43 |
+ |
44 |
+--- |
45 |
+ src/cpp/r/CMakeLists.txt | 12 ++++++++++++ |
46 |
+ src/cpp/r/config.h.in | 8 +++++++- |
47 |
+ src/cpp/r/session/REmbeddedPosix.cpp | 20 ++++++++++++++------ |
48 |
+ 3 files changed, 33 insertions(+), 7 deletions(-) |
49 |
+ |
50 |
+diff --git a/src/cpp/r/CMakeLists.txt b/src/cpp/r/CMakeLists.txt |
51 |
+index 6984ae309c..29784b8b67 100644 |
52 |
+--- a/src/cpp/r/CMakeLists.txt |
53 |
++++ b/src/cpp/r/CMakeLists.txt |
54 |
+@@ -15,6 +15,18 @@ |
55 |
+ |
56 |
+ project (R) |
57 |
+ |
58 |
++# find the version of R in play |
59 |
++find_package(LibR REQUIRED) |
60 |
++execute_process( |
61 |
++ COMMAND "${LIBR_EXECUTABLE}" "--vanilla" "--slave" "-e" "cat(as.character(getRversion()))" |
62 |
++ OUTPUT_VARIABLE LIBR_VERSION) |
63 |
++ |
64 |
++# parse and save the R version to a variable |
65 |
++string(REPLACE "." ";" R_VERSION_LIST "${LIBR_VERSION}") |
66 |
++list(GET R_VERSION_LIST 0 R_VERSION_MAJOR) |
67 |
++list(GET R_VERSION_LIST 1 R_VERSION_MINOR) |
68 |
++list(GET R_VERSION_LIST 2 R_VERSION_PATCH) |
69 |
++ |
70 |
+ # include files |
71 |
+ file(GLOB_RECURSE R_HEADER_FILES "*.h*") |
72 |
+ |
73 |
+diff --git a/src/cpp/r/config.h.in b/src/cpp/r/config.h.in |
74 |
+index 6ba67c8e09..00bc8b6191 100644 |
75 |
+--- a/src/cpp/r/config.h.in |
76 |
++++ b/src/cpp/r/config.h.in |
77 |
+@@ -1,7 +1,7 @@ |
78 |
+ /* |
79 |
+ * config.h.in |
80 |
+ * |
81 |
+- * Copyright (C) 2009-12 by RStudio, PBC |
82 |
++ * Copyright (C) 2009-20 by RStudio, Inc. |
83 |
+ * |
84 |
+ * Unless you have received this program directly from RStudio pursuant |
85 |
+ * to the terms of a commercial license agreement with RStudio, then |
86 |
+@@ -16,4 +16,10 @@ |
87 |
+ |
88 |
+ #cmakedefine PANGO_CAIRO_FOUND |
89 |
+ |
90 |
++// Important: These variables represent the version of R found during |
91 |
++// compile/link time, NOT the version of R present at runtime. |
92 |
++#define R_VERSION_MAJOR ${R_VERSION_MAJOR} |
93 |
++#define R_VERSION_MINOR ${R_VERSION_MINOR} |
94 |
++#define R_VERSION_PATCH ${R_VERSION_PATCH} |
95 |
++ |
96 |
+ |
97 |
+diff --git a/src/cpp/r/session/REmbeddedPosix.cpp b/src/cpp/r/session/REmbeddedPosix.cpp |
98 |
+index ac71b94522..73e2e2ce7f 100644 |
99 |
+--- a/src/cpp/r/session/REmbeddedPosix.cpp |
100 |
++++ b/src/cpp/r/session/REmbeddedPosix.cpp |
101 |
+@@ -1,7 +1,7 @@ |
102 |
+ /* |
103 |
+ * REmbeddedPosix.cpp |
104 |
+ * |
105 |
+- * Copyright (C) 2009-19 by RStudio, PBC |
106 |
++ * Copyright (C) 2009-20 by RStudio, Inc. |
107 |
+ * |
108 |
+ * Unless you have received this program directly from RStudio pursuant |
109 |
+ * to the terms of a commercial license agreement with RStudio, then |
110 |
+@@ -38,6 +38,8 @@ extern "C" void (*ptr_R_ProcessEvents)(void); |
111 |
+ extern "C" typedef void (*ptr_QuartzCocoa_SetupEventLoop)(int, unsigned long); |
112 |
+ #endif |
113 |
+ |
114 |
++#include "config.h" |
115 |
++ |
116 |
+ extern int R_running_as_main_program; // from unix/system.c |
117 |
+ |
118 |
+ using namespace rstudio::core; |
119 |
+@@ -103,14 +105,20 @@ void runEmbeddedR(const core::FilePath& /*rHome*/, // ignored on posix |
120 |
+ // |
121 |
+ structRstart rp; |
122 |
+ Rstart Rp = &rp; |
123 |
+- R_DefParams(Rp) ; |
124 |
+- Rp->R_Slave = FALSE ; |
125 |
++ R_DefParams(Rp); |
126 |
++#if R_VERSION_MAJOR > 3 |
127 |
++ // R 4.0 and above use --no-echo to suppress output |
128 |
++ Rp->R_NoEcho = FALSE; |
129 |
++#else |
130 |
++ // R 3.x and below use --slave |
131 |
++ Rp->R_Slave = FALSE; |
132 |
++#endif |
133 |
+ Rp->R_Quiet = quiet ? TRUE : FALSE; |
134 |
+- Rp->R_Interactive = TRUE ; |
135 |
+- Rp->SaveAction = defaultSaveAction ; |
136 |
++ Rp->R_Interactive = TRUE; |
137 |
++ Rp->SaveAction = defaultSaveAction; |
138 |
+ Rp->RestoreAction = SA_NORESTORE; // handled within initialize() |
139 |
+ Rp->LoadInitFile = loadInitFile ? TRUE : FALSE; |
140 |
+- R_SetParams(Rp) ; |
141 |
++ R_SetParams(Rp); |
142 |
+ |
143 |
+ // redirect console |
144 |
+ R_Interactive = TRUE; // should have also been set by call to Rf_initialize_R |
145 |
|
146 |
diff --git a/sci-mathematics/rstudio/files/rstudio-1.3.959-core.patch b/sci-mathematics/rstudio/files/rstudio-1.3.959-core.patch |
147 |
new file mode 100644 |
148 |
index 00000000000..0f6af4ef7f1 |
149 |
--- /dev/null |
150 |
+++ b/sci-mathematics/rstudio/files/rstudio-1.3.959-core.patch |
151 |
@@ -0,0 +1,184 @@ |
152 |
+--- rstudio-1.3.959-orig/src/cpp/session/SessionClientInit.cpp 2020-05-19 04:11:10.000000000 +1000 |
153 |
++++ rstudio-1.3.959/src/cpp/session/SessionClientInit.cpp 2020-05-24 17:21:56.960469575 +1000 |
154 |
+@@ -91,13 +91,13 @@ |
155 |
+ boost::shared_ptr<http::Cookie>* pCookie) |
156 |
+ { |
157 |
+ // extract the base URL |
158 |
+- json::JsonRpcRequest request; |
159 |
++ core::json::JsonRpcRequest request; |
160 |
+ Error error = parseJsonRpcRequest(ptrConnection->request().body(), &request); |
161 |
+ if (error) |
162 |
+ return error; |
163 |
+ std::string baseURL; |
164 |
+ |
165 |
+- error = json::readParams(request.params, &baseURL); |
166 |
++ error = core::json::readParams(request.params, &baseURL); |
167 |
+ if (error) |
168 |
+ return error; |
169 |
+ |
170 |
+@@ -143,7 +143,7 @@ |
171 |
+ if (options.programMode() == kSessionProgramModeServer && |
172 |
+ !core::http::validateCSRFHeaders(ptrConnection->request())) |
173 |
+ { |
174 |
+- ptrConnection->sendJsonRpcError(Error(json::errc::Unauthorized, ERROR_LOCATION)); |
175 |
++ ptrConnection->sendJsonRpcError(Error(core::json::errc::Unauthorized, ERROR_LOCATION)); |
176 |
+ return; |
177 |
+ } |
178 |
+ |
179 |
+@@ -173,12 +173,12 @@ |
180 |
+ } |
181 |
+ |
182 |
+ // prepare session info |
183 |
+- json::Object sessionInfo ; |
184 |
++ core::json::Object sessionInfo ; |
185 |
+ sessionInfo["clientId"] = clientId; |
186 |
+ sessionInfo["mode"] = options.programMode(); |
187 |
+ |
188 |
+ // build initialization options for client |
189 |
+- json::Object initOptions; |
190 |
++ core::json::Object initOptions; |
191 |
+ initOptions["restore_workspace"] = options.rRestoreWorkspace(); |
192 |
+ initOptions["run_rprofile"] = options.rRunRprofile(); |
193 |
+ sessionInfo["init_options"] = initOptions; |
194 |
+@@ -194,8 +194,8 @@ |
195 |
+ } |
196 |
+ |
197 |
+ // temp dir |
198 |
+- FilePath tempDir = rstudio::r::session::utils::tempDir(); |
199 |
+- Error error = tempDir.ensureDirectory(); |
200 |
++ core::FilePath tempDir = rstudio::r::session::utils::tempDir(); |
201 |
++ core::Error error = tempDir.ensureDirectory(); |
202 |
+ if (error) |
203 |
+ LOG_ERROR(error); |
204 |
+ sessionInfo["temp_dir"] = tempDir.getAbsolutePath(); |
205 |
+@@ -213,12 +213,12 @@ |
206 |
+ sessionInfo["prompt"] = rstudio::r::options::getOption<std::string>("prompt"); |
207 |
+ |
208 |
+ // client state |
209 |
+- json::Object clientStateObject; |
210 |
++ core::json::Object clientStateObject; |
211 |
+ rstudio::r::session::clientState().currentState(&clientStateObject); |
212 |
+ sessionInfo["client_state"] = clientStateObject; |
213 |
+ |
214 |
+ // source documents |
215 |
+- json::Array jsonDocs; |
216 |
++ core::json::Array jsonDocs; |
217 |
+ error = modules::source::clientInitDocuments(&jsonDocs); |
218 |
+ if (error) |
219 |
+ LOG_ERROR(error); |
220 |
+@@ -243,7 +243,7 @@ |
221 |
+ if (resumed) |
222 |
+ { |
223 |
+ // console actions |
224 |
+- json::Object actionsObject; |
225 |
++ core::json::Object actionsObject; |
226 |
+ consoleActions.asJson(&actionsObject); |
227 |
+ sessionInfo["console_actions"] = actionsObject; |
228 |
+ } |
229 |
+@@ -310,12 +310,12 @@ |
230 |
+ } |
231 |
+ else |
232 |
+ { |
233 |
+- sessionInfo["active_project_file"] = json::Value(); |
234 |
+- sessionInfo["project_ui_prefs"] = json::Value(); |
235 |
+- sessionInfo["project_open_docs"] = json::Value(); |
236 |
++ sessionInfo["active_project_file"] = core::json::Value(); |
237 |
++ sessionInfo["project_ui_prefs"] = core::json::Value(); |
238 |
++ sessionInfo["project_open_docs"] = core::json::Value(); |
239 |
+ sessionInfo["project_supports_sharing"] = false; |
240 |
+ sessionInfo["project_owned_by_user"] = false; |
241 |
+- sessionInfo["project_user_data_directory"] = json::Value(); |
242 |
++ sessionInfo["project_user_data_directory"] = core::json::Value(); |
243 |
+ } |
244 |
+ |
245 |
+ sessionInfo["system_encoding"] = std::string(::locale2charset(nullptr)); |
246 |
+@@ -352,20 +352,20 @@ |
247 |
+ sessionInfo["build_tools_bookdown_website"] = |
248 |
+ module_context::isBookdownWebsite(); |
249 |
+ |
250 |
+- FilePath buildTargetDir = projects::projectContext().buildTargetPath(); |
251 |
++ core::FilePath buildTargetDir = projects::projectContext().buildTargetPath(); |
252 |
+ if (!buildTargetDir.isEmpty()) |
253 |
+ { |
254 |
+ sessionInfo["build_target_dir"] = module_context::createAliasedPath( |
255 |
+ buildTargetDir); |
256 |
+- sessionInfo["has_pkg_src"] = (type == r_util::kBuildTypePackage) && |
257 |
++ sessionInfo["has_pkg_src"] = (type == core::r_util::kBuildTypePackage) && |
258 |
+ buildTargetDir.completeChildPath("src").exists(); |
259 |
+ sessionInfo["has_pkg_vig"] = |
260 |
+- (type == r_util::kBuildTypePackage) && |
261 |
++ (type == core::r_util::kBuildTypePackage) && |
262 |
+ buildTargetDir.completeChildPath("vignettes").exists(); |
263 |
+ } |
264 |
+ else |
265 |
+ { |
266 |
+- sessionInfo["build_target_dir"] = json::Value(); |
267 |
++ sessionInfo["build_target_dir"] = core::json::Value(); |
268 |
+ sessionInfo["has_pkg_src"] = false; |
269 |
+ sessionInfo["has_pkg_vig"] = false; |
270 |
+ } |
271 |
+@@ -373,9 +373,9 @@ |
272 |
+ } |
273 |
+ else |
274 |
+ { |
275 |
+- sessionInfo["build_tools_type"] = r_util::kBuildTypeNone; |
276 |
++ sessionInfo["build_tools_type"] = core::r_util::kBuildTypeNone; |
277 |
+ sessionInfo["build_tools_bookdown_website"] = false; |
278 |
+- sessionInfo["build_target_dir"] = json::Value(); |
279 |
++ sessionInfo["build_target_dir"] = core::json::Value(); |
280 |
+ sessionInfo["has_pkg_src"] = false; |
281 |
+ sessionInfo["has_pkg_vig"] = false; |
282 |
+ } |
283 |
+@@ -384,7 +384,7 @@ |
284 |
+ sessionInfo["presentation_commands"] = options.allowPresentationCommands(); |
285 |
+ |
286 |
+ sessionInfo["tutorial_api_available"] = false; |
287 |
+- sessionInfo["tutorial_api_client_origin"] = json::Value(); |
288 |
++ sessionInfo["tutorial_api_client_origin"] = core::json::Value(); |
289 |
+ |
290 |
+ sessionInfo["build_state"] = modules::build::buildStateAsJson(); |
291 |
+ sessionInfo["devtools_installed"] = module_context::isMinimumDevtoolsInstalled(); |
292 |
+@@ -395,7 +395,7 @@ |
293 |
+ |
294 |
+ // console history -- we do this at the end because |
295 |
+ // restoreBuildRestartContext may have reset it |
296 |
+- json::Array historyArray; |
297 |
++ core::json::Array historyArray; |
298 |
+ rstudio::r::session::consoleHistory().asJson(&historyArray); |
299 |
+ sessionInfo["console_history"] = historyArray; |
300 |
+ sessionInfo["console_history_capacity"] = |
301 |
+@@ -470,14 +470,14 @@ |
302 |
+ |
303 |
+ sessionInfo["multi_session"] = options.multiSession(); |
304 |
+ |
305 |
+- json::Object rVersionsJson; |
306 |
++ core::json::Object rVersionsJson; |
307 |
+ rVersionsJson["r_version"] = module_context::rVersion(); |
308 |
+ rVersionsJson["r_version_label"] = module_context::rVersionLabel(); |
309 |
+ rVersionsJson["r_home_dir"] = module_context::rHomeDir(); |
310 |
+ sessionInfo["r_versions_info"] = rVersionsJson; |
311 |
+ |
312 |
+ sessionInfo["show_user_home_page"] = options.showUserHomePage(); |
313 |
+- sessionInfo["user_home_page_url"] = json::Value(); |
314 |
++ sessionInfo["user_home_page_url"] = core::json::Value(); |
315 |
+ |
316 |
+ sessionInfo["r_addins"] = modules::r_addins::addinRegistryAsJson(); |
317 |
+ sessionInfo["package_provided_extensions"] = modules::ppe::indexer().getPayload(); |
318 |
+@@ -501,7 +501,7 @@ |
319 |
+ |
320 |
+ sessionInfo["launcher_jobs_enabled"] = modules::overlay::launcherJobsFeatureDisplayed(); |
321 |
+ |
322 |
+- json::Object packageDependencies; |
323 |
++ core::json::Object packageDependencies; |
324 |
+ error = modules::dependency_list::getDependencyList(&packageDependencies); |
325 |
+ if (error) |
326 |
+ LOG_ERROR(error); |
327 |
+@@ -529,7 +529,7 @@ |
328 |
+ |
329 |
+ // create response (we always set kEventsPending to false so that the client |
330 |
+ // won't poll for events until it is ready) |
331 |
+- json::JsonRpcResponse jsonRpcResponse; |
332 |
++ core::json::JsonRpcResponse jsonRpcResponse; |
333 |
+ jsonRpcResponse.setField(kEventsPending, "false"); |
334 |
+ jsonRpcResponse.setResult(sessionInfo); |
335 |
+ |
336 |
|
337 |
diff --git a/sci-mathematics/rstudio/files/rstudio-1.3.959-pandoc-mathjax.patch b/sci-mathematics/rstudio/files/rstudio-1.3.959-pandoc-mathjax.patch |
338 |
new file mode 100644 |
339 |
index 00000000000..d8718dda9b1 |
340 |
--- /dev/null |
341 |
+++ b/sci-mathematics/rstudio/files/rstudio-1.3.959-pandoc-mathjax.patch |
342 |
@@ -0,0 +1,42 @@ |
343 |
+--- rstudio-1.3.959-orig/src/cpp/session/CMakeLists.txt 2020-05-19 04:11:10.000000000 +1000 |
344 |
++++ rstudio-1.3.959/src/cpp/session/CMakeLists.txt 2020-05-24 18:54:40.444955162 +1000 |
345 |
+@@ -22,12 +22,6 @@ |
346 |
+ if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/dictionaries") |
347 |
+ message(FATAL_ERROR "Dictionaries not found (re-run install-dependencies script to install)") |
348 |
+ endif() |
349 |
+-if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/mathjax-27") |
350 |
+- message(FATAL_ERROR "Mathjax 2.7 not found (re-run install-dependencies script to install)") |
351 |
+-endif() |
352 |
+-if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc") |
353 |
+- message(FATAL_ERROR "pandoc not found (re-run install-dependencies script to install)") |
354 |
+-endif() |
355 |
+ |
356 |
+ # verify embedded packages are available |
357 |
+ foreach(PKG ${RSTUDIO_EMBEDDED_PACKAGES}) |
358 |
+@@ -500,10 +494,6 @@ |
359 |
+ install(DIRECTORY "${RSTUDIO_DEPENDENCIES_DIR}/common/dictionaries" |
360 |
+ DESTINATION "${RSTUDIO_INSTALL_SUPPORTING}/resources") |
361 |
+ |
362 |
+- # install mathjax for local html preview |
363 |
+- install(DIRECTORY "${RSTUDIO_DEPENDENCIES_DIR}/common/mathjax-27" |
364 |
+- DESTINATION "${RSTUDIO_INSTALL_SUPPORTING}/resources") |
365 |
+- |
366 |
+ # icons for database connections |
367 |
+ install(DIRECTORY "resources/connections" |
368 |
+ DESTINATION ${RSTUDIO_INSTALL_SUPPORTING}/resources) |
369 |
+@@ -516,15 +506,6 @@ |
370 |
+ install(DIRECTORY "resources/dependencies" |
371 |
+ DESTINATION ${RSTUDIO_INSTALL_SUPPORTING}/resources) |
372 |
+ |
373 |
+- # install pandoc |
374 |
+- set(PANDOC_VERSION "2.7.3" CACHE INTERNAL "Pandoc version") |
375 |
+- |
376 |
+- set(PANDOC_BIN "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc/${PANDOC_VERSION}") |
377 |
+- file(GLOB PANDOC_FILES "${PANDOC_BIN}/pandoc*") |
378 |
+- install(FILES ${PANDOC_FILES} |
379 |
+- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE |
380 |
+- DESTINATION ${RSTUDIO_INSTALL_BIN}/pandoc) |
381 |
+- |
382 |
+ # install embedded packages |
383 |
+ foreach(PKG ${RSTUDIO_EMBEDDED_PACKAGES}) |
384 |
+ file(GLOB PKG_FILES "${RSTUDIO_DEPENDENCIES_DIR}/common/${PKG}*.tar.gz") |
385 |
|
386 |
diff --git a/sci-mathematics/rstudio/files/rstudio-1.3.959-paths.patch b/sci-mathematics/rstudio/files/rstudio-1.3.959-paths.patch |
387 |
new file mode 100644 |
388 |
index 00000000000..175d52f7149 |
389 |
--- /dev/null |
390 |
+++ b/sci-mathematics/rstudio/files/rstudio-1.3.959-paths.patch |
391 |
@@ -0,0 +1,118 @@ |
392 |
+--- rstudio-1.3.959-orig/CMakeGlobals.txt 2020-05-19 04:11:10.000000000 +1000 |
393 |
++++ rstudio-1.3.959/CMakeGlobals.txt 2020-05-25 19:30:10.711859714 +1000 |
394 |
+@@ -181,7 +181,7 @@ |
395 |
+ else() |
396 |
+ set(RSTUDIO_INSTALL_BIN bin) |
397 |
+ endif() |
398 |
+- set(RSTUDIO_INSTALL_SUPPORTING .) |
399 |
++ set(RSTUDIO_INSTALL_SUPPORTING ${DISTRO_SHARE}) |
400 |
+ endif() |
401 |
+ |
402 |
+ # if the install prefix is /usr/local then tweak as appropriate |
403 |
+--- rstudio-1.3.959-orig/src/cpp/server/CMakeLists.txt 2020-05-19 04:11:10.000000000 +1000 |
404 |
++++ rstudio-1.3.959/src/cpp/server/CMakeLists.txt 2020-05-25 19:30:10.711859714 +1000 |
405 |
+@@ -190,7 +190,7 @@ |
406 |
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT}.in |
407 |
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT}) |
408 |
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT} |
409 |
+- DESTINATION ${RSERVER_INITD_DEBIAN_DIR}) |
410 |
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_DEBIAN_DIR}) |
411 |
+ |
412 |
+ # install configured redhat init.d script |
413 |
+ set(RSERVER_INITD_REDHAT_DIR "extras/init.d/redhat") |
414 |
+@@ -198,7 +198,7 @@ |
415 |
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_REDHAT_SCRIPT}.in |
416 |
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_REDHAT_SCRIPT}) |
417 |
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_REDHAT_SCRIPT} |
418 |
+- DESTINATION ${RSERVER_INITD_REDHAT_DIR}) |
419 |
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_REDHAT_DIR}) |
420 |
+ |
421 |
+ # install configured suse init.d script |
422 |
+ set(RSERVER_INITD_SUSE_DIR "extras/init.d/suse") |
423 |
+@@ -206,13 +206,13 @@ |
424 |
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_SUSE_SCRIPT}.in |
425 |
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_SUSE_SCRIPT}) |
426 |
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_SUSE_SCRIPT} |
427 |
+- DESTINATION ${RSERVER_INITD_SUSE_DIR}) |
428 |
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_SUSE_DIR}) |
429 |
+ |
430 |
+ # install pam profile |
431 |
+ set(RSERVER_PAM_DIR "extras/pam") |
432 |
+ set(RSERVER_PAM_PROFILE "${RSERVER_PAM_DIR}/rstudio") |
433 |
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_PAM_PROFILE} |
434 |
+- DESTINATION ${RSERVER_PAM_DIR}) |
435 |
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_PAM_DIR}) |
436 |
+ |
437 |
+ # install configured upstart profile |
438 |
+ set(RSERVER_UPSTART_DIR "extras/upstart") |
439 |
+@@ -220,12 +220,12 @@ |
440 |
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_UPSTART_PROFILE}.in |
441 |
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE}) |
442 |
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE} |
443 |
+- DESTINATION ${RSERVER_UPSTART_DIR}) |
444 |
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_UPSTART_DIR}) |
445 |
+ set(RSERVER_UPSTART_PROFILE_REDHAT "${RSERVER_UPSTART_DIR}/rstudio-server.redhat.conf") |
446 |
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT}.in |
447 |
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT}) |
448 |
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT} |
449 |
+- DESTINATION ${RSERVER_UPSTART_DIR}) |
450 |
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_UPSTART_DIR}) |
451 |
+ |
452 |
+ # install configured systemd profile |
453 |
+ set(RSERVER_SYSTEMD_DIR "extras/systemd") |
454 |
+--- rstudio-1.3.959-orig/src/cpp/server/ServerOptions.cpp 2020-05-19 04:11:10.000000000 +1000 |
455 |
++++ rstudio-1.3.959/src/cpp/server/ServerOptions.cpp 2020-05-25 19:34:19.377675880 +1000 |
456 |
+@@ -442,8 +442,8 @@ |
457 |
+ |
458 |
+ // convert relative paths by completing from the system installation |
459 |
+ // path (this allows us to be relocatable) |
460 |
+- resolvePath(resourcePath, &wwwLocalPath_); |
461 |
+- resolvePath(resourcePath, &wwwSymbolMapsPath_); |
462 |
++ resolvePath(resourcePath.completeChildPath(DISTRO_SHARE), &wwwLocalPath_); |
463 |
++ resolvePath(resourcePath.completeChildPath(DISTRO_SHARE), &wwwSymbolMapsPath_); |
464 |
+ resolvePath(binaryPath, &authPamHelperPath_); |
465 |
+ resolvePath(binaryPath, &rsessionPath_); |
466 |
+ resolvePath(binaryPath, &rldpathPath_); |
467 |
+--- rstudio-1.3.959-orig/src/cpp/session/SessionOptions.cpp 2020-05-19 04:11:10.000000000 +1000 |
468 |
++++ rstudio-1.3.959/src/cpp/session/SessionOptions.cpp 2020-05-25 19:33:58.318606745 +1000 |
469 |
+@@ -52,7 +52,7 @@ |
470 |
+ namespace session { |
471 |
+ |
472 |
+ namespace { |
473 |
+-const char* const kDefaultPandocPath = "bin/pandoc"; |
474 |
++const char* const kDefaultPandocPath = "bin"; |
475 |
+ const char* const kDefaultPostbackPath = "bin/postback/rpostback"; |
476 |
+ const char* const kDefaultRsclangPath = "bin/rsclang"; |
477 |
+ |
478 |
+@@ -586,14 +586,14 @@ |
479 |
+ } |
480 |
+ |
481 |
+ // convert relative paths by completing from the app resource path |
482 |
+- resolvePath(resourcePath_, &rResourcesPath_); |
483 |
+- resolvePath(resourcePath_, &agreementFilePath_); |
484 |
+- resolvePath(resourcePath_, &wwwLocalPath_); |
485 |
+- resolvePath(resourcePath_, &wwwSymbolMapsPath_); |
486 |
+- resolvePath(resourcePath_, &coreRSourcePath_); |
487 |
+- resolvePath(resourcePath_, &modulesRSourcePath_); |
488 |
+- resolvePath(resourcePath_, &sessionLibraryPath_); |
489 |
+- resolvePath(resourcePath_, &sessionPackageArchivesPath_); |
490 |
++ resolvePath(resourcePath_.completeChildPath(DISTRO_SHARE), &rResourcesPath_); |
491 |
++ resolvePath(resourcePath_.completeChildPath(DISTRO_SHARE), &agreementFilePath_); |
492 |
++ resolvePath(resourcePath_.completeChildPath(DISTRO_SHARE), &wwwLocalPath_); |
493 |
++ resolvePath(resourcePath_.completeChildPath(DISTRO_SHARE), &wwwSymbolMapsPath_); |
494 |
++ resolvePath(resourcePath_.completeChildPath(DISTRO_SHARE), &coreRSourcePath_); |
495 |
++ resolvePath(resourcePath_.completeChildPath(DISTRO_SHARE), &modulesRSourcePath_); |
496 |
++ resolvePath(resourcePath_.completeChildPath(DISTRO_SHARE), &sessionLibraryPath_); |
497 |
++ resolvePath(resourcePath_.completeChildPath(DISTRO_SHARE), &sessionPackageArchivesPath_); |
498 |
+ resolvePostbackPath(resourcePath_, &rpostbackPath_); |
499 |
+ #ifdef _WIN32 |
500 |
+ resolvePath(resourcePath_, &consoleIoPath_); |
501 |
+@@ -626,7 +626,7 @@ |
502 |
+ } |
503 |
+ winptyPath_ = pty.completePath(completion).getAbsolutePath(); |
504 |
+ #endif // _WIN32 |
505 |
+- resolvePath(resourcePath_, &hunspellDictionariesPath_); |
506 |
++ resolvePath(resourcePath_.completeChildPath(DISTRO_SHARE), &hunspellDictionariesPath_); |
507 |
+ resolvePath(resourcePath_, &mathjaxPath_); |
508 |
+ resolvePath(resourcePath_, &libclangHeadersPath_); |
509 |
+ resolvePandocPath(resourcePath_, &pandocPath_); |
510 |
|
511 |
diff --git a/sci-mathematics/rstudio/files/rstudio-1.3.959-prefs.patch b/sci-mathematics/rstudio/files/rstudio-1.3.959-prefs.patch |
512 |
new file mode 100644 |
513 |
index 00000000000..4f961394769 |
514 |
--- /dev/null |
515 |
+++ b/sci-mathematics/rstudio/files/rstudio-1.3.959-prefs.patch |
516 |
@@ -0,0 +1,68 @@ |
517 |
+--- rstudio-1.3.959-orig/src/gwt/build.xml 2020-05-19 04:11:10.000000000 +1000 |
518 |
++++ rstudio-1.3.959/src/gwt/build.xml 2020-05-25 17:38:28.911881424 +1000 |
519 |
+@@ -28,19 +28,37 @@ |
520 |
+ classname="com.google.javascript.jscomp.ant.CompileTask" |
521 |
+ classpath="${tools.dir}/compiler/compiler.jar"/> |
522 |
+ |
523 |
++ <!-- Configure path to aopalliance --> |
524 |
++ <property name="aopalliance.sdk" value="@GENTOO_PORTAGE_EPREFIX@/usr/share/aopalliance-1/lib"/> |
525 |
++ |
526 |
++ <!-- Configure path to javax-inject --> |
527 |
++ <property name="javax.inject" value="@GENTOO_PORTAGE_EPREFIX@/usr/share/javax-inject/lib"/> |
528 |
++ |
529 |
++ <!-- Configure path to validation-api --> |
530 |
++ <property name="validation.api" value="@GENTOO_PORTAGE_EPREFIX@/usr/share/validation-api-1.0/lib"/> |
531 |
++ <property name="validation.api.sources" value="@GENTOO_PORTAGE_EPREFIX@/usr/share/validation-api-1.0/sources"/> |
532 |
++ |
533 |
+ <!-- Configure path to GWT SDK --> |
534 |
+ <property name="gwt.sdk" value="${lib.dir}/gwt/gwt-rstudio-1.3"/> |
535 |
++ <!-- Configure path to Google Gin --> |
536 |
++ <property name="gin.sdk" value="@GENTOO_PORTAGE_EPREFIX@/usr/share/gin-2.1/lib"/> |
537 |
++ |
538 |
+ <property name="gwt.extra.args" value=""/> |
539 |
+ <property name="gwt.main.module" value="org.rstudio.studio.RStudio"/> |
540 |
+ <property name="ace.bin" value="${src.dir}/org/rstudio/studio/client/workbench/views/source/editors/text/ace"/> |
541 |
++ <property environment="env"/> |
542 |
+ |
543 |
+ <!-- configure code server --> |
544 |
+ <property name="bind.address" value="127.0.0.1"/> |
545 |
+ |
546 |
+ <path id="project.class.path"> |
547 |
+ <pathelement location="${build.dir}"/> |
548 |
++ <fileset dir="${aopalliance.sdk}" includes="*.jar"/> |
549 |
++ <fileset dir="${javax.inject}" includes="*.jar"/> |
550 |
++ <fileset dir="${validation.api}" includes="*.jar"/> |
551 |
++ <fileset dir="${validation.api.sources}" includes="*.zip"/> |
552 |
+ <fileset dir="${gwt.sdk}" includes="*.jar"/> |
553 |
+- <fileset dir="${lib.dir}/gin/2.1.2" includes="*.jar"/> |
554 |
++ <fileset dir="${gin.sdk}" includes="*.jar"/> |
555 |
+ </path> |
556 |
+ |
557 |
+ <path id="test.class.path"> |
558 |
+@@ -114,8 +132,10 @@ |
559 |
+ <pathelement location="${src.dir}"/> |
560 |
+ <path refid="project.class.path"/> |
561 |
+ </classpath> |
562 |
++ <jvmarg value="-Duser.home=${env.T}"/> |
563 |
+ <!-- add jvmarg -Xss16M or similar if you see a StackOverflowError --> |
564 |
+ <jvmarg value="-Xmx1536M"/> |
565 |
++ <jvmarg value="-Djava.util.prefs.userRoot=${env.T}"/> |
566 |
+ <arg value="-war"/> |
567 |
+ <arg value="${www.dir}"/> |
568 |
+ <arg value="-localWorkers"/> |
569 |
+@@ -168,6 +188,7 @@ |
570 |
+ <pathelement location="${src.dir}"/> |
571 |
+ <path refid="project.class.path"/> |
572 |
+ </classpath> |
573 |
++ <jvmarg value="-Duser.home=${env.T}"/> |
574 |
+ <jvmarg value="-Xmx2048M"/> |
575 |
+ <arg value="-style"/> |
576 |
+ <arg value="PRETTY"/> |
577 |
+@@ -212,6 +233,7 @@ |
578 |
+ <pathelement location="${test.dir}"/> |
579 |
+ <pathelement location="${src.dir}"/> |
580 |
+ </classpath> |
581 |
++ <jvmarg value="-Duser.home=${env.T}"/> |
582 |
+ <classpath refid="project.class.path"/> |
583 |
+ <classpath refid="unittest.class.path"/> |
584 |
+ <arg value="org.rstudio.studio.client.RStudioUnitTestSuite"/> |
585 |
|
586 |
diff --git a/sci-mathematics/rstudio/files/rstudio-1.3.959-qtsingleapplication.patch b/sci-mathematics/rstudio/files/rstudio-1.3.959-qtsingleapplication.patch |
587 |
new file mode 100644 |
588 |
index 00000000000..3ced4f9afa1 |
589 |
--- /dev/null |
590 |
+++ b/sci-mathematics/rstudio/files/rstudio-1.3.959-qtsingleapplication.patch |
591 |
@@ -0,0 +1,60 @@ |
592 |
+--- rstudio-1.3.959-orig/src/cpp/desktop/CMakeLists.txt 2020-05-19 04:11:10.000000000 +1000 |
593 |
++++ rstudio-1.3.959/src/cpp/desktop/CMakeLists.txt 2020-05-24 17:15:47.039422975 +1000 |
594 |
+@@ -138,6 +138,13 @@ |
595 |
+ get_filename_component(QT_LIBRARY_PATH "${QT_BIN_DIR}/../lib" ABSOLUTE CACHE) |
596 |
+ get_filename_component(QT_INSTALL_PATH "${QT_BIN_DIR}/.." ABSOLUTE CACHE) |
597 |
+ |
598 |
++find_path(QTSINGLEAPPLIB_INCLUDE_DIR NAMES QtSingleApplication |
599 |
++ PATH_SUFFIXES QtSolutions |
600 |
++ PATHS |
601 |
++ /usr/include/qt5) |
602 |
++find_library(QTSINGLEAPPLIB Qt5Solutions_SingleApplication-2.6 |
603 |
++ libQt5Solutions_SingleApplication-2.6) |
604 |
++ |
605 |
+ # disable clang warnings for qt sources |
606 |
+ if(APPLE) |
607 |
+ add_definitions(-Wno-unused-private-field |
608 |
+@@ -156,7 +163,6 @@ |
609 |
+ |
610 |
+ set(MOC_DESKTOP_HEADER_FILES ${DESKTOP_HEADER_FILES}) |
611 |
+ list(REMOVE_ITEM MOC_DESKTOP_HEADER_FILES |
612 |
+- ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/qtsingleapplication/qtlockedfile.h |
613 |
+ ${CMAKE_CURRENT_SOURCE_DIR}/DesktopDetectRHome.hpp |
614 |
+ ${CMAKE_CURRENT_SOURCE_DIR}/DesktopOptions.hpp |
615 |
+ ${CMAKE_CURRENT_SOURCE_DIR}/DesktopRVersion.hpp |
616 |
+@@ -225,8 +231,6 @@ |
617 |
+ DesktopSynctex.cpp |
618 |
+ DesktopJobLauncherOverlay.cpp |
619 |
+ RemoteDesktopSessionLauncherOverlay.cpp |
620 |
+- 3rdparty/qtsingleapplication/qtsingleapplication.cpp |
621 |
+- 3rdparty/qtsingleapplication/qtlocalpeer.cpp |
622 |
+ ) |
623 |
+ |
624 |
+ if(WIN32) |
625 |
+@@ -283,6 +287,7 @@ |
626 |
+ ${OPENSSL_INCLUDE_DIR} |
627 |
+ ${CMAKE_CURRENT_SOURCE_DIR} |
628 |
+ ${CMAKE_CURRENT_BINARY_DIR} |
629 |
++ ${QTSINGLEAPPLIB_INCLUDE_DIR} |
630 |
+ ${EXT_SOURCE_DIR} |
631 |
+ ${SESSION_SOURCE_DIR}/include |
632 |
+ ${TESTS_INCLUDE_DIR} |
633 |
+@@ -386,6 +391,7 @@ |
634 |
+ # set link dependencies |
635 |
+ target_link_libraries(rstudio |
636 |
+ ${RSTUDIO_QTMODULES} |
637 |
++ ${QTSINGLEAPPLIB} |
638 |
+ ${QT_LIBRARIES} |
639 |
+ ${Boost_LIBRARIES} |
640 |
+ rstudio-core |
641 |
+--- rstudio-1.3.959-orig/src/cpp/desktop/DesktopPosixApplication.hpp 2020-05-19 04:11:10.000000000 +1000 |
642 |
++++ rstudio-1.3.959/src/cpp/desktop/DesktopPosixApplication.hpp 2020-05-24 17:13:22.050016953 +1000 |
643 |
+@@ -16,7 +16,7 @@ |
644 |
+ #ifndef DESKTOP_POSIX_APPLICATION_HPP |
645 |
+ #define DESKTOP_POSIX_APPLICATION_HPP |
646 |
+ |
647 |
+-#include "3rdparty/qtsingleapplication/QtSingleApplication" |
648 |
++#include <QtSingleApplication> |
649 |
+ |
650 |
+ #include "DesktopApplicationLaunch.hpp" |
651 |
+ |
652 |
|
653 |
diff --git a/sci-mathematics/rstudio/rstudio-1.3.959.ebuild b/sci-mathematics/rstudio/rstudio-1.3.959.ebuild |
654 |
new file mode 100644 |
655 |
index 00000000000..d708ec5bd51 |
656 |
--- /dev/null |
657 |
+++ b/sci-mathematics/rstudio/rstudio-1.3.959.ebuild |
658 |
@@ -0,0 +1,231 @@ |
659 |
+# Copyright 1999-2020 Gentoo Authors |
660 |
+# Distributed under the terms of the GNU General Public License v2 |
661 |
+ |
662 |
+EAPI=7 |
663 |
+ |
664 |
+inherit eutils cmake-utils pam xdg-utils java-pkg-2 java-ant-2 pax-utils prefix qmake-utils vcs-clean |
665 |
+ |
666 |
+# TODO |
667 |
+# * use dict from tree, linguas |
668 |
+# * do src_test (use junit from tree?) |
669 |
+ |
670 |
+GIN_VER=2.1.2 |
671 |
+# grep 'PANDOC_VERSION=' dependencies/common/install-pandoc |
672 |
+# It should be PANDOC_VER=2.7.3 however >=app-text/pandoc-2.7.3 is not yet in portage |
673 |
+PANDOC_VER=1.19.2.1 |
674 |
+# grep -5 QT_CANDIDATES src/cpp/desktop/CMakeLists.txt |
675 |
+QT_VER=5.12.6 |
676 |
+QT_SLOT=5 |
677 |
+ |
678 |
+DESCRIPTION="IDE for the R language" |
679 |
+HOMEPAGE=" |
680 |
+ http://www.rstudio.org |
681 |
+ https://github.com/rstudio/rstudio/" |
682 |
+SRC_URI=" |
683 |
+ https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz |
684 |
+ https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip |
685 |
+" |
686 |
+ |
687 |
+LICENSE="AGPL-3" |
688 |
+SLOT="0" |
689 |
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
690 |
+IUSE="dedicated libressl server" |
691 |
+ |
692 |
+RDEPEND=" |
693 |
+ >=app-text/pandoc-${PANDOC_VER} |
694 |
+ dev-java/aopalliance:1 |
695 |
+ dev-java/gin:2.1 |
696 |
+ dev-java/javax-inject |
697 |
+ =dev-java/validation-api-1.0*:1.0[source] |
698 |
+ dev-haskell/pandoc-citeproc |
699 |
+ dev-lang/R |
700 |
+ dev-libs/boost:= |
701 |
+ >=dev-libs/mathjax-2.7.4 |
702 |
+ sys-apps/util-linux |
703 |
+ sys-devel/clang:* |
704 |
+ sys-libs/zlib |
705 |
+ >=virtual/jre-1.8:= |
706 |
+ x11-libs/pango |
707 |
+ !dedicated? ( |
708 |
+ >=dev-qt/qtcore-${QT_VER}:${QT_SLOT} |
709 |
+ >=dev-qt/qtdeclarative-${QT_VER}:${QT_SLOT} |
710 |
+ >=dev-qt/qtdbus-${QT_VER}:${QT_SLOT} |
711 |
+ >=dev-qt/qtgui-${QT_VER}:${QT_SLOT} |
712 |
+ >=dev-qt/qtnetwork-${QT_VER}:${QT_SLOT} |
713 |
+ >=dev-qt/qtopengl-${QT_VER}:${QT_SLOT} |
714 |
+ >=dev-qt/qtpositioning-${QT_VER}:${QT_SLOT} |
715 |
+ >=dev-qt/qtprintsupport-${QT_VER}:${QT_SLOT} |
716 |
+ >=dev-qt/qtsingleapplication-2.6.1_p20150629[X,qt5(+)] |
717 |
+ >=dev-qt/qtsensors-${QT_VER}:${QT_SLOT} |
718 |
+ >=dev-qt/qtsql-${QT_VER}:${QT_SLOT} |
719 |
+ >=dev-qt/qtsvg-${QT_VER}:${QT_SLOT} |
720 |
+ >=dev-qt/qtwebchannel-${QT_VER}:${QT_SLOT} |
721 |
+ >=dev-qt/qtwebengine-${QT_VER}:${QT_SLOT}[widgets] |
722 |
+ >=dev-qt/qtwidgets-${QT_VER}:${QT_SLOT} |
723 |
+ >=dev-qt/qtxml-${QT_VER}:${QT_SLOT} |
724 |
+ >=dev-qt/qtxmlpatterns-${QT_VER}:${QT_SLOT} |
725 |
+ server? ( sys-libs/pam ) |
726 |
+ ) |
727 |
+ dedicated? ( sys-libs/pam ) |
728 |
+ dedicated? ( |
729 |
+ sys-libs/pam |
730 |
+ acct-user/rstudio-server |
731 |
+ acct-group/rstudio-server |
732 |
+ ) |
733 |
+ server? ( |
734 |
+ acct-user/rstudio-server |
735 |
+ acct-group/rstudio-server |
736 |
+ ) |
737 |
+ !libressl? ( dev-libs/openssl:0= ) |
738 |
+ libressl? ( dev-libs/libressl:0= )" |
739 |
+DEPEND="${RDEPEND} |
740 |
+ app-arch/unzip |
741 |
+ dev-java/ant-core |
742 |
+ >=virtual/jdk-1.8:= |
743 |
+ virtual/pkgconfig" |
744 |
+# test? ( dev-java/junit:4 ) |
745 |
+ |
746 |
+PATCHES=( |
747 |
+ "${FILESDIR}"/${PN}-1.3.959-prefs.patch |
748 |
+ "${FILESDIR}"/${PN}-1.3.959-paths.patch |
749 |
+ "${FILESDIR}"/${PN}-1.3.959-pandoc-mathjax.patch |
750 |
+ "${FILESDIR}"/${PN}-1.2.1335-linker_flags.patch |
751 |
+ "${FILESDIR}"/${PN}-1.3.959-qtsingleapplication.patch |
752 |
+ "${FILESDIR}"/${PN}-1.0.44-systemd.patch |
753 |
+ "${FILESDIR}"/${PN}-1.3.959-core.patch |
754 |
+ "${FILESDIR}"/${PN}-1.2.5042-boost-1.73.0.patch |
755 |
+ "${FILESDIR}"/${PN}-1.3.959-R-4.0.0.patch |
756 |
+) |
757 |
+ |
758 |
+src_unpack() { |
759 |
+ unpack ${P}.tar.gz |
760 |
+ cd "${S}" || die |
761 |
+ mkdir -p dependencies/common/dictionaries |
762 |
+ unzip -qd dependencies/common/dictionaries \ |
763 |
+ "${DISTDIR}"/core-dictionaries.zip || die |
764 |
+} |
765 |
+ |
766 |
+src_prepare() { |
767 |
+ cmake-utils_src_prepare |
768 |
+ java-pkg-2_src_prepare |
769 |
+ egit_clean |
770 |
+ |
771 |
+ # Enable CMake to install our .service file for systemd usage |
772 |
+ mkdir -vp "${S}/src/cpp/server/lib/systemd/system" || die |
773 |
+ cp -v "${FILESDIR}/rstudio-server.service.in" "${S}/src/cpp/server/lib/systemd/system/" || die |
774 |
+ |
775 |
+ # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using |
776 |
+ # this sed hack for now. ~RMH |
777 |
+ sed -i \ |
778 |
+ -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \ |
779 |
+ src/cpp/server/ServerOptions.cpp \ |
780 |
+ src/cpp/session/SessionOptions.cpp || die |
781 |
+ |
782 |
+ # use mathjax from system |
783 |
+ ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax-26 || die |
784 |
+ |
785 |
+ # make sure icons and mime stuff are with prefix |
786 |
+ sed -i \ |
787 |
+ -e "s:/usr:${EPREFIX}/usr:g" \ |
788 |
+ CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die |
789 |
+ |
790 |
+ # install themes in /etc/rstudio/extra/sthemes instead of /usr/extra/themes |
791 |
+ sed -i \ |
792 |
+ -e "s@\(DESTINATION \"\)\(extras/themes\"\)@\1${EROOT}/etc/rstudio/\2@" \ |
793 |
+ src/cpp/server/CMakeLists.txt || die |
794 |
+ |
795 |
+ # On Gentoo the rstudio-server configuration file is /etc/conf.d/rstudio-server.conf |
796 |
+ sed -e "s@/etc/rstudio/rserver.conf@${EROOT}/etc/conf.d/rstudio-server.conf@" \ |
797 |
+ -i src/cpp/server/ServerOptions.cpp \ |
798 |
+ || die |
799 |
+ |
800 |
+ # Set the rsession.conf file location for Gentoo prefix |
801 |
+ sed -e "s@/etc/rstudio/rsession.conf@${EROOT}/etc/rstudio/rsession.conf@" \ |
802 |
+ -i src/cpp/session/SessionOptions.cpp \ |
803 |
+ || die |
804 |
+ |
805 |
+ # dev-qt/qtsingleapplication-2.6.1_p20150629 does not provide a cmake module. |
806 |
+ # It provides a library that has its version number appended to the end, |
807 |
+ # which is difficult to handle in cmake, as find_library does not support |
808 |
+ # searching for wildcard library names. So I find the library name from the |
809 |
+ # qmake spec, and then sed this into the patched src/cpp/desktop/CMakeLists.txt. |
810 |
+ rm -rf "${S}"/src/cpp/desktop/3rdparty || die |
811 |
+ local s=$(grep '\-lQt$${QT_MAJOR_VERSION}Solutions_SingleApplication' \ |
812 |
+ $(qt5_get_mkspecsdir)/features/qtsingleapplication.prf \ |
813 |
+ | sed -e 's@\$\${QT_MAJOR_VERSION}@5@' \ |
814 |
+ -e 's@LIBS \*= -l@@') |
815 |
+ sed -e "s@Qt5Solutions_SingleApplication-2.6@${s}@g" \ |
816 |
+ -i "${S}"/src/cpp/desktop/CMakeLists.txt \ |
817 |
+ || die |
818 |
+ |
819 |
+ # The git commit for tag: git rev-list -n 1 v${PV} |
820 |
+ sed -e 's@git ARGS rev-parse HEAD@echo ARGS 3a09be39fd51a8fafa8ae330007937d31924b395@'\ |
821 |
+ -i "${S}"/CMakeLists.txt \ |
822 |
+ "${S}"/CMakeGlobals.txt \ |
823 |
+ || die |
824 |
+ |
825 |
+ eprefixify src/gwt/build.xml |
826 |
+} |
827 |
+ |
828 |
+src_configure() { |
829 |
+ export RSTUDIO_VERSION_MAJOR=$(ver_cut 1) |
830 |
+ export RSTUDIO_VERSION_MINOR=$(ver_cut 2) |
831 |
+ export RSTUDIO_VERSION_PATCH=$(ver_cut 3) |
832 |
+ |
833 |
+ local mycmakeargs=( |
834 |
+ -DDISTRO_SHARE=share/${PN} |
835 |
+ -DRSTUDIO_TARGET=$(usex dedicated "Server" "$(usex server "Development" "Desktop")") |
836 |
+ -DRSTUDIO_VERIFY_R_VERSION=FALSE |
837 |
+ -DRSTUDIO_USE_SYSTEM_BOOST=TRUE |
838 |
+ ) |
839 |
+ |
840 |
+ if use !dedicated; then |
841 |
+ mycmakeargs+=( |
842 |
+ -DRSTUDIO_INSTALL_FREEDESKTOP="$(usex !dedicated "ON" "OFF")" |
843 |
+ -DQT_QMAKE_EXECUTABLE=$(qt5_get_bindir)/qmake |
844 |
+ ) |
845 |
+ fi |
846 |
+ cmake-utils_src_configure |
847 |
+} |
848 |
+ |
849 |
+src_compile() { |
850 |
+ local JAVA_ANT_REWRITE_CLASSPATH="yes" |
851 |
+ local EANT_BUILD_XML="src/gwt/build.xml" |
852 |
+ local EANT_BUILD_TARGET="clean" |
853 |
+ java-pkg-2_src_compile |
854 |
+ |
855 |
+ # Avoid the rest of the oracle-jdk-bin-1.8.0.60 sandbox violations F: mkdir S: deny |
856 |
+ # P: /root/.oracle_jre_usage. |
857 |
+ export ANT_OPTS="-Duser.home=${T}" |
858 |
+ cmake-utils_src_compile |
859 |
+} |
860 |
+ |
861 |
+src_install() { |
862 |
+ export ANT_OPTS="-Duser.home=${T}" |
863 |
+ cmake-utils_src_install |
864 |
+ use dedicated || pax-mark m "${ED}/usr/bin/rstudio" |
865 |
+ doconfd "${FILESDIR}"/rstudio-server.conf |
866 |
+ insinto /etc/rstudio |
867 |
+ doins "${FILESDIR}"/rsession.conf |
868 |
+ dosym ../conf.d/rstudio-server.conf /etc/rstudio/rserver.conf |
869 |
+ if use dedicated || use server; then |
870 |
+ dopamd src/cpp/server/extras/pam/rstudio |
871 |
+ newinitd "${FILESDIR}"/rstudio-server.initd rstudio-server |
872 |
+ fi |
873 |
+} |
874 |
+ |
875 |
+pkg_preinst() { |
876 |
+ java-pkg-2_pkg_preinst |
877 |
+} |
878 |
+ |
879 |
+pkg_postinst() { |
880 |
+ use dedicated || { xdg_desktop_database_update |
881 |
+ xdg_mimeinfo_database_update |
882 |
+ xdg_icon_cache_update ;} |
883 |
+} |
884 |
+ |
885 |
+pkg_postrm() { |
886 |
+ use dedicated || { xdg_desktop_database_update |
887 |
+ xdg_mimeinfo_database_update |
888 |
+ xdg_icon_cache_update ;} |
889 |
+} |