sci-mathematics/rstudio: Bump to 1.2.5042
authorMark Wright <gienah@gentoo.org>
Tue, 28 Apr 2020 12:23:49 +0000 (22:23 +1000)
committerMark Wright <gienah@gentoo.org>
Tue, 28 Apr 2020 12:24:55 +0000 (22:24 +1000)
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Mark Wright <gienah@gentoo.org>
sci-mathematics/rstudio/Manifest
sci-mathematics/rstudio/files/rstudio-1.2.5042-boost-1.73.0.patch [new file with mode: 0644]
sci-mathematics/rstudio/rstudio-1.2.5042.ebuild [new file with mode: 0644]

index 48c017368ef86c1078bd9cdd75fa6d755e5d0313..314a334a3e7af5eaab7cb1dfcea90cc8220a98c4 100644 (file)
@@ -10,6 +10,7 @@ DIST rsconnect_0.4.1.4_fcac892a69817febd7b655b189bf57193260cda0.tar.gz 197051 BL
 DIST rstudio-1.1.463.tar.gz 20203779 BLAKE2B 97f879539cbb7051af362a8469795a47feb42d18ff46dbbdffe36e0685d1cd5704848b3bf5a5611d482a09567722e35288527302cd521b18e2a48b347c919e17 SHA512 987347563a9726363c28d866e1372eae8eb19a5cbd0e33c7ee0e0c8f90471c4b69de0f559c00410523841b6c090b584652e01496f5db33c015a4554d2f4e179b
 DIST rstudio-1.2.1335.tar.gz 20440199 BLAKE2B cdd54a7df5a234bcc6d440f4ba5b45e58ea469f8dac5a17d9088f9d65035495c86b5a308cde28a224648f96a74038299863291f3c516a1d567762ecc5bfb079c SHA512 90657effc55264bf3efa1a8a5d2bbe94a37727f0450202ade99b9fbb71ea75b6dd9fa798d17cd4d1a1a97a16f186de8004d1888b6ea43f36d5252508520d3cde
 DIST rstudio-1.2.5033.tar.gz 20456976 BLAKE2B 3cbca6a5180690104dddf1456168bd38708d4152ed9b7a167035dd66e270aeb6405169d34461cbd899738be1872607e3f3b6f81ff0b3c9e6a9ed965a889b1393 SHA512 3569d4fed342275a9905c87e4f97be63b6391d2c37f75397e06201a7c31f80d94799214f51ff8e57d458ef18d5e54afe1ec8a7c56ac05ed8b8225ecca72d1daf
+DIST rstudio-1.2.5042.tar.gz 20456999 BLAKE2B 3251ab2511daefefa395256fedb273ecc36dbc8118457474e3647f7616baea91301e597896582ad4b191195fc7baf17645c4c25b9a957a0c17a6251151b1dd87 SHA512 e09f2360abecde0c16e240e6838efb270a355bec3d3982ffde2b01b32b21e9281fef465734edbfeb5e05375529cc7f06d5b5d41304f367982f53ae7ad98e20f9
 DIST selenium-java-2.37.0.zip 24625928 BLAKE2B b369a805ae96f0d0913c4be42888d9c2a1e213ff982f9daefe73fadb705baa80ab0186ab50ed52609e83697cffaf8d617d06d75405cb8e1c3fe8e7c5b81dba25 SHA512 68624e82dbc751a25c50fad72702a98eb30d77fd4337d2a969f8e06bcc49e5f8c835cd27ec53772f3375014ddde1d5636936e966b75f3594a9f86aa18ba4e779
 DIST selenium-server-standalone-2.37.0.jar 34730734 BLAKE2B 3899b1d4c5f9153c1f9f13bec66f7c1456ea2e0f34db7d8e54a1ce9063c33a05b3cf95216c2ae06bb40504f72f343a4b9ba6c8553fbbc340e7c18a5b612dde5c SHA512 b215446d42d2d1f69664349b6ae6dc53a532d3624c91254f0f4183d0ad764648792e5cc1126a55a1e60d9687d55200fed01d6d2f46cc3d853b1fa6ee38111018
 DIST shinyapps-0.98.1000.tar.gz 910095 BLAKE2B 4f9364692348bb52cbd12cc6ee447841cb0c805327f2518b2a9545920b602b954a98dea68ccb3daf32d2c3bab6464fb15402844d93277193315f1ae7b3ca5190 SHA512 3162317c4c20cfc1497e952a8235867084d629ae88407e6c465b3e208adb1dc97abfe6b9922e0374ddf4c8e38a76e112942bd312c54a66f74e6f2a3fe4c0a07c
