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: Tue, 28 Apr 2020 12:25:07
Message-Id: 1588076695.83f5ebaecb1e0351c10f988589fe2858259e6a85.gienah@gentoo
1 commit: 83f5ebaecb1e0351c10f988589fe2858259e6a85
2 Author: Mark Wright <gienah <AT> gentoo <DOT> org>
3 AuthorDate: Tue Apr 28 12:23:49 2020 +0000
4 Commit: Mark Wright <gienah <AT> gentoo <DOT> org>
5 CommitDate: Tue Apr 28 12:24:55 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=83f5ebae
7
8 sci-mathematics/rstudio: Bump to 1.2.5042
9
10 Package-Manager: Portage-2.3.99, Repoman-2.3.22
11 Signed-off-by: Mark Wright <gienah <AT> gentoo.org>
12
13 sci-mathematics/rstudio/Manifest | 1 +
14 .../files/rstudio-1.2.5042-boost-1.73.0.patch | 22 ++
15 sci-mathematics/rstudio/rstudio-1.2.5042.ebuild | 236 +++++++++++++++++++++
16 3 files changed, 259 insertions(+)
17
18 diff --git a/sci-mathematics/rstudio/Manifest b/sci-mathematics/rstudio/Manifest
19 index 48c017368ef..314a334a3e7 100644
20 --- a/sci-mathematics/rstudio/Manifest
21 +++ b/sci-mathematics/rstudio/Manifest
22 @@ -10,6 +10,7 @@ DIST rsconnect_0.4.1.4_fcac892a69817febd7b655b189bf57193260cda0.tar.gz 197051 BL
23 DIST rstudio-1.1.463.tar.gz 20203779 BLAKE2B 97f879539cbb7051af362a8469795a47feb42d18ff46dbbdffe36e0685d1cd5704848b3bf5a5611d482a09567722e35288527302cd521b18e2a48b347c919e17 SHA512 987347563a9726363c28d866e1372eae8eb19a5cbd0e33c7ee0e0c8f90471c4b69de0f559c00410523841b6c090b584652e01496f5db33c015a4554d2f4e179b
24 DIST rstudio-1.2.1335.tar.gz 20440199 BLAKE2B cdd54a7df5a234bcc6d440f4ba5b45e58ea469f8dac5a17d9088f9d65035495c86b5a308cde28a224648f96a74038299863291f3c516a1d567762ecc5bfb079c SHA512 90657effc55264bf3efa1a8a5d2bbe94a37727f0450202ade99b9fbb71ea75b6dd9fa798d17cd4d1a1a97a16f186de8004d1888b6ea43f36d5252508520d3cde
25 DIST rstudio-1.2.5033.tar.gz 20456976 BLAKE2B 3cbca6a5180690104dddf1456168bd38708d4152ed9b7a167035dd66e270aeb6405169d34461cbd899738be1872607e3f3b6f81ff0b3c9e6a9ed965a889b1393 SHA512 3569d4fed342275a9905c87e4f97be63b6391d2c37f75397e06201a7c31f80d94799214f51ff8e57d458ef18d5e54afe1ec8a7c56ac05ed8b8225ecca72d1daf
26 +DIST rstudio-1.2.5042.tar.gz 20456999 BLAKE2B 3251ab2511daefefa395256fedb273ecc36dbc8118457474e3647f7616baea91301e597896582ad4b191195fc7baf17645c4c25b9a957a0c17a6251151b1dd87 SHA512 e09f2360abecde0c16e240e6838efb270a355bec3d3982ffde2b01b32b21e9281fef465734edbfeb5e05375529cc7f06d5b5d41304f367982f53ae7ad98e20f9
27 DIST selenium-java-2.37.0.zip 24625928 BLAKE2B b369a805ae96f0d0913c4be42888d9c2a1e213ff982f9daefe73fadb705baa80ab0186ab50ed52609e83697cffaf8d617d06d75405cb8e1c3fe8e7c5b81dba25 SHA512 68624e82dbc751a25c50fad72702a98eb30d77fd4337d2a969f8e06bcc49e5f8c835cd27ec53772f3375014ddde1d5636936e966b75f3594a9f86aa18ba4e779
28 DIST selenium-server-standalone-2.37.0.jar 34730734 BLAKE2B 3899b1d4c5f9153c1f9f13bec66f7c1456ea2e0f34db7d8e54a1ce9063c33a05b3cf95216c2ae06bb40504f72f343a4b9ba6c8553fbbc340e7c18a5b612dde5c SHA512 b215446d42d2d1f69664349b6ae6dc53a532d3624c91254f0f4183d0ad764648792e5cc1126a55a1e60d9687d55200fed01d6d2f46cc3d853b1fa6ee38111018
29 DIST shinyapps-0.98.1000.tar.gz 910095 BLAKE2B 4f9364692348bb52cbd12cc6ee447841cb0c805327f2518b2a9545920b602b954a98dea68ccb3daf32d2c3bab6464fb15402844d93277193315f1ae7b3ca5190 SHA512 3162317c4c20cfc1497e952a8235867084d629ae88407e6c465b3e208adb1dc97abfe6b9922e0374ddf4c8e38a76e112942bd312c54a66f74e6f2a3fe4c0a07c
30
31 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
32 new file mode 100644
33 index 00000000000..cd024e9ed91
34 --- /dev/null
35 +++ b/sci-mathematics/rstudio/files/rstudio-1.2.5042-boost-1.73.0.patch
36 @@ -0,0 +1,22 @@
37 +--- rstudio-1.2.5042-orig/src/cpp/core/system/PosixChildProcessTracker.cpp 2020-04-02 03:16:24.000000000 +1100
38 ++++ rstudio-1.2.5042/src/cpp/core/system/PosixChildProcessTracker.cpp 2020-04-28 15:36:44.839368084 +1000
39 +@@ -19,6 +19,8 @@
40 +
41 + #include <boost/format.hpp>
42 +
43 ++using namespace boost::placeholders;
44 ++
45 + namespace rstudio {
46 + namespace core {
47 + namespace system {
48 +--- rstudio-1.2.5042-orig/src/cpp/core/system/PosixOutputCapture.cpp 2020-04-02 03:16:24.000000000 +1100
49 ++++ rstudio-1.2.5042/src/cpp/core/system/PosixOutputCapture.cpp 2020-04-28 15:35:50.869185435 +1000
50 +@@ -28,6 +28,8 @@
51 +
52 + #include <core/system/System.hpp>
53 +
54 ++using namespace boost::placeholders;
55 ++
56 + namespace rstudio {
57 + namespace core {
58 + namespace system {
59
60 diff --git a/sci-mathematics/rstudio/rstudio-1.2.5042.ebuild b/sci-mathematics/rstudio/rstudio-1.2.5042.ebuild
61 new file mode 100644
62 index 00000000000..2de83f6f633
63 --- /dev/null
64 +++ b/sci-mathematics/rstudio/rstudio-1.2.5042.ebuild
65 @@ -0,0 +1,236 @@
66 +# Copyright 1999-2020 Gentoo Authors
67 +# Distributed under the terms of the GNU General Public License v2
68 +
69 +EAPI=7
70 +
71 +inherit eutils cmake-utils pam xdg-utils java-pkg-2 java-ant-2 pax-utils prefix qmake-utils vcs-clean
72 +
73 +# TODO
74 +# * use dict from tree, linguas
75 +# * do src_test (use junit from tree?)
76 +
77 +# update from scripts in dependencies/common
78 +# egrep '(GWT_SDK_VER=|GIN_VER=)' dependencies/common/install-gwt
79 +GWT_VER=2.8.1
80 +GIN_VER=2.1.2
81 +# grep 'PANDOC_VERSION=' dependencies/common/install-pandoc
82 +# It should be PANDOC_VER=2.3.1 however >=app-text/pandoc-2.3.1 is not yet in portage
83 +PANDOC_VER=1.19.2.1
84 +# grep -5 QT_CANDIDATES src/cpp/desktop/CMakeLists.txt
85 +QT_VER=5.10
86 +QT_SLOT=5
87 +
88 +DESCRIPTION="IDE for the R language"
89 +HOMEPAGE="
90 + http://www.rstudio.org
91 + https://github.com/rstudio/rstudio/"
92 +SRC_URI="
93 + https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz
94 + https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip
95 +"
96 +
97 +LICENSE="AGPL-3"
98 +SLOT="0"
99 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
100 +IUSE="dedicated libressl server"
101 +
102 +RDEPEND="
103 + >=app-text/pandoc-${PANDOC_VER}
104 + dev-java/aopalliance:1
105 + dev-java/gin:2.1
106 + dev-java/gwt:2.8
107 + dev-java/javax-inject
108 + =dev-java/validation-api-1.0*:1.0[source]
109 + dev-haskell/pandoc-citeproc
110 + dev-lang/R
111 + dev-libs/boost:=
112 + >=dev-libs/mathjax-2.7.4
113 + sys-apps/util-linux
114 + sys-devel/clang:*
115 + sys-libs/zlib
116 + >=virtual/jre-1.8:=
117 + x11-libs/pango
118 + !dedicated? (
119 + >=dev-qt/qtcore-${QT_VER}:${QT_SLOT}
120 + >=dev-qt/qtdeclarative-${QT_VER}:${QT_SLOT}
121 + >=dev-qt/qtdbus-${QT_VER}:${QT_SLOT}
122 + >=dev-qt/qtgui-${QT_VER}:${QT_SLOT}
123 + >=dev-qt/qtnetwork-${QT_VER}:${QT_SLOT}
124 + >=dev-qt/qtopengl-${QT_VER}:${QT_SLOT}
125 + >=dev-qt/qtpositioning-${QT_VER}:${QT_SLOT}
126 + >=dev-qt/qtprintsupport-${QT_VER}:${QT_SLOT}
127 + >=dev-qt/qtsingleapplication-2.6.1_p20150629[X,qt5(+)]
128 + >=dev-qt/qtsensors-${QT_VER}:${QT_SLOT}
129 + >=dev-qt/qtsql-${QT_VER}:${QT_SLOT}
130 + >=dev-qt/qtsvg-${QT_VER}:${QT_SLOT}
131 + >=dev-qt/qtwebchannel-${QT_VER}:${QT_SLOT}
132 + >=dev-qt/qtwebengine-${QT_VER}:${QT_SLOT}[widgets]
133 + >=dev-qt/qtwidgets-${QT_VER}:${QT_SLOT}
134 + >=dev-qt/qtxml-${QT_VER}:${QT_SLOT}
135 + >=dev-qt/qtxmlpatterns-${QT_VER}:${QT_SLOT}
136 + server? ( sys-libs/pam )
137 + )
138 + dedicated? ( sys-libs/pam )
139 + dedicated? (
140 + sys-libs/pam
141 + acct-user/rstudio-server
142 + acct-group/rstudio-server
143 + )
144 + server? (
145 + acct-user/rstudio-server
146 + acct-group/rstudio-server
147 + )
148 + !libressl? ( dev-libs/openssl:0= )
149 + libressl? ( dev-libs/libressl:0= )"
150 +DEPEND="${RDEPEND}
151 + app-arch/unzip
152 + dev-java/ant-core
153 + >=virtual/jdk-1.8:=
154 + virtual/pkgconfig"
155 +# test? ( dev-java/junit:4 )
156 +
157 +PATCHES=(
158 + "${FILESDIR}"/${PN}-1.2.5033-prefs.patch
159 + "${FILESDIR}"/${PN}-1.2.5033-paths.patch
160 + "${FILESDIR}"/${PN}-1.2.5033-pandoc.patch
161 + "${FILESDIR}"/${PN}-1.2.1335-linker_flags.patch
162 + "${FILESDIR}"/${PN}-1.2.1335-qtsingleapplication.patch
163 + "${FILESDIR}"/${PN}-1.0.44-systemd.patch
164 + "${FILESDIR}"/${PN}-1.2.1335-core.patch
165 + "${FILESDIR}"/${PN}-1.2.1335-boost-1.70.0_p1.patch
166 + "${FILESDIR}"/${PN}-1.2.1335-boost-1.70.0_p2.patch
167 + "${FILESDIR}"/${PN}-1.2.5042-boost-1.73.0.patch
168 +)
169 +
170 +src_unpack() {
171 + unpack ${P}.tar.gz
172 + cd "${S}" || die
173 + mkdir -p dependencies/common/dictionaries
174 + unzip -qd dependencies/common/dictionaries \
175 + "${DISTDIR}"/core-dictionaries.zip || die
176 +}
177 +
178 +src_prepare() {
179 + cmake-utils_src_prepare
180 + java-pkg-2_src_prepare
181 + egit_clean
182 +
183 + # Enable CMake to install our .service file for systemd usage
184 + mkdir -vp "${S}/src/cpp/server/lib/systemd/system" || die
185 + cp -v "${FILESDIR}/rstudio-server.service.in" "${S}/src/cpp/server/lib/systemd/system/" || die
186 +
187 + # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using
188 + # this sed hack for now. ~RMH
189 + sed -i \
190 + -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \
191 + src/cpp/server/ServerOptions.cpp \
192 + src/cpp/session/SessionOptions.cpp || die
193 +
194 + # use mathjax from system
195 + ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax-26 || die
196 +
197 + # make sure icons and mime stuff are with prefix
198 + sed -i \
199 + -e "s:/usr:${EPREFIX}/usr:g" \
200 + CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die
201 +
202 + # install themes in /etc/rstudio/extra/sthemes instead of /usr/extra/themes
203 + sed -i \
204 + -e "s@\(DESTINATION \"\)\(extras/themes\"\)@\1${EROOT}/etc/rstudio/\2@" \
205 + src/cpp/server/CMakeLists.txt || die
206 +
207 + # On Gentoo the rstudio-server configuration file is /etc/conf.d/rstudio-server.conf
208 + sed -e "s@/etc/rstudio/rserver.conf@${EROOT}/etc/conf.d/rstudio-server.conf@" \
209 + -i src/cpp/server/ServerOptions.cpp \
210 + || die
211 +
212 + # Set the rsession.conf file location for Gentoo prefix
213 + sed -e "s@/etc/rstudio/rsession.conf@${EROOT}/etc/rstudio/rsession.conf@" \
214 + -i src/cpp/session/SessionOptions.cpp \
215 + || die
216 +
217 + # dev-qt/qtsingleapplication-2.6.1_p20150629 does not provide a cmake module.
218 + # It provides a library that has its version number appended to the end,
219 + # which is difficult to handle in cmake, as find_library does not support
220 + # searching for wildcard library names. So I find the library name from the
221 + # qmake spec, and then sed this into the patched src/cpp/desktop/CMakeLists.txt.
222 + rm -rf "${S}"/src/cpp/desktop/3rdparty || die
223 + local s=$(grep '\-lQt$${QT_MAJOR_VERSION}Solutions_SingleApplication' \
224 + $(qt5_get_mkspecsdir)/features/qtsingleapplication.prf \
225 + | sed -e 's@\$\${QT_MAJOR_VERSION}@5@' \
226 + -e 's@LIBS \*= -l@@')
227 + sed -e "s@Qt5Solutions_SingleApplication-2.6@${s}@g" \
228 + -i "${S}"/src/cpp/desktop/CMakeLists.txt \
229 + || die
230 +
231 + # The git commit for tag: git rev-list -n 1 v${PV}
232 + sed -e 's@git ARGS rev-parse HEAD@echo ARGS e4a1c219cbf6c10d9aec41461d80171ab3009bef@'\
233 + -i "${S}"/CMakeLists.txt \
234 + "${S}"/CMakeGlobals.txt \
235 + || die
236 +
237 + eprefixify src/gwt/build.xml
238 +}
239 +
240 +src_configure() {
241 + export RSTUDIO_VERSION_MAJOR=$(ver_cut 1)
242 + export RSTUDIO_VERSION_MINOR=$(ver_cut 2)
243 + export RSTUDIO_VERSION_PATCH=$(ver_cut 3)
244 +
245 + local mycmakeargs=(
246 + -DDISTRO_SHARE=share/${PN}
247 + -DRSTUDIO_TARGET=$(usex dedicated "Server" "$(usex server "Development" "Desktop")")
248 + -DRSTUDIO_VERIFY_R_VERSION=FALSE
249 + )
250 +
251 + if use !dedicated; then
252 + mycmakeargs+=(
253 + -DRSTUDIO_INSTALL_FREEDESKTOP="$(usex !dedicated "ON" "OFF")"
254 + -DQT_QMAKE_EXECUTABLE=$(qt5_get_bindir)/qmake
255 + )
256 + fi
257 + cmake-utils_src_configure
258 +}
259 +
260 +src_compile() {
261 + local JAVA_ANT_REWRITE_CLASSPATH="yes"
262 + local EANT_BUILD_XML="src/gwt/build.xml"
263 + local EANT_BUILD_TARGET="clean"
264 + java-pkg-2_src_compile
265 +
266 + # Avoid the rest of the oracle-jdk-bin-1.8.0.60 sandbox violations F: mkdir S: deny
267 + # P: /root/.oracle_jre_usage.
268 + export ANT_OPTS="-Duser.home=${T}"
269 + cmake-utils_src_compile
270 +}
271 +
272 +src_install() {
273 + export ANT_OPTS="-Duser.home=${T}"
274 + cmake-utils_src_install
275 + use dedicated || pax-mark m "${ED}/usr/bin/rstudio"
276 + doconfd "${FILESDIR}"/rstudio-server.conf
277 + dodir /etc/rstudio
278 + insinto /etc/rstudio
279 + doins "${FILESDIR}"/rsession.conf
280 + dosym ../conf.d/rstudio-server.conf /etc/rstudio/rserver.conf
281 + if use dedicated || use server; then
282 + dopamd src/cpp/server/extras/pam/rstudio
283 + newinitd "${FILESDIR}"/rstudio-server.initd rstudio-server
284 + fi
285 +}
286 +
287 +pkg_preinst() {
288 + java-pkg-2_pkg_preinst
289 +}
290 +
291 +pkg_postinst() {
292 + use dedicated || { xdg_desktop_database_update
293 + xdg_mimeinfo_database_update
294 + xdg_icon_cache_update ;}
295 +}
296 +
297 +pkg_postrm() {
298 + use dedicated || { xdg_desktop_database_update
299 + xdg_mimeinfo_database_update
300 + xdg_icon_cache_update ;}
301 +}