2019-06-11 23:45:49 +02:00
|
|
|
# Description: RStudio - an Interface for GNU R
|
|
|
|
# URL: https://www.rstudio.com/
|
|
|
|
# Maintainer: Tim Biermann, tbier at posteo dot de
|
2021-08-21 19:50:14 +02:00
|
|
|
# Depends on: ant hyphen libevent libsoci mathjax npm openjdk8 pandoc-bin qtwebengine r yaml-cpp yarn
|
2019-06-11 23:45:49 +02:00
|
|
|
|
|
|
|
name=rstudio
|
2021-06-14 09:54:03 +00:00
|
|
|
version=1.4.1717
|
2021-08-21 19:50:14 +02:00
|
|
|
release=3
|
2020-05-14 15:25:43 +02:00
|
|
|
|
2020-05-24 09:52:56 +00:00
|
|
|
source=(https://github.com/rstudio/rstudio/archive/v$version/$name-$version.tar.gz
|
2021-06-14 09:54:03 +00:00
|
|
|
# https://src.fedoraproject.org/rpms/rstudio/tree/rawhide
|
|
|
|
0000-unbundle-dependencies-common.patch 0003-fix-resources-path.patch
|
2021-08-21 19:50:14 +02:00
|
|
|
0002-fix-rstudio-exec-path.patch 0004-use-system-node.patch)
|
2019-06-11 23:45:49 +02:00
|
|
|
|
|
|
|
build() {
|
2021-08-21 19:50:14 +02:00
|
|
|
patch -Np1 -d $name-$version -i $SRC/0000-unbundle-dependencies-common.patch
|
|
|
|
patch -Np1 -d $name-$version -i $SRC/0002-fix-rstudio-exec-path.patch
|
|
|
|
patch -Np1 -d $name-$version -i $SRC/0003-fix-resources-path.patch
|
|
|
|
patch -Np1 -d $name-$version -i $SRC/0004-use-system-node.patch
|
2020-05-14 15:25:43 +02:00
|
|
|
|
2021-01-20 13:36:09 +00:00
|
|
|
export R_LIBS_USER="$PKG/usr/lib/R/library/"
|
2021-08-21 19:50:14 +02:00
|
|
|
export JAVA_ANT_REWRITE_CLASSPATH="yes"
|
|
|
|
export JAVA_TOOL_OPTIONS="-Djava.util.prefs.userRoot=$SRC"
|
|
|
|
|
|
|
|
export JAVA_HOME=/usr/lib/java/openjdk8
|
|
|
|
export PATH="${JAVA_HOME}/bin/:${PATH}"
|
2021-01-20 13:36:09 +00:00
|
|
|
|
|
|
|
(pushd $name-$version/dependencies/common
|
2021-08-21 19:50:14 +02:00
|
|
|
install -d node/10.19.0/bin
|
2019-10-14 23:48:24 +02:00
|
|
|
ln -sfT /usr/share/myspell/dicts dictionaries
|
2020-05-24 09:52:56 +00:00
|
|
|
ln -sfT /usr/share/mathjax mathjax-27
|
2021-08-21 19:50:14 +02:00
|
|
|
ln -sfT /usr/bin/pandoc pandoc
|
2021-01-20 13:36:09 +00:00
|
|
|
ln -sfT /usr/bin/node node/10.19.0/bin/node
|
2021-08-21 19:50:14 +02:00
|
|
|
bash install-packages
|
|
|
|
yarn config set ignore-engines true
|
|
|
|
yarn install)
|
2019-06-11 23:45:49 +02:00
|
|
|
|
2021-08-21 19:50:14 +02:00
|
|
|
pushd $name-$version/src/gwt
|
|
|
|
|
|
|
|
pushd panmirror/src/editor
|
|
|
|
npm install --no-optional --legacy-peer-deps
|
|
|
|
popd
|
|
|
|
|
|
|
|
ant clean
|
|
|
|
ant build
|
|
|
|
popd
|
|
|
|
|
|
|
|
sed -i 's@gwt_build ALL@gwt_build@g' $name-$version/src/gwt/CMakeLists.txt
|
2021-06-14 09:54:03 +00:00
|
|
|
|
2021-01-20 13:36:09 +00:00
|
|
|
cmake -S $name-$version -B build -G Ninja \
|
2020-11-08 13:13:00 +00:00
|
|
|
-D CMAKE_INSTALL_PREFIX=/usr/lib/rstudio \
|
|
|
|
-D CMAKE_BUILD_TYPE=Release \
|
2020-12-07 00:02:12 +00:00
|
|
|
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
|
|
|
|
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
|
2021-06-14 09:54:03 +00:00
|
|
|
-D QT_QMAKE_EXECUTABLE=/usr/lib/qt5/bin/qmake \
|
2020-11-08 13:13:00 +00:00
|
|
|
-D RSTUDIO_TARGET=Desktop \
|
|
|
|
-D RSTUDIO_USE_SYSTEM_BOOST=ON \
|
2021-01-20 13:36:09 +00:00
|
|
|
-D RSTUDIO_USE_SYSTEM_SOCI=ON \
|
2021-06-14 09:54:03 +00:00
|
|
|
-D RSTUDIO_USE_SYSTEM_YAML_CPP=ON \
|
2020-11-08 13:13:00 +00:00
|
|
|
-D Boost_NO_BOOST_CMAKE=ON \
|
|
|
|
-D RSTUDIO_BUNDLE_QT=FALSE \
|
2021-08-21 19:50:14 +02:00
|
|
|
-D RSTUDIO_CRASHPAD_ENABLED=FALSE \
|
2020-05-14 15:25:43 +02:00
|
|
|
-Wno-dev
|
|
|
|
|
|
|
|
cmake --build build
|
2020-07-08 13:01:36 +00:00
|
|
|
DESTDIR=$PKG cmake --install build
|
2019-06-11 23:45:49 +02:00
|
|
|
|
2019-10-14 23:48:24 +02:00
|
|
|
install -dm755 $PKG/usr/bin/
|
2020-05-14 15:25:43 +02:00
|
|
|
ln -s /usr/lib/$name/bin/$name $PKG/usr/bin/$name
|
2019-10-14 23:48:24 +02:00
|
|
|
sed -i 's|/usr/lib/rstudio/bin/rstudio|/usr/bin/rstudio|g' $PKG/usr/share/applications/rstudio.desktop
|
2021-01-20 13:36:09 +00:00
|
|
|
|
2019-10-14 23:48:24 +02:00
|
|
|
find $PKG \(\
|
|
|
|
-iname '*README*' -o \
|
|
|
|
-iname '*COPYING*' -o \
|
|
|
|
-iname 'INSTALL' \
|
|
|
|
\) -delete || true
|
2019-06-11 23:45:49 +02:00
|
|
|
}
|