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/, sci-mathematics/rstudio/files/
Date: Fri, 02 Dec 2016 01:07:54
Message-Id: 1480640829.9b2645061cdbc30b2a6bfaab0937083c91655070.gienah@gentoo
1 commit: 9b2645061cdbc30b2a6bfaab0937083c91655070
2 Author: Mark Wright <gienah <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 2 01:06:31 2016 +0000
4 Commit: Mark Wright <gienah <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 2 01:07:09 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b264506
7
8 sci-mathematics/rstudio: Bump to 1.0.44, thanks to David Luna for reporting.
9
10 Gentoo-Bug: 599282
11
12 Package-Manager: portage-2.3.2
13
14 sci-mathematics/rstudio/Manifest | 1 +
15 .../files/rstudio-1.0.44-clang-pandoc.patch | 71 ++++++
16 .../rstudio/files/rstudio-1.0.44-paths.patch | 130 +++++++++++
17 .../rstudio/files/rstudio-1.0.44-systemd.patch | 21 ++
18 sci-mathematics/rstudio/rstudio-1.0.44.ebuild | 248 +++++++++++++++++++++
19 5 files changed, 471 insertions(+)
20
21 diff --git a/sci-mathematics/rstudio/Manifest b/sci-mathematics/rstudio/Manifest
22 index 8ff2707..26d0c77 100644
23 --- a/sci-mathematics/rstudio/Manifest
24 +++ b/sci-mathematics/rstudio/Manifest
25 @@ -28,6 +28,7 @@ DIST rstudio-0.99.893.tar.gz 17407634 SHA256 90a657b1fa16cfc575ca884789bac47f178
26 DIST rstudio-0.99.896.tar.gz 17409121 SHA256 05fc7546ad1d21d7e6219538056ec2ee1b86d09b731a588198ce137d3fe25bae SHA512 c62df2a1c54f8c6d14b1239dd746b88693c11c48ec56aa5ae89023e98901793b0e65df44526cbc8c71036c0f73a512767cae086ed3777540b1ceda05e3398e17 WHIRLPOOL 7f4d0ebc8db509f09ccc15da02a4a426de431312f2dc65126bda76e11de0e106671fc7a83e9ea8e66b88f81268d0db8b44014a70744b30641bb58bedda73427d
27 DIST rstudio-0.99.902.tar.gz 17408815 SHA256 703a3ebedbb4bb44d2cacffed2615b4f65156fcd4115029931eb5fd99950c689 SHA512 23db68f05900666287901d75f02006f7edacafab057d82a312b4e5aac639ef4b5db702420632f2768e509411bbfc73c32a533aa0f1b33379c10df82e009b974e WHIRLPOOL e7ef3cf0d9a414257c4c0c68809c674721f9513917bd450c9946133ee69dd735374417483c7dc380ee4d387119558c961d4ea815aac5bcd3fa22ee863556e0a4
28 DIST rstudio-0.99.903.tar.gz 17409865 SHA256 8902fe7a6f7f6e0d6e8fae2472e479bb9cbe9cbb2e0747e5f01a093d31993a3c SHA512 9ddcfdab187c907dfa3cbf386ee902b43ba35c242b44a4190c58d1e3bad590ca428209423739768b57f759c4bde61ef2b5958fb3cba366d7740753c3c5dbf739 WHIRLPOOL 82ca64883d02aacc0c1081779f769c3ea2bbac3c370f1e62fba18465547742114df18d431f30c3fe449c0ae2ac212cd7dd98a72bb2e5810eb1fc6cdbb3c82a69
29 +DIST rstudio-1.0.44.tar.gz 17774065 SHA256 43ece6cfdd1a13ac0e17f2a50154a30a1a14ad6c1b3cf381cc6007988ce44a0f SHA512 a8b975dc517125a257e5f61db5bb137e133b02d738d55553770aa65e388cd112ce646b53b77dc069d1ca95ccd95979f4a57ad60b99fc3b91543cf61e737e8169 WHIRLPOOL 4ad472aed130451e81d8d8e3251d3bbd701a8b8e2fbddf17dc357f39335e33c75505f9443c2c7208e60a19c2767b9328134433e5d4fd22504813020712c658ef
30 DIST selenium-java-2.37.0.zip 24625928 SHA256 0eebba65d8edb01c1f46e462907c58f5d6e1cb0ddf63660a9985c8432bdffbb7 SHA512 68624e82dbc751a25c50fad72702a98eb30d77fd4337d2a969f8e06bcc49e5f8c835cd27ec53772f3375014ddde1d5636936e966b75f3594a9f86aa18ba4e779 WHIRLPOOL eb6659aae26f3c78b6f998546b23d0636c9d00ed8a7f985db1463ac4bd483ccb3e643d84e2ca0f59e0636a8de79eb552ff1d68eb6f9c06907029f7552d8f7777
31 DIST selenium-server-standalone-2.37.0.jar 34730734 SHA256 97bc8c699037fb6e99ba7af570fb60dbb1b7ce30cde2448287a44ef65b13023e SHA512 b215446d42d2d1f69664349b6ae6dc53a532d3624c91254f0f4183d0ad764648792e5cc1126a55a1e60d9687d55200fed01d6d2f46cc3d853b1fa6ee38111018 WHIRLPOOL 20640591534f31f24825a9ed139589b182e8b60d86541bf0be104d3cc0280983f6566bd0459f2253ac3875b48a2798b205bac8f815a119fff6db625ce9bbc29e
32 DIST shinyapps-0.98.1000.tar.gz 910095 SHA256 b95c512ae0a0fb4335878d9cfcf9073e2cb3ccfed73543abe27ea8878ed36d57 SHA512 3162317c4c20cfc1497e952a8235867084d629ae88407e6c465b3e208adb1dc97abfe6b9922e0374ddf4c8e38a76e112942bd312c54a66f74e6f2a3fe4c0a07c WHIRLPOOL ecc2bce78387cb42e9989163d8fca29220e66f085acde3323417058aebb624dafa8c0e1873c7d79e67324cbd5aad250ef9fcdbbc8f659d64482233b95d898a15
33
34 diff --git a/sci-mathematics/rstudio/files/rstudio-1.0.44-clang-pandoc.patch b/sci-mathematics/rstudio/files/rstudio-1.0.44-clang-pandoc.patch
35 new file mode 100644
36 index 00000000..ed0fc8e
37 --- /dev/null
38 +++ b/sci-mathematics/rstudio/files/rstudio-1.0.44-clang-pandoc.patch
39 @@ -0,0 +1,71 @@
40 +--- rstudio-1.0.44-orig/src/cpp/session/CMakeLists.txt 2016-10-19 08:32:41.000000000 +1100
41 ++++ rstudio-1.0.44/src/cpp/session/CMakeLists.txt 2016-12-01 23:44:30.130725331 +1100
42 +@@ -25,24 +25,6 @@
43 + if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/mathjax-26")
44 + message(FATAL_ERROR "Mathjax 2.6 not found (re-run install-dependencies script to install)")
45 + endif()
46 +-if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc")
47 +- message(FATAL_ERROR "pandoc not found (re-run install-dependencies script to install)")
48 +-endif()
49 +-
50 +-# verify libclang is installed
51 +-if(WIN32)
52 +- set(LIBCLANG_VERSION "3.4")
53 +-else()
54 +- set(LIBCLANG_VERSION "3.5")
55 +-endif()
56 +-set(LIBCLANG_DIR "${RSTUDIO_DEPENDENCIES_DIR}/common/libclang/${LIBCLANG_VERSION}")
57 +-if(NOT EXISTS "${LIBCLANG_DIR}")
58 +- message(FATAL_ERROR "libclang ${LIBCLANG_VERSION} not found (re-run install-dependencies script to install)")
59 +-endif()
60 +-set(LIBCLANG_HEADERS_DIR "${RSTUDIO_DEPENDENCIES_DIR}/common/libclang/builtin-headers")
61 +-if(NOT EXISTS "${LIBCLANG_HEADERS_DIR}")
62 +- message(FATAL_ERROR "libclang builtin-headers not found (re-run install-dependencies script to install)")
63 +-endif()
64 +
65 +
66 + # include files
67 +@@ -420,18 +402,6 @@
68 + install(DIRECTORY "${RSTUDIO_DEPENDENCIES_DIR}/common/mathjax-26"
69 + DESTINATION "${RSTUDIO_INSTALL_SUPPORTING}/resources")
70 +
71 +- # install pandoc
72 +- if(RSTUDIO_PACKAGE_BUILD_SLES)
73 +- # when producing a SUSE Linux Enterpise build, we want to install the
74 +- # static Pandoc binaries (see dependencies/common/install-pandoc)
75 +- set(PANDOC_EXTENSION_DIR "/static")
76 +- endif()
77 +- set(PANDOC_BIN "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc/1.17.2${PANDOC_EXTENSION_DIR}")
78 +- file(GLOB PANDOC_FILES "${PANDOC_BIN}/pandoc*")
79 +- install(FILES ${PANDOC_FILES}
80 +- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
81 +- DESTINATION ${RSTUDIO_INSTALL_BIN}/pandoc)
82 +-
83 + # install PDF.js
84 + install(DIRECTORY "resources/pdfjs"
85 + DESTINATION ${RSTUDIO_INSTALL_SUPPORTING}/resources)
86 +@@ -452,24 +422,6 @@
87 + install(DIRECTORY "resources/pagedtable"
88 + DESTINATION ${RSTUDIO_INSTALL_SUPPORTING}/resources)
89 +
90 +- # install libclang
91 +- if(WIN32)
92 +- file(GLOB LIBCLANG_32_FILES "${LIBCLANG_DIR}/x86/libclang.*")
93 +- install(PROGRAMS ${LIBCLANG_32_FILES}
94 +- DESTINATION ${RSTUDIO_INSTALL_BIN}/rsclang/x86)
95 +- file(GLOB LIBCLANG_64_FILES "${LIBCLANG_DIR}/x86_64/libclang.*")
96 +- install(PROGRAMS ${LIBCLANG_64_FILES}
97 +- DESTINATION ${RSTUDIO_INSTALL_BIN}/rsclang/x86_64)
98 +- else()
99 +- file(GLOB_RECURSE LIBCLANG_FILES "${LIBCLANG_DIR}/libclang.*")
100 +- install(PROGRAMS ${LIBCLANG_FILES}
101 +- DESTINATION ${RSTUDIO_INSTALL_BIN}/rsclang)
102 +- endif()
103 +-
104 +- # install libclang builtin-headers
105 +- install(DIRECTORY "${RSTUDIO_DEPENDENCIES_DIR}/common/libclang/builtin-headers"
106 +- DESTINATION "${RSTUDIO_INSTALL_SUPPORTING}/resources/libclang")
107 +-
108 + # install 64 bit binaries if we are on win64
109 + if(WIN32)
110 + if(NOT ("$ENV{PROGRAMW6432}" STREQUAL ""))
111
112 diff --git a/sci-mathematics/rstudio/files/rstudio-1.0.44-paths.patch b/sci-mathematics/rstudio/files/rstudio-1.0.44-paths.patch
113 new file mode 100644
114 index 00000000..b2a1a33
115 --- /dev/null
116 +++ b/sci-mathematics/rstudio/files/rstudio-1.0.44-paths.patch
117 @@ -0,0 +1,130 @@
118 +--- rstudio-1.0.44-orig/CMakeGlobals.txt 2016-10-19 08:32:41.000000000 +1100
119 ++++ rstudio-1.0.44/CMakeGlobals.txt 2016-12-01 23:33:04.149326324 +1100
120 +@@ -123,7 +123,7 @@
121 + else()
122 + set(RSTUDIO_INSTALL_BIN bin)
123 + endif()
124 +- set(RSTUDIO_INSTALL_SUPPORTING .)
125 ++ set(RSTUDIO_INSTALL_SUPPORTING ${DISTRO_SHARE})
126 + endif()
127 +
128 + # if the install prefix is /usr/local then tweak as appropriate
129 +--- rstudio-1.0.44-orig/src/cpp/server/CMakeLists.txt 2016-10-19 08:32:41.000000000 +1100
130 ++++ rstudio-1.0.44/src/cpp/server/CMakeLists.txt 2016-12-01 23:35:51.634862018 +1100
131 +@@ -155,7 +155,7 @@
132 + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT}.in
133 + ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT})
134 + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT}
135 +- DESTINATION ${RSERVER_INITD_DEBIAN_DIR})
136 ++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_DEBIAN_DIR})
137 +
138 + # install configured redhat init.d script
139 + set(RSERVER_INITD_REDHAT_DIR "extras/init.d/redhat")
140 +@@ -163,7 +163,7 @@
141 + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_REDHAT_SCRIPT}.in
142 + ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_REDHAT_SCRIPT})
143 + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_REDHAT_SCRIPT}
144 +- DESTINATION ${RSERVER_INITD_REDHAT_DIR})
145 ++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_REDHAT_DIR})
146 +
147 + # install configured suse init.d script
148 + set(RSERVER_INITD_SUSE_DIR "extras/init.d/suse")
149 +@@ -171,13 +171,13 @@
150 + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_SUSE_SCRIPT}.in
151 + ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_SUSE_SCRIPT})
152 + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_SUSE_SCRIPT}
153 +- DESTINATION ${RSERVER_INITD_SUSE_DIR})
154 ++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_SUSE_DIR})
155 +
156 + # install pam profile
157 + set(RSERVER_PAM_DIR "extras/pam")
158 + set(RSERVER_PAM_PROFILE "${RSERVER_PAM_DIR}/rstudio")
159 + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_PAM_PROFILE}
160 +- DESTINATION ${RSERVER_PAM_DIR})
161 ++ DESTINATION ${DISTRO_SHARE}/${RSERVER_PAM_DIR})
162 +
163 + # install configured apparmor profile
164 + set(RSERVER_APPARMOR_DIR "extras/apparmor")
165 +@@ -185,9 +185,9 @@
166 + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_APPARMOR_PROFILE}.in
167 + ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_APPARMOR_PROFILE})
168 + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_APPARMOR_PROFILE}
169 +- DESTINATION ${RSERVER_APPARMOR_DIR})
170 ++ DESTINATION ${DISTRO_SHARE}/${RSERVER_APPARMOR_DIR})
171 + install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_APPARMOR_DIR}/apparmor-profile-load
172 +- DESTINATION ${RSERVER_APPARMOR_DIR})
173 ++ DESTINATION ${DISTRO_SHARE}/${RSERVER_APPARMOR_DIR})
174 +
175 + # install configured upstart profile
176 + set(RSERVER_UPSTART_DIR "extras/upstart")
177 +@@ -195,12 +195,12 @@
178 + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_UPSTART_PROFILE}.in
179 + ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE})
180 + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE}
181 +- DESTINATION ${RSERVER_UPSTART_DIR})
182 ++ DESTINATION ${DISTRO_SHARE}/${RSERVER_UPSTART_DIR})
183 + set(RSERVER_UPSTART_PROFILE_REDHAT "${RSERVER_UPSTART_DIR}/rstudio-server.redhat.conf")
184 + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT}.in
185 + ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT})
186 + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT}
187 +- DESTINATION ${RSERVER_UPSTART_DIR})
188 ++ DESTINATION ${DISTRO_SHARE}/${RSERVER_UPSTART_DIR})
189 +
190 + # install configured systemd profile
191 + set(RSERVER_SYSTEMD_DIR "extras/systemd")
192 +--- rstudio-1.0.44-orig/src/cpp/server/ServerOptions.cpp 2016-10-19 08:32:41.000000000 +1100
193 ++++ rstudio-1.0.44/src/cpp/server/ServerOptions.cpp 2016-12-01 23:33:04.151326331 +1100
194 +@@ -386,8 +386,8 @@
195 +
196 + // convert relative paths by completing from the system installation
197 + // path (this allows us to be relocatable)
198 +- resolvePath(resourcePath, &wwwLocalPath_);
199 +- resolvePath(resourcePath, &wwwSymbolMapsPath_);
200 ++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &wwwLocalPath_);
201 ++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &wwwSymbolMapsPath_);
202 + resolvePath(binaryPath, &authPamHelperPath_);
203 + resolvePath(binaryPath, &rsessionPath_);
204 + resolvePath(binaryPath, &rldpathPath_);
205 +--- rstudio-1.0.44-orig/src/cpp/session/SessionOptions.cpp 2016-10-19 08:32:41.000000000 +1100
206 ++++ rstudio-1.0.44/src/cpp/session/SessionOptions.cpp 2016-12-01 23:33:04.151326331 +1100
207 +@@ -49,7 +49,7 @@
208 + namespace session {
209 +
210 + namespace {
211 +-const char* const kDefaultPandocPath = "bin/pandoc";
212 ++const char* const kDefaultPandocPath = "bin";
213 + const char* const kDefaultPostbackPath = "bin/postback/rpostback";
214 + const char* const kDefaultRsclangPath = "bin/rsclang";
215 +
216 +@@ -481,14 +481,14 @@
217 + }
218 +
219 + // convert relative paths by completing from the app resource path
220 +- resolvePath(resourcePath_, &rResourcesPath_);
221 +- resolvePath(resourcePath_, &agreementFilePath_);
222 +- resolvePath(resourcePath_, &wwwLocalPath_);
223 +- resolvePath(resourcePath_, &wwwSymbolMapsPath_);
224 +- resolvePath(resourcePath_, &coreRSourcePath_);
225 +- resolvePath(resourcePath_, &modulesRSourcePath_);
226 +- resolvePath(resourcePath_, &sessionLibraryPath_);
227 +- resolvePath(resourcePath_, &sessionPackageArchivesPath_);
228 ++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &rResourcesPath_);
229 ++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &agreementFilePath_);
230 ++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &wwwLocalPath_);
231 ++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &wwwSymbolMapsPath_);
232 ++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &coreRSourcePath_);
233 ++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &modulesRSourcePath_);
234 ++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &sessionLibraryPath_);
235 ++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &sessionPackageArchivesPath_);
236 + resolvePostbackPath(resourcePath_, &rpostbackPath_);
237 + #ifdef _WIN32
238 + resolvePath(resourcePath_, &consoleIoPath_);
239 +@@ -498,7 +498,7 @@
240 + resolvePath(resourcePath_, &sumatraPath_);
241 + resolvePath(resourcePath_, &winutilsPath_);
242 + #endif
243 +- resolvePath(resourcePath_, &hunspellDictionariesPath_);
244 ++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &hunspellDictionariesPath_);
245 + resolvePath(resourcePath_, &mathjaxPath_);
246 + resolvePath(resourcePath_, &libclangHeadersPath_);
247 + resolvePandocPath(resourcePath_, &pandocPath_);
248
249 diff --git a/sci-mathematics/rstudio/files/rstudio-1.0.44-systemd.patch b/sci-mathematics/rstudio/files/rstudio-1.0.44-systemd.patch
250 new file mode 100644
251 index 00000000..7eafd43
252 --- /dev/null
253 +++ b/sci-mathematics/rstudio/files/rstudio-1.0.44-systemd.patch
254 @@ -0,0 +1,21 @@
255 +--- rstudio-1.0.44-orig/src/cpp/server/CMakeLists.txt 2016-10-19 08:32:41.000000000 +1100
256 ++++ rstudio-1.0.44/src/cpp/server/CMakeLists.txt 2016-12-02 11:11:45.259050839 +1100
257 +@@ -203,17 +203,12 @@
258 + DESTINATION ${RSERVER_UPSTART_DIR})
259 +
260 + # install configured systemd profile
261 +- set(RSERVER_SYSTEMD_DIR "extras/systemd")
262 ++ set(RSERVER_SYSTEMD_DIR "lib/systemd/system")
263 + set(RSERVER_SYSTEMD_PROFILE "${RSERVER_SYSTEMD_DIR}/rstudio-server.service")
264 + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_SYSTEMD_PROFILE}.in
265 + ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_SYSTEMD_PROFILE})
266 + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_SYSTEMD_PROFILE}
267 + DESTINATION ${RSERVER_SYSTEMD_DIR})
268 +- set(RSERVER_SYSTEMD_PROFILE_REDHAT "${RSERVER_SYSTEMD_DIR}/rstudio-server.redhat.service")
269 +- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_SYSTEMD_PROFILE_REDHAT}.in
270 +- ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_SYSTEMD_PROFILE_REDHAT})
271 +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_SYSTEMD_PROFILE_REDHAT}
272 +- DESTINATION ${RSERVER_SYSTEMD_DIR})
273 +
274 + elseif(APPLE)
275 +
276
277 diff --git a/sci-mathematics/rstudio/rstudio-1.0.44.ebuild b/sci-mathematics/rstudio/rstudio-1.0.44.ebuild
278 new file mode 100644
279 index 00000000..884e05d
280 --- /dev/null
281 +++ b/sci-mathematics/rstudio/rstudio-1.0.44.ebuild
282 @@ -0,0 +1,248 @@
283 +# Copyright 1999-2016 Gentoo Foundation
284 +# Distributed under the terms of the GNU General Public License v2
285 +# $Id$
286 +
287 +EAPI=6
288 +
289 +inherit eutils user cmake-utils gnome2-utils pam versionator fdo-mime java-pkg-2 pax-utils
290 +
291 +# TODO
292 +# * package gin and gwt
293 +# * use dict from tree, linguas
294 +# * do src_test (use junit from tree?)
295 +
296 +# update from scripts in dependencies/common
297 +# egrep '(GWT_SDK_VER=|GIN_VER=|SELENIUM_VER=|CHROMEDRIVER_VER=)' dependencies/common/install-gwt
298 +GWT_VER=2.7.0
299 +GIN_VER=1.5
300 +SELENIUM_VER=2.37.0
301 +CHROMEDRIVER_VER=2.7
302 +# grep 'PANDOC_VERSION=' dependencies/common/update-pandoc
303 +PANDOC_VER=1.13.1
304 +# ls dependencies/common/*.tar.gz
305 +PACKRAT_VER=0.98.1000
306 +RMARKDOWN_VER=0.98.1000
307 +SHINYAPPS_VER=0.98.1000
308 +RSCONNECT_VER=0.4.1.4_fcac892a69817febd7b655b189bf57193260cda0
309 +
310 +DESCRIPTION="IDE for the R language"
311 +HOMEPAGE="
312 + http://www.rstudio.org
313 + https://github.com/rstudio/rstudio/"
314 +SRC_URI="
315 + https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz
316 + https://s3.amazonaws.com/rstudio-buildtools/gin-${GIN_VER}.zip
317 + https://s3.amazonaws.com/rstudio-buildtools/gwt-${GWT_VER}.zip
318 + https://s3.amazonaws.com/rstudio-buildtools/selenium-java-${SELENIUM_VER}.zip
319 + https://s3.amazonaws.com/rstudio-buildtools/selenium-server-standalone-${SELENIUM_VER}.jar
320 + https://s3.amazonaws.com/rstudio-buildtools/chromedriver-linux
321 + https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip
322 + https://dev.gentoo.org/~gienah/distfiles/packrat-${PACKRAT_VER}.tar.gz
323 + https://dev.gentoo.org/~gienah/distfiles/rmarkdown-${RMARKDOWN_VER}.tar.gz
324 + https://dev.gentoo.org/~gienah/distfiles/shinyapps-${SHINYAPPS_VER}.tar.gz
325 + https://dev.gentoo.org/~gienah/distfiles/rsconnect_${RSCONNECT_VER}.tar.gz
326 +"
327 +
328 +LICENSE="AGPL-3"
329 +SLOT="0"
330 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
331 +IUSE="dedicated server"
332 +
333 +QT_VER=5.4
334 +QT_SLOT=5
335 +RDEPEND="
336 + app-text/pandoc
337 + dev-haskell/pandoc-citeproc
338 + >=dev-lang/R-2.11.1
339 + >=dev-libs/boost-1.50:=
340 + >=dev-libs/mathjax-2.7.0
341 + dev-libs/openssl:0
342 + sys-apps/util-linux
343 + >=sys-devel/clang-3.5.0
344 + sys-libs/zlib
345 + >=virtual/jre-1.8:=
346 + x11-libs/pango
347 + !dedicated? (
348 + >=dev-qt/qtcore-${QT_VER}:${QT_SLOT}
349 + >=dev-qt/qtdeclarative-${QT_VER}:${QT_SLOT}
350 + >=dev-qt/qtdbus-${QT_VER}:${QT_SLOT}
351 + >=dev-qt/qtgui-${QT_VER}:${QT_SLOT}
352 + >=dev-qt/qtnetwork-${QT_VER}:${QT_SLOT}
353 + >=dev-qt/qtopengl-${QT_VER}:${QT_SLOT}
354 + >=dev-qt/qtpositioning-${QT_VER}:${QT_SLOT}
355 + >=dev-qt/qtprintsupport-${QT_VER}:${QT_SLOT}
356 + >=dev-qt/qtsingleapplication-2.6.1_p20150629[qt5]
357 + >=dev-qt/qtsensors-${QT_VER}:${QT_SLOT}
358 + >=dev-qt/qtsql-${QT_VER}:${QT_SLOT}
359 + >=dev-qt/qtsvg-${QT_VER}:${QT_SLOT}
360 + >=dev-qt/qtwebkit-${QT_VER}:${QT_SLOT}
361 + >=dev-qt/qtwidgets-${QT_VER}:${QT_SLOT}
362 + >=dev-qt/qtxml-${QT_VER}:${QT_SLOT}
363 + >=dev-qt/qtxmlpatterns-${QT_VER}:${QT_SLOT}
364 + server? ( virtual/pam )
365 + )
366 + dedicated? ( virtual/pam )"
367 +DEPEND="${RDEPEND}
368 + app-arch/unzip
369 + dev-java/ant-core
370 + >=virtual/jdk-1.8:=
371 + virtual/pkgconfig"
372 +# test? ( dev-java/junit:4 )
373 +
374 +PATCHES=(
375 + "${FILESDIR}/${PN}-0.99.879-prefs.patch"
376 + "${FILESDIR}/${PN}-1.0.44-paths.patch"
377 + "${FILESDIR}/${PN}-1.0.44-clang-pandoc.patch"
378 + "${FILESDIR}/${PN}-0.98.490-linker_flags.patch"
379 + "${FILESDIR}/${PN}-0.98.1091-boost-1.57.patch"
380 + "${FILESDIR}/${PN}-0.99.473-qtsingleapplication.patch"
381 + "${FILESDIR}/${PN}-1.0.44-systemd.patch"
382 +)
383 +
384 +src_unpack() {
385 + unpack ${P}.tar.gz gwt-${GWT_VER}.zip
386 + cd "${S}" || die
387 + mkdir -p src/gwt/lib/{gin,gwt} \
388 + dependencies/common/dictionaries \
389 + src/gwt/lib/selenium/${SELENIUM_VER} \
390 + src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER} || die
391 + mv ../gwt-${GWT_VER} src/gwt/lib/gwt/${GWT_VER} || die
392 + unzip -qd src/gwt/lib/gin/${GIN_VER} \
393 + "${DISTDIR}"/gin-${GIN_VER}.zip || die
394 + unzip -qd dependencies/common/dictionaries \
395 + "${DISTDIR}"/core-dictionaries.zip || die
396 + unzip -qd src/gwt/lib/selenium/${SELENIUM_VER} \
397 + "${DISTDIR}"/selenium-java-${SELENIUM_VER}.zip || die
398 + cp "${DISTDIR}"/selenium-server-standalone-${SELENIUM_VER}.jar \
399 + src/gwt/lib/selenium/${SELENIUM_VER}/ || die
400 + cp "${DISTDIR}"/chromedriver-linux \
401 + src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER}/ || die
402 + cd dependencies/common || die
403 + unpack packrat-${PACKRAT_VER}.tar.gz
404 + unpack rmarkdown-${RMARKDOWN_VER}.tar.gz
405 + unpack shinyapps-${SHINYAPPS_VER}.tar.gz
406 + unpack rsconnect_${RSCONNECT_VER}.tar.gz
407 + cp "${DISTDIR}"/rmarkdown-${RMARKDOWN_VER}.tar.gz \
408 + . || die
409 + cp "${DISTDIR}"/packrat-${PACKRAT_VER}.tar.gz \
410 + . || die
411 + cp "${DISTDIR}"/shinyapps-${SHINYAPPS_VER}.tar.gz \
412 + . || die
413 + cp "${DISTDIR}"/rsconnect_${RSCONNECT_VER}.tar.gz \
414 + . || die
415 +}
416 +
417 +src_prepare() {
418 + default
419 + java-pkg-2_src_prepare
420 + egit_clean
421 +
422 + # Enable CMake to install our .service file for systemd usage
423 + mkdir -vp "${S}/src/cpp/server/lib/systemd/system" || die
424 + cp -v "${FILESDIR}/rstudio-server.service.in" "${S}/src/cpp/server/lib/systemd/system/" || die
425 +
426 + # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using
427 + # this sed hack for now. ~RMH
428 + sed -i \
429 + -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \
430 + src/cpp/server/ServerOptions.cpp \
431 + src/cpp/session/SessionOptions.cpp || die
432 +
433 + # use mathjax from system
434 + ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax-26 || die
435 +
436 + # make sure icons and mime stuff are with prefix
437 + sed -i \
438 + -e "s:/usr:${EPREFIX}/usr:g" \
439 + CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die
440 +
441 + # On Gentoo the rstudio-server configuration file is /etc/conf.d/rstudio-server.conf
442 + sed -e "s@/etc/rstudio/rserver.conf@${EROOT}etc/conf.d/rstudio-server.conf@" \
443 + -i src/cpp/server/ServerOptions.cpp \
444 + || die
445 +
446 + # Set the rsession.conf file location for Gentoo prefix
447 + sed -e "s@/etc/rstudio/rsession.conf@${EROOT}etc/rstudio/rsession.conf@" \
448 + -i src/cpp/session/SessionOptions.cpp \
449 + || die
450 +
451 + # dev-qt/qtsingleapplication-2.6.1_p20150629 does not provide a cmake module.
452 + # It provides a library that has its version number appended to the end,
453 + # which is difficult to handle in cmake, as find_library does not support
454 + # searching for wildcard library names. So I find the library name from the
455 + # qmake spec, and then sed this into the patched src/cpp/desktop/CMakeLists.txt.
456 + rm -rf "${S}"/src/cpp/desktop/3rdparty || die
457 + local s=$(grep '\-lQt$${QT_MAJOR_VERSION}Solutions_SingleApplication' \
458 + "${EROOT}"/usr/lib64/qt5/mkspecs/features/qtsingleapplication.prf \
459 + | sed -e 's@\$\${QT_MAJOR_VERSION}@5@' \
460 + -e 's@LIBS \*= -l@@')
461 + sed -e "s@Qt5Solutions_SingleApplication-2.6@${s}@g" \
462 + -i "${S}"/src/cpp/desktop/CMakeLists.txt \
463 + || die
464 +
465 + # The git commit for tag: git rev-list -n 1 v0.99.903
466 + sed -e 's@git ARGS rev-parse HEAD@echo ARGS 0eb2d8ea28ebc1ac6ac327e023becb6133b679c4@'\
467 + -i "${S}"/CMakeLists.txt \
468 + "${S}"/CMakeGlobals.txt \
469 + || die
470 +}
471 +
472 +src_configure() {
473 + export RSTUDIO_VERSION_MAJOR=$(get_version_component_range 1)
474 + export RSTUDIO_VERSION_MINOR=$(get_version_component_range 2)
475 + export RSTUDIO_VERSION_PATCH=$(get_version_component_range 3)
476 +
477 + local mycmakeargs=(
478 + -DDISTRO_SHARE=share/${PN}
479 + -DRSTUDIO_INSTALL_FREEDESKTOP="$(usex !dedicated "ON" "OFF")"
480 + -DRSTUDIO_TARGET=$(usex dedicated "Server" "$(usex server "Development" "Desktop")")
481 + -DQT_QMAKE_EXECUTABLE="${EROOT}"usr/lib64/qt5/bin/qmake
482 + -DRSTUDIO_VERIFY_R_VERSION=FALSE
483 + )
484 +
485 + cmake-utils_src_configure
486 +}
487 +
488 +src_compile() {
489 + # Avoid the rest of the oracle-jdk-bin-1.8.0.60 sandbox violations F: mkdir S: deny
490 + # P: /root/.oracle_jre_usage.
491 + export ANT_OPTS="-Duser.home=${T}"
492 + cmake-utils_src_compile
493 +}
494 +
495 +src_install() {
496 + export ANT_OPTS="-Duser.home=${T}"
497 + cmake-utils_src_install
498 + pax-mark m "${ED}usr/bin/rstudio"
499 + doconfd "${FILESDIR}"/rstudio-server.conf
500 + dodir /etc/rstudio
501 + insinto /etc/rstudio
502 + doins "${FILESDIR}"/rsession.conf
503 + dosym /etc/conf.d/rstudio-server.conf /etc/rstudio/rserver.conf
504 + if use dedicated || use server; then
505 + dopamd src/cpp/server/extras/pam/rstudio
506 + newinitd "${FILESDIR}"/rstudio-server.initd rstudio-server
507 + fi
508 +}
509 +
510 +pkg_preinst() {
511 + use dedicated || gnome2_icon_savelist
512 + java-pkg-2_pkg_preinst
513 +}
514 +
515 +pkg_postinst() {
516 + use dedicated || { fdo-mime_desktop_database_update
517 + fdo-mime_mime_database_update
518 + gnome2_icon_cache_update ;}
519 +
520 + if use dedicated || use server; then
521 + enewgroup rstudio-server
522 + enewuser rstudio-server -1 -1 -1 rstudio-server
523 + fi
524 +}
525 +
526 +pkg_postrm() {
527 + use dedicated || { fdo-mime_desktop_database_update
528 + fdo-mime_mime_database_update
529 + gnome2_icon_cache_update ;}
530 +}