midipix / build / midipix_build

Forked from build/midipix_build 4 years ago
Clone
Blob Blame History Raw
#
# set -o errexit -o noglob are assumed.
#

pkg_autoconf() {
	local __;
	if [ -e "${WORKDIR}/${PKG_SUBDIR}/configure" -o						\
	     -e "${WORKDIR}/${PKG_SUBDIR}/configure.ac" -o					\
	     -e "${WORKDIR}/${PKG_SUBDIR}/configure.in" -o					\
	     -e "${WORKDIR}/${PKG_SUBDIR}/config.guess" ]; then
		find "${WORKDIR}/${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 [ -e "${WORKDIR}/${PKG_SUBDIR}/configure.ac" ]\
		&& [ ! -e "${WORKDIR}/${PKG_SUBDIR}/configure" ]; then
			if [ -e "${WORKDIR}/${PKG_SUBDIR}/autogen.sh" ]; then
				for __ in "${WORKDIR}/${PKG_SUBDIR}/build-aux" "${WORKDIR}/${PKG_SUBDIR}"; do
					if [ -e "${__}" ]; then
						echo install -m 0700				\
							"${MIDIPIX_BUILD_PWD}/etc/config.sub"	\
							"${__}/config.sub";
						install -m 0700					\
							"${MIDIPIX_BUILD_PWD}/etc/config.sub"	\
							"${__}/config.sub";
						break;
					fi;
				done;
				(build_fileop cd "${WORKDIR}/${PKG_SUBDIR}" && "${SHELL}" ./autogen.sh) || exit 1;
			else
				(build_fileop cd "${WORKDIR}/${PKG_SUBDIR}" && autoconf) || exit 1;
			fi;
		fi;
		for __ in ${PKG_BUILD_DIR} ${PKG_CONFIG_CACHE_EXTRA}; do
			build_fileop cp "${MIDIPIX_BUILD_PWD}/etc/config.cache" "${WORKDIR}/${__}/";
		done;
	fi;
};

# vim:filetype=sh