aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaac Yu <isaacyu1@isaacyu1.com>2022-04-06 17:13:18 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-04-09 15:45:48 +0700
commite6d0f24b48d4d46abe1e7eebe354f69d56a51e6f (patch)
tree7c3b2f10f461e280233a659c5832d30ef3c8d5bf
parentd90274bb52ada29a05e7ade76169b153d7450db5 (diff)
development/rstudio-desktop: Updated for version 2022.02.1+461.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--development/rstudio-desktop/README7
-rw-r--r--development/rstudio-desktop/rstudio-desktop.SlackBuild127
-rw-r--r--development/rstudio-desktop/rstudio-desktop.info20
-rw-r--r--development/rstudio-desktop/sigstksz_gcc11.patch14
-rw-r--r--development/rstudio-desktop/slack-desc2
5 files changed, 145 insertions, 25 deletions
diff --git a/development/rstudio-desktop/README b/development/rstudio-desktop/README
index c21cf89f67e3..34c12052d8ef 100644
--- a/development/rstudio-desktop/README
+++ b/development/rstudio-desktop/README
@@ -1,5 +1,8 @@
RStudio is a cross-platform IDE for the R statistical computing
environment. It is available in desktop and server versions.
-This is the Linux desktop version.
+This builds the Linux desktop version.
-This script repackages the Debian package provided by RStudio.
+RStudio currently only supports 64-bit systems.
+
+The last supported version of RStudio for 32-bit systems is 1.1.463.
+A rstudio-desktop-legacy SlackBuild for 32-bit systems is available.
diff --git a/development/rstudio-desktop/rstudio-desktop.SlackBuild b/development/rstudio-desktop/rstudio-desktop.SlackBuild
index 7addfc55bc51..336cbd95fb78 100644
--- a/development/rstudio-desktop/rstudio-desktop.SlackBuild
+++ b/development/rstudio-desktop/rstudio-desktop.SlackBuild
@@ -2,7 +2,8 @@
# Slackware build script for rstudio-desktop
-# Copyright 2018 Ekin Akoglu, Erdemli/Mersin, Turkey
+# Copyright 2018 Ekin Akoglu, Erdemli/Mersin, Turkey <ekinakoglu@gmail.com>
+# Copyright 2022 Isaac Yu <isaacyu1@isaacyu1.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -26,7 +27,11 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=rstudio-desktop
SRCNAM=rstudio
-VERSION=${VERSION:-1.1.463}
+VERSION=${VERSION:-2022.02.1+461}
+SRCVER=${SRCVER:-$(echo $VERSION | sed 's/+/-/g')}
+GITCOMMIT_VER=fc9e217
+GWT_SDK_VER=${GWT_SDK_VER:-2.8.2}
+NODE_VER=${NODE_VER:-14.17.5}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -51,22 +56,28 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i586" ] || [ "$ARCH" = "i686" ]; then
- PACKAGESUFFIX="i386"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
- PACKAGESUFFIX="amd64"
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
else
- echo "$ARCH is not supported." >&2
- exit 1
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
-cd $PKG
-ar x $CWD/${SRCNAM}-${VERSION}-${PACKAGESUFFIX}.deb
-tar xvzf data.tar.gz
+cd $TMP
+rm -rf $SRCNAM-$SRCVER
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+cd $SRCNAM-$SRCVER
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -77,10 +88,98 @@ find -L . \
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-rm -f $PKG/_gpgbuilder
-rm -f $PKG/control.tar.gz
-rm -r $PKG/data.tar.gz
-rm -f $PKG/debian-binary
+GWT_DIR=src/gwt
+LIB_DIR=$GWT_DIR/lib
+mkdir -p $LIB_DIR
+
+GWT_SDK_ZIP=$CWD/gwt-$GWT_SDK_VER.zip
+
+mkdir -p $LIB_DIR/gwt
+unzip -qo $GWT_SDK_ZIP -d $LIB_DIR/gwt
+mv $LIB_DIR/gwt/gwt-$GWT_SDK_VER $LIB_DIR/gwt/$GWT_SDK_VER
+
+patch -p1 < $CWD/sigstksz_gcc11.patch
+
+cd dependencies/common
+PANDOCVER=$(grep -oP "(?<=PANDOC_VERSION=\").*(?=\"$)" install-pandoc)
+mkdir -p pandoc/$PANDOCVER
+
+ln -sfT /usr/share/myspell/dicts dictionaries
+ln -sfT /usr/share/mathjax2 mathjax-27
+ln -sfT /usr/bin/pandoc pandoc/$PANDOCVER/pandoc
+
+mkdir -p node
+cd node && tar xvf $CWD/node-v$NODE_VER-linux-x64.tar.gz
+cd ../
+mv node/node-v$NODE_VER-linux-x64 node/$NODE_VER
+cd $TMP/$SRCNAM-$SRCVER/src/gwt/panmirror/src/editor
+yarn config set ignore-engines true
+yarn install
+
+# Fix links for src/cpp/session/CMakeLists.txt
+cd $TMP/$SRCNAM-$SRCVER/dependencies
+ln -sfT common/dictionaries dictionaries
+ln -sfT common/mathjax-27 mathjax-27
+ln -sfT common/pandoc pandoc
+
+cd $TMP/$SRCNAM-$SRCVER
+
+# Environmental variables (RStudio version numbers, architecture, etc.)
+VERSION_AWK=${VERSION_AWK:-$(echo $VERSION | sed 's/+/\.+/g')}
+export RSTUDIO_VERSION_MAJOR=$(echo $VERSION_AWK | awk -F '.' '{print $1}')
+export RSTUDIO_VERSION_MINOR=$(echo $VERSION_AWK | awk -F '.' '{print $2}')
+export RSTUDIO_VERSION_PATCH=$(echo $VERSION_AWK | awk -F '.' '{print $3}')
+export RSTUDIO_VERSION_SUFFIX=$(echo $VERSION_AWK | awk -F '.' '{print $4}')
+export GIT_COMMIT=$GITCOMMIT_VER
+export PACKAGE_OS=$(uname -om)
+
+# Ensure that RStudio builds successfully on multilib systems
+QT5_CORE=-DQt5Core_DIR:PATH=/usr/lib${LIBDIRSUFFIX}/cmake/Qt5Core
+QT5_DBUS=-DQt5DBus_DIR:PATH=/usr/lib${LIBDIRSUFFIX}/cmake/Qt5DBus
+QT5_GUI=-DQt5Gui_DIR:PATH=/usr/lib${LIBDIRSUFFIX}/cmake/Qt5Gui
+QT5_NETWORK=-DQt5Network_DIR:PATH=/usr/lib${LIBDIRSUFFIX}/cmake/Qt5Network
+QT5_OPENGL=-DQt5OpenGL_DIR:PATH=/usr/lib${LIBDIRSUFFIX}/cmake/Qt5OpenGL
+QT5_POSITIONING=-DQt5Positioning_DIR:PATH=/usr/lib${LIBDIRSUFFIX}/cmake/Qt5Positioning
+QT5_PRINTSUPPORT=-DQt5PrintSupport_DIR:PATH=/usr/lib${LIBDIRSUFFIX}/cmake/Qt5PrintSupport
+QT5_QMLMODELS=-DQt5QmlModels_DIR:PATH=/usr/lib${LIBDIRSUFFIX}/cmake/Qt5QmlModels
+QT5_QML=-DQt5Qml_DIR:PATH=/usr/lib${LIBDIRSUFFIX}/cmake/Qt5Qml
+QT5_QUICKWIDGETS=-DQt5QuickWidgets_DIR:PATH=/usr/lib${LIBDIRSUFFIX}/cmake/Qt5QuickWidgets
+QT5_QUICK=-DQt5Quick_DIR:PATH=/usr/lib${LIBDIRSUFFIX}/cmake/Qt5Quick
+QT5_SENSORS=-DQt5Sensors_DIR:PATH=/usr/lib${LIBDIRSUFFIX}/cmake/Qt5Sensors
+QT5_SQL=-DQt5Sql_DIR:PATH=/usr/lib${LIBDIRSUFFIX}/cmake/Qt5Sql
+QT5_SVG=-DQt5Svg_DIR:PATH=/usr/lib${LIBDIRSUFFIX}/cmake/Qt5Svg
+QT5_WEBCHANNEL=-DQt5WebChannel_DIR:PATH=/usr/lib${LIBDIRSUFFIX}/cmake/Qt5WebChannel
+QT5_WEBENGINECORE=-DQt5WebEngineCore_DIR:PATH=/usr/lib${LIBDIRSUFFIX}/cmake/Qt5WebEngineCore
+QT5_WEBENGINEWIDGETS=-DQt5WebEngineWidgets_DIR:PATH=/usr/lib${LIBDIRSUFFIX}/cmake/Qt5WebEngineWidgets
+QT5_WEBENGINE=-DQt5WebEngine_DIR:PATH=/usr/lib${LIBDIRSUFFIX}/cmake/Qt5WebEngine
+QT5_WIDGETS=-DQt5Widgets_DIR:PATH=/usr/lib${LIBDIRSUFFIX}/cmake/Qt5Widgets
+QT5_XMLPATTERNS=-DQt5XmlPatterns_DIR:PATH=/usr/lib${LIBDIRSUFFIX}/cmake/Qt5XmlPatterns
+QT5_XML=-DQt5Xml_DIR:PATH=/usr/lib${LIBDIRSUFFIX}/cmake/Qt5Xml
+
+MULTILIB=($QT5_CORE $QT5_DBUS $QT5_GUI $QT5_NETWORK $QT5_NETWORK $QT5_OPENGL \
+ $QT5_POSITIONING $QT5_PRINTSUPPORT $QT5_QMLMODELS $QT5_QML $QT5_QUICKWIDGETS \
+ $QT5_QUICK $QT5_SENSORS $QT5_SQL $QT5_SVG $QT5_WEBCHANNEL $QT5_WEBENGINECORE \
+ $QT5_WEBENGINEWIDGETS $QT5_WEBENGINE $QT5_WIDGETS $QT5_XMLPATTERNS $QT5_XML)
+
+mkdir -p build
+cd build
+ cmake -S "$TMP/$SRCNAM-$SRCVER" \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DRSTUDIO_TARGET=Desktop \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr/lib/rstudio \
+ -DRSTUDIO_USE_SYSTEM_BOOST=yes \
+ -DRSTUDIO_USE_SYSTEM_YAML_CPP=yes \
+ -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt5 \
+ -DBoost_NO_BOOST_CMAKE=ON \
+ -DQUARTO_ENABLED=FALSE \
+ -DRSTUDIO_USE_SYSTEM_SOCI=yes \
+ -DRSTUDIO_BUNDLE_QT=FALSE \
+ ${MULTILIB[@]}
+ make
+ make install DESTDIR=$PKG
+cd ..
mkdir -p $PKG/usr/bin
ln -sf /usr/lib/rstudio/bin/rstudio $PKG/usr/bin
diff --git a/development/rstudio-desktop/rstudio-desktop.info b/development/rstudio-desktop/rstudio-desktop.info
index f5aee2887ee6..3d24ef107db8 100644
--- a/development/rstudio-desktop/rstudio-desktop.info
+++ b/development/rstudio-desktop/rstudio-desktop.info
@@ -1,10 +1,14 @@
PRGNAM="rstudio-desktop"
-VERSION="1.1.463"
+VERSION="2022.02.1+461"
HOMEPAGE="http://rstudio.com"
-DOWNLOAD="https://download1.rstudio.org/rstudio-1.1.463-i386.deb"
-MD5SUM="8a6755fa9fae2bafce289df3358aaf63"
-DOWNLOAD_x86_64="https://download1.rstudio.org/rstudio-1.1.463-amd64.deb"
-MD5SUM_x86_64="bc50d6bd34926c1cc3ae4a209d67d649"
-REQUIRES="R gst0-plugins-base"
-MAINTAINER="Ekin Akoglu"
-EMAIL="ekinakoglu@gmail.com"
+DOWNLOAD="UNSUPPORTED"
+MD5SUM=""
+DOWNLOAD_x86_64="https://github.com/rstudio/rstudio/archive/refs/tags/v2022.02.1+461/rstudio-2022.02.1+461.tar.gz \
+ https://storage.googleapis.com/gwt-releases/gwt-2.8.2.zip \
+ https://nodejs.org/dist/v14.17.5/node-v14.17.5-linux-x64.tar.gz"
+MD5SUM_x86_64="5ed749937d2413784418c9a87e398c21 \
+ c295406d68c5ef364e445068599aa6d4 \
+ 3cd3b18e1412067aabd2e1b23b93106e"
+REQUIRES="R pandoc-bin yaml-cpp hunspell-en yarn openjdk8 mathjax2 soci"
+MAINTAINER="Isaac Yu"
+EMAIL="isaacyu1@isaacyu1.com"
diff --git a/development/rstudio-desktop/sigstksz_gcc11.patch b/development/rstudio-desktop/sigstksz_gcc11.patch
new file mode 100644
index 000000000000..7b1b70f147ac
--- /dev/null
+++ b/development/rstudio-desktop/sigstksz_gcc11.patch
@@ -0,0 +1,14 @@
+This patch was taken from the Arch Linux AUR:
+https://aur.archlinux.org/cgit/aur.git/tree/sigstksz_gcc11.patch?h=rstudio-desktop
+diff -ru rstudio-2022.02.0-443.original/src/cpp/tests/cpp/tests/vendor/catch.hpp rstudio-2022.02.0-443/src/cpp/tests/cpp/tests/vendor/catch.hpp
+--- a/src/cpp/tests/cpp/tests/vendor/catch.hpp 2022-02-17 08:26:03.000000000 +1300
++++ b/src/cpp/tests/cpp/tests/vendor/catch.hpp 2022-02-18 19:04:27.382806708 +1300
+@@ -10824,7 +10824,7 @@
+
+ // 32kb for the alternate stack seems to be sufficient. However, this value
+ // is experimentally determined, so that's not guaranteed.
+- static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
++ static constexpr std::size_t sigStackSize = 32768;
+
+ static SignalDefs signalDefs[] = {
+ { SIGINT, "SIGINT - Terminal interrupt signal" },
diff --git a/development/rstudio-desktop/slack-desc b/development/rstudio-desktop/slack-desc
index 80ad384c8e83..065e1b5a4533 100644
--- a/development/rstudio-desktop/slack-desc
+++ b/development/rstudio-desktop/slack-desc
@@ -10,7 +10,7 @@ rstudio-desktop: rstudio-desktop (R Statistical IDE)
rstudio-desktop:
rstudio-desktop: RStudio is a cross-platform IDE for the R statistical computing
rstudio-desktop: environment. It is available in desktop and server versions.
-rstudio-desktop: This is the Linux desktop version.
+rstudio-desktop: This builds the Linux desktop version.
rstudio-desktop:
rstudio-desktop: See http://www.rstudio.com
rstudio-desktop: