blob: 86155f2739da63f1d2bb671c9cc9f441e30ef051 (
plain)
1 # Description: RStudio - an Interface for GNU R
2 # URL: https://www.rstudio.com/
3 # Maintainer: Tim Biermann, tbier at posteo dot de
4 # Depends on: ant boost hyphen libevent mathjax openjdk8 pandoc-bin qtwebengine r
5
6 name=rstudio
7 version=1.3.959
8 release=1
9
10 source=(https://github.com/rstudio/rstudio/archive/v$version/$name-$version.tar.gz
11 # https://gitweb.gentoo.org/repo/gentoo.git/tree/sci-mathematics/rstudio/files
12 rstudio-1.2.5042-boost-1.73.0.patch
13 # https://github.com/rstudio/rstudio/commit/60dd6e3cd349cc208e33a12635378a1e338f8efc.patch
14 r-nosave.patch)
15 git=(https://github.com/rstudio/rstudio.git)
16
17 build() {
18 ## if you want your git snapshot to be a particular version
19 ## uncomment below and change every occurance of $name-$version to $name
20 #git checkout v$version $name
21
22 patch -Np1 -d $name-$version -i $SRC/rstudio-1.2.5042-boost-1.73.0.patch
23
24 sed -i 's/2009-12/2009-19/g' $name-$version/src/cpp/r/session/REmbeddedPosix.cpp
25 sed -i 's/PBC/Inc./g' $name-$version/src/cpp/r/config.h.in
26 sed -i 's/PBC/Inc./g' $name-$version/src/cpp/r/session/REmbeddedPosix.cpp
27 patch -Np1 -d $name-$version -i $SRC/r-nosave.patch
28
29 pushd $name-$version/dependencies/common
30 install -d pandoc
31 ln -sfT /usr/share/myspell/dicts dictionaries
32 ln -sfT /usr/share/mathjax mathjax-27
33 ln -sfT /usr/bin/pandoc pandoc/pandoc
34 ln -sfT /usr/bin/pandoc-citeproc pandoc/pandoc-citeproc
35 export R_LIBS_USER="$PKG/usr/lib/R/library/"
36 bash install-packages
37 popd
38
39 export PATH="/usr/lib/java/openjdk8/jre/bin/:${PATH}"
40 cmake -S$name-$version -Bbuild -GNinja\
41 -DCMAKE_INSTALL_PREFIX=/usr/lib/rstudio \
42 -DRSTUDIO_TARGET=Desktop \
43 -DCMAKE_BUILD_TYPE=Release \
44 -DRSTUDIO_USE_SYSTEM_BOOST=ON \
45 -DQT_QMAKE_EXECUTABLE=/usr/lib/qt5/bin/qmake \
46 -DBoost_NO_BOOST_CMAKE=ON \
47 -DRSTUDIO_BUNDLE_QT=FALSE \
48 -Wno-dev
49
50 cmake --build build
51 DESTDIR=$PKG cmake --install build
52
53 install -dm755 $PKG/usr/bin/
54 ln -s /usr/lib/$name/bin/$name $PKG/usr/bin/$name
55 sed -i 's|/usr/lib/rstudio/bin/rstudio|/usr/bin/rstudio|g' $PKG/usr/share/applications/rstudio.desktop
56 find $PKG \(\
57 -iname '*README*' -o \
58 -iname '*COPYING*' -o \
59 -iname 'INSTALL' \
60 \) -delete || true
61 }
|