ref: 536cef2b2ad9ba00df99f38b8eee764297562799
dir: /jinx-config/
JINX_MAJOR_VER=0.2
export CFLAGS="-O2 -pipe"
export CXXFLAGS="${CFLAGS}"
export LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed"
OS_TRIPLET=x86_64-9front-plan9
post_package_strip() {
if [ -z "$strip_command" ]; then
strip_command="${OS_TRIPLET}-strip"
fi
for f in $(find "${dest_dir}"); do
if file "$f" | grep 'not stripped' >/dev/null; then
echo "* stripping '$f'..."
stripped_file="$(mktemp)"
${strip_command} "$f" -o "$stripped_file"
chmod --reference="$f" "$stripped_file"
mv -f "$stripped_file" "$f"
fi
done
}
autotools_configure() {
if [ -z "${configure_script_path}" ]; then
configure_script_path="${source_dir}/configure"
fi
ac_cv_func_malloc_0_nonnull=yes \
ac_cv_func_calloc_0_nonnull=yes \
ac_cv_func_realloc_0_nonnull=yes \
${configure_script_path} \
--host=${OS_TRIPLET} \
--with-sysroot=${sysroot} \
--prefix=${prefix} \
--sysconfdir=/etc \
--localstatedir=/var \
--bindir=${prefix}/bin \
--sbindir=${prefix}/bin \
--libdir=${prefix}/lib \
--enable-static \
--disable-shared \
--disable-malloc0returnsnull \
"$@"
}
autotools_recursive_regen() {
ACLOCAL_INCLUDE=""
if [ -d ${sysroot_dir}/usr/share/aclocal ]; then
ACLOCAL_INCLUDE="-I${sysroot_dir}/usr/share/aclocal"
fi
for f in $(find . -name configure.ac -o -name configure.in -type f | sort | grep -v contrib); do
echo "* autotools regen in '$(dirname $f)'..."
( cd "$(dirname "$f")" && autoreconf -fvi "$@" $ACLOCAL_INCLUDE )
done
}