@@ -4,7 +4,7 @@ on: | |||||
push: | push: | ||||
env: | env: | ||||
CACHE_VERSION: 13 | |||||
CACHE_VERSION: 14 | |||||
DEBIAN_FRONTEND: noninteractive | DEBIAN_FRONTEND: noninteractive | ||||
PAWPAW_SKIP_TESTS: 1 | PAWPAW_SKIP_TESTS: 1 | ||||
@@ -56,16 +56,32 @@ download db "${DB_VERSION}" "${DB_URL}" | |||||
# based on build_autoconf | # based on build_autoconf | ||||
function build_custom_db() { | function build_custom_db() { | ||||
local name="${1}" | |||||
local pkgname="${1}" | |||||
local version="${2}" | local version="${2}" | ||||
local extraconfrules="${3}" | local extraconfrules="${3}" | ||||
local pkgdir="${PAWPAW_BUILDDIR}/${name}-${version}" | |||||
local pkgdir="${PAWPAW_BUILDDIR}/${pkgname}-${version}" | |||||
if [ "${CROSS_COMPILING}" -eq 1 ]; then | |||||
if [ "${LINUX}" -eq 1 ] || [ "${WASM}" -eq 1 ]; then | |||||
extraconfrules+=" --build=$(uname -m)-linux-gnu ac_cv_build=$(uname -m)-linux-gnu" | extraconfrules+=" --build=$(uname -m)-linux-gnu ac_cv_build=$(uname -m)-linux-gnu" | ||||
fi | |||||
if [ "${LINUX}" -eq 1 ] && [ "$(uname -m)" != "x86_64" ]; then | |||||
extraconfrules+=" --host=$(uname -m)-linux-gnu ac_cv_host=$(uname -m)-linux-gnu" | |||||
elif [ "${WASM}" -eq 1 ]; then | |||||
extraconfrules+=" --host=i686-linux-gnu ac_cv_host=i686-linux-gnu" | |||||
elif [ -n "${TOOLCHAIN_PREFIX}" ]; then | |||||
extraconfrules+=" --host=${TOOLCHAIN_PREFIX} ac_cv_host=${TOOLCHAIN_PREFIX}" | extraconfrules+=" --host=${TOOLCHAIN_PREFIX} ac_cv_host=${TOOLCHAIN_PREFIX}" | ||||
fi | fi | ||||
if echo "${extraconfrules}" | grep -q -e '--enable-debug' -e '--disable-debug'; then | |||||
true | |||||
elif [ -n "${PAWPAW_DEBUG}" ] && [ "${PAWPAW_DEBUG}" -eq 1 ]; then | |||||
extraconfrules+=" --enable-debug" | |||||
else | |||||
extraconfrules+=" --disable-debug" | |||||
fi | |||||
if [ "${MACOS}" -eq 1 ]; then | if [ "${MACOS}" -eq 1 ]; then | ||||
extraconfrules+=" --with-mutex=x86_64/gcc-assembly db_cv_atomic=x86/gcc-assembly" | extraconfrules+=" --with-mutex=x86_64/gcc-assembly db_cv_atomic=x86/gcc-assembly" | ||||
fi | fi | ||||
@@ -73,11 +89,11 @@ function build_custom_db() { | |||||
extraconfrules+=" --enable-mingw" | extraconfrules+=" --enable-mingw" | ||||
fi | fi | ||||
_prebuild "${name}" "${pkgdir}" | |||||
_prebuild "${pkgname}" "${pkgdir}" | |||||
if [ ! -f "${pkgdir}/.stamp_configured" ]; then | if [ ! -f "${pkgdir}/.stamp_configured" ]; then | ||||
pushd "${pkgdir}/build_unix" | pushd "${pkgdir}/build_unix" | ||||
../dist/configure --enable-static --disable-shared --disable-debug --disable-doc --disable-maintainer-mode --prefix="${PAWPAW_PREFIX}" ${extraconfrules} | |||||
../dist/configure --enable-static --disable-shared --disable-doc --disable-maintainer-mode --prefix="${PAWPAW_PREFIX}" ${extraconfrules} | |||||
touch ../.stamp_configured | touch ../.stamp_configured | ||||
popd | popd | ||||
fi | fi | ||||
@@ -385,8 +385,9 @@ fi | |||||
if [ -z "${PAWPAW_SKIP_GLIB}" ] || [ "${PAWPAW_SKIP_GLIB}" -eq 0 ]; then | if [ -z "${PAWPAW_SKIP_GLIB}" ] || [ "${PAWPAW_SKIP_GLIB}" -eq 0 ]; then | ||||
if [ "${MACOS}" -eq 1 ] || [ "${WASM}" -eq 1 ] || [ "${WIN32}" -eq 1 ]; then | if [ "${MACOS}" -eq 1 ] || [ "${WASM}" -eq 1 ] || [ "${WIN32}" -eq 1 ]; then | ||||
GLIB_EXTRAFLAGS="--disable-rebuilds" | |||||
GLIB_EXTRAFLAGS="--disable-profile" | |||||
GLIB_EXTRAFLAGS="" | |||||
GLIB_EXTRAFLAGS+=" --disable-rebuilds" | |||||
GLIB_EXTRAFLAGS+=" --disable-profile" | |||||
if [ "${WIN32}" -eq 1 ]; then | if [ "${WIN32}" -eq 1 ]; then | ||||
GLIB_EXTRAFLAGS+=" --with-threads=win32" | GLIB_EXTRAFLAGS+=" --with-threads=win32" | ||||
@@ -413,6 +414,7 @@ if [ "${MACOS}" -eq 1 ] || [ "${WASM}" -eq 1 ] || [ "${WIN32}" -eq 1 ]; then | |||||
patch_file glib ${GLIB_VERSION} "glib/gatomic.c" 's/G_ATOMIC_ARM/__aarch64__/' | patch_file glib ${GLIB_VERSION} "glib/gatomic.c" 's/G_ATOMIC_ARM/__aarch64__/' | ||||
patch_file glib ${GLIB_VERSION} "glib/gatomic.c" 's/G_ATOMIC_X86_64/__SSE2__/' | patch_file glib ${GLIB_VERSION} "glib/gatomic.c" 's/G_ATOMIC_X86_64/__SSE2__/' | ||||
elif [ "${WASM}" -eq 1 ]; then | elif [ "${WASM}" -eq 1 ]; then | ||||
patch_file glib ${GLIB_VERSION} "glib/gatomic.c" 's/G_ATOMIC_I486/_G_ATOMIC_NOT_I486/' | |||||
patch_file glib ${GLIB_VERSION} "glib/gatomic.c" 's/G_ATOMIC_X86_64/_G_ATOMIC_NOT_X86_64/' | patch_file glib ${GLIB_VERSION} "glib/gatomic.c" 's/G_ATOMIC_X86_64/_G_ATOMIC_NOT_X86_64/' | ||||
fi | fi | ||||
@@ -80,7 +80,7 @@ function build_conf_openssl() { | |||||
fi | fi | ||||
export RELEASE="whatever" | export RELEASE="whatever" | ||||
export BUILD="unknown" | export BUILD="unknown" | ||||
elif [ "${MACOS_UNIVERSAL}" -eq 0 ] && [ "$(uname -m)" != "x86_64" ]; then | |||||
elif [ "${MACOS_UNIVERSAL}" -eq 0 ] && [ "$(uname -m)" = "x86_64" ]; then | |||||
export MACHINE="x86_64" | export MACHINE="x86_64" | ||||
fi | fi | ||||
@@ -221,10 +221,16 @@ function build_autoconf() { | |||||
local pkgdir="${PAWPAW_BUILDDIR}/${pkgname}-${version}" | local pkgdir="${PAWPAW_BUILDDIR}/${pkgname}-${version}" | ||||
if [ "${WASM}" -eq 1 ]; then | |||||
extraconfrules+=" --host=$(uname -m)-linux-gnu" | |||||
if [ "${LINUX}" -eq 1 ] || [ "${WASM}" -eq 1 ]; then | |||||
extraconfrules+=" --build=$(uname -m)-linux-gnu ac_cv_build=$(uname -m)-linux-gnu" | |||||
fi | |||||
if [ "${LINUX}" -eq 1 ] && [ "$(uname -m)" != "x86_64" ]; then | |||||
extraconfrules+=" --host=$(uname -m)-linux-gnu ac_cv_host=$(uname -m)-linux-gnu" | |||||
elif [ "${WASM}" -eq 1 ]; then | |||||
extraconfrules+=" --host=i686-linux-gnu ac_cv_host=i686-linux-gnu" | |||||
elif [ -n "${TOOLCHAIN_PREFIX}" ]; then | elif [ -n "${TOOLCHAIN_PREFIX}" ]; then | ||||
extraconfrules+=" --host=${TOOLCHAIN_PREFIX} ac_cv_build=$(uname -m)-linux-gnu ac_cv_host=${TOOLCHAIN_PREFIX}" | |||||
extraconfrules+=" --host=${TOOLCHAIN_PREFIX} ac_cv_host=${TOOLCHAIN_PREFIX}" | |||||
fi | fi | ||||
if echo "${extraconfrules}" | grep -q -e '--enable-debug' -e '--disable-debug'; then | if echo "${extraconfrules}" | grep -q -e '--enable-debug' -e '--disable-debug'; then | ||||