From 978b1c9b3103bd254ca65c739a0c6a088520be48 Mon Sep 17 00:00:00 2001 From: Ralf Hubert Date: Wed, 21 Jan 2026 13:31:24 +0100 Subject: [PATCH 1/2] classes/autoconf: add option to call custom auto(re)conf tool For some packages plain autoreconf doesn't work. Instead some `autogen.sh` or other scripts are provided by the package maintainer. For such packages `AUTOCONF_TOOL` can be used to override the default behavior. --- classes/autoconf.yaml | 48 +++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/classes/autoconf.yaml b/classes/autoconf.yaml index ecfc1c29..8d8c82d6 100644 --- a/classes/autoconf.yaml +++ b/classes/autoconf.yaml @@ -56,31 +56,35 @@ buildSetup: | if [[ ( ! -e configure ) || ( ! -e .autoreconf.stamp ) || ( configure.ac -nt .autoreconf.stamp ) ]] ; then - ( - # Work around a stupid perl limitation that does not retain - # sub-second file timestamps when moving files across file - # system boundaries. Make sure rename() always works. - # Otherwise files may appear older than they are and trigger - # reconfigurations in the build step. - export TMPDIR="$BOB_CWD" + if [[ -n ${AUTOCONF_TOOL:-} ]]; then + ${AUTOCONF_TOOL} + else + ( + # Work around a stupid perl limitation that does not retain + # sub-second file timestamps when moving files across file + # system boundaries. Make sure rename() always works. + # Otherwise files may appear older than they are and trigger + # reconfigurations in the build step. + export TMPDIR="$BOB_CWD" - # We don't want to retain any backups. Give them a unique - # suffix so that they can be garbage collected. - export SIMPLE_BACKUP_SUFFIX=.bob-backup + # We don't want to retain any backups. Give them a unique + # suffix so that they can be garbage collected. + export SIMPLE_BACKUP_SUFFIX=.bob-backup - # Autoreconf will not replace existing autoconf-archive macros - # in the m4 directory. If that is needed, the recipe must - # force the update. - if [[ $CALL_ACLOCAL ]] ; then - if [[ -n "${ACLOCAL_ARGS[@]:+set}" ]] ; then - aclocal "${ACLOCAL_ARGS[@]}" - else - aclocal -I m4 --install + # Autoreconf will not replace existing autoconf-archive macros + # in the m4 directory. If that is needed, the recipe must + # force the update. + if [[ $CALL_ACLOCAL ]] ; then + if [[ -n "${ACLOCAL_ARGS[@]:+set}" ]] ; then + aclocal "${ACLOCAL_ARGS[@]}" + else + aclocal -I m4 --install + fi fi - fi - autoreconf -v ${AUTORECONF_FORCE:+-fi} \ - ${AUTOCONF_EXTRA_PKGS[@]+"${AUTOCONF_EXTRA_PKGS[@]/#/-I}"} - ) + autoreconf -v ${AUTORECONF_FORCE:+-fi} \ + ${AUTOCONF_EXTRA_PKGS[@]+"${AUTOCONF_EXTRA_PKGS[@]/#/-I}"} + ) + fi rm -rf autom4te.cache find . -name '*.bob-backup' -delete touch .autoreconf.stamp From 31c8bbb588aeb608a946e6c58bbdf29da10607ba Mon Sep 17 00:00:00 2001 From: Ralf Hubert Date: Wed, 21 Jan 2026 13:33:17 +0100 Subject: [PATCH 2/2] classes/autoconf: optionally call bootstrapping tool Sometimes (when building from development sources) calling a bootstrap script is required prior to autoreconf. Add `AUTOCONF_BOOTSTRAP_TOOL` which can be set to e.g. `./bootstrap.sh` to be able to use the autoconf class for those packages. --- classes/autoconf.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/classes/autoconf.yaml b/classes/autoconf.yaml index 8d8c82d6..53918a9a 100644 --- a/classes/autoconf.yaml +++ b/classes/autoconf.yaml @@ -56,6 +56,7 @@ buildSetup: | if [[ ( ! -e configure ) || ( ! -e .autoreconf.stamp ) || ( configure.ac -nt .autoreconf.stamp ) ]] ; then + ${AUTOCONF_BOOTSTRAP_TOOL:-} if [[ -n ${AUTOCONF_TOOL:-} ]]; then ${AUTOCONF_TOOL} else