commit:     6fc8257f0c1be1c4ebd2f7db5486d43ab0749006
Author:     Mark Wright <gienah <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 20 07:46:56 2016 +0000
Commit:     Mark Wright <gienah <AT> gentoo <DOT> org>
CommitDate: Sat Feb 20 07:47:53 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6fc8257f

sci-mathematics/rstudio: Bump to 0.99.879

Package-Manager: portage-2.2.27

 sci-mathematics/rstudio/Manifest                   |   1 +
 .../files/rstudio-0.99.879-clang-pandoc.patch      |  77 +++++++
 .../rstudio/files/rstudio-0.99.879-paths.patch     | 130 +++++++++++
 .../rstudio/files/rstudio-0.99.879-prefs.patch     |  45 ++++
 sci-mathematics/rstudio/rstudio-0.99.879.ebuild    | 250 +++++++++++++++++++++
 5 files changed, 503 insertions(+)

diff --git a/sci-mathematics/rstudio/Manifest b/sci-mathematics/rstudio/Manifest
index cc582ca..d84f721 100644
--- a/sci-mathematics/rstudio/Manifest
+++ b/sci-mathematics/rstudio/Manifest
@@ -23,6 +23,7 @@ DIST rstudio-0.99.483.tar.gz 16993049 SHA256 
85ce1a2f40690e4ed0338b153a1b3279ce9
 DIST rstudio-0.99.484.tar.gz 16993033 SHA256 
8ca4abccb9b554713077cf1057ac13abadfd7606f22ac3386b2a88a38ae8a427 SHA512 
407f50747bca749ef2c512e727cbe062abdd99c1eb76af09761e6bdfb4208f30117e1ee55b485447f64f6cf249bc939ef1fb4f8ce0199595e241a3cc617b4b8b
 WHIRLPOOL 
8cc16553ea2703f005908c69803b64da4172092cb0b3ff9015e7ec354340fcd1cfa82a218ac890adffafe3565ead94bee6f7bd239b1c56ee38cbeb5896f556b0
 DIST rstudio-0.99.486.tar.gz 16992775 SHA256 
4057195465e5032625bad0304bfbd9d123a78c3e4d6d5d41abcc6ef6ccd18a6f SHA512 
bb88d12f8ae2f79779532371d03a698a2c2897c212c42c8438d5223c14e1033098dbd7c278a929958fa4bbc764a3ceb101abe03634f0e33192de44cf97128a1f
 WHIRLPOOL 
13c35a69e525d90c6694d068526a2aede76a086427539294e46db67d0fc92759fb9cb0a1169cf88745ae1e121fdd7ba2e46bd2d2fb3fa17dc7fcc65848820941
 DIST rstudio-0.99.491.tar.gz 16992702 SHA256 
e8c21e2262b610a7ccf39283b97d114bee33c6840a060067b8019404ff44b03f SHA512 
2658694d6154f4b91b2dc07a7ec653edb7f593c4d9829a06a5e600e4db465ca6059418be6812d5ba2529fd6202dd136f0f58d74576f856fdcf6f81032d74f3c2
 WHIRLPOOL 
e71650a07cc010ab3c25955c7fa9e90eee68577c1ef78e02a5f81a0160c688908ec5ec4fd89c89e5a9bc49b926623cd5de976fb249aa2d472354d23f5fad76de
+DIST rstudio-0.99.879.tar.gz 17406999 SHA256 
73fa59be34eb63d9ed194642a93ad529d2c67cdcbcd2f291952fdef8e999a097 SHA512 
c2bbe598a4a9c2abc69e39807af70be5729a06bbcb73bac5249f74f3c3daddb2909bf4a46d988f0d4bfeabe308f0c31d2a75aa28a52f11c1343dfcead07e2c45
 WHIRLPOOL 
5c9c75a7891ac53eb80a36eff518d77a0c281b16bff383526ac1ede07ee57486d7b00be4e400a0cad48dfea92729becf25c67f18782af7930f9b4218592afe5c
 DIST selenium-java-2.37.0.zip 24625928 SHA256 
0eebba65d8edb01c1f46e462907c58f5d6e1cb0ddf63660a9985c8432bdffbb7 SHA512 
68624e82dbc751a25c50fad72702a98eb30d77fd4337d2a969f8e06bcc49e5f8c835cd27ec53772f3375014ddde1d5636936e966b75f3594a9f86aa18ba4e779
 WHIRLPOOL 
eb6659aae26f3c78b6f998546b23d0636c9d00ed8a7f985db1463ac4bd483ccb3e643d84e2ca0f59e0636a8de79eb552ff1d68eb6f9c06907029f7552d8f7777
 DIST selenium-server-standalone-2.37.0.jar 34730734 SHA256 
97bc8c699037fb6e99ba7af570fb60dbb1b7ce30cde2448287a44ef65b13023e SHA512 
b215446d42d2d1f69664349b6ae6dc53a532d3624c91254f0f4183d0ad764648792e5cc1126a55a1e60d9687d55200fed01d6d2f46cc3d853b1fa6ee38111018
 WHIRLPOOL 
20640591534f31f24825a9ed139589b182e8b60d86541bf0be104d3cc0280983f6566bd0459f2253ac3875b48a2798b205bac8f815a119fff6db625ce9bbc29e
 DIST shinyapps-0.98.1000.tar.gz 910095 SHA256 
b95c512ae0a0fb4335878d9cfcf9073e2cb3ccfed73543abe27ea8878ed36d57 SHA512 
3162317c4c20cfc1497e952a8235867084d629ae88407e6c465b3e208adb1dc97abfe6b9922e0374ddf4c8e38a76e112942bd312c54a66f74e6f2a3fe4c0a07c
 WHIRLPOOL 
ecc2bce78387cb42e9989163d8fca29220e66f085acde3323417058aebb624dafa8c0e1873c7d79e67324cbd5aad250ef9fcdbbc8f659d64482233b95d898a15

