blob: d0a88fdae91a56741c02342720cc6a1d00fa4b4f (
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 libsoci mathjax nodejs openjdk8 pandoc-bin qtwebengine r yaml-cpp yarn
5
6 name=rstudio
7 version=1.4.1717
8 release=2
9
10 source=(https://github.com/rstudio/rstudio/archive/v$version/$name-$version.tar.gz
11 # https://src.fedoraproject.org/rpms/rstudio/tree/rawhide
12 0000-unbundle-dependencies-common.patch 0003-fix-resources-path.patch
13 0004-use-system-node.patch)
14 git=(https://github.com/rstudio/rstudio.git)
15
16 build() {
17 ## if you want your git snapshot to be a particular version
18 ## uncomment below and change every occurance of $name-$version to $name
19 #git checkout v$version $name
20
21 export R_LIBS_USER="$PKG/usr/lib/R/library/"
22
23 (pushd $name-$version/dependencies/common
24 install -d pandoc node/10.19.0/bin
25 ln -sfT /usr/share/myspell/dicts dictionaries
26 ln -sfT /usr/share/mathjax mathjax-27
27 ln -sfT /usr/bin/ "pandoc/2.11.4"
28 ln -sfT /usr/bin/node node/10.19.0/bin/node
29 bash install-packages)
30
31 patch -Np1 -d $name-$version -i $SRC/0000-unbundle-dependencies-common.patch
32 patch -Np1 -d $name-$version -i $SRC/0003-fix-resources-path.patch
33 patch -Np1 -d $name-$version -i $SRC/0004-use-system-node.patch
34
35 export PATH="/usr/lib/java/openjdk8/jre/bin/:${PATH}"
36 cmake -S $name-$version -B build -G Ninja \
37 -D CMAKE_INSTALL_PREFIX=/usr/lib/rstudio \
38 -D CMAKE_BUILD_TYPE=Release \
39 -D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
40 -D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
41 -D QT_QMAKE_EXECUTABLE=/usr/lib/qt5/bin/qmake \
42 -D RSTUDIO_TARGET=Desktop \
43 -D RSTUDIO_USE_SYSTEM_BOOST=ON \
44 -D RSTUDIO_USE_SYSTEM_SOCI=ON \
45 -D RSTUDIO_USE_SYSTEM_YAML_CPP=ON \
46 -D Boost_NO_BOOST_CMAKE=ON \
47 -D RSTUDIO_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
57 find $PKG \(\
58 -iname '*README*' -o \
59 -iname '*COPYING*' -o \
60 -iname 'INSTALL' \
61 \) -delete || true
62 }
|