From 4d6e265dc350af1849b60ce2c97d839b4d156306 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Thu, 9 Sep 2021 19:46:47 +0200 Subject: Don't copy etc/config.guess for binutils{,_*}. etc/README.md: updated. midipix.env:${DEFAULT_BUILD_VARS}: adds AUTOCONF_CONFIG_GUESS. groups/010.host_deps.group:binutils_build:${PKG_PATCHES_EXTRA}: from chainport (via midipix.) patches/binutils_build-2.24.51.local.patch: from patches/binutils-2.24.51.local.patch (via midipix.) subr/pkg_configure_autotools.subr: copy etc/config.guess according to ${PKG_AUTOCONF_CONFIG_GUESS}. --- subr/pkg_configure_autotools.subr | 42 +++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 15 deletions(-) (limited to 'subr') diff --git a/subr/pkg_configure_autotools.subr b/subr/pkg_configure_autotools.subr index 4f7f76ed..15d76566 100644 --- a/subr/pkg_configure_autotools.subr +++ b/subr/pkg_configure_autotools.subr @@ -3,15 +3,22 @@ # pkg_configure_autotools() { - local _config_cache="" _fname="" _subdir_tgt=""; + local _config_cache="" _config_guest_fname="" _fname="" _subdir_tgt=""; if [ "${PKG_CONFIGURE_TYPE:+1}" = 1 ]\ && [ "${PKG_CONFIGURE_TYPE}" != "autotools" ]; then return 0; fi; + if [ "${PKG_AUTOCONF_CONFIG_GUESS:-midipix}" = "midipix" ]; then + _config_guest_fname="config.guess"; + else + _config_guest_fname=""; + fi; + if rtl_exists_any "${PKG_BASE_DIR}/${PKG_SUBDIR}" \ - "config.guess" "configure.ac" "configure.in" "configure"; + ${_config_guest_fname:+"${_config_guest_fname}"} \ + "configure.ac" "configure.in" "configure"; then rtl_export_vars PKG_CONFIG "${PKG_PKG_CONFIG:-}" PKG_CONFIG_LIBDIR "${PKG_PKG_CONFIG_LIBDIR:-}"; if [ "${PKG_FORCE_AUTORECONF:-0}" -eq 1 ]\ && ! (cd "${PKG_BASE_DIR}/${PKG_SUBDIR}" && autoreconf -fiv); then @@ -29,12 +36,15 @@ pkg_configure_autotools() { "${MIDIPIX_BUILD_PWD}/etc/config.sub" \ "${_subdir_tgt}/config.sub"; then return 1; - elif ! rtl_fileop install -m 0700 \ - "${MIDIPIX_BUILD_PWD}/etc/config.guess" \ - "${_subdir_tgt}/config.guess"; then - return 1; - else - break; + fi; + if [ "${PKG_AUTOCONF_CONFIG_GUESS:-midipix}" = "midipix" ]; then + if ! rtl_fileop install -m 0700 \ + "${MIDIPIX_BUILD_PWD}/etc/config.guess"\ + "${_subdir_tgt}/config.guess"; then + return 1; + else + break; + fi; fi; fi; done; @@ -55,13 +65,15 @@ pkg_configure_autotools() { || ! rtl_fileop install -m 0700 "${MIDIPIX_BUILD_PWD}/etc/config.sub" "${_fname}"; then return 1; fi; - done - for _fname in $(find "${PKG_BASE_DIR}/${PKG_SUBDIR}" -name config.guess); do - if ! rtl_fileop mv "${_fname}" "${_fname}.orig"\ - || ! rtl_fileop install -m 0700 "${MIDIPIX_BUILD_PWD}/etc/config.guess" "${_fname}"; then - return 1; - fi; - done + done; + if [ "${PKG_AUTOCONF_CONFIG_GUESS:-midipix}" = "midipix" ]; then + for _fname in $(find "${PKG_BASE_DIR}/${PKG_SUBDIR}" -name config.guess); do + if ! rtl_fileop mv "${_fname}" "${_fname}.orig"\ + || ! rtl_fileop install -m 0700 "${MIDIPIX_BUILD_PWD}/etc/config.guess" "${_fname}"; then + return 1; + fi; + done; + fi; if [ "${PKG_BUILD_TYPE}" != host ]; then if ! rtl_fileop touch "${PKG_BUILD_DIR}/config.cache"; then return 1; -- cgit v1.2.3