From 730db0768a4bb0a83c782fa0cc47532aa574165b Mon Sep 17 00:00:00 2001 From: mglae Date: Tue, 16 Feb 2021 19:15:04 +0100 Subject: [PATCH] autoreconf: support custom PKG_CONFIGURE_SCRIPT --- scripts/autoreconf | 18 ++++++++++-------- scripts/build | 2 +- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/scripts/autoreconf b/scripts/autoreconf index 26cc2ca1bc..66413841e0 100755 --- a/scripts/autoreconf +++ b/scripts/autoreconf @@ -6,27 +6,29 @@ . config/options "${1}" -if [ ! -f "${PKG_BUILD}/configure.in" \ - -a ! -f "${PKG_BUILD}/configure.ac" ]; then +RECONF_DIR="${3}" + +if [ ! -f "${RECONF_DIR}/configure.in" \ + -a ! -f "${RECONF_DIR}/configure.ac" ]; then die "configure.in or configure.ac not found" fi -if [ ! -f "${PKG_BUILD}/.autoreconf-done" ]; then +if [ ! -f "${RECONF_DIR}/.autoreconf-done" ]; then PARENT_PKG="${2}" # lock package during autoreconf otherwise it is racy, eg. glib:host/glib:target building concurrently pkg_lock "${PKG_NAME}" "reconf" "${PARENT_PKG}" - if [ ! -f "${PKG_BUILD}/.autoreconf-done" ]; then + if [ ! -f "${RECONF_DIR}/.autoreconf-done" ]; then pkg_lock_status "ACTIVE" "${PKG_NAME}" "reconf" - touch "${PKG_BUILD}/NEWS" "${PKG_BUILD}/AUTHORS" "${PKG_BUILD}/ChangeLog" - mkdir -p "${PKG_BUILD}/m4" + touch "${RECONF_DIR}/NEWS" "${RECONF_DIR}/AUTHORS" "${RECONF_DIR}/ChangeLog" + mkdir -p "${RECONF_DIR}/m4" build_msg "CLR_AUTORECONF" "AUTORECONF" "${PKG_NAME}" "indent" - do_autoreconf "${PKG_BUILD}" - touch "${PKG_BUILD}/.autoreconf-done" + do_autoreconf "${RECONF_DIR}" + touch "${RECONF_DIR}/.autoreconf-done" pkg_lock_status "UNLOCK" "${PKG_NAME}" "reconf" "configured" else diff --git a/scripts/build b/scripts/build index 074cd8544c..033bbdce6c 100755 --- a/scripts/build +++ b/scripts/build @@ -207,7 +207,7 @@ BOOTSTRAP_MESON_OPTS="${HOST_MESON_OPTS}" # make autoreconf if [ "${PKG_TOOLCHAIN}" = "autotools" ]; then - ${SCRIPTS}/autoreconf "${PKG_NAME}" "${PARENT_PKG}" + ${SCRIPTS}/autoreconf "${PKG_NAME}" "${PARENT_PKG}" $(dirname "${PKG_CONFIGURE_SCRIPT}") fi pkg_lock_status "ACTIVE" "${PKG_NAME}:${TARGET}" "build"