2023-08-29 02:27:03 +00:00
|
|
|
# Maintainer: Aleksandr Beliaev <trap000d@gmail.com>
|
2023-05-15 14:48:14 +00:00
|
|
|
|
|
|
|
pkgname=rstudio-desktop
|
2024-04-30 00:29:45 +00:00
|
|
|
_vermajor=2024
|
|
|
|
_verminor=04
|
2024-05-13 08:32:44 +00:00
|
|
|
_verpatch=1
|
|
|
|
_versuffix=748
|
|
|
|
_gitcommit=3ada7c6
|
2023-05-15 14:48:14 +00:00
|
|
|
_gitname=rstudio-rstudio-${_gitcommit}
|
|
|
|
pkgver=${_vermajor}.${_verminor}.${_verpatch}.${_versuffix}
|
|
|
|
_srcname=rstudio-${_vermajor}.${_verminor}.${_verpatch}-${_versuffix}
|
|
|
|
_pandocver="current"
|
2024-05-29 01:27:35 +00:00
|
|
|
_sociver="4.0.3"
|
2023-05-15 14:48:14 +00:00
|
|
|
_quarto="FALSE"
|
|
|
|
|
2024-05-29 01:27:35 +00:00
|
|
|
pkgrel=4
|
2023-05-15 14:48:14 +00:00
|
|
|
pkgdesc="A powerful and productive integrated development environment (IDE) for R programming language"
|
|
|
|
arch=('x86_64')
|
|
|
|
url="https://www.rstudio.com/products/rstudio/"
|
|
|
|
license=('AGPL3')
|
2024-05-29 01:27:35 +00:00
|
|
|
depends=("boost-libs" "clang" "hunspell-en_US" "mathjax2" "pandoc" "postgresql-libs" "qt5-sensors" "qt5-svg" "qt5-webengine" "qt5-xmlpatterns" "quarto-cli" "r>=3.3.0" "sqlite3" "yaml-cpp")
|
2024-05-20 11:35:21 +00:00
|
|
|
makedepends=('git' 'cmake>=3.29' 'boost' 'desktop-file-utils' 'jdk8-openjdk' 'apache-ant' 'unzip' 'openssl' 'libcups' 'pam' 'patchelf' 'wget' 'yarn')
|
2023-05-15 14:48:14 +00:00
|
|
|
optdepends=('git: for git support'
|
|
|
|
'subversion: for subversion support'
|
|
|
|
'openssh-askpass: for a git ssh access'
|
|
|
|
'quarto: for Quarto projects support')
|
|
|
|
|
2024-04-30 00:29:45 +00:00
|
|
|
source=("rstudio-$pkgver.tar.gz::https://github.com/rstudio/rstudio/archive/refs/tags/v${_vermajor}.${_verminor}.${_verpatch}+${_versuffix}.tar.gz"
|
2024-05-29 01:27:35 +00:00
|
|
|
"git+https://github.com/quarto-dev/quarto.git#branch=release/rstudio-cherry-blossom"
|
|
|
|
"https://github.com/SOCI/soci/archive/refs/tags/v${_sociver}.tar.gz"
|
2023-05-15 14:48:14 +00:00
|
|
|
"qt.conf"
|
2024-05-29 01:27:35 +00:00
|
|
|
"0001-pandoc_version.patch"
|
|
|
|
"0002-allow_system_node.patch"
|
|
|
|
"0003-fortify_source.patch")
|
2023-05-15 14:48:14 +00:00
|
|
|
|
2024-05-13 08:32:44 +00:00
|
|
|
sha256sums=('5c1190ae22e3a25740727ff1f341ef568f47359a0d1358958ec22f7e5b59b75b'
|
2024-05-29 01:27:35 +00:00
|
|
|
'SKIP'
|
|
|
|
'4b1ff9c8545c5d802fbe06ee6cd2886630e5c03bf740e269bb625b45cf934928'
|
2023-05-15 14:48:14 +00:00
|
|
|
'723626bfe05dafa545e135e8e61a482df111f488583fef155301acc5ecbbf921'
|
2024-05-29 01:27:35 +00:00
|
|
|
'286925c442c1818979714feeec1577f03ae8a3527d2478b0f55238e2272a0b9e'
|
|
|
|
'ad4bd3076ff2bff7d075e3928a7e55c618fa744e3bf5d3d387bf70e01ff96c2f'
|
|
|
|
'c657f75f26f95c5dae3a3f5605305af2f47954a9d266de8ffc8fc2f0b47e8bd4')
|
|
|
|
|
|
|
|
options=('!emptydirs' '!debug')
|
2023-05-15 14:48:14 +00:00
|
|
|
|
|
|
|
prepare() {
|
|
|
|
cd ${srcdir}/${_srcname}
|
|
|
|
# Do not use outdated version name of pandoc
|
2024-05-29 01:27:35 +00:00
|
|
|
patch -p1 < ${srcdir}/0001-pandoc_version.patch
|
|
|
|
|
|
|
|
# Add option to use system node
|
|
|
|
patch -p3 < ${srcdir}/0002-allow_system_node.patch
|
|
|
|
|
|
|
|
# Suppress _FORTIFY_SOURCE mismatch warnings
|
|
|
|
patch -p3 < ${srcdir}/0003-fortify_source.patch
|
2023-05-15 14:48:14 +00:00
|
|
|
|
|
|
|
cd "${srcdir}/${_srcname}/dependencies/common"
|
|
|
|
install -d pandoc/${_pandocver}
|
|
|
|
|
|
|
|
ln -sfT /usr/share/myspell/dicts dictionaries
|
|
|
|
ln -sfT /usr/share/mathjax2 mathjax-27
|
|
|
|
ln -sfT /usr/bin/pandoc pandoc/${_pandocver}/pandoc
|
|
|
|
|
|
|
|
# Nodejs
|
2024-05-29 01:27:35 +00:00
|
|
|
##install -d node/${_nodever}
|
|
|
|
##cp -r "${srcdir}/node-v${_nodever}-linux-x64/"* node/${_nodever}
|
2023-05-15 14:48:14 +00:00
|
|
|
|
|
|
|
# Fix links for src/cpp/session/CMakeLists.txt
|
|
|
|
cd "${srcdir}/${_srcname}/dependencies"
|
|
|
|
ln -sfT /usr/share/myspell/dicts dictionaries
|
|
|
|
ln -sfT /usr/share/mathjax2 mathjax-27
|
2024-05-29 01:27:35 +00:00
|
|
|
# Bundled SOCI libs
|
|
|
|
ln -sfT "${srcdir}/soci-${_sociver}" "soci-${_sociver}"
|
2023-05-15 14:48:14 +00:00
|
|
|
|
|
|
|
# Panmirror is picked up now from Quarto repo
|
2024-05-29 01:27:35 +00:00
|
|
|
ln -sfT "${srcdir}/quarto" "${srcdir}/${_srcname}/src/gwt/lib/quarto"
|
|
|
|
|
2023-05-15 14:48:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2023-08-29 02:27:03 +00:00
|
|
|
# Quarto set up
|
2023-09-01 09:32:08 +00:00
|
|
|
if (pacman -Q quarto >/dev/null 2>/dev/null) ; then
|
|
|
|
_quarto="TRUE"
|
2023-08-29 02:27:03 +00:00
|
|
|
msg "Quarto is installed, include it to build"
|
2023-05-15 14:48:14 +00:00
|
|
|
cd "${srcdir}/${_srcname}/dependencies"
|
|
|
|
install -d quarto/bin/tools
|
|
|
|
ln -sfT /usr/bin/quarto quarto/bin/quarto
|
|
|
|
ln -sfT /usr/bin/pandoc quarto/bin/tools/pandoc
|
|
|
|
else
|
2023-09-01 09:32:08 +00:00
|
|
|
_quarto="FALSE"
|
2023-08-29 02:27:03 +00:00
|
|
|
msg "Quarto is not installed, use Pandoc"
|
2023-05-15 14:48:14 +00:00
|
|
|
cd "${srcdir}/${_srcname}/dependencies"
|
|
|
|
install -d pandoc/${_pandocver}/bin/tools
|
|
|
|
ln -sfT /usr/bin/pandoc pandoc/${_pandocver}/bin/tools/pandoc
|
|
|
|
fi
|
|
|
|
|
2024-05-29 01:27:35 +00:00
|
|
|
cd "${srcdir}/${_srcname}/dependencies/soci-${_sociver}"
|
|
|
|
msg "Buildind SOCI libs"
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
|
|
|
|
cmake \
|
|
|
|
-DCMAKE_POLICY_DEFAULT_CMP0063="NEW" \
|
|
|
|
-DCMAKE_POLICY_DEFAULT_CMP0074="NEW" \
|
|
|
|
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true \
|
|
|
|
-DCMAKE_CXX_VISIBILITY_PRESET="$COMPILE_VISIBILITY" \
|
|
|
|
-DSOCI_TESTS=OFF \
|
|
|
|
-DSOCI_CXX11=ON \
|
|
|
|
-DSOCI_EMPTY=OFF \
|
|
|
|
-DWITH_BOOST=ON \
|
|
|
|
-DWITH_POSTGRESQL=ON \
|
|
|
|
-DWITH_SQLITE3=ON \
|
|
|
|
-DWITH_DB2=OFF \
|
|
|
|
-DWITH_MYSQL=OFF \
|
|
|
|
-DWITH_ORACLE=OFF \
|
|
|
|
-DWITH_FIREBIRD=OFF \
|
|
|
|
-DWITH_ODBC=OFF \
|
|
|
|
..
|
|
|
|
|
|
|
|
cmake --build . --target all
|
|
|
|
|
|
|
|
export LDFLAGS="${LDFLAGS} -L${srcdir}/${_srcname}/dependencies/soci-${_sociver}/build/lib"
|
2023-05-15 14:48:14 +00:00
|
|
|
|
2024-05-29 01:27:35 +00:00
|
|
|
cd ${srcdir}
|
2023-05-15 14:48:14 +00:00
|
|
|
msg "Downloading and installing R packages..."
|
|
|
|
export R_LIBS_USER="${srcdir}/${_srcname}/dependencies/R"
|
|
|
|
_JOBS="$(grep -oP -- "-j\s*\K[0-9]+" <<< "${MAKEFLAGS}")" || _JOBS="1"
|
|
|
|
mkdir -p "${R_LIBS_USER}"
|
|
|
|
for RPKG in rmarkdown renv testthat xml2 yaml; do
|
|
|
|
RINSTALLCMD="if("'!'"require($RPKG, quietly = TRUE)) { options(Ncpus = ${_JOBS} ); install.packages('$RPKG', lib='$R_LIBS_USER', repos='https://cran.rstudio.com/') }"
|
|
|
|
echo "> $RINSTALLCMD"
|
|
|
|
Rscript -e "$RINSTALLCMD"
|
|
|
|
done
|
|
|
|
|
|
|
|
export PATH=/usr/lib/jvm/java-8-openjdk/jre/bin/:${PATH}
|
2024-05-29 01:27:35 +00:00
|
|
|
export RSTUDIO_TOOLS_ROOT="${srcdir}/${_srcname}/dependencies"
|
|
|
|
export RSTUDIO_NODE_PATH=/usr/
|
2023-05-15 14:48:14 +00:00
|
|
|
export RSTUDIO_VERSION_MAJOR=${_vermajor}
|
|
|
|
export RSTUDIO_VERSION_MINOR=${_verminor}
|
|
|
|
export RSTUDIO_VERSION_PATCH=${_verpatch}
|
|
|
|
export RSTUDIO_VERSION_SUFFIX="+${_versuffix}"
|
|
|
|
export GIT_COMMIT=${_gitcommit}
|
|
|
|
export PACKAGE_OS=$(uname -om)
|
2024-05-20 11:35:21 +00:00
|
|
|
|
|
|
|
# node-gyp or node have a bug that prevents building with "text file busy"
|
|
|
|
# if the kernel is too fast, so we have to disable IO_URING support. This
|
|
|
|
# is cleary a hack and needs to be removed as soon as possible
|
|
|
|
# nodejs/node#48444 is the necro bumped thread
|
|
|
|
# originally from docker
|
|
|
|
# https://github.com/nodejs/node/issues/48444
|
|
|
|
export UV_USE_IO_URING=0
|
|
|
|
|
|
|
|
# -DCMAKE_INSTALL_PREFIX seems ignored for sub-dependencies,
|
|
|
|
# which results as empty '/usr/local/bin' in package
|
|
|
|
# Following override works for cmake >3.29
|
|
|
|
export CMAKE_INSTALL_PREFIX=/usr/lib/rstudio
|
2024-05-29 01:27:35 +00:00
|
|
|
|
2024-05-20 11:35:21 +00:00
|
|
|
|
2023-05-15 14:48:14 +00:00
|
|
|
cmake -S "${srcdir}/${_srcname}" -B build \
|
|
|
|
-DRSTUDIO_TARGET=Desktop \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DRSTUDIO_USE_SYSTEM_BOOST=yes \
|
|
|
|
-DQT_QMAKE_EXECUTABLE=/usr/bin/qmake \
|
|
|
|
-DBoost_NO_BOOST_CMAKE=ON \
|
|
|
|
-DQUARTO_ENABLED=${_quarto} \
|
2024-05-29 01:27:35 +00:00
|
|
|
-DRSTUDIO_USE_SYSTEM_NODE=yes \
|
2023-05-15 14:48:14 +00:00
|
|
|
-DRSTUDIO_BUNDLE_QT=FALSE
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2024-05-20 11:35:21 +00:00
|
|
|
|
2023-05-15 14:48:14 +00:00
|
|
|
# Install the program
|
|
|
|
make -C build DESTDIR="${pkgdir}" install
|
|
|
|
|
|
|
|
# Install the license
|
|
|
|
install -Dm 644 "${srcdir}/${_srcname}/COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
|
|
|
|
|
|
|
|
# Symlink main binary
|
|
|
|
install -d "${pkgdir}/usr/bin"
|
|
|
|
ln -s "/usr/lib/rstudio/bin/rstudio" "${pkgdir}/usr/bin/rstudio"
|
|
|
|
|
|
|
|
# BUGFIX: qt5-webengine isn't init'ing properly. Likely an Rstudio bug.
|
|
|
|
install -Dm 644 "${srcdir}/qt.conf" "${pkgdir}/usr/lib/qt/libexec/qt.conf"
|
|
|
|
}
|