Blame subr/pkg_configure_autotools.subr

Lucio Andrés Illanes Albornoz (arab, vxp) 570129
#
Lucio Andrés Illanes Albornoz (arab, vxp) 802215
# set -o errexit -o noglob are assumed.
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
#
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
pkg_configure_autotools() {
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
	local _script_fname _subdir_tgt;
Lucio Andrés Illanes Albornoz (arab, vxp) d01c02
	if [ -e "${PKG_BASE_DIR}/${PKG_SUBDIR}/configure" -o						\
Lucio Andrés Illanes Albornoz (arab, vxp) d01c02
	     -e "${PKG_BASE_DIR}/${PKG_SUBDIR}/configure.ac" -o						\
Lucio Andrés Illanes Albornoz (arab, vxp) d01c02
	     -e "${PKG_BASE_DIR}/${PKG_SUBDIR}/configure.in" -o						\
Lucio Andrés Illanes Albornoz (arab, vxp) d01c02
	     -e "${PKG_BASE_DIR}/${PKG_SUBDIR}/config.guess" ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) d01c02
		if [ -e "${PKG_BASE_DIR}/${PKG_SUBDIR}/configure.ac" ]\
Lucio Andrés Illanes Albornoz (arab, vxp) d01c02
		&& [ ! -e "${PKG_BASE_DIR}/${PKG_SUBDIR}/configure" ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
			for _script_fname in bootstrap bootstrap.sh autogen.sh ""; do
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
				if [ -z "${_script_fname}" ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) d01c02
					(build_fileop cd "${PKG_BASE_DIR}/${PKG_SUBDIR}" && autoconf)\
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
						|| exit 1 && break;
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
				elif [ -e "${PKG_BASE_DIR}/${PKG_SUBDIR}/${_script_fname}" ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
					for _subdir_tgt in "${PKG_BASE_DIR}/${PKG_SUBDIR}/build-aux" "${PKG_BASE_DIR}/${PKG_SUBDIR}"; do
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
						if [ -e "${_subdir_tgt}" ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
							echo install -m 0700				\
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
								"${MIDIPIX_BUILD_PWD}/etc/config.sub"	\
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
								"${_subdir_tgt}/config.sub";
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
							install -m 0700					\
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
								"${MIDIPIX_BUILD_PWD}/etc/config.sub"	\
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
								"${_subdir_tgt}/config.sub";
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
							break;
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
						fi;
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
					done;
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
					(build_fileop cd "${PKG_BASE_DIR}/${PKG_SUBDIR}" &&		\
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
						"${SHELL}" "${_script_fname}") || exit 1 && break;
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
				fi;
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
			done;
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
		fi;
Lucio Andrés Illanes Albornoz (arab, vxp) d01c02
		find "${PKG_BASE_DIR}/${PKG_SUBDIR}" -name config.sub					\
Lucio Andrés Illanes Albornoz (arab, vxp) d01c02
			-exec echo mv -- {} {}.orig \;							\
Lucio Andrés Illanes Albornoz (arab, vxp) d01c02
			-exec mv -- {} {}.orig \;							\
Lucio Andrés Illanes Albornoz (arab, vxp) d01c02
			-exec echo install -m 0700 "${MIDIPIX_BUILD_PWD}/etc/config.sub" {} \;		\
Lucio Andrés Illanes Albornoz (arab, vxp) 49b460
			-exec install -m 0700 "${MIDIPIX_BUILD_PWD}/etc/config.sub" {} \;;
Lucio Andrés Illanes Albornoz (arab, vxp) a2f293
		if [ "${PKG_BUILD_TYPE}" != host ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) d01c02
			build_fileop cp "${MIDIPIX_BUILD_PWD}/etc/config.cache" "${PKG_BUILD_DIR}/";
Lucio Andrés Illanes Albornoz (arab, vxp) a2f293
		fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
	fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
};
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
# vim:filetype=sh