2024.12.1

This commit is contained in:
xiota 2025-02-23 07:52:35 +00:00
parent 77a2d74716
commit 9b66a094ce
2 changed files with 82 additions and 62 deletions

View file

@ -1,6 +1,6 @@
pkgbase = rstudio-desktop
pkgdesc = A powerful and productive integrated development environment (IDE) for R programming language
pkgver = 2024.12.0.467
pkgver = 2024.12.1
pkgrel = 1
url = https://github.com/rstudio/rstudio
arch = x86_64
@ -9,7 +9,7 @@ pkgbase = rstudio-desktop
makedepends = boost
makedepends = cmake
makedepends = git
makedepends = jdk11-openjdk
makedepends = java-environment
makedepends = libcups
makedepends = ninja
makedepends = nvm
@ -38,10 +38,10 @@ pkgbase = rstudio-desktop
conflicts = rstudio-desktop
options = !emptydirs
options = !debug
source = rstudio-2024.12.0.467-cf37a3e.tar.gz::https://github.com/rstudio/rstudio/archive/cf37a3e5488c937207f992226d255be71f5e3f41.tar.gz
source = rstudio-2024.12.1-c5bcd0e.tar.gz::https://github.com/rstudio/rstudio/archive/c5bcd0ec4fb959b2a9fcd656f12eb62092f0617e.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
sha256sums = b43ab0a3a37a4efe6ff090be110762f763e2606ccf9b64f2ca0df52e0737ec3e
sha256sums = SKIP
sha256sums = SKIP
sha256sums = 4b1ff9c8545c5d802fbe06ee6cd2886630e5c03bf740e269bb625b45cf934928

136
PKGBUILD
View file

