Blame bootstrap

Packit Service 214d95
# !/bin/sh -e
Packit Service 214d95
Packit Service 214d95
REQUIRED='is required, but not installed.'
Packit Service 214d95
bc -v >/dev/null 2>&1 || { echo >&2 "'bc' $REQUIRED"; exit 1; }
Packit Service 214d95
if [ `uname -s` != "FreeBSD" ]; then
Packit Service 214d95
sed --version >/dev/null 2>&1 || { echo >&2 "'sed' $REQUIRED"; exit 1; }
Packit Service 214d95
fi
Packit Service 214d95
autoreconf --version >/dev/null 2>&1 || { echo >&2 "'autoconf' $REQUIRED"; exit 1; }
Packit Service 214d95
Packit Service 214d95
# If libtool is not installed -> "error: Libtool library used but 'LIBTOOL' is undefined"
Packit Service 214d95
Packit Service 214d95
mkdir m4 2>/dev/null
Packit Service 214d95
Packit Service 214d95
BROTLI_ABI_HEX=`sed -n 's/#define BROTLI_ABI_VERSION 0x//p' c/common/version.h`
Packit Service 214d95
BROTLI_ABI_INT=`echo "ibase=16;$BROTLI_ABI_HEX" | bc`
Packit Service 214d95
BROTLI_ABI_CURRENT=`expr $BROTLI_ABI_INT / 16777216`
Packit Service 214d95
BROTLI_ABI_REVISION=`expr $BROTLI_ABI_INT / 4096 % 4096`
Packit Service 214d95
BROTLI_ABI_AGE=`expr $BROTLI_ABI_INT % 4096`
Packit Service 214d95
BROTLI_ABI_INFO="$BROTLI_ABI_CURRENT:$BROTLI_ABI_REVISION:$BROTLI_ABI_AGE"
Packit Service 214d95
Packit Service 214d95
BROTLI_VERSION_HEX=`sed -n 's/#define BROTLI_VERSION 0x//p' c/common/version.h`
Packit Service 214d95
BROTLI_VERSION_INT=`echo "ibase=16;$BROTLI_VERSION_HEX" | bc`
Packit Service 214d95
BROTLI_VERSION_MAJOR=`expr $BROTLI_VERSION_INT / 16777216`
Packit Service 214d95
BROTLI_VERSION_MINOR=`expr $BROTLI_VERSION_INT / 4096 % 4096`
Packit Service 214d95
BROTLI_VERSION_PATCH=`expr $BROTLI_VERSION_INT % 4096`
Packit Service 214d95
BROTLI_VERSION="$BROTLI_VERSION_MAJOR.$BROTLI_VERSION_MINOR.$BROTLI_VERSION_PATCH"
Packit Service 214d95
Packit Service 214d95
sed -i.bak -r "s/[0-9]+:[0-9]+:[0-9]+/$BROTLI_ABI_INFO/" Makefile.am
Packit Service 214d95
sed -i.bak -r "s/\[[0-9]+\.[0-9]+\.[0-9]+\]/[$BROTLI_VERSION]/" configure.ac
Packit Service 214d95
Packit Service 214d95
autoreconf --install --force --symlink || exit $