Fix missing Pango support in R 3.x for Ubuntu 22
This commit is contained in:
parent
d4052533e7
commit
a611cb425b
3 changed files with 8 additions and 5 deletions
|
|
@ -18,6 +18,9 @@ RUN chmod 0777 /opt
|
||||||
# Override the default pager used by R
|
# Override the default pager used by R
|
||||||
ENV PAGER /usr/bin/pager
|
ENV PAGER /usr/bin/pager
|
||||||
|
|
||||||
|
# R 3.x requires PCRE2 for Pango support on Ubuntu 22
|
||||||
|
ENV INCLUDE_PCRE2_IN_R_3 yes
|
||||||
|
|
||||||
COPY package.ubuntu-2204 /package.sh
|
COPY package.ubuntu-2204 /package.sh
|
||||||
COPY build.sh .
|
COPY build.sh .
|
||||||
ENTRYPOINT ./build.sh
|
ENTRYPOINT ./build.sh
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ compile_r() {
|
||||||
#
|
#
|
||||||
# The INCLUDE_PCRE2_IN_R_3 environment variable can be set to include PCRE2
|
# 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 R 3.x builds, for distributions where PCRE2 is always required.
|
||||||
# In Debian 11, Pango now depends on PCRE2, so R 3.x will not be compiled with
|
# In Debian 11/Ubuntu 22, Pango now depends on PCRE2, so R 3.x will not be compiled with
|
||||||
# Pango support if the PCRE2 pkg-config file is missing.
|
# Pango support if the PCRE2 pkg-config file is missing.
|
||||||
if [[ "${1}" =~ ^3 ]] && pkg-config --exists libpcre2-8 && [ -z "$INCLUDE_PCRE2_IN_R_3" ]; then
|
if [[ "${1}" =~ ^3 ]] && pkg-config --exists libpcre2-8 && [ -z "$INCLUDE_PCRE2_IN_R_3" ]; then
|
||||||
mkdir -p /tmp/pcre2
|
mkdir -p /tmp/pcre2
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,10 @@ if [[ ! -d /tmp/output/ubuntu-2204 ]]; then
|
||||||
mkdir -p /tmp/output/ubuntu-2204
|
mkdir -p /tmp/output/ubuntu-2204
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# R 3.x requires PCRE1
|
# R 3.x requires PCRE1. On Ubuntu 22, R 3.x also requires PCRE2 for Pango support.
|
||||||
pcre_lib='libpcre2-dev'
|
pcre_lib_flags='-d libpcre2-dev'
|
||||||
if [[ "${R_VERSION}" =~ ^3 ]]; then
|
if [[ "${R_VERSION}" =~ ^3 ]]; then
|
||||||
pcre_lib='libpcre3-dev'
|
pcre_lib_flags='-d libpcre2-dev -d libpcre3-dev'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fpm \
|
fpm \
|
||||||
|
|
@ -40,7 +40,7 @@ fpm \
|
||||||
-d libpango-1.0-0 \
|
-d libpango-1.0-0 \
|
||||||
-d libpangocairo-1.0-0 \
|
-d libpangocairo-1.0-0 \
|
||||||
-d libpaper-utils \
|
-d libpaper-utils \
|
||||||
-d ${pcre_lib} \
|
${pcre_lib_flags} \
|
||||||
-d libpng16-16 \
|
-d libpng16-16 \
|
||||||
-d libreadline8 \
|
-d libreadline8 \
|
||||||
-d libtcl8.6 \
|
-d libtcl8.6 \
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue