X-Git-Url: https://git.distorted.org.uk/~mdw/termux-packages/blobdiff_plain/637f22d133aac8c8cc7db18638258c8f4646b688..150f95af271c7e32d66d94adbc7db6a8298d1693:/build-package.sh diff --git a/build-package.sh b/build-package.sh index d5eeccc6..eb046182 100755 --- a/build-package.sh +++ b/build-package.sh @@ -177,6 +177,7 @@ TERMUX_PKG_KEEP_HEADER_FILES="false" TERMUX_PKG_ESSENTIAL="" TERMUX_PKG_CONFLICTS="" # https://www.debian.org/doc/debian-policy/ch-relationships.html#s-conflicts TERMUX_PKG_CONFFILES="" +TERMUX_PKG_INCLUDE_IN_DEVPACKAGE="" # Set if a host build should be done in TERMUX_PKG_HOSTBUILD_DIR: TERMUX_PKG_HOSTBUILD="" TERMUX_PKG_MAINTAINER="Fredrik Fornwall " @@ -338,11 +339,17 @@ termux_step_configure () { set -e -o pipefail export PATH=$TERMUX_PKG_TMPDIR/config-scripts:$PATH + # See http://wiki.buici.com/xwiki/bin/view/Programing+C+and+C%2B%2B/Autoconf+and+RPL_MALLOC + # about this problem which may cause linker errors in test scripts not undef:ing malloc and + # also cause problems with e.g. malloc interceptors such as libgc: + local AVOID_AUTOCONF_WRAPPERS="ac_cv_func_malloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes" + $TERMUX_PKG_SRCDIR/configure \ --disable-dependency-tracking \ --prefix=$TERMUX_PREFIX \ --disable-rpath --disable-rpath-hack \ $HOST_FLAG \ + $AVOID_AUTOCONF_WRAPPERS \ $TERMUX_PKG_EXTRA_CONFIGURE_ARGS \ $DISABLE_NLS \ $ENABLE_SHARED \ @@ -441,7 +448,7 @@ termux_step_massage () { if [ -d include -a -z "${TERMUX_PKG_NO_DEVELSPLIT}" ]; then # Add virtual -dev sub package if there are include files: _DEVEL_SUBPACKAGE_FILE=$TERMUX_PKG_TMPDIR/${TERMUX_PKG_NAME}-dev.subpackage.sh - echo TERMUX_SUBPKG_INCLUDE=\"include share/man/man3 lib/pkgconfig share/aclocal\" > $_DEVEL_SUBPACKAGE_FILE + echo TERMUX_SUBPKG_INCLUDE=\"include share/man/man3 lib/pkgconfig share/aclocal $TERMUX_PKG_INCLUDE_IN_DEVPACKAGE\" > $_DEVEL_SUBPACKAGE_FILE echo TERMUX_SUBPKG_DESCRIPTION=\"Development files for ${TERMUX_PKG_NAME}\" >> $_DEVEL_SUBPACKAGE_FILE echo TERMUX_SUBPKG_DEPENDS=\"$TERMUX_PKG_NAME\" >> $_DEVEL_SUBPACKAGE_FILE fi