diff options
author | Isaac Yu <isaacyu1@isaacyu1.com> | 2022-04-06 17:13:18 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-04-09 15:45:48 +0700 |
commit | e6d0f24b48d4d46abe1e7eebe354f69d56a51e6f (patch) | |
tree | 7c3b2f10f461e280233a659c5832d30ef3c8d5bf /development/rstudio-desktop/rstudio-desktop.SlackBuild | |
parent | d90274bb52ada29a05e7ade76169b153d7450db5 (diff) |
development/rstudio-desktop: Updated for version 2022.02.1+461.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/rstudio-desktop/rstudio-desktop.SlackBuild')
-rw-r--r-- | development/rstudio-desktop/rstudio-desktop.SlackBuild | 127 |
1 files changed, 113 insertions, 14 deletions
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 |