Gentoo Archives: gentoo-commits

From: Mark Wright <gienah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/rstudio/files/, sci-mathematics/rstudio/
Date: Fri, 10 Jan 2020 08:45:35
Message-Id: 1578645801.8c2e866221a19364bb608688acd0794ecf86c204.gienah@gentoo
1 commit: 8c2e866221a19364bb608688acd0794ecf86c204
2 Author: Mark Wright <gienah <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jan 10 08:42:28 2020 +0000
4 Commit: Mark Wright <gienah <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 10 08:43:21 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c2e8662
7
8 sci-mathematics/rstudio: Bump to 1.2.5033, use acct rstudio-server
9
10 Thanks to John Dough for reporting the version bump bug #702140.
11
12 Thanks to toralf for reporting bug #693662. The egit_clean: command not found
13 is fixed by inherit vcs-clean.
14
15 The QA: other
16 The ebuild is installing to one or more unexpected paths:
17
18 /usr/extras
19
20 is fixed with the sed under this comment:
21 # install themes in /etc/rstudio/extra/sthemes instead of /usr/extra/themes
22
23 The: One or more CMake variables were not used by the project:
24 QT_QMAKE_EXECUTABLE
25 RSTUDIO_INSTALL_FREEDESKTOP
26
27 is fixed by only setting these variables if use !dedicated.
28
29 Thanks to Alessandro Barbieri reporting bug #696944, the dependencies are
30 unbundled in rstudio 1.2.5033.ebuild, and some needless dependencies are
31 removed.
32
33 Closes: https://bugs.gentoo.org/show_bug.cgi?id=702140
34 Closes: https://bugs.gentoo.org/show_bug.cgi?id=693662
35 Closes: https://bugs.gentoo.org/show_bug.cgi?id=696944
36 Package-Manager: Portage-2.3.84, Repoman-2.3.20
37 Signed-off-by: Mark Wright <gienah <AT> gentoo.org>
38
39 sci-mathematics/rstudio/Manifest | 1 +
40 .../rstudio/files/rstudio-1.2.5033-pandoc.patch | 32 +++
41 .../rstudio/files/rstudio-1.2.5033-paths.patch | 118 +++++++++++
42 .../rstudio/files/rstudio-1.2.5033-prefs.patch | 83 ++++++++
43 sci-mathematics/rstudio/rstudio-1.2.5033.ebuild | 235 +++++++++++++++++++++
44 5 files changed, 469 insertions(+)
45
46 diff --git a/sci-mathematics/rstudio/Manifest b/sci-mathematics/rstudio/Manifest
47 index 2c0bab41204..48c017368ef 100644
48 --- a/sci-mathematics/rstudio/Manifest
49 +++ b/sci-mathematics/rstudio/Manifest
50 @@ -9,6 +9,7 @@ DIST rmarkdown-0.98.1000.tar.gz 1423820 BLAKE2B eac8c9cf438c9b44ddfe954602dd67a8
51 DIST rsconnect_0.4.1.4_fcac892a69817febd7b655b189bf57193260cda0.tar.gz 197051 BLAKE2B 1f3f9fe71d7b50ab5108dfdbd3cc0b882bcc935ee58e8a9145b07a18bb86c39bc45e321a13add24df99492bc30548df716775c339bcbf4efc2bfe158299ae55a SHA512 208dc349f4aa7613ecf94939aba60d22d3a06972344b526c9b6c951015571f5922927bca08db571a7b8a268e42609a4f558f01278c9685f6da2ffc66a1f95ade
52 DIST rstudio-1.1.463.tar.gz 20203779 BLAKE2B 97f879539cbb7051af362a8469795a47feb42d18ff46dbbdffe36e0685d1cd5704848b3bf5a5611d482a09567722e35288527302cd521b18e2a48b347c919e17 SHA512 987347563a9726363c28d866e1372eae8eb19a5cbd0e33c7ee0e0c8f90471c4b69de0f559c00410523841b6c090b584652e01496f5db33c015a4554d2f4e179b
53 DIST rstudio-1.2.1335.tar.gz 20440199 BLAKE2B cdd54a7df5a234bcc6d440f4ba5b45e58ea469f8dac5a17d9088f9d65035495c86b5a308cde28a224648f96a74038299863291f3c516a1d567762ecc5bfb079c SHA512 90657effc55264bf3efa1a8a5d2bbe94a37727f0450202ade99b9fbb71ea75b6dd9fa798d17cd4d1a1a97a16f186de8004d1888b6ea43f36d5252508520d3cde
54 +DIST rstudio-1.2.5033.tar.gz 20456976 BLAKE2B 3cbca6a5180690104dddf1456168bd38708d4152ed9b7a167035dd66e270aeb6405169d34461cbd899738be1872607e3f3b6f81ff0b3c9e6a9ed965a889b1393 SHA512 3569d4fed342275a9905c87e4f97be63b6391d2c37f75397e06201a7c31f80d94799214f51ff8e57d458ef18d5e54afe1ec8a7c56ac05ed8b8225ecca72d1daf
55 DIST selenium-java-2.37.0.zip 24625928 BLAKE2B b369a805ae96f0d0913c4be42888d9c2a1e213ff982f9daefe73fadb705baa80ab0186ab50ed52609e83697cffaf8d617d06d75405cb8e1c3fe8e7c5b81dba25 SHA512 68624e82dbc751a25c50fad72702a98eb30d77fd4337d2a969f8e06bcc49e5f8c835cd27ec53772f3375014ddde1d5636936e966b75f3594a9f86aa18ba4e779
56 DIST selenium-server-standalone-2.37.0.jar 34730734 BLAKE2B 3899b1d4c5f9153c1f9f13bec66f7c1456ea2e0f34db7d8e54a1ce9063c33a05b3cf95216c2ae06bb40504f72f343a4b9ba6c8553fbbc340e7c18a5b612dde5c SHA512 b215446d42d2d1f69664349b6ae6dc53a532d3624c91254f0f4183d0ad764648792e5cc1126a55a1e60d9687d55200fed01d6d2f46cc3d853b1fa6ee38111018
57 DIST shinyapps-0.98.1000.tar.gz 910095 BLAKE2B 4f9364692348bb52cbd12cc6ee447841cb0c805327f2518b2a9545920b602b954a98dea68ccb3daf32d2c3bab6464fb15402844d93277193315f1ae7b3ca5190 SHA512 3162317c4c20cfc1497e952a8235867084d629ae88407e6c465b3e208adb1dc97abfe6b9922e0374ddf4c8e38a76e112942bd312c54a66f74e6f2a3fe4c0a07c
58
59 diff --git a/sci-mathematics/rstudio/files/rstudio-1.2.5033-pandoc.patch b/sci-mathematics/rstudio/files/rstudio-1.2.5033-pandoc.patch
60 new file mode 100644
61 index 00000000000..b4f611063e1
62 --- /dev/null
63 +++ b/sci-mathematics/rstudio/files/rstudio-1.2.5033-pandoc.patch
64 @@ -0,0 +1,32 @@
65 +--- rstudio-1.2.5033-orig/src/cpp/session/CMakeLists.txt 2019-12-04 17:22:17.000000000 +1100
66 ++++ rstudio-1.2.5033/src/cpp/session/CMakeLists.txt 2020-01-07 12:29:20.174304185 +1100
67 +@@ -25,9 +25,6 @@
68 + if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/mathjax-26")
69 + message(FATAL_ERROR "Mathjax 2.6 not found (re-run install-dependencies script to install)")
70 + endif()
71 +-if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc")
72 +- message(FATAL_ERROR "pandoc not found (re-run install-dependencies script to install)")
73 +-endif()
74 +
75 + # we often install embedded versions of these packages but don't do so currently
76 +
77 +@@ -490,19 +487,6 @@
78 + install(DIRECTORY "resources/connections"
79 + DESTINATION ${RSTUDIO_INSTALL_SUPPORTING}/resources)
80 +
81 +- # install pandoc
82 +- if(WIN32)
83 +- set(PANDOC_VERSION "2.7.2" CACHE INTERNAL "Pandoc version")
84 +- else()
85 +- set(PANDOC_VERSION "2.3.1" CACHE INTERNAL "Pandoc version")
86 +- endif()
87 +-
88 +- set(PANDOC_BIN "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc/${PANDOC_VERSION}")
89 +- file(GLOB PANDOC_FILES "${PANDOC_BIN}/pandoc*")
90 +- install(FILES ${PANDOC_FILES}
91 +- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
92 +- DESTINATION ${RSTUDIO_INSTALL_BIN}/pandoc)
93 +-
94 + # install rmarkdown package
95 + # file(GLOB RMARKDOWN_PACKAGE "${RSTUDIO_DEPENDENCIES_DIR}/common/rmarkdown*.tar.gz")
96 + # install(FILES ${RMARKDOWN_PACKAGE}
97
98 diff --git a/sci-mathematics/rstudio/files/rstudio-1.2.5033-paths.patch b/sci-mathematics/rstudio/files/rstudio-1.2.5033-paths.patch
99 new file mode 100644
100 index 00000000000..aa6a9b23fde
101 --- /dev/null
102 +++ b/sci-mathematics/rstudio/files/rstudio-1.2.5033-paths.patch
103 @@ -0,0 +1,118 @@
104 +--- rstudio-1.2.5033-orig/CMakeGlobals.txt 2019-12-04 17:22:17.000000000 +1100
105 ++++ rstudio-1.2.5033/CMakeGlobals.txt 2020-01-07 12:20:19.115307754 +1100
106 +@@ -175,7 +175,7 @@
107 + else()
108 + set(RSTUDIO_INSTALL_BIN bin)
109 + endif()
110 +- set(RSTUDIO_INSTALL_SUPPORTING .)
111 ++ set(RSTUDIO_INSTALL_SUPPORTING ${DISTRO_SHARE})
112 + endif()
113 +
114 + # if the install prefix is /usr/local then tweak as appropriate
115 +--- rstudio-1.2.5033-orig/src/cpp/server/CMakeLists.txt 2019-12-04 17:22:17.000000000 +1100
116 ++++ rstudio-1.2.5033/src/cpp/server/CMakeLists.txt 2020-01-07 12:17:32.736309024 +1100
117 +@@ -194,7 +194,7 @@
118 + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT}.in
119 + ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT})
120 + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT}
121 +- DESTINATION ${RSERVER_INITD_DEBIAN_DIR})
122 ++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_DEBIAN_DIR})
123 +
124 + # install configured redhat init.d script
125 + set(RSERVER_INITD_REDHAT_DIR "extras/init.d/redhat")
126 +@@ -202,7 +202,7 @@
127 + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_REDHAT_SCRIPT}.in
128 + ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_REDHAT_SCRIPT})
129 + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_REDHAT_SCRIPT}
130 +- DESTINATION ${RSERVER_INITD_REDHAT_DIR})
131 ++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_REDHAT_DIR})
132 +
133 + # install configured suse init.d script
134 + set(RSERVER_INITD_SUSE_DIR "extras/init.d/suse")
135 +@@ -210,13 +210,13 @@
136 + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_SUSE_SCRIPT}.in
137 + ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_SUSE_SCRIPT})
138 + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_SUSE_SCRIPT}
139 +- DESTINATION ${RSERVER_INITD_SUSE_DIR})
140 ++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_SUSE_DIR})
141 +
142 + # install pam profile
143 + set(RSERVER_PAM_DIR "extras/pam")
144 + set(RSERVER_PAM_PROFILE "${RSERVER_PAM_DIR}/rstudio")
145 + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_PAM_PROFILE}
146 +- DESTINATION ${RSERVER_PAM_DIR})
147 ++ DESTINATION ${DISTRO_SHARE}/${RSERVER_PAM_DIR})
148 +
149 + # install configured upstart profile
150 + set(RSERVER_UPSTART_DIR "extras/upstart")
151 +@@ -224,12 +224,12 @@
152 + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_UPSTART_PROFILE}.in
153 + ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE})
154 + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE}
155 +- DESTINATION ${RSERVER_UPSTART_DIR})
156 ++ DESTINATION ${DISTRO_SHARE}/${RSERVER_UPSTART_DIR})
157 + set(RSERVER_UPSTART_PROFILE_REDHAT "${RSERVER_UPSTART_DIR}/rstudio-server.redhat.conf")
158 + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT}.in
159 + ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT})
160 + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT}
161 +- DESTINATION ${RSERVER_UPSTART_DIR})
162 ++ DESTINATION ${DISTRO_SHARE}/${RSERVER_UPSTART_DIR})
163 +
164 + # install configured systemd profile
165 + set(RSERVER_SYSTEMD_DIR "extras/systemd")
166 +--- rstudio-1.2.5033-orig/src/cpp/server/ServerOptions.cpp 2019-12-04 17:22:17.000000000 +1100
167 ++++ rstudio-1.2.5033/src/cpp/server/ServerOptions.cpp 2020-01-07 12:17:32.773309023 +1100
168 +@@ -389,8 +389,8 @@
169 +
170 + // convert relative paths by completing from the system installation
171 + // path (this allows us to be relocatable)
172 +- resolvePath(resourcePath, &wwwLocalPath_);
173 +- resolvePath(resourcePath, &wwwSymbolMapsPath_);
174 ++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &wwwLocalPath_);
175 ++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &wwwSymbolMapsPath_);
176 + resolvePath(binaryPath, &authPamHelperPath_);
177 + resolvePath(binaryPath, &rsessionPath_);
178 + resolvePath(binaryPath, &rldpathPath_);
179 +--- rstudio-1.2.5033-orig/src/cpp/session/SessionOptions.cpp 2019-12-04 17:22:17.000000000 +1100
180 ++++ rstudio-1.2.5033/src/cpp/session/SessionOptions.cpp 2020-01-07 12:17:32.774309023 +1100
181 +@@ -53,7 +53,7 @@
182 + namespace session {
183 +
184 + namespace {
185 +-const char* const kDefaultPandocPath = "bin/pandoc";
186 ++const char* const kDefaultPandocPath = "bin";
187 + const char* const kDefaultPostbackPath = "bin/postback/rpostback";
188 + const char* const kDefaultRsclangPath = "bin/rsclang";
189 +
190 +@@ -571,14 +571,14 @@
191 + }
192 +
193 + // convert relative paths by completing from the app resource path
194 +- resolvePath(resourcePath_, &rResourcesPath_);
195 +- resolvePath(resourcePath_, &agreementFilePath_);
196 +- resolvePath(resourcePath_, &wwwLocalPath_);
197 +- resolvePath(resourcePath_, &wwwSymbolMapsPath_);
198 +- resolvePath(resourcePath_, &coreRSourcePath_);
199 +- resolvePath(resourcePath_, &modulesRSourcePath_);
200 +- resolvePath(resourcePath_, &sessionLibraryPath_);
201 +- resolvePath(resourcePath_, &sessionPackageArchivesPath_);
202 ++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &rResourcesPath_);
203 ++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &agreementFilePath_);
204 ++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &wwwLocalPath_);
205 ++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &wwwSymbolMapsPath_);
206 ++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &coreRSourcePath_);
207 ++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &modulesRSourcePath_);
208 ++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &sessionLibraryPath_);
209 ++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &sessionPackageArchivesPath_);
210 + resolvePostbackPath(resourcePath_, &rpostbackPath_);
211 + #ifdef _WIN32
212 + resolvePath(resourcePath_, &consoleIoPath_);
213 +@@ -611,7 +611,7 @@
214 + }
215 + winptyPath_ = pty.complete(completion).absolutePath();
216 + #endif // _WIN32
217 +- resolvePath(resourcePath_, &hunspellDictionariesPath_);
218 ++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &hunspellDictionariesPath_);
219 + resolvePath(resourcePath_, &mathjaxPath_);
220 + resolvePath(resourcePath_, &libclangHeadersPath_);
221 + resolvePandocPath(resourcePath_, &pandocPath_);
222
223 diff --git a/sci-mathematics/rstudio/files/rstudio-1.2.5033-prefs.patch b/sci-mathematics/rstudio/files/rstudio-1.2.5033-prefs.patch
224 new file mode 100644
225 index 00000000000..034eba37a8b
226 --- /dev/null
227 +++ b/sci-mathematics/rstudio/files/rstudio-1.2.5033-prefs.patch
228 @@ -0,0 +1,83 @@
229 +--- rstudio-1.2.5033-orig/src/gwt/build.xml 2019-12-04 17:22:17.000000000 +1100
230 ++++ rstudio-1.2.5033/src/gwt/build.xml 2020-01-10 18:35:29.913030923 +1100
231 +@@ -28,17 +28,35 @@
232 + classname="com.google.javascript.jscomp.ant.CompileTask"
233 + classpath="${tools.dir}/compiler/compiler.jar"/>
234 +
235 ++ <!-- Configure path to aopalliance -->
236 ++ <property name="aopalliance.sdk" value="@GENTOO_PORTAGE_EPREFIX@/usr/share/aopalliance-1/lib"/>
237 ++
238 ++ <!-- Configure path to javax-inject -->
239 ++ <property name="javax.inject" value="@GENTOO_PORTAGE_EPREFIX@/usr/share/javax-inject/lib"/>
240 ++
241 ++ <!-- Configure path to validation-api -->
242 ++ <property name="validation.api" value="@GENTOO_PORTAGE_EPREFIX@/usr/share/validation-api-1.0/lib"/>
243 ++ <property name="validation.api.sources" value="@GENTOO_PORTAGE_EPREFIX@/usr/share/validation-api-1.0/sources"/>
244 ++
245 + <!-- Configure path to GWT SDK -->
246 +- <property name="gwt.sdk" value="${lib.dir}/gwt/2.8.1"/>
247 ++ <property name="gwt.sdk" value="@GENTOO_PORTAGE_EPREFIX@/usr/share/gwt-2.8/lib"/>
248 ++
249 ++ <!-- Configure path to Google Gin -->
250 ++ <property name="gin.sdk" value="@GENTOO_PORTAGE_EPREFIX@/usr/share/gin-2.1/lib"/>
251 +
252 + <property name="gwt.extra.args" value=""/>
253 + <property name="gwt.main.module" value="org.rstudio.studio.RStudio"/>
254 + <property name="ace.bin" value="${src.dir}/org/rstudio/studio/client/workbench/views/source/editors/text/ace"/>
255 ++ <property environment="env"/>
256 +
257 + <path id="project.class.path">
258 + <pathelement location="${build.dir}"/>
259 ++ <fileset dir="${aopalliance.sdk}" includes="*.jar"/>
260 ++ <fileset dir="${javax.inject}" includes="*.jar"/>
261 ++ <fileset dir="${validation.api}" includes="*.jar"/>
262 ++ <fileset dir="${validation.api.sources}" includes="*.zip"/>
263 + <fileset dir="${gwt.sdk}" includes="*.jar"/>
264 +- <fileset dir="${lib.dir}/gin/2.1.2" includes="*.jar"/>
265 ++ <fileset dir="${gin.sdk}" includes="*.jar"/>
266 + </path>
267 +
268 + <path id="test.class.path">
269 +@@ -112,8 +130,10 @@
270 + <pathelement location="${src.dir}"/>
271 + <path refid="project.class.path"/>
272 + </classpath>
273 ++ <jvmarg value="-Duser.home=${env.T}"/>
274 + <!-- add jvmarg -Xss16M or similar if you see a StackOverflowError -->
275 + <jvmarg value="-Xmx1536M"/>
276 ++ <jvmarg value="-Djava.util.prefs.userRoot=${env.T}"/>
277 + <arg value="-war"/>
278 + <arg value="${www.dir}"/>
279 + <arg value="-localWorkers"/>
280 +@@ -154,6 +174,7 @@
281 + <pathelement location="${src.dir}"/>
282 + <path refid="project.class.path"/>
283 + </classpath>
284 ++ <jvmarg value="-Duser.home=${env.T}"/>
285 + <jvmarg value="-Xmx2048M"/>
286 + <arg value="-style"/>
287 + <arg value="PRETTY"/>
288 +@@ -176,6 +197,7 @@
289 + <pathelement location="src"/>
290 + <path refid="project.class.path"/>
291 + </classpath>
292 ++ <jvmarg value="-Duser.home=${env.T}"/>
293 + <jvmarg value="-Xmx2048M"/>
294 + <arg value="-style"/>
295 + <arg value="PRETTY"/>
296 +@@ -202,6 +224,7 @@
297 + <pathelement location="src"/>
298 + <path refid="project.class.path"/>
299 + </classpath>
300 ++ <jvmarg value="-Duser.home=${env.T}"/>
301 + <jvmarg value="-Xmx2048M"/>
302 + <arg value="-src"/>
303 + <arg value = "src"/>
304 +@@ -237,6 +260,7 @@
305 + <pathelement location="${test.dir}"/>
306 + <pathelement location="${src.dir}"/>
307 + </classpath>
308 ++ <jvmarg value="-Duser.home=${env.T}"/>
309 + <classpath refid="project.class.path"/>
310 + <classpath refid="unittest.class.path"/>
311 + <arg value="org.rstudio.studio.client.RStudioUnitTestSuite"/>
312
313 diff --git a/sci-mathematics/rstudio/rstudio-1.2.5033.ebuild b/sci-mathematics/rstudio/rstudio-1.2.5033.ebuild
314 new file mode 100644
315 index 00000000000..88b8f9d905b
316 --- /dev/null
317 +++ b/sci-mathematics/rstudio/rstudio-1.2.5033.ebuild
318 @@ -0,0 +1,235 @@
319 +# Copyright 1999-2020 Gentoo Authors
320 +# Distributed under the terms of the GNU General Public License v2
321 +
322 +EAPI=7
323 +
324 +inherit eutils cmake-utils pam xdg-utils java-pkg-2 java-ant-2 pax-utils prefix qmake-utils vcs-clean
325 +
326 +# TODO
327 +# * use dict from tree, linguas
328 +# * do src_test (use junit from tree?)
329 +
330 +# update from scripts in dependencies/common
331 +# egrep '(GWT_SDK_VER=|GIN_VER=)' dependencies/common/install-gwt
332 +GWT_VER=2.8.1
333 +GIN_VER=2.1.2
334 +# grep 'PANDOC_VERSION=' dependencies/common/install-pandoc
335 +# It should be PANDOC_VER=2.3.1 however >=app-text/pandoc-2.3.1 is not yet in portage
336 +PANDOC_VER=1.19.2.1
337 +# grep -5 QT_CANDIDATES src/cpp/desktop/CMakeLists.txt
338 +QT_VER=5.10
339 +QT_SLOT=5
340 +
341 +DESCRIPTION="IDE for the R language"
342 +HOMEPAGE="
343 + http://www.rstudio.org
344 + https://github.com/rstudio/rstudio/"
345 +SRC_URI="
346 + https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz
347 + https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip
348 +"
349 +
350 +LICENSE="AGPL-3"
351 +SLOT="0"
352 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
353 +IUSE="dedicated libressl server"
354 +
355 +RDEPEND="
356 + >=app-text/pandoc-${PANDOC_VER}
357 + dev-java/aopalliance:1
358 + dev-java/gin:2.1
359 + dev-java/gwt:2.8
360 + dev-java/javax-inject
361 + =dev-java/validation-api-1.0*:1.0[source]
362 + dev-haskell/pandoc-citeproc
363 + dev-lang/R
364 + dev-libs/boost:=
365 + >=dev-libs/mathjax-2.7.4
366 + sys-apps/util-linux
367 + sys-devel/clang:*
368 + sys-libs/zlib
369 + >=virtual/jre-1.8:=
370 + x11-libs/pango
371 + !dedicated? (
372 + >=dev-qt/qtcore-${QT_VER}:${QT_SLOT}
373 + >=dev-qt/qtdeclarative-${QT_VER}:${QT_SLOT}
374 + >=dev-qt/qtdbus-${QT_VER}:${QT_SLOT}
375 + >=dev-qt/qtgui-${QT_VER}:${QT_SLOT}
376 + >=dev-qt/qtnetwork-${QT_VER}:${QT_SLOT}
377 + >=dev-qt/qtopengl-${QT_VER}:${QT_SLOT}
378 + >=dev-qt/qtpositioning-${QT_VER}:${QT_SLOT}
379 + >=dev-qt/qtprintsupport-${QT_VER}:${QT_SLOT}
380 + >=dev-qt/qtsingleapplication-2.6.1_p20150629[X,qt5(+)]
381 + >=dev-qt/qtsensors-${QT_VER}:${QT_SLOT}
382 + >=dev-qt/qtsql-${QT_VER}:${QT_SLOT}
383 + >=dev-qt/qtsvg-${QT_VER}:${QT_SLOT}
384 + >=dev-qt/qtwebchannel-${QT_VER}:${QT_SLOT}
385 + >=dev-qt/qtwebengine-${QT_VER}:${QT_SLOT}[widgets]
386 + >=dev-qt/qtwidgets-${QT_VER}:${QT_SLOT}
387 + >=dev-qt/qtxml-${QT_VER}:${QT_SLOT}
388 + >=dev-qt/qtxmlpatterns-${QT_VER}:${QT_SLOT}
389 + server? ( sys-libs/pam )
390 + )
391 + dedicated? ( sys-libs/pam )
392 + dedicated? (
393 + sys-libs/pam
394 + acct-user/rstudio-server
395 + acct-group/rstudio-server
396 + )
397 + server? (
398 + acct-user/rstudio-server
399 + acct-group/rstudio-server
400 + )
401 + !libressl? ( dev-libs/openssl:0= )
402 + libressl? ( dev-libs/libressl:0= )"
403 +DEPEND="${RDEPEND}
404 + app-arch/unzip
405 + dev-java/ant-core
406 + >=virtual/jdk-1.8:=
407 + virtual/pkgconfig"
408 +# test? ( dev-java/junit:4 )
409 +
410 +PATCHES=(
411 + "${FILESDIR}"/${PN}-1.2.5033-prefs.patch
412 + "${FILESDIR}"/${PN}-1.2.5033-paths.patch
413 + "${FILESDIR}"/${PN}-1.2.5033-pandoc.patch
414 + "${FILESDIR}"/${PN}-1.2.1335-linker_flags.patch
415 + "${FILESDIR}"/${PN}-1.2.1335-qtsingleapplication.patch
416 + "${FILESDIR}"/${PN}-1.0.44-systemd.patch
417 + "${FILESDIR}"/${PN}-1.2.1335-core.patch
418 + "${FILESDIR}"/${PN}-1.2.1335-boost-1.70.0_p1.patch
419 + "${FILESDIR}"/${PN}-1.2.1335-boost-1.70.0_p2.patch
420 +)
421 +
422 +src_unpack() {
423 + unpack ${P}.tar.gz
424 + cd "${S}" || die
425 + mkdir -p dependencies/common/dictionaries
426 + unzip -qd dependencies/common/dictionaries \
427 + "${DISTDIR}"/core-dictionaries.zip || die
428 +}
429 +
430 +src_prepare() {
431 + cmake-utils_src_prepare
432 + java-pkg-2_src_prepare
433 + egit_clean
434 +
435 + # Enable CMake to install our .service file for systemd usage
436 + mkdir -vp "${S}/src/cpp/server/lib/systemd/system" || die
437 + cp -v "${FILESDIR}/rstudio-server.service.in" "${S}/src/cpp/server/lib/systemd/system/" || die
438 +
439 + # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using
440 + # this sed hack for now. ~RMH
441 + sed -i \
442 + -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \
443 + src/cpp/server/ServerOptions.cpp \
444 + src/cpp/session/SessionOptions.cpp || die
445 +
446 + # use mathjax from system
447 + ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax-26 || die
448 +
449 + # make sure icons and mime stuff are with prefix
450 + sed -i \
451 + -e "s:/usr:${EPREFIX}/usr:g" \
452 + CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die
453 +
454 + # install themes in /etc/rstudio/extra/sthemes instead of /usr/extra/themes
455 + sed -i \
456 + -e "s@\(DESTINATION \"\)\(extras/themes\"\)@\1${EROOT}/etc/rstudio/\2@" \
457 + src/cpp/server/CMakeLists.txt || die
458 +
459 + # On Gentoo the rstudio-server configuration file is /etc/conf.d/rstudio-server.conf
460 + sed -e "s@/etc/rstudio/rserver.conf@${EROOT}/etc/conf.d/rstudio-server.conf@" \
461 + -i src/cpp/server/ServerOptions.cpp \
462 + || die
463 +
464 + # Set the rsession.conf file location for Gentoo prefix
465 + sed -e "s@/etc/rstudio/rsession.conf@${EROOT}/etc/rstudio/rsession.conf@" \
466 + -i src/cpp/session/SessionOptions.cpp \
467 + || die
468 +
469 + # dev-qt/qtsingleapplication-2.6.1_p20150629 does not provide a cmake module.
470 + # It provides a library that has its version number appended to the end,
471 + # which is difficult to handle in cmake, as find_library does not support
472 + # searching for wildcard library names. So I find the library name from the
473 + # qmake spec, and then sed this into the patched src/cpp/desktop/CMakeLists.txt.
474 + rm -rf "${S}"/src/cpp/desktop/3rdparty || die
475 + local s=$(grep '\-lQt$${QT_MAJOR_VERSION}Solutions_SingleApplication' \
476 + $(qt5_get_mkspecsdir)/features/qtsingleapplication.prf \
477 + | sed -e 's@\$\${QT_MAJOR_VERSION}@5@' \
478 + -e 's@LIBS \*= -l@@')
479 + sed -e "s@Qt5Solutions_SingleApplication-2.6@${s}@g" \
480 + -i "${S}"/src/cpp/desktop/CMakeLists.txt \
481 + || die
482 +
483 + # The git commit for tag: git rev-list -n 1 v${PV}
484 + sed -e 's@git ARGS rev-parse HEAD@echo ARGS 6871a99b32add885fe6fa3d50fe15f62346142e7@'\
485 + -i "${S}"/CMakeLists.txt \
486 + "${S}"/CMakeGlobals.txt \
487 + || die
488 +
489 + eprefixify src/gwt/build.xml
490 +}
491 +
492 +src_configure() {
493 + export RSTUDIO_VERSION_MAJOR=$(ver_cut 1)
494 + export RSTUDIO_VERSION_MINOR=$(ver_cut 2)
495 + export RSTUDIO_VERSION_PATCH=$(ver_cut 3)
496 +
497 + local mycmakeargs=(
498 + -DDISTRO_SHARE=share/${PN}
499 + -DRSTUDIO_TARGET=$(usex dedicated "Server" "$(usex server "Development" "Desktop")")
500 + -DRSTUDIO_VERIFY_R_VERSION=FALSE
501 + )
502 +
503 + if use !dedicated; then
504 + mycmakeargs+=(
505 + -DRSTUDIO_INSTALL_FREEDESKTOP="$(usex !dedicated "ON" "OFF")"
506 + -DQT_QMAKE_EXECUTABLE=$(qt5_get_bindir)/qmake
507 + )
508 + fi
509 + cmake-utils_src_configure
510 +}
511 +
512 +src_compile() {
513 + local JAVA_ANT_REWRITE_CLASSPATH="yes"
514 + local EANT_BUILD_XML="src/gwt/build.xml"
515 + local EANT_BUILD_TARGET="clean"
516 + java-pkg-2_src_compile
517 +
518 + # Avoid the rest of the oracle-jdk-bin-1.8.0.60 sandbox violations F: mkdir S: deny
519 + # P: /root/.oracle_jre_usage.
520 + export ANT_OPTS="-Duser.home=${T}"
521 + cmake-utils_src_compile
522 +}
523 +
524 +src_install() {
525 + export ANT_OPTS="-Duser.home=${T}"
526 + cmake-utils_src_install
527 + use dedicated || pax-mark m "${ED}/usr/bin/rstudio"
528 + doconfd "${FILESDIR}"/rstudio-server.conf
529 + dodir /etc/rstudio
530 + insinto /etc/rstudio
531 + doins "${FILESDIR}"/rsession.conf
532 + dosym ../conf.d/rstudio-server.conf /etc/rstudio/rserver.conf
533 + if use dedicated || use server; then
534 + dopamd src/cpp/server/extras/pam/rstudio
535 + newinitd "${FILESDIR}"/rstudio-server.initd rstudio-server
536 + fi
537 +}
538 +
539 +pkg_preinst() {
540 + java-pkg-2_pkg_preinst
541 +}
542 +
543 +pkg_postinst() {
544 + use dedicated || { xdg_desktop_database_update
545 + xdg_mimeinfo_database_update
546 + xdg_icon_cache_update ;}
547 +}
548 +
549 +pkg_postrm() {
550 + use dedicated || { xdg_desktop_database_update
551 + xdg_mimeinfo_database_update
552 + xdg_icon_cache_update ;}
553 +}