diff --git a/sci-mathematics/rstudio/files/rstudio-1.2.5042-boost-1.73.0.patch b/sci-mathematics/rstudio/files/rstudio-1.2.5042-boost-1.73.0.patch
new file mode 100644 (file)
index 0000000..cd024e9
--- /dev/null
@@ -0,0 +1,22 @@
+--- rstudio-1.2.5042-orig/src/cpp/core/system/PosixChildProcessTracker.cpp     2020-04-02 03:16:24.000000000 +1100
++++ rstudio-1.2.5042/src/cpp/core/system/PosixChildProcessTracker.cpp  2020-04-28 15:36:44.839368084 +1000
+@@ -19,6 +19,8 @@
+ #include <boost/format.hpp>
++using namespace boost::placeholders;
++
+ namespace rstudio {
+ namespace core {
+ namespace system {
+--- rstudio-1.2.5042-orig/src/cpp/core/system/PosixOutputCapture.cpp   2020-04-02 03:16:24.000000000 +1100
++++ rstudio-1.2.5042/src/cpp/core/system/PosixOutputCapture.cpp        2020-04-28 15:35:50.869185435 +1000
+@@ -28,6 +28,8 @@
+ #include <core/system/System.hpp>
++using namespace boost::placeholders;
++
+ namespace rstudio {
+ namespace core {
+ namespace system {
diff --git a/sci-mathematics/rstudio/rstudio-1.2.5042.ebuild b/sci-mathematics/rstudio/rstudio-1.2.5042.ebuild
new file mode 100644 (file)
index 0000000..2de83f6
--- /dev/null
@@ -0,0 +1,236 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit eutils cmake-utils pam xdg-utils java-pkg-2 java-ant-2 pax-utils prefix qmake-utils vcs-clean
+
+# TODO
+# * use dict from tree, linguas
+# * do src_test (use junit from tree?)
+
+# update from scripts in dependencies/common
+# egrep '(GWT_SDK_VER=|GIN_VER=)' dependencies/common/install-gwt
+GWT_VER=2.8.1
+GIN_VER=2.1.2
+# grep 'PANDOC_VERSION=' dependencies/common/install-pandoc
+# It should be PANDOC_VER=2.3.1 however >=app-text/pandoc-2.3.1 is not yet in portage
+PANDOC_VER=1.19.2.1
+# grep -5 QT_CANDIDATES src/cpp/desktop/CMakeLists.txt
+QT_VER=5.10
+QT_SLOT=5
+
+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-dictionaries/core-dictionaries.zip
+"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="dedicated libressl server"
+
+RDEPEND="
+       >=app-text/pandoc-${PANDOC_VER}
+       dev-java/aopalliance:1
+       dev-java/gin:2.1
+       dev-java/gwt:2.8
+       dev-java/javax-inject
+       =dev-java/validation-api-1.0*:1.0[source]
+       dev-haskell/pandoc-citeproc
+       dev-lang/R
+       dev-libs/boost:=
+       >=dev-libs/mathjax-2.7.4
+       sys-apps/util-linux
+       sys-devel/clang:*
+       sys-libs/zlib
+       >=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[X,qt5(+)]
+               >=dev-qt/qtsensors-${QT_VER}:${QT_SLOT}
+               >=dev-qt/qtsql-${QT_VER}:${QT_SLOT}
+               >=dev-qt/qtsvg-${QT_VER}:${QT_SLOT}
+               >=dev-qt/qtwebchannel-${QT_VER}:${QT_SLOT}
+               >=dev-qt/qtwebengine-${QT_VER}:${QT_SLOT}[widgets]
+               >=dev-qt/qtwidgets-${QT_VER}:${QT_SLOT}
+               >=dev-qt/qtxml-${QT_VER}:${QT_SLOT}
+               >=dev-qt/qtxmlpatterns-${QT_VER}:${QT_SLOT}
+               server? ( sys-libs/pam )
+       )
+       dedicated? ( sys-libs/pam )
+       dedicated? (
+               sys-libs/pam
+               acct-user/rstudio-server
+               acct-group/rstudio-server
+       )
+       server? (
+               acct-user/rstudio-server
+               acct-group/rstudio-server
+       )
+       !libressl? ( dev-libs/openssl:0= )
+       libressl? ( dev-libs/libressl:0= )"
+DEPEND="${RDEPEND}
+       app-arch/unzip
+       dev-java/ant-core
+       >=virtual/jdk-1.8:=
+       virtual/pkgconfig"
+#      test? ( dev-java/junit:4 )
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.2.5033-prefs.patch
+       "${FILESDIR}"/${PN}-1.2.5033-paths.patch
+       "${FILESDIR}"/${PN}-1.2.5033-pandoc.patch
+       "${FILESDIR}"/${PN}-1.2.1335-linker_flags.patch
+       "${FILESDIR}"/${PN}-1.2.1335-qtsingleapplication.patch
+       "${FILESDIR}"/${PN}-1.0.44-systemd.patch
+       "${FILESDIR}"/${PN}-1.2.1335-core.patch
+       "${FILESDIR}"/${PN}-1.2.1335-boost-1.70.0_p1.patch
+       "${FILESDIR}"/${PN}-1.2.1335-boost-1.70.0_p2.patch
+       "${FILESDIR}"/${PN}-1.2.5042-boost-1.73.0.patch
+)
+
+src_unpack() {
+       unpack ${P}.tar.gz
+       cd "${S}" || die
+       mkdir -p dependencies/common/dictionaries
+       unzip -qd dependencies/common/dictionaries \
+               "${DISTDIR}"/core-dictionaries.zip || die
+}
+
+src_prepare() {
+       cmake-utils_src_prepare
+       java-pkg-2_src_prepare
+       egit_clean
+
+       # 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-26 || 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
+
+       # install themes in /etc/rstudio/extra/sthemes instead of /usr/extra/themes
+       sed -i \
+               -e "s@\(DESTINATION \"\)\(extras/themes\"\)@\1${EROOT}/etc/rstudio/\2@" \
+               src/cpp/server/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' \
+                                  $(qt5_get_mkspecsdir)/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: git rev-list -n 1 v${PV}
+       sed -e 's@git ARGS rev-parse HEAD@echo ARGS e4a1c219cbf6c10d9aec41461d80171ab3009bef@'\
+               -i "${S}"/CMakeLists.txt \
+               "${S}"/CMakeGlobals.txt \
+               || die
+
+       eprefixify src/gwt/build.xml
+}
+
+src_configure() {
+       export RSTUDIO_VERSION_MAJOR=$(ver_cut 1)
+       export RSTUDIO_VERSION_MINOR=$(ver_cut 2)
+       export RSTUDIO_VERSION_PATCH=$(ver_cut 3)
+
+       local mycmakeargs=(
+               -DDISTRO_SHARE=share/${PN}
+               -DRSTUDIO_TARGET=$(usex dedicated "Server" "$(usex server "Development" "Desktop")")
+               -DRSTUDIO_VERIFY_R_VERSION=FALSE
+               )
+
+       if use !dedicated; then
+               mycmakeargs+=(
+                       -DRSTUDIO_INSTALL_FREEDESKTOP="$(usex !dedicated "ON" "OFF")"
+                       -DQT_QMAKE_EXECUTABLE=$(qt5_get_bindir)/qmake
+               )
+       fi
+       cmake-utils_src_configure
+}
+
+src_compile() {
+       local JAVA_ANT_REWRITE_CLASSPATH="yes"
+       local EANT_BUILD_XML="src/gwt/build.xml"
+       local EANT_BUILD_TARGET="clean"
+       java-pkg-2_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
+       use dedicated || pax-mark m "${ED}/usr/bin/rstudio"
+       doconfd "${FILESDIR}"/rstudio-server.conf
+       dodir /etc/rstudio
+       insinto /etc/rstudio
+       doins "${FILESDIR}"/rsession.conf
+       dosym ../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() {
+       java-pkg-2_pkg_preinst
+}
+
+pkg_postinst() {
+       use dedicated || { xdg_desktop_database_update
+               xdg_mimeinfo_database_update
+               xdg_icon_cache_update ;}
+}
+
+pkg_postrm() {
+       use dedicated || { xdg_desktop_database_update
+               xdg_mimeinfo_database_update
+               xdg_icon_cache_update ;}
+}