From c27beab66023847435fb88cd5cc75916dca37057 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Mon, 20 Nov 2017 21:45:21 +0000 Subject: Refactors build steps along the sequence {setup,fetch,configure,build,install}. subr/mode_check_updates.subr: seperated into check_updates.sh. subr/post_{copy_etc,sha256sums,tarballs}.subr: absorbed into `dist' target. --- subr/pkg_configure_autotools.subr | 45 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 subr/pkg_configure_autotools.subr (limited to 'subr/pkg_configure_autotools.subr') diff --git a/subr/pkg_configure_autotools.subr b/subr/pkg_configure_autotools.subr new file mode 100644 index 00000000..dbad6a30 --- /dev/null +++ b/subr/pkg_configure_autotools.subr @@ -0,0 +1,45 @@ +# +# set -o errexit -o noglob are assumed. +# + +pkg_configure_autotools() { + local _script_fname _subdir_tgt; + if [ -e "${PKG_BASE_DIR}/${PKG_SUBDIR}/configure" -o \ + -e "${PKG_BASE_DIR}/${PKG_SUBDIR}/configure.ac" -o \ + -e "${PKG_BASE_DIR}/${PKG_SUBDIR}/configure.in" -o \ + -e "${PKG_BASE_DIR}/${PKG_SUBDIR}/config.guess" ]; then + if [ -e "${PKG_BASE_DIR}/${PKG_SUBDIR}/configure.ac" ]\ + && [ ! -e "${PKG_BASE_DIR}/${PKG_SUBDIR}/configure" ]; then + for _script_fname in bootstrap bootstrap.sh autogen.sh ""; do + if [ -z "${_script_fname}" ]; then + (build_fileop cd "${PKG_BASE_DIR}/${PKG_SUBDIR}" && autoconf)\ + || exit 1 && break; + elif [ -e "${PKG_BASE_DIR}/${PKG_SUBDIR}/${_script_fname}" ]; then + for _subdir_tgt in "${PKG_BASE_DIR}/${PKG_SUBDIR}/build-aux" "${PKG_BASE_DIR}/${PKG_SUBDIR}"; do + if [ -e "${_subdir_tgt}" ]; then + echo install -m 0700 \ + "${MIDIPIX_BUILD_PWD}/etc/config.sub" \ + "${_subdir_tgt}/config.sub"; + install -m 0700 \ + "${MIDIPIX_BUILD_PWD}/etc/config.sub" \ + "${_subdir_tgt}/config.sub"; + break; + fi; + done; + (build_fileop cd "${PKG_BASE_DIR}/${PKG_SUBDIR}" && \ + "${SHELL}" "${_script_fname}") || exit 1 && break; + fi; + done; + fi; + find "${PKG_BASE_DIR}/${PKG_SUBDIR}" -name config.sub \ + -exec echo mv -- {} {}.orig \; \ + -exec mv -- {} {}.orig \; \ + -exec echo install -m 0700 "${MIDIPIX_BUILD_PWD}/etc/config.sub" {} \; \ + -exec install -m 0700 "${MIDIPIX_BUILD_PWD}/etc/config.sub" {} \;; + if [ "${PKG_BUILD_TYPE}" != host ]; then + build_fileop cp "${MIDIPIX_BUILD_PWD}/etc/config.cache" "${PKG_BUILD_DIR}/"; + fi; + fi; +}; + +# vim:filetype=sh -- cgit v1.2.3