@ -6,18 +6,17 @@
# https://github.com/rstudio/rstudio
## options
: ${_nodeversion:=22}
: ${_nodeversion:=23}
: ${_pandocver:=current}
: ${_sociver:=4.0.3}
: ${_soci_version:=4.0.3}
: ${_quarto_branch:=release/rstudio-cranberry-hibiscus}
: ${_quarto:=false}
: ${_commit:=cf37a3e5488c937207f992226d255be71f5e3f41} # 2024.12.0.467
: ${_commit:=c5bcd0ec4fb959b2a9fcd656f12eb62092f0617e}
## basic info
_pkgname="rstudio-desktop"
pkgname="$_pkgname"
pkgver=2024.12.0.467
pkgver=2024.12.1
pkgrel=1
pkgdesc="A powerful and productive integrated development environment (IDE) for R programming language"
url="https://github.com/rstudio/rstudio"
@ -41,7 +40,7 @@ makedepends=(
'boost'
'cmake'
'git'
'jdk11-openjdk'
'java-environment'
'libcups'
'ninja'
'nvm' # AUR
@ -61,9 +60,7 @@ optdepends=(
)
if [[ "${_quarto::1}" == "t" ]]; then
makedepends+=(
'quarto' # AUR
)
makedepends+=('quarto') # AUR
fi
provides=("$_pkgname")
@ -71,18 +68,54 @@ conflicts=("$_pkgname")
options=('!emptydirs' '!debug')
_pkgsrc="rstudio-$_commit"
_pkgext="tar.gz"
source=(
"rstudio-$pkgver-${_commit::7}.$_pkgext"::"https://github.com/rstudio/rstudio/archive/$_commit.$_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"
)
sha256sums=(
'b43ab0a3a37a4efe6ff090be110762f763e2606ccf9b64f2ca0df52e0737ec3e'
'SKIP'
'4b1ff9c8545c5d802fbe06ee6cd2886630e5c03bf740e269bb625b45cf934928'
)
_source_main() {
_pkgsrc="rstudio-$_commit"
local _pkgext="tar.gz"
source=(
"rstudio-$pkgver-${_commit::7}.$_pkgext"::"https://github.com/rstudio/rstudio/archive/$_commit.$_pkgext"
"quarto"::"git+https://github.com/quarto-dev/quarto.git#branch=${_quarto_branch}"
)
sha256sums=(
'SKIP'
'SKIP'
)
}
_source_soci() {
local _pkgext_soci="tar.gz"
source+=("soci-$_soci_version.$_pkgext_soci"::"https://github.com/SOCI/soci/archive/refs/tags/v$_soci_version.$_pkgext_soci")
sha256sums+=('4b1ff9c8545c5d802fbe06ee6cd2886630e5c03bf740e269bb625b45cf934928')
_build_soci() (
echo "Building SOCI..."
local _opts_soci=(
-B "soci-$_soci_version/build"
-S "soci-$_soci_version"
-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
-DBUILD_SHARED_LIBS=OFF
-Wno-dev
)
cmake "${_opts_soci[@]}"
cmake --build "soci-$_soci_version/build"
)
}
_source_main
_source_soci
_nvm_env() {
export HOME="$SRCDEST/node-home"
@ -156,42 +189,17 @@ prepare() (
ln -sfT /usr/share/myspell/dicts dictionaries
ln -sfT /usr/share/mathjax2 mathjax-27
# Bundled SOCI libs
ln -sfT "${srcdir}/soci-${_sociver}" "soci-${_sociver}"
# Bundled libs
ln -sfT "$srcdir/soci-$_soci_version" "soci-$_soci_version"
# Panmirror is picked up now from Quarto repo
ln -sfT "${srcdir}/quarto" "$srcdir/$_pkgsrc/src/gwt/lib/quarto"
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
_run_if_exists _build_soci
# Quarto set up
if (pacman -Q quarto > /dev/null 2> /dev/null); then
_quarto="ON"
@ -208,13 +216,14 @@ build() (
ln -sfT /usr/bin/pandoc pandoc/${_pandocver}/bin/tools/pandoc
fi
_build_soci
export LDFLAGS+=" -L$srcdir/$_pkgsrc/dependencies/soci-${_sociver}/build/lib"
local _ldflags=(
-L"$srcdir/$_pkgsrc/dependencies/soci-$_soci_version/build/lib"
)
export LDFLAGS+=" ${_ldflags[@]}"
cd "${srcdir}"
echo "Downloading and installing R packages..."
export R_LIBS_USER="${srcdir}/${_srcname}/dependencies/R"
export R_LIBS_USER="$srcdir/$_pkgsrc/dependencies/R"
_JOBS="$(grep -oP -- "-j\s*\K[0-9]+" <<< "${MAKEFLAGS}")" || _JOBS="1"
mkdir -p "${R_LIBS_USER}"
local RPACKAGES=(
@ -231,7 +240,6 @@ build() (
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")
@ -265,9 +273,11 @@ build() (
-DRSTUDIO_NODE_VERSION="Current"
-DRSTUDIO_INSTALLED_NODE_VERSION="Current"
-DQUARTO_ENABLED=${_quarto}
-DRSTUDIO_UNIT_TESTS_ENABLED=OFF
-DBUILD_TESTING=OFF
-Wno-dev
)
cmake "${_opts_rstudio[@]}"
cmake --build build
)
@ -281,13 +291,17 @@ package() {
# See following script for potentially useful flags.
# https://github.com/ozankiratli/dotfiles/blob/master/.config/sway/scripts/rstudio-wayland
: \${XDG_CONFIG_HOME:=\$HOME/.config}
#!/usr/bin/bash
flags_file="\$XDG_CONFIG_HOME/rstudio-flags.conf"
name=rstudio
flags_file="\${XDG_CONFIG_HOME:-\$HOME/.config}/\${name}-flags.conf"
fallback_file="\${XDG_CONFIG_HOME:-\$HOME/.config}/electron-flags.conf"
lines=()
if [[ -f "\${flags_file}" ]]; then
mapfile -t lines < "\${flags_file}"
elif [[ -f "\${fallback_file}" ]]; then
mapfile -t lines < "\${fallback_file}"
fi
flags=()
@ -305,3 +319,9 @@ export ELECTRON_FORCE_IS_PACKAGED
exec /usr/lib/rstudio/rstudio "\${flags[@]}" "\$@"
END
}
_run_if_exists() {
if declare -F "$1" > /dev/null; then
eval "$1"
fi
}