Bundle our own R 4.5.3 instead of building against Arch's R

Arch ships R 4.6.1, but JASP pins its R packages against a frozen CRAN
snapshot (2026-03-31 for 0.98.1) that targets R 4.5. Configuring against
Arch's R fails at Rcpp 1.1.1, which cannot compile on R 4.6 since
R_NamespaceRegistry was removed; the Rcpp release that fixes it is newer
than the pinned snapshot, so the lockfile cannot reach it either.

Build R 4.5.3 into /opt/jasp-desktop/R and point R_HOME at it, matching
what upstream CI does. This drops 'r' from depends entirely, so an Arch R
upgrade can no longer break an installed JASP, and the rebuild triggers
become Qt6 and ICU - the libraries actually still linked against.
This commit is contained in:
agw
2026-09-01 21:40:00 +02:00
parent 3ad88f9b0d
commit d880e6748c
7 changed files with 130 additions and 64 deletions
+13 -8
View File
@@ -16,22 +16,27 @@ license=('AGPL-3.0-or-later')
provides=("jasp-desktop=${pkgver}")
conflicts=('jasp-desktop')
# JASP links against the system R and Qt6 rather than bundling them, and the
# bundled R module library is compiled against one specific R minor. These are
# pinned to what this binary was actually built against — an Arch R or Qt6 bump
# makes pacman refuse the combination instead of leaving JASP silently broken.
# JASP's R packages are pinned by upstream against a frozen CRAN snapshot that
# targets R @BUNDLED_R@, so this package ships its own R at
# /opt/jasp-desktop/R rather than using Arch's. That deliberately keeps `r` out
# of depends: an Arch R upgrade cannot break an installed JASP.
#
# Qt6 and ICU are still system libraries, and both break ABI across releases, so
# they are pinned to the versions this binary was linked against.
depends=(
"r>=@R_MINOR@" "r<@R_NEXT_MINOR@"
"qt6-base>=@QT_MINOR@" "qt6-base<@QT_NEXT_MINOR@"
'qt6-declarative' 'qt6-svg' 'qt6-positioning' 'qt6-webchannel'
'qt6-webengine' 'qt6-5compat' 'qt6-httpserver'
'boost-libs' 'glpk' 'jsoncpp' 'libarchive' 'openssl' 'curl' 'sqlite'
'zlib' 'readstat' 'blas' 'lapack'
"icu>=@ICU_MAJOR@" "icu<@ICU_NEXT_MAJOR@"
'boost-libs' 'glpk' 'jsoncpp' 'libarchive' 'openssl' 'curl' 'sqlite' 'zlib'
'readstat' 'blas' 'lapack' 'pcre2' 'readline' 'bzip2' 'xz'
'libpng' 'libtiff' 'libjpeg-turbo' 'cairo' 'pango' 'fontconfig'
'jags' 'librdata-git'
)
# The tarball is a complete /opt + /usr install tree; there is nothing to
# compile or strip here.
# compile, and stripping a bundled R plus several hundred R modules is both slow
# and a good way to break them.
options=('!strip' '!debug')
source=("jasp-desktop-${pkgver}-${pkgrel}-x86_64.tar.zst::@DOWNLOAD_URL@")