fix(installer): install gettext headers on Alpine

This commit is contained in:
Patrick Schratz 2026-09-22 12:14:20 +00:00
commit 299f1adcce
No known key found for this signature in database
GPG key ID: 62050D5BC68AB6DC

View file

@ -16,8 +16,8 @@
# precisely because such a target may be shared (`/mnt/cache/R-pkgs` holds # precisely because such a target may be shared (`/mnt/cache/R-pkgs` holds
# bincraft and its dependencies alongside whatever this script installs). # bincraft and its dependencies alongside whatever this script installs).
# #
# System dependencies come from uvr's vendored r-system-requirements rules, so # System dependencies come from uvr's vendored r-system-requirements rules,
# `pak::sysreqs_db_update()` and `PKG_SYSREQS_PLATFORM` are no longer needed. # with explicit prerequisites below for gaps in Alpine support.
# #
# Environment: # Environment:
# UVR_R_BIN R interpreter to install for; set by install-bincraft.R so # UVR_R_BIN R interpreter to install for; set by install-bincraft.R so
@ -117,4 +117,11 @@ if command -v apt-get >/dev/null 2>&1; then
apt-get update -qq || echo "warning: apt-get update failed; continuing" >&2 apt-get update -qq || echo "warning: apt-get update failed; continuing" >&2
fi fi
# Alpine's build images lack libintl.h, which data.table needs when R enables
# NLS. uvr does not resolve this prerequisite on Alpine, so install it before
# compiling bincraft's dependencies (including when the library cache is cold).
if command -v apk >/dev/null 2>&1; then
apk add --no-cache gettext-dev
fi
"$uvr_bin" sync --library "$target_lib" --install-system-deps "$uvr_bin" sync --library "$target_lib" --install-system-deps