Skip to content

Commit

Permalink
Fix missing Pango support in R 3.x for openSUSE 15.6
Browse files Browse the repository at this point in the history
On R <= 3.6, running png() or similar was returning an error, and
getOption("bitmapType") returned "Xlib" instead of "cairo" as expected.
  • Loading branch information
glin committed Aug 3, 2024
1 parent 262df8b commit a337484
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions builder/Dockerfile.opensuse-156
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ ENV CONFIGURE_OPTIONS="\
# https://solutions.posit.co/envs-pkgs/using-rjava/
ENV JAVA_HOME=/usr/lib64/jvm/jre-11-openjdk

# R 3.x requires PCRE2 for Pango support on SUSE 15.6
ENV INCLUDE_PCRE2_IN_R_3 yes

COPY package.opensuse-156 /package.sh
COPY build.sh .
COPY patches /patches
Expand Down
2 changes: 1 addition & 1 deletion builder/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ compile_r() {
#
# The INCLUDE_PCRE2_IN_R_3 environment variable can be set to include PCRE2
# in R 3.x builds, for distributions where PCRE2 is always required.
# In Debian 11/Ubuntu 22/RHEL 9, Pango now depends on PCRE2, so R 3.x will not be compiled with
# In Debian 11/Ubuntu 22/RHEL 9/SUSE 15.6, Pango now depends on PCRE2, so R 3.x will not be compiled with
# Pango support if the PCRE2 pkg-config file is missing.
if [[ "${r_version}" =~ ^3 ]] && pkg-config --exists libpcre2-8 && [ -z "$INCLUDE_PCRE2_IN_R_3" ]; then
mkdir -p /tmp/pcre2
Expand Down

0 comments on commit a337484

Please sign in to comment.