diff --git a/sci-mathematics/rstudio/files/rstudio-0.99.879-clang-pandoc.patch 
b/sci-mathematics/rstudio/files/rstudio-0.99.879-clang-pandoc.patch
new file mode 100644
index 0000000..c3af2b7
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-0.99.879-clang-pandoc.patch
@@ -0,0 +1,77 @@
+--- rstudio-0.99.879-orig/src/cpp/session/CMakeLists.txt       2016-02-12 
09:24:39.000000000 +1100
++++ rstudio-0.99.879/src/cpp/session/CMakeLists.txt    2016-02-19 
23:04:57.266186448 +1100
+@@ -25,30 +25,11 @@
+ if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/mathjax-23")
+   message(FATAL_ERROR "Mathjax 2.3 not found (re-run install-dependencies 
script to install)")
+ endif()
+-if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc")
+-  message(FATAL_ERROR "pandoc not found (re-run install-dependencies script 
to install)")
+-endif()
+ if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/rsconnect")
+   message(FATAL_ERROR "rsconnect package not found (re-run 
install-dependencies script to install)")
+ endif()
+ 
+ 
+-# verify libclang is installed
+-if(WIN32)
+-   set(LIBCLANG_VERSION "3.4")
+-else()
+-   set(LIBCLANG_VERSION "3.5")
+-endif()
+-set(LIBCLANG_DIR 
"${RSTUDIO_DEPENDENCIES_DIR}/common/libclang/${LIBCLANG_VERSION}")
+-if(NOT EXISTS "${LIBCLANG_DIR}")
+-  message(FATAL_ERROR "libclang ${LIBCLANG_VERSION} not found  (re-run 
install-dependencies script to install)")
+-endif()
+-set(LIBCLANG_HEADERS_DIR 
"${RSTUDIO_DEPENDENCIES_DIR}/common/libclang/builtin-headers")
+-if(NOT EXISTS "${LIBCLANG_HEADERS_DIR}")
+-  message(FATAL_ERROR "libclang builtin-headers not found  (re-run 
install-dependencies script to install)")
+-endif()
+-
+-
+ # include files
+ file(GLOB_RECURSE SESSION_HEADER_FILES "*.h*")
+ 
+@@ -399,18 +380,6 @@
+    install(DIRECTORY "${RSTUDIO_DEPENDENCIES_DIR}/common/mathjax-23"
+            DESTINATION "${RSTUDIO_INSTALL_SUPPORTING}/resources")
+ 
+-   # install pandoc
+-   if(RSTUDIO_PACKAGE_BUILD_SLES)
+-      # when producing a SUSE Linux Enterpise build, we want to install the 
+-      # static Pandoc binaries (see dependencies/common/install-pandoc)
+-      set(PANDOC_EXTENSION_DIR "/static")
+-   endif()
+-   set(PANDOC_BIN 
"${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc/1.15.2${PANDOC_EXTENSION_DIR}")
+-   file(GLOB PANDOC_FILES "${PANDOC_BIN}/pandoc*")
+-   install(FILES ${PANDOC_FILES}
+-           PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ 
GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+-           DESTINATION  ${RSTUDIO_INSTALL_BIN}/pandoc)
+-
+    # install rsconnect package
+    file(GLOB RSCONNECT_PACKAGE 
"${RSTUDIO_DEPENDENCIES_DIR}/common/rsconnect*.tar.gz")
+    install(FILES ${RSCONNECT_PACKAGE}
+@@ -428,24 +397,6 @@
+    install(DIRECTORY "resources/help_resources"
+            DESTINATION ${RSTUDIO_INSTALL_SUPPORTING}/resources)
+ 
+-   # install libclang
+-   if(WIN32)
+-      file(GLOB LIBCLANG_32_FILES "${LIBCLANG_DIR}/x86/libclang.*")
+-      install(PROGRAMS ${LIBCLANG_32_FILES}
+-              DESTINATION  ${RSTUDIO_INSTALL_BIN}/rsclang/x86)
+-      file(GLOB LIBCLANG_64_FILES "${LIBCLANG_DIR}/x86_64/libclang.*")
+-      install(PROGRAMS ${LIBCLANG_64_FILES}
+-              DESTINATION  ${RSTUDIO_INSTALL_BIN}/rsclang/x86_64)
+-   else()
+-      file(GLOB_RECURSE LIBCLANG_FILES "${LIBCLANG_DIR}/libclang.*")
+-      install(PROGRAMS ${LIBCLANG_FILES}
+-              DESTINATION  ${RSTUDIO_INSTALL_BIN}/rsclang)
+-   endif()
+-
+-   # install libclang builtin-headers
+-   install(DIRECTORY 
"${RSTUDIO_DEPENDENCIES_DIR}/common/libclang/builtin-headers"
+-           DESTINATION "${RSTUDIO_INSTALL_SUPPORTING}/resources/libclang")
+-
+    # install 64 bit binaries if we are on win64
+    if(WIN32)
+       if(NOT ("$ENV{PROGRAMW6432}" STREQUAL ""))

diff --git a/sci-mathematics/rstudio/files/rstudio-0.99.879-paths.patch 
b/sci-mathematics/rstudio/files/rstudio-0.99.879-paths.patch
new file mode 100644
index 0000000..a8b48f2
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-0.99.879-paths.patch
@@ -0,0 +1,130 @@
+--- rstudio-0.99.879-orig/CMakeGlobals.txt     2016-02-12 09:24:39.000000000 
+1100
++++ rstudio-0.99.879/CMakeGlobals.txt  2016-02-19 22:58:41.396818474 +1100
+@@ -120,7 +120,7 @@
+    else()
+      set(RSTUDIO_INSTALL_BIN bin)
+    endif()
+-   set(RSTUDIO_INSTALL_SUPPORTING .)
++   set(RSTUDIO_INSTALL_SUPPORTING ${DISTRO_SHARE})
+ endif()
+ 
+ # if the install prefix is /usr/local then tweak as appropriate
+--- rstudio-0.99.879-orig/src/cpp/server/CMakeLists.txt        2016-02-12 
09:24:39.000000000 +1100
++++ rstudio-0.99.879/src/cpp/server/CMakeLists.txt     2016-02-19 
22:58:41.397818478 +1100
+@@ -155,7 +155,7 @@
+    
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT}.in
+                   ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT})
+    install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT}
+-           DESTINATION ${RSERVER_INITD_DEBIAN_DIR})
++           DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_DEBIAN_DIR})
+ 
+    # install configured redhat init.d script
+    set(RSERVER_INITD_REDHAT_DIR "extras/init.d/redhat")
+@@ -163,7 +163,7 @@
+    
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_REDHAT_SCRIPT}.in
+                   ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_REDHAT_SCRIPT})
+    install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_REDHAT_SCRIPT}
+-           DESTINATION ${RSERVER_INITD_REDHAT_DIR})
++           DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_REDHAT_DIR})
+ 
+    # install configured suse init.d script
+    set(RSERVER_INITD_SUSE_DIR "extras/init.d/suse")
+@@ -171,13 +171,13 @@
+    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_SUSE_SCRIPT}.in
+                   ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_SUSE_SCRIPT})
+    install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_SUSE_SCRIPT}
+-           DESTINATION ${RSERVER_INITD_SUSE_DIR})
++           DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_SUSE_DIR})
+ 
+    # install pam profile
+    set(RSERVER_PAM_DIR "extras/pam")
+    set(RSERVER_PAM_PROFILE "${RSERVER_PAM_DIR}/rstudio")
+    install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_PAM_PROFILE}
+-           DESTINATION ${RSERVER_PAM_DIR})
++           DESTINATION ${DISTRO_SHARE}/${RSERVER_PAM_DIR})
+ 
+    # install configured apparmor profile
+    set(RSERVER_APPARMOR_DIR "extras/apparmor")
+@@ -185,9 +185,9 @@
+    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_APPARMOR_PROFILE}.in
+                   ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_APPARMOR_PROFILE})
+    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_APPARMOR_PROFILE}
+-           DESTINATION ${RSERVER_APPARMOR_DIR})
++           DESTINATION ${DISTRO_SHARE}/${RSERVER_APPARMOR_DIR})
+    install(PROGRAMS 
${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_APPARMOR_DIR}/apparmor-profile-load
+-           DESTINATION ${RSERVER_APPARMOR_DIR})
++           DESTINATION ${DISTRO_SHARE}/${RSERVER_APPARMOR_DIR})
+ 
+    # install configured upstart profile
+    set(RSERVER_UPSTART_DIR "extras/upstart")
+@@ -195,12 +195,12 @@
+    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_UPSTART_PROFILE}.in
+                   ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE})
+    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE}
+-           DESTINATION ${RSERVER_UPSTART_DIR})
++           DESTINATION ${DISTRO_SHARE}/${RSERVER_UPSTART_DIR})
+    set(RSERVER_UPSTART_PROFILE_REDHAT 
"${RSERVER_UPSTART_DIR}/rstudio-server.redhat.conf")
+    
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT}.in
+                   
${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT})
+    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT}
+-           DESTINATION ${RSERVER_UPSTART_DIR})
++           DESTINATION ${DISTRO_SHARE}/${RSERVER_UPSTART_DIR})
+            
+     # install configured systemd profile
+    set(RSERVER_SYSTEMD_DIR "extras/systemd")
+--- rstudio-0.99.879-orig/src/cpp/server/ServerOptions.cpp     2016-02-12 
09:24:39.000000000 +1100
++++ rstudio-0.99.879/src/cpp/server/ServerOptions.cpp  2016-02-19 
22:58:41.397818478 +1100
+@@ -382,8 +382,8 @@
+ 
+    // convert relative paths by completing from the system installation
+    // path (this allows us to be relocatable)
+-   resolvePath(resourcePath, &wwwLocalPath_);
+-   resolvePath(resourcePath, &wwwSymbolMapsPath_);
++   resolvePath(resourcePath.childPath(DISTRO_SHARE), &wwwLocalPath_);
++   resolvePath(resourcePath.childPath(DISTRO_SHARE), &wwwSymbolMapsPath_);
+    resolvePath(binaryPath, &authPamHelperPath_);
+    resolvePath(binaryPath, &rsessionPath_);
+    resolvePath(binaryPath, &rldpathPath_);
+--- rstudio-0.99.879-orig/src/cpp/session/SessionOptions.cpp   2016-02-12 
09:24:39.000000000 +1100
++++ rstudio-0.99.879/src/cpp/session/SessionOptions.cpp        2016-02-20 
18:13:34.807771539 +1100
+@@ -49,7 +49,7 @@
+ namespace session {  
+ 
+ namespace {
+-const char* const kDefaultPandocPath = "bin/pandoc";
++const char* const kDefaultPandocPath = "bin";
+ const char* const kDefaultPostbackPath = "bin/postback/rpostback";
+ const char* const kDefaultRsclangPath = "bin/rsclang";
+ } // anonymous namespace
+@@ -451,14 +451,14 @@
+    }
+    
+    // convert relative paths by completing from the app resource path
+-   resolvePath(resourcePath_, &rResourcesPath_);
+-   resolvePath(resourcePath_, &agreementFilePath_);
+-   resolvePath(resourcePath_, &wwwLocalPath_);
+-   resolvePath(resourcePath_, &wwwSymbolMapsPath_);
+-   resolvePath(resourcePath_, &coreRSourcePath_);
+-   resolvePath(resourcePath_, &modulesRSourcePath_);
+-   resolvePath(resourcePath_, &sessionLibraryPath_);
+-   resolvePath(resourcePath_, &sessionPackageArchivesPath_);
++   resolvePath(resourcePath_.childPath(DISTRO_SHARE), &rResourcesPath_);
++   resolvePath(resourcePath_.childPath(DISTRO_SHARE), &agreementFilePath_);
++   resolvePath(resourcePath_.childPath(DISTRO_SHARE), &wwwLocalPath_);
++   resolvePath(resourcePath_.childPath(DISTRO_SHARE), &wwwSymbolMapsPath_);
++   resolvePath(resourcePath_.childPath(DISTRO_SHARE), &coreRSourcePath_);
++   resolvePath(resourcePath_.childPath(DISTRO_SHARE), &modulesRSourcePath_);
++   resolvePath(resourcePath_.childPath(DISTRO_SHARE), &sessionLibraryPath_);
++   resolvePath(resourcePath_.childPath(DISTRO_SHARE), 
&sessionPackageArchivesPath_);
+    resolvePostbackPath(resourcePath_, &rpostbackPath_);
+ #ifdef _WIN32
+    resolvePath(resourcePath_, &consoleIoPath_);
+@@ -467,7 +467,7 @@
+    resolvePath(resourcePath_, &msysSshPath_);
+    resolvePath(resourcePath_, &sumatraPath_);
+ #endif
+-   resolvePath(resourcePath_, &hunspellDictionariesPath_);
++   resolvePath(resourcePath_.childPath(DISTRO_SHARE), 
&hunspellDictionariesPath_);
+    resolvePath(resourcePath_, &mathjaxPath_);
+    resolvePath(resourcePath_, &libclangHeadersPath_);
+    resolvePandocPath(resourcePath_, &pandocPath_);

diff --git a/sci-mathematics/rstudio/files/rstudio-0.99.879-prefs.patch 
b/sci-mathematics/rstudio/files/rstudio-0.99.879-prefs.patch
new file mode 100644
index 0000000..483613c
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-0.99.879-prefs.patch
@@ -0,0 +1,45 @@
+--- rstudio-0.99.879-orig/src/gwt/build.xml    2016-02-12 09:24:39.000000000 
+1100
++++ rstudio-0.99.879/src/gwt/build.xml 2016-02-20 00:25:39.458756693 +1100
+@@ -25,6 +25,7 @@
+    <property name="gwt.extra.args" value=""/>
+    <property name="gwt.main.module" value="org.rstudio.studio.RStudio"/>
+    <property name="ace.bin" 
value="src/org/rstudio/studio/client/workbench/views/source/editors/text/ace"/>
++   <property environment="env"/>
+ 
+    <path id="project.class.path">
+       <pathelement location="bin"/>
+@@ -101,8 +102,10 @@
+             <pathelement location="src"/>
+             <path refid="project.class.path"/>
+          </classpath>
++         <jvmarg value="-Duser.home=${env.T}"/>
+          <!-- add jvmarg -Xss16M or similar if you see a StackOverflowError 
-->
+          <jvmarg value="-Xmx1536M"/>
++         <jvmarg value="-Djava.util.prefs.userRoot=${env.T}"/>
+          <arg value="-war"/>
+          <arg value="www"/>
+          <arg value="-localWorkers"/>
+@@ -142,6 +145,7 @@
+             <pathelement location="src"/>
+             <path refid="project.class.path"/>
+          </classpath>
++         <jvmarg value="-Duser.home=${env.T}"/>
+          <jvmarg value="-Xmx2048M"/>
+          <arg value="-war"/>
+          <arg value="www"/>
+@@ -163,6 +167,7 @@
+             <pathelement location="src"/>
+             <path refid="project.class.path"/>
+          </classpath>
++         <jvmarg value="-Duser.home=${env.T}"/>
+          <jvmarg value="-Xmx2048M"/>
+               <arg value="-src"/>
+               <arg value = "src"/>
+@@ -194,6 +199,7 @@
+                   <pathelement location="src"/>
+                   <path refid="test.class.path"/>
+                </classpath>
++               <jvmarg value="-Duser.home=${env.T}"/>
+                <arg value="org.rstudio.studio.selenium.RStudioTestSuite"/>
+             </java>
+          </sequential>

diff --git a/sci-mathematics/rstudio/rstudio-0.99.879.ebuild 
b/sci-mathematics/rstudio/rstudio-0.99.879.ebuild
new file mode 100644
index 0000000..35a886b
--- /dev/null
+++ b/sci-mathematics/rstudio/rstudio-0.99.879.ebuild
@@ -0,0 +1,250 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils user cmake-utils gnome2-utils pam versionator fdo-mime 
java-pkg-2 pax-utils
+
+# TODO
+# * package gin and gwt
+# * use dict from tree, linguas
+# * do src_test (use junit from tree?)
+
+# update from scripts in dependencies/common
+# egrep '(GWT_SDK_VER=|GIN_VER=|SELENIUM_VER=|CHROMEDRIVER_VER=)' 
dependencies/common/install-gwt
+GWT_VER=2.7.0
+GIN_VER=1.5
+SELENIUM_VER=2.37.0
+CHROMEDRIVER_VER=2.7
+# grep 'PANDOC_VERSION=' dependencies/common/update-pandoc
+PANDOC_VER=1.13.1
+# ls dependencies/common/*.tar.gz
+PACKRAT_VER=0.98.1000
+RMARKDOWN_VER=0.98.1000
+SHINYAPPS_VER=0.98.1000
+RSCONNECT_VER=0.4.1.4_fcac892a69817febd7b655b189bf57193260cda0
+
+DESCRIPTION="IDE for the R language"
+HOMEPAGE="
+       http://www.rstudio.org
+       https://github.com/rstudio/rstudio/";
+SRC_URI="
+       https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz
+       https://s3.amazonaws.com/rstudio-buildtools/gin-${GIN_VER}.zip
+       https://s3.amazonaws.com/rstudio-buildtools/gwt-${GWT_VER}.zip
+       
https://s3.amazonaws.com/rstudio-buildtools/selenium-java-${SELENIUM_VER}.zip
+       
https://s3.amazonaws.com/rstudio-buildtools/selenium-server-standalone-${SELENIUM_VER}.jar
+       https://s3.amazonaws.com/rstudio-buildtools/chromedriver-linux
+       https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip
+       https://dev.gentoo.org/~gienah/distfiles/packrat-${PACKRAT_VER}.tar.gz
+       
https://dev.gentoo.org/~gienah/distfiles/rmarkdown-${RMARKDOWN_VER}.tar.gz
+       
https://dev.gentoo.org/~gienah/distfiles/shinyapps-${SHINYAPPS_VER}.tar.gz
+       
https://dev.gentoo.org/~gienah/distfiles/rsconnect_${RSCONNECT_VER}.tar.gz
+"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="dedicated server"
+
+QT_VER=5.4
+QT_SLOT=5
+RDEPEND="
+       app-text/pandoc
+       dev-haskell/pandoc-citeproc
+       >=dev-lang/R-2.11.1
+       >=dev-libs/boost-1.50:=
+       >=dev-libs/mathjax-2.3
+       dev-libs/openssl:0
+       sys-apps/util-linux
+       >=sys-devel/clang-3.5.0
+       sys-libs/zlib
+       || ( =virtual/jre-1.7*:= =virtual/jre-1.8*:= )
+       x11-libs/pango
+       !dedicated? (
+               >=dev-qt/qtcore-${QT_VER}:${QT_SLOT}
+               >=dev-qt/qtdeclarative-${QT_VER}:${QT_SLOT}
+               >=dev-qt/qtdbus-${QT_VER}:${QT_SLOT}
+               >=dev-qt/qtgui-${QT_VER}:${QT_SLOT}
+               >=dev-qt/qtnetwork-${QT_VER}:${QT_SLOT}
+               >=dev-qt/qtopengl-${QT_VER}:${QT_SLOT}
+               >=dev-qt/qtpositioning-${QT_VER}:${QT_SLOT}
+               >=dev-qt/qtprintsupport-${QT_VER}:${QT_SLOT}
+               >=dev-qt/qtsingleapplication-2.6.1_p20150629[qt5]
+               >=dev-qt/qtsensors-${QT_VER}:${QT_SLOT}
+               >=dev-qt/qtsql-${QT_VER}:${QT_SLOT}
+               >=dev-qt/qtsvg-${QT_VER}:${QT_SLOT}
+               >=dev-qt/qtwebkit-${QT_VER}:${QT_SLOT}
+               >=dev-qt/qtwidgets-${QT_VER}:${QT_SLOT}
+               >=dev-qt/qtxml-${QT_VER}:${QT_SLOT}
+               >=dev-qt/qtxmlpatterns-${QT_VER}:${QT_SLOT}
+               server? ( virtual/pam )
+       )
+       dedicated? ( virtual/pam )"
+DEPEND="${RDEPEND}
+       app-arch/unzip
+       dev-java/ant-core
+       || ( =virtual/jdk-1.7*:= =virtual/jdk-1.8*:= )
+       virtual/pkgconfig"
+#      test? ( dev-java/junit:4 )
+
+PATCHES=(
+               "${FILESDIR}/${PN}-0.99.879-prefs.patch"
+               "${FILESDIR}/${PN}-0.99.879-paths.patch"
+               "${FILESDIR}/${PN}-0.99.879-clang-pandoc.patch"
+               "${FILESDIR}/${PN}-0.98.490-linker_flags.patch"
+               "${FILESDIR}/${PN}-0.98.1091-boost-1.57.patch"
+               "${FILESDIR}/${PN}-0.99.473-qtsingleapplication.patch"
+               "${FILESDIR}/${PN}-0.99.486-systemd.patch"
+)
+
+src_unpack() {
+       unpack ${P}.tar.gz gwt-${GWT_VER}.zip
+       cd "${S}" || die
+       mkdir -p src/gwt/lib/{gin,gwt} \
+               dependencies/common/dictionaries \
+               src/gwt/lib/selenium/${SELENIUM_VER} \
+               src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER} || die
+       mv ../gwt-${GWT_VER} src/gwt/lib/gwt/${GWT_VER} || die
+       unzip -qd src/gwt/lib/gin/${GIN_VER} \
+               "${DISTDIR}"/gin-${GIN_VER}.zip || die
+       unzip -qd dependencies/common/dictionaries \
+               "${DISTDIR}"/core-dictionaries.zip || die
+       unzip -qd src/gwt/lib/selenium/${SELENIUM_VER} \
+               "${DISTDIR}"/selenium-java-${SELENIUM_VER}.zip || die
+       cp "${DISTDIR}"/selenium-server-standalone-${SELENIUM_VER}.jar \
+               src/gwt/lib/selenium/${SELENIUM_VER}/ || die
+       cp "${DISTDIR}"/chromedriver-linux \
+               src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER}/ || die
+       cd dependencies/common || die
+       unpack packrat-${PACKRAT_VER}.tar.gz
+       unpack rmarkdown-${RMARKDOWN_VER}.tar.gz
+       unpack shinyapps-${SHINYAPPS_VER}.tar.gz
+       unpack rsconnect_${RSCONNECT_VER}.tar.gz
+       cp "${DISTDIR}"/rmarkdown-${RMARKDOWN_VER}.tar.gz \
+               . || die
+       cp "${DISTDIR}"/packrat-${PACKRAT_VER}.tar.gz \
+               . || die
+       cp "${DISTDIR}"/shinyapps-${SHINYAPPS_VER}.tar.gz \
+               . || die
+       cp "${DISTDIR}"/rsconnect_${RSCONNECT_VER}.tar.gz \
+               . || die
+}
+
+src_prepare() {
+       java-pkg-2_src_prepare
+
+       egit_clean
+
+       epatch "${PATCHES[@]}"
+
+       # Enable CMake to install our .service file for systemd usage
+       mkdir -vp "${S}/src/cpp/server/lib/systemd/system" || die
+       cp -v "${FILESDIR}/rstudio-server.service.in" 
"${S}/src/cpp/server/lib/systemd/system/" || die
+
+       # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using
+       # this sed hack for now. ~RMH
+       sed -i \
+               -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \
+               src/cpp/server/ServerOptions.cpp \
+               src/cpp/session/SessionOptions.cpp || die
+
+       # use mathjax from system
+       ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax-23 || 
die
+
+       # make sure icons and mime stuff are with prefix
+       sed -i \
+               -e "s:/usr:${EPREFIX}/usr:g" \
+               CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die
+
+       # On Gentoo the rstudio-server configuration file is 
/etc/conf.d/rstudio-server.conf
+       sed -e 
"s@/etc/rstudio/rserver.conf@${EROOT}etc/conf.d/rstudio-server.conf@" \
+               -i src/cpp/server/ServerOptions.cpp \
+               || die
+
+       # Set the rsession.conf file location for Gentoo prefix
+       sed -e 
"s@/etc/rstudio/rsession.conf@${EROOT}etc/rstudio/rsession.conf@" \
+               -i src/cpp/session/SessionOptions.cpp \
+               || die
+
+       # dev-qt/qtsingleapplication-2.6.1_p20150629 does not provide a cmake 
module.
+       # It provides a library that has its version number appended to the end,
+       # which is difficult to handle in cmake, as find_library does not 
support
+       # searching for wildcard library names. So I find the library name from 
the
+       # qmake spec, and then sed this into the patched 
src/cpp/desktop/CMakeLists.txt.
+       rm -rf "${S}"/src/cpp/desktop/3rdparty || die
+       local s=$(grep '\-lQt$${QT_MAJOR_VERSION}Solutions_SingleApplication' \
+                                  
"${EROOT}"/usr/lib64/qt5/mkspecs/features/qtsingleapplication.prf \
+                                        | sed -e 's@\$\${QT_MAJOR_VERSION}@5@' 
\
+                                                  -e 's@LIBS \*= -l@@')
+       sed -e "s@Qt5Solutions_SingleApplication-2.6@${s}@g" \
+               -i "${S}"/src/cpp/desktop/CMakeLists.txt \
+               || die
+
+       # The git commit for tag v0.99.879
+       sed -e 's@git ARGS rev-parse HEAD@echo ARGS 
9ac918338d6f9d6dd25807d6d746b470f1cfcf6d@'\
+               -i "${S}"/CMakeLists.txt \
+               "${S}"/CMakeGlobals.txt \
+               || die
+}
+
+src_configure() {
+       export RSTUDIO_VERSION_MAJOR=$(get_version_component_range 1)
+       export RSTUDIO_VERSION_MINOR=$(get_version_component_range 2)
+       export RSTUDIO_VERSION_PATCH=$(get_version_component_range 3)
+
+       local mycmakeargs=(
+               -DDISTRO_SHARE=share/${PN}
+               $(cmake-utils_use !dedicated RSTUDIO_INSTALL_FREEDESKTOP)
+               -DRSTUDIO_TARGET=$(usex dedicated "Server" "$(usex server 
"Development" "Desktop")")
+               -DQT_QMAKE_EXECUTABLE="${EROOT}"usr/lib64/qt5/bin/qmake
+               -DRSTUDIO_VERIFY_R_VERSION=FALSE
+               )
+
+       cmake-utils_src_configure
+}
+
+src_compile() {
+       # Avoid the rest of the oracle-jdk-bin-1.8.0.60 sandbox violations F: 
mkdir S: deny
+       # P: /root/.oracle_jre_usage.
+       export ANT_OPTS="-Duser.home=${T}"
+       cmake-utils_src_compile
+}
+
+src_install() {
+       export ANT_OPTS="-Duser.home=${T}"
+       cmake-utils_src_install
+       pax-mark m "${ED}usr/bin/rstudio"
+       doconfd "${FILESDIR}"/rstudio-server.conf
+       dodir /etc/rstudio
+       insinto /etc/rstudio
+       doins "${FILESDIR}"/rsession.conf
+       dosym /etc/conf.d/rstudio-server.conf /etc/rstudio/rserver.conf
+       if use dedicated || use server; then
+               dopamd src/cpp/server/extras/pam/rstudio
+               newinitd "${FILESDIR}"/rstudio-server.initd rstudio-server
+       fi
+}
+
+pkg_preinst() {
+       use dedicated || gnome2_icon_savelist
+       java-pkg-2_pkg_preinst
+}
+
+pkg_postinst() {
+       use dedicated || { fdo-mime_desktop_database_update
+               fdo-mime_mime_database_update
+               gnome2_icon_cache_update ;}
+
+       if use dedicated || use server; then
+               enewgroup rstudio-server
+               enewuser rstudio-server -1 -1 -1 rstudio-server
+       fi
+}
+
+pkg_postrm() {
+       use dedicated || { fdo-mime_desktop_database_update
+               fdo-mime_mime_database_update
+               gnome2_icon_cache_update ;}
+}

Reply via email to