From 16929ebd200863466123d72fea96ebc6d7eb9e61 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Fri, 18 Jun 2021 15:53:44 -0400 Subject: [PATCH] ansible: add ICU to sharedlibs containers Add versions of ICU to the sharedlibs containers. Intended to be used to build and test Node.js against a system ICU: e.g. for ICU 65 ``` $ export PKG_CONFIG_PATH=$ICU65DIR/lib/pkgconfig $ export LD_LIBRARY_PATH=$(pkg-config --variable=libdir icu-i18n) $ export CONFIG_FLAGS='--with-intl=system-icu --verbose' $ make run-ci ``` --- .../ubuntu1804_sharedlibs.Dockerfile.j2 | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/ansible/roles/docker/templates/ubuntu1804_sharedlibs.Dockerfile.j2 b/ansible/roles/docker/templates/ubuntu1804_sharedlibs.Dockerfile.j2 index 0d61bf57c..9afd51d05 100644 --- a/ansible/roles/docker/templates/ubuntu1804_sharedlibs.Dockerfile.j2 +++ b/ansible/roles/docker/templates/ubuntu1804_sharedlibs.Dockerfile.j2 @@ -23,6 +23,7 @@ RUN apt-get update && apt-get install apt-utils -y && \ gcc-8 \ git \ openjdk-8-jre-headless \ + pkg-config \ curl \ python-pip \ python3-pip \ @@ -36,6 +37,27 @@ RUN addgroup --gid {{ server_user_gid.stdout_lines[0] }} {{ server_user }} RUN adduser --gid {{ server_user_gid.stdout_lines[0] }} --uid {{ server_user_uid.stdout_lines[0] }} --disabled-password --gecos {{ server_user }} {{ server_user }} +ENV ICU64DIR=/opt/icu-64.1 \ + ICU65DIR=/opt/icu-65.1 \ + ICU67DIR=/opt/icu-67.1 \ + ICU68DIR=/opt/icu-68.2 \ + ICU69DIR=/opt/icu-69.1 + +RUN for ICU_ENV in $(env | grep ICU..DIR); do \ + ICU_PREFIX=$(echo $ICU_ENV | cut -d '=' -f 2) && \ + ICU_VERSION=$(echo $ICU_PREFIX | cut -d '-' -f 2) && \ + ICU_MAJOR=$(echo $ICU_VERSION | cut -d '.' -f 1) && \ + ICU_MINOR=$(echo $ICU_VERSION | cut -d '.' -f 2) && \ + mkdir -p /tmp/icu-$ICU_VERSION && \ + cd /tmp/icu-$ICU_VERSION && \ + curl -sL "https://github.com/unicode-org/icu/releases/download/release-$ICU_MAJOR-$ICU_MINOR/icu4c-${ICU_MAJOR}_$ICU_MINOR-src.tgz" | tar zxv --strip=1 && \ + cd source && \ + ./runConfigureICU Linux --prefix=$ICU_PREFIX && \ + make -j $JOBS && \ + make install && \ + rm -rf /tmp/icu-$ICU_VERSION; \ + done + ENV OPENSSL110DIR /opt/openssl-1.1.0l RUN mkdir -p /tmp/openssl_1.1.0l && \