mirror of
https://github.com/archlinux/aur.git
synced 2026-03-14 23:16:48 +01:00
2024.09.0+375
This commit is contained in:
parent
15411b8475
commit
7bef3ed6a2
6 changed files with 264 additions and 289 deletions
48
.SRCINFO
48
.SRCINFO
|
|
@ -1,57 +1,43 @@
|
|||
pkgbase = rstudio-desktop
|
||||
pkgdesc = A powerful and productive integrated development environment (IDE) for R programming language
|
||||
pkgver = 2024.09.0.375
|
||||
pkgrel = 5
|
||||
pkgver = 2024.09.0
|
||||
pkgrel = 1
|
||||
url = https://github.com/rstudio/rstudio
|
||||
arch = x86_64
|
||||
license = AGPL-3.0-only
|
||||
makedepends = git
|
||||
makedepends = cmake>=3.29
|
||||
makedepends = boost
|
||||
makedepends = ninja
|
||||
makedepends = npm
|
||||
makedepends = gyp
|
||||
makedepends = desktop-file-utils
|
||||
makedepends = jdk11-openjdk
|
||||
makedepends = apache-ant
|
||||
makedepends = unzip
|
||||
makedepends = openssl
|
||||
makedepends = python-setuptools
|
||||
makedepends = boost
|
||||
makedepends = cmake
|
||||
makedepends = git
|
||||
makedepends = jdk11-openjdk
|
||||
makedepends = libcups
|
||||
makedepends = ninja
|
||||
makedepends = nvm
|
||||
makedepends = openssl
|
||||
makedepends = pam
|
||||
makedepends = patchelf
|
||||
makedepends = python
|
||||
makedepends = python-setuptools
|
||||
makedepends = wget
|
||||
makedepends = yarn
|
||||
depends = r>=3.3.0
|
||||
depends = boost-libs
|
||||
depends = qt5-sensors
|
||||
depends = qt5-svg
|
||||
depends = qt5-webengine
|
||||
depends = qt5-xmlpatterns
|
||||
depends = postgresql-libs
|
||||
depends = sqlite3
|
||||
depends = clang
|
||||
depends = hunspell-en_US
|
||||
depends = mathjax2
|
||||
depends = pandoc
|
||||
depends = yaml-cpp
|
||||
depends = r
|
||||
optdepends = git: for git support
|
||||
optdepends = subversion: for subversion support
|
||||
optdepends = openssh-askpass: for a git ssh access
|
||||
optdepends = quarto: for Quarto projects support
|
||||
provides = rstudio-desktop
|
||||
conflicts = rstudio-desktop
|
||||
options = !emptydirs
|
||||
options = !debug
|
||||
source = rstudio-2024.09.0.375.tar.gz::https://github.com/rstudio/rstudio/archive/refs/tags/v2024.09.0+375.tar.gz
|
||||
source = git+https://github.com/quarto-dev/quarto.git#branch=release/rstudio-cherry-blossom
|
||||
source = https://github.com/SOCI/soci/archive/refs/tags/v4.0.3.tar.gz
|
||||
source = qt.conf
|
||||
source = 0001-enable_system_node.patch
|
||||
source = rstudio-2024.09.0-375.tar.gz::https://github.com/rstudio/rstudio/archive/refs/tags/v2024.09.0+375.tar.gz
|
||||
source = quarto::git+https://github.com/quarto-dev/quarto.git#branch=release/rstudio-cranberry-hibiscus
|
||||
source = soci-4.0.3.tar.gz::https://github.com/SOCI/soci/archive/refs/tags/v4.0.3.tar.gz
|
||||
source = 0003-fix_boost_186.patch
|
||||
sha256sums = 8a29b77c53a3db8379d824a9f4a491843036003d105ed71981cd40fe39d2c8c8
|
||||
sha256sums = SKIP
|
||||
sha256sums = 4b1ff9c8545c5d802fbe06ee6cd2886630e5c03bf740e269bb625b45cf934928
|
||||
sha256sums = 723626bfe05dafa545e135e8e61a482df111f488583fef155301acc5ecbbf921
|
||||
sha256sums = fa20d753ba2d2dcf64705bd8cd0bd4d01090bfee9c8173d4312d1050d26121f3
|
||||
sha256sums = 7b3384fc7349a69e866ef0db21f196a2cafa3a9e2fb7f1edaead773b991dac72
|
||||
|
||||
pkgname = rstudio-desktop
|
||||
|
|
|
|||
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
*
|
||||
!PKGBUILD
|
||||
!.SRCINFO
|
||||
!.gitignore
|
||||
6
.nvchecker.toml
Normal file
6
.nvchecker.toml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[rstudio-desktop]
|
||||
source = "git"
|
||||
git = "https://github.com/rstudio/rstudio.git"
|
||||
prefix = "v"
|
||||
from_pattern = '\+\S+'
|
||||
to_pattern = ''
|
||||
|
|
@ -1,96 +0,0 @@
|
|||
diff -ru rstudio-2024.09.0-375/src/cpp/conf/rsession-dev.conf rstudio-2024.09.0-375.new/src/cpp/conf/rsession-dev.conf
|
||||
--- rstudio-2024.09.0-375/src/cpp/conf/rsession-dev.conf 2024-09-17 05:02:32.000000000 +1200
|
||||
+++ rstudio-2024.09.0-375.new/src/cpp/conf/rsession-dev.conf 2024-09-24 11:25:57.648251605 +1200
|
||||
@@ -41,7 +41,7 @@
|
||||
external-libclang-path=${RSTUDIO_DEPENDENCIES_DIR}/common/libclang
|
||||
|
||||
# node version below should match RSTUDIO_INSTALLED_NODE_VERSION
|
||||
-external-node-path=${RSTUDIO_DEPENDENCIES_DIR}/common/node/20.15.1-patched/bin/node
|
||||
+external-node-path=/usr/bin/node
|
||||
|
||||
# enable copilot
|
||||
copilot-enabled=1
|
||||
diff -ru rstudio-2024.09.0-375/src/cpp/session/CMakeLists.txt rstudio-2024.09.0-375.new/src/cpp/session/CMakeLists.txt
|
||||
--- rstudio-2024.09.0-375/src/cpp/session/CMakeLists.txt 2024-09-17 05:02:32.000000000 +1200
|
||||
+++ rstudio-2024.09.0-375.new/src/cpp/session/CMakeLists.txt 2024-09-24 11:27:41.827637114 +1200
|
||||
@@ -700,10 +700,12 @@
|
||||
DESTINATION "${RSTUDIO_INSTALL_SUPPORTING}/resources")
|
||||
|
||||
# install node
|
||||
- install(
|
||||
- DIRECTORY "${RSTUDIO_DEPENDENCIES_DIR}/common/node/${RSTUDIO_INSTALLED_NODE_VERSION}-patched/"
|
||||
- DESTINATION "${RSTUDIO_INSTALL_BIN}/node"
|
||||
- USE_SOURCE_PERMISSIONS)
|
||||
+ if(NOT RSTUDIO_USE_SYSTEM_NODE)
|
||||
+ install(
|
||||
+ DIRECTORY "${RSTUDIO_DEPENDENCIES_DIR}/common/node/${RSTUDIO_INSTALLED_NODE_VERSION}/"
|
||||
+ DESTINATION "${RSTUDIO_INSTALL_BIN}/node"
|
||||
+ USE_SOURCE_PERMISSIONS)
|
||||
+ endif()
|
||||
|
||||
# install quarto (or pandoc if quarto disabled)
|
||||
if(QUARTO_ENABLED)
|
||||
diff -ru rstudio-2024.09.0-375/src/cpp/session/SessionOptions.cpp rstudio-2024.09.0-375.new/src/cpp/session/SessionOptions.cpp
|
||||
--- rstudio-2024.09.0-375/src/cpp/session/SessionOptions.cpp 2024-09-17 05:02:32.000000000 +1200
|
||||
+++ rstudio-2024.09.0-375.new/src/cpp/session/SessionOptions.cpp 2024-09-24 11:28:57.490536726 +1200
|
||||
@@ -713,7 +713,7 @@
|
||||
{
|
||||
#if defined(__linux__) && !defined(RSTUDIO_PACKAGE_BUILD)
|
||||
// node version should match RSTUDIO_INSTALLED_NODE_VERSION
|
||||
- FilePath dependenciesPath = resourcePath.completePath("../../dependencies/common/node/20.15.1-patched");
|
||||
+ FilePath dependenciesPath = resourcePath.completePath("/usr");
|
||||
resolvePath(dependenciesPath, pPath);
|
||||
#else
|
||||
resolvePath(resourcePath, pPath);
|
||||
diff -ru rstudio-2024.09.0-375/src/gwt/build.xml rstudio-2024.09.0-375.new/src/gwt/build.xml
|
||||
--- rstudio-2024.09.0-375/src/gwt/build.xml 2024-09-17 05:02:32.000000000 +1200
|
||||
+++ rstudio-2024.09.0-375.new/src/gwt/build.xml 2024-09-24 11:30:26.016707136 +1200
|
||||
@@ -85,8 +85,8 @@
|
||||
|
||||
<!-- panmirror typescript library -->
|
||||
<!-- ensure version matches RSTUDIO_NODE_VERSION -->
|
||||
- <property name="node.version" value="20.14.0"/>
|
||||
- <property name="node.dir" value="../../dependencies/common/node/${node.version}"/>
|
||||
+ <property name="node.version" value="Current"/>
|
||||
+ <property name="node.dir" value="/usr"/>
|
||||
<!-- use yarn from system but will prefer yarn from dependencies if available -->
|
||||
<condition property="yarn.bin" value="yarn">
|
||||
<not>
|
||||
diff -ru rstudio-2024.09.0-375/src/node/CMakeNodeTools.txt rstudio-2024.09.0-375.new/src/node/CMakeNodeTools.txt
|
||||
--- rstudio-2024.09.0-375/src/node/CMakeNodeTools.txt 2024-09-17 05:02:32.000000000 +1200
|
||||
+++ rstudio-2024.09.0-375.new/src/node/CMakeNodeTools.txt 2024-09-24 11:30:51.146568219 +1200
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
# set the node version
|
||||
if(NOT DEFINED RSTUDIO_NODE_VERSION)
|
||||
- set(RSTUDIO_NODE_VERSION "20.14.0")
|
||||
+ set(RSTUDIO_NODE_VERSION "Current")
|
||||
endif()
|
||||
if(DEFINED ENV{RSTUDIO_NODE_VERSION})
|
||||
set(RSTUDIO_NODE_VERSION $ENV{RSTUDIO_NODE_VERSION})
|
||||
@@ -45,7 +45,7 @@
|
||||
NO_DEFAULT_PATH PATH_SUFFIXES "bin"
|
||||
PATHS "/opt/rstudio-tools/dependencies/common/node/${RSTUDIO_NODE_VERSION}"
|
||||
"c:/rstudio-tools/dependencies/common/node/${RSTUDIO_NODE_VERSION}"
|
||||
- "${CMAKE_CURRENT_LIST_DIR}/../../dependencies/common/node/${RSTUDIO_NODE_VERSION}")
|
||||
+ "/usr")
|
||||
|
||||
find_program(NPM
|
||||
NAMES npm
|
||||
@@ -53,7 +53,7 @@
|
||||
NO_DEFAULT_PATH
|
||||
PATHS "/opt/rstudio-tools/dependencies/common/node/${RSTUDIO_NODE_VERSION}"
|
||||
"c:/rstudio-tools/dependencies/common/node/${RSTUDIO_NODE_VERSION}"
|
||||
- "${CMAKE_CURRENT_LIST_DIR}/../../dependencies/common/node/${RSTUDIO_NODE_VERSION}")
|
||||
+ "/usr")
|
||||
|
||||
find_program(NPX
|
||||
NAMES npx
|
||||
@@ -61,7 +61,7 @@
|
||||
NO_DEFAULT_PATH
|
||||
PATHS "/opt/rstudio-tools/dependencies/common/node/${RSTUDIO_NODE_VERSION}"
|
||||
"c:/rstudio-tools/dependencies/common/node/${RSTUDIO_NODE_VERSION}"
|
||||
- "${CMAKE_CURRENT_LIST_DIR}/../../dependencies/common/node/${RSTUDIO_NODE_VERSION}")
|
||||
+ "/usr")
|
||||
|
||||
endif()
|
||||
391
PKGBUILD
391
PKGBUILD
|
|
@ -1,182 +1,265 @@
|
|||
# Maintainer: Aleksandr Beliaev <trap000d@gmail.com>
|
||||
# Maintainer:
|
||||
# Contributor: Aleksandr Beliaev <trap000d@gmail.com>
|
||||
|
||||
pkgname=rstudio-desktop
|
||||
_vermajor=2024
|
||||
_verminor=09
|
||||
_verpatch=0
|
||||
_versuffix=375
|
||||
_gitcommit=c8fc7ae
|
||||
_gitname=rstudio-rstudio-${_gitcommit}
|
||||
pkgver=${_vermajor}.${_verminor}.${_verpatch}.${_versuffix}
|
||||
_srcname=rstudio-${_vermajor}.${_verminor}.${_verpatch}-${_versuffix}
|
||||
_pandocver="current"
|
||||
_sociver="4.0.3"
|
||||
_quarto="FALSE"
|
||||
## links
|
||||
# https://posit.co/products/open-source/rstudio/
|
||||
# https://github.com/rstudio/rstudio
|
||||
|
||||
pkgrel=5
|
||||
## options
|
||||
: ${_nodeversion:=22}
|
||||
: ${_pandocver:=current}
|
||||
: ${_sociver:=4.0.3}
|
||||
: ${_quarto_branch:=release/rstudio-cranberry-hibiscus}
|
||||
: ${_quarto:=false}
|
||||
|
||||
: ${_pkgver=2024.09.0+375}
|
||||
|
||||
## basic info
|
||||
_pkgname="rstudio-desktop"
|
||||
pkgname="$_pkgname"
|
||||
pkgver="${_pkgver%%+*}"
|
||||
pkgrel=1
|
||||
pkgdesc="A powerful and productive integrated development environment (IDE) for R programming language"
|
||||
arch=('x86_64')
|
||||
url="https://github.com/rstudio/rstudio"
|
||||
license=('AGPL-3.0-only')
|
||||
depends=('r>=3.3.0' 'boost-libs' 'qt5-sensors' 'qt5-svg' 'qt5-webengine' 'qt5-xmlpatterns' 'postgresql-libs' 'sqlite3' 'clang' 'hunspell-en_US' 'mathjax2' 'pandoc' 'yaml-cpp')
|
||||
makedepends=('git' 'cmake>=3.29' 'boost' 'ninja' 'npm' 'gyp' 'desktop-file-utils' 'jdk11-openjdk' 'apache-ant' 'unzip' 'openssl' 'python-setuptools' 'libcups' 'pam' 'patchelf' 'wget' 'yarn')
|
||||
optdepends=('git: for git support'
|
||||
'subversion: for subversion support'
|
||||
'openssh-askpass: for a git ssh access'
|
||||
'quarto: for Quarto projects support')
|
||||
arch=('x86_64')
|
||||
|
||||
source=("rstudio-$pkgver.tar.gz::https://github.com/rstudio/rstudio/archive/refs/tags/v${_vermajor}.${_verminor}.${_verpatch}+${_versuffix}.tar.gz"
|
||||
"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"
|
||||
"qt.conf"
|
||||
"0001-enable_system_node.patch"
|
||||
"0003-fix_boost_186.patch")
|
||||
depends=(
|
||||
'hunspell-en_US'
|
||||
'mathjax2'
|
||||
'pandoc'
|
||||
'r'
|
||||
)
|
||||
makedepends=(
|
||||
'apache-ant'
|
||||
'boost'
|
||||
'cmake'
|
||||
'git'
|
||||
'jdk11-openjdk'
|
||||
'libcups'
|
||||
'ninja'
|
||||
'nvm' # AUR
|
||||
'openssl'
|
||||
'pam'
|
||||
'python'
|
||||
'python-setuptools'
|
||||
'wget'
|
||||
'yarn'
|
||||
)
|
||||
optdepends=(
|
||||
'git: for git support'
|
||||
'subversion: for subversion support'
|
||||
'openssh-askpass: for a git ssh access'
|
||||
'quarto: for Quarto projects support'
|
||||
)
|
||||
|
||||
sha256sums=('8a29b77c53a3db8379d824a9f4a491843036003d105ed71981cd40fe39d2c8c8'
|
||||
'SKIP'
|
||||
'4b1ff9c8545c5d802fbe06ee6cd2886630e5c03bf740e269bb625b45cf934928'
|
||||
'723626bfe05dafa545e135e8e61a482df111f488583fef155301acc5ecbbf921'
|
||||
'fa20d753ba2d2dcf64705bd8cd0bd4d01090bfee9c8173d4312d1050d26121f3'
|
||||
'7b3384fc7349a69e866ef0db21f196a2cafa3a9e2fb7f1edaead773b991dac72')
|
||||
if [[ "${_quarto::1}" == "t" ]]; then
|
||||
makedepends+=(
|
||||
'quarto' # AUR
|
||||
)
|
||||
fi
|
||||
|
||||
provides=("$_pkgname")
|
||||
conflicts=("$_pkgname")
|
||||
|
||||
options=('!emptydirs' '!debug')
|
||||
|
||||
prepare() {
|
||||
cd ${srcdir}/${_srcname}
|
||||
_pkgsrc="rstudio-${_pkgver//+/-}"
|
||||
_pkgext="tar.gz"
|
||||
source=(
|
||||
"$_pkgsrc.$_pkgext"::"https://github.com/rstudio/rstudio/archive/refs/tags/v$_pkgver.$_pkgext"
|
||||
"quarto"::"git+https://github.com/quarto-dev/quarto.git#branch=${_quarto_branch}"
|
||||
"soci-$_sociver.tar.gz"::"https://github.com/SOCI/soci/archive/refs/tags/v${_sociver}.tar.gz"
|
||||
'0003-fix_boost_186.patch'
|
||||
)
|
||||
sha256sums=(
|
||||
'8a29b77c53a3db8379d824a9f4a491843036003d105ed71981cd40fe39d2c8c8'
|
||||
'SKIP'
|
||||
'4b1ff9c8545c5d802fbe06ee6cd2886630e5c03bf740e269bb625b45cf934928'
|
||||
'7b3384fc7349a69e866ef0db21f196a2cafa3a9e2fb7f1edaead773b991dac72'
|
||||
)
|
||||
|
||||
msg "Suppress _FORTIFY_SOURCE mismatch warnings"
|
||||
sed -i 's/D_FORTIFY_SOURCE=2/D_FORTIFY_SOURCE=3/' "${srcdir}/${_srcname}/src/cpp/CMakeLists.txt"
|
||||
|
||||
sed -i 's/add_subdirectory(package)/# add_subdirectory(package)/' "${srcdir}/${_srcname}/CMakeLists.txt"
|
||||
_nvm_env() {
|
||||
export HOME="$SRCDEST/node-home"
|
||||
export NVM_DIR="$SRCDEST/node-nvm"
|
||||
|
||||
# Add option to use system node
|
||||
patch -p1 < ${srcdir}/0001-enable_system_node.patch
|
||||
# set up nvm
|
||||
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
|
||||
nvm install $_nodeversion
|
||||
nvm use $_nodeversion
|
||||
|
||||
# fix boost 1.86 incompatibility
|
||||
patch -p1 < ${srcdir}/0003-fix_boost_186.patch
|
||||
|
||||
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
|
||||
|
||||
# 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
|
||||
|
||||
# Bundled SOCI libs
|
||||
ln -sfT "${srcdir}/soci-${_sociver}" "soci-${_sociver}"
|
||||
|
||||
# Panmirror is picked up from Quarto repo
|
||||
ln -sfT "${srcdir}/quarto" "${srcdir}/${_srcname}/src/gwt/lib/quarto"
|
||||
_npm_path="$(which npm | sed -E 's&/[^/]+$&&')"
|
||||
export RSTUDIO_NODE_VERSION=$(echo "$_npm_path" | sed -E 's&^\S+/v([0-9\.]+)/\S+$&\1&')
|
||||
}
|
||||
|
||||
build() {
|
||||
# Quarto set up
|
||||
if (pacman -Q quarto >/dev/null 2>/dev/null) ; then
|
||||
_quarto="TRUE"
|
||||
msg "Quarto is installed, include it to build"
|
||||
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
|
||||
_quarto="FALSE"
|
||||
msg "Quarto is not installed, use Pandoc"
|
||||
cd "${srcdir}/${_srcname}/dependencies"
|
||||
install -d pandoc/${_pandocver}/bin/tools
|
||||
ln -sfT /usr/bin/pandoc pandoc/${_pandocver}/bin/tools/pandoc
|
||||
fi
|
||||
prepare() (
|
||||
_nvm_env
|
||||
npm install yarn
|
||||
|
||||
cd "${srcdir}/${_srcname}/dependencies/soci-${_sociver}"
|
||||
msg "Building SOCI libs..."
|
||||
cd "$_pkgsrc"
|
||||
# Do not use outdated version name of pandoc
|
||||
sed -i '/PANDOC_VERSION/s/2.18/current/' "cmake/globals.cmake"
|
||||
|
||||
local _CMAKE_SOCI_OPTIONS=(
|
||||
-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
|
||||
)
|
||||
# Suppress _FORTIFY_SOURCE mismatch warnings
|
||||
sed -i 's/D_FORTIFY_SOURCE=2/D_FORTIFY_SOURCE=3/' "src/cpp/CMakeLists.txt"
|
||||
|
||||
cmake -G Ninja -S "${srcdir}/${_srcname}/dependencies/soci-${_sociver}" -B build "${_CMAKE_SOCI_OPTIONS[@]}"
|
||||
cmake --build build --target all
|
||||
# fix npm/node paths
|
||||
install -dm755 "$srcdir/$_pkgsrc/dependencies/common/node"
|
||||
ln -sfT "$NVM_DIR/versions/node/v$RSTUDIO_NODE_VERSION" "$srcdir/$_pkgsrc/dependencies/common/node/${RSTUDIO_NODE_VERSION}-patched"
|
||||
|
||||
export LDFLAGS="${LDFLAGS} -L${srcdir}/${_srcname}/dependencies/soci-${_sociver}/build/lib"
|
||||
sed -E -e 's&PATHS "/opt/rstudio-tools/dependencies/common/node/\$\{RSTUDIO_NODE_VERSION\}"&PATHS "'"${_npm_path}"'"&' \
|
||||
-i src/node/CMakeNodeTools.txt
|
||||
|
||||
cd ${srcdir}
|
||||
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
|
||||
sed -E -e 's&(common/node)/([0-9\.]+)-(patched)&\1/'"${RSTUDIO_NODE_VERSION}"'-\3&' \
|
||||
-i src/cpp/conf/rsession-dev.conf src/cpp/session/SessionOptions.cpp
|
||||
|
||||
export PATH=/usr/lib/jvm/java-11-openjdk/jre/bin/:${PATH}
|
||||
export RSTUDIO_TOOLS_ROOT="${srcdir}/${_srcname}/dependencies"
|
||||
export RSTUDIO_NODE_PATH=/usr/
|
||||
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)
|
||||
sed -E -e '/"node\.version"/s&value="[0-9\.]+"&value="'"${RSTUDIO_NODE_VERSION}"'"&' \
|
||||
-i src/gwt/build.xml
|
||||
|
||||
# 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
|
||||
sed -E -e 's&set\(RSTUDIO_NODE_VERSION "[0-9\.]+"\)&set(RSTUDIO_NODE_VERSION "'"${RSTUDIO_NODE_VERSION}"'")&' \
|
||||
-i src/node/CMakeNodeTools.txt
|
||||
|
||||
# -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
|
||||
|
||||
local _CMAKE_RSTUDIO_OPTIONS=(
|
||||
-DRSTUDIO_TARGET=Electron
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DRSTUDIO_USE_SYSTEM_BOOST=yes
|
||||
-DQT_QMAKE_EXECUTABLE=/usr/bin/qmake
|
||||
-DBoost_NO_BOOST_CMAKE=ON
|
||||
-DQUARTO_ENABLED=${_quarto}
|
||||
-DRSTUDIO_USE_SYSTEM_NODE=yes
|
||||
-DRSTUDIO_BUNDLE_QT=FALSE
|
||||
)
|
||||
cmake -G Ninja -S "${srcdir}/${_srcname}" -B build "${_CMAKE_RSTUDIO_OPTIONS[@]}"
|
||||
cmake --build build
|
||||
# fix os-release path
|
||||
sed -E 's&(STRINGS) "/etc/os-release" (OS_RELEASE)&\1 "/usr/lib/os-release" \2&' \
|
||||
-i cmake/modules/OsRelease.cmake
|
||||
|
||||
# fix boost 1.86 incompatibility
|
||||
patch -p1 -i "$srcdir/0003-fix_boost_186.patch"
|
||||
|
||||
cd "$srcdir/$_pkgsrc/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
|
||||
|
||||
# Fix links for src/cpp/session/CMakeLists.txt
|
||||
cd "$srcdir/$_pkgsrc/dependencies"
|
||||
ln -sfT /usr/share/myspell/dicts dictionaries
|
||||
ln -sfT /usr/share/mathjax2 mathjax-27
|
||||
|
||||
# Bundled SOCI libs
|
||||
ln -sfT "${srcdir}/soci-${_sociver}" "soci-${_sociver}"
|
||||
|
||||
# Panmirror is picked up now from Quarto repo
|
||||
ln -sfT "${srcdir}/quarto" "$srcdir/$_pkgsrc/src/gwt/lib/quarto"
|
||||
)
|
||||
|
||||
_build_soci() {
|
||||
echo "Building SOCI libs..."
|
||||
|
||||
local _opts_soci=(
|
||||
-B "soci-${_sociver}/build"
|
||||
-S "soci-${_sociver}"
|
||||
-G Ninja
|
||||
-DCMAKE_BUILD_TYPE=None
|
||||
-DCMAKE_INSTALL_PREFIX='/usr'
|
||||
-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
|
||||
-Wno-dev
|
||||
)
|
||||
|
||||
cmake "${_opts_soci[@]}"
|
||||
cmake --build "soci-${_sociver}/build"
|
||||
}
|
||||
|
||||
build() (
|
||||
_nvm_env
|
||||
# Quarto set up
|
||||
if (pacman -Q quarto > /dev/null 2> /dev/null); then
|
||||
_quarto="ON"
|
||||
echo "Quarto is installed, linking for build"
|
||||
cd "$srcdir/$_pkgsrc/dependencies"
|
||||
install -d quarto/bin/tools
|
||||
ln -sfT /usr/bin/quarto quarto/bin/quarto
|
||||
ln -sfT /usr/bin/pandoc quarto/bin/tools/pandoc
|
||||
else
|
||||
_quarto="OFF"
|
||||
echo "Quarto is not installed, using Pandoc"
|
||||
cd "$srcdir/$_pkgsrc/dependencies"
|
||||
install -d pandoc/${_pandocver}/bin/tools
|
||||
ln -sfT /usr/bin/pandoc pandoc/${_pandocver}/bin/tools/pandoc
|
||||
fi
|
||||
|
||||
_build_soci
|
||||
|
||||
export LDFLAGS+=" -L$srcdir/$_pkgsrc/dependencies/soci-${_sociver}/build/lib"
|
||||
|
||||
cd "${srcdir}"
|
||||
echo "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}"
|
||||
local RPACKAGES=(
|
||||
digest
|
||||
purrr
|
||||
rmarkdown
|
||||
testthat
|
||||
xml2
|
||||
yaml
|
||||
)
|
||||
for RPKG in ${RPACKAGES[*]}; 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-11-openjdk/jre/bin/:${PATH}"
|
||||
export RSTUDIO_TOOLS_ROOT="$srcdir/$_pkgsrc/dependencies"
|
||||
export RSTUDIO_NODE_PATH=/usr/
|
||||
export RSTUDIO_VERSION_MAJOR=$(cut -d'.' -f1 <<< "$pkgver")
|
||||
export RSTUDIO_VERSION_MINOR=$(cut -d'.' -f2 <<< "$pkgver")
|
||||
export RSTUDIO_VERSION_PATCH=$(cut -d'.' -f3 <<< "$pkgver")
|
||||
export RSTUDIO_VERSION_SUFFIX="+$(cut -d'.' -f4 <<< "$pkgver")"
|
||||
export GIT_COMMIT=$(echo "$pkgver" | cut -d'.' -f6 | sed 's/^g//')
|
||||
export PACKAGE_OS=$(uname -om)
|
||||
|
||||
# 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
|
||||
|
||||
local _opts_rstudio=(
|
||||
-B build
|
||||
-S "$_pkgsrc"
|
||||
-G Ninja
|
||||
-DCMAKE_BUILD_TYPE=None
|
||||
-DRSTUDIO_TARGET=Electron
|
||||
-DRSTUDIO_USE_SYSTEM_BOOST=YES
|
||||
-DRSTUDIO_USE_SYSTEM_SOCI=NO
|
||||
-DRSTUDIO_USE_SYSTEM_NODE=YES
|
||||
-DRSTUDIO_NODE_VERSION="$RSTUDIO_NODE_VERSION"
|
||||
-DRSTUDIO_INSTALLED_NODE_VERSION="$RSTUDIO_NODE_VERSION"
|
||||
-DQUARTO_ENABLED=${_quarto}
|
||||
-DBUILD_TESTING=OFF
|
||||
-Wno-dev
|
||||
)
|
||||
cmake "${_opts_rstudio[@]}"
|
||||
cmake --build build
|
||||
)
|
||||
|
||||
package() {
|
||||
# Install the program
|
||||
DESTDIR="${pkgdir}" cmake --install build
|
||||
|
||||
# Install the program
|
||||
DESTDIR="${pkgdir}" cmake --install build
|
||||
|
||||
# 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/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"
|
||||
# Symlink main binary
|
||||
install -d "${pkgdir}/usr/bin"
|
||||
ln -s "/usr/lib/rstudio/rstudio" "$pkgdir/usr/bin/rstudio"
|
||||
}
|
||||
|
|
|
|||
8
qt.conf
8
qt.conf
|
|
@ -1,8 +0,0 @@
|
|||
[Paths]
|
||||
Headers = /usr/include/qt/
|
||||
Data = /usr/share/qt/
|
||||
Libraries = /usr/lib/qt/
|
||||
LibraryExecutables = /usr/lib/qt/libexec/
|
||||
Plugins = /usr/lib/qt/plugins/
|
||||
Qml2Imports = /usr/lib/qt/qml/
|
||||
Translations = /usr/share/qt/translations/
|
||||
Loading…
Add table
Reference in a new issue