From 44b807c57d6e951ffa3f89694fd023b57309900e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Fri, 25 May 2018 14:05:58 +0000 Subject: [PATCH] [libpsl] Fix and optimize libpsl build (#1446) * [libpsl] Add autoconf-archive to fix libidn2 build * [libpsl] Speed up build by using ./configure caches * [libpsl] Prevent cloning gnulib multiple times --- projects/libpsl/Dockerfile | 12 +++++++++--- projects/libpsl/build.sh | 7 ++++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/projects/libpsl/Dockerfile b/projects/libpsl/Dockerfile index dbf703d8a..d5cf8db70 100644 --- a/projects/libpsl/Dockerfile +++ b/projects/libpsl/Dockerfile @@ -22,6 +22,7 @@ RUN apt-get update && apt-get install -y \ autogen \ autopoint \ autoconf \ + autoconf-archive \ automake \ libtool \ texinfo \ @@ -33,12 +34,17 @@ RUN apt-get update && apt-get install -y \ wget \ python -RUN git clone --depth=1 --recursive https://git.savannah.gnu.org/git/libunistring.git -RUN git clone --depth=1 --recursive https://gitlab.com/libidn/libidn2.git +RUN git clone git://git.savannah.gnu.org/gnulib.git +ENV GNULIB_TOOL=$SRC/gnulib/gnulib-tool +ENV GNULIB_SRCDIR=$SRC/gnulib + +RUN git clone --depth=1 https://git.savannah.gnu.org/git/libunistring.git +RUN git clone --depth=1 https://gitlab.com/libidn/libidn2.git && \ + rmdir libidn2/gnulib && ln -s $SRC/gnulib libidn2/gnulib RUN git clone --depth=1 https://git.savannah.gnu.org/git/libidn.git RUN wget http://download.icu-project.org/files/icu4c/59.1/icu4c-59_1-src.tgz && tar xvfz icu4c-59_1-src.tgz RUN git clone --depth=1 --recursive https://github.com/rockdaboot/libpsl.git WORKDIR libpsl -COPY build.sh $SRC/ +COPY build.sh config.site $SRC/ diff --git a/projects/libpsl/build.sh b/projects/libpsl/build.sh index 7b48d3c3a..6cf1cb92b 100755 --- a/projects/libpsl/build.sh +++ b/projects/libpsl/build.sh @@ -19,6 +19,7 @@ export DEPS_PATH=$SRC/deps export PKG_CONFIG_PATH=$DEPS_PATH/lib/pkgconfig export CPPFLAGS="-I$DEPS_PATH/include" export LDFLAGS="-L$DEPS_PATH/lib" +export CONFIG_SITE=$SRC/config.site cd $SRC/icu/source UBSAN_OPTIONS=detect_leaks=0 \ @@ -65,17 +66,17 @@ else builds="libicu libidn2 libidn none" fi for build in $builds; do - XLIBS="" + unset LIBS if test $build = "none"; then BUILD_FLAGS="--disable-runtime --disable-builtin" else BUILD_FLAGS="--enable-runtime=$build --enable-builtin=$build" if test $build = "libicu"; then - XLIBS="-lstdc++" + export LIBS="-lstdc++" fi fi # older m4 iconv detection has memleaks, so switch leak detection off - LIBS=$XLIBS ASAN_OPTIONS=detect_leaks=0 UBSAN_OPTIONS=detect_leaks=0 \ + ASAN_OPTIONS=detect_leaks=0 UBSAN_OPTIONS=detect_leaks=0 \ ./configure --enable-static --disable-shared --disable-gtk-doc $BUILD_FLAGS --prefix=$DEPS_PATH make clean make -j$(nproc)