[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
This commit is contained in:
Tim Rühsen 2018-05-25 14:05:58 +00:00 committed by Max Moroz
parent 57524c4445
commit 44b807c57d
2 changed files with 13 additions and 6 deletions

View File

@ -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/

View File

@ -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)