Conan_Kudo / build / midipix_build

Forked from build/midipix_build 4 years ago
Clone

Blame subr/pkg_configure_patch.subr

Lucio Andrés Illanes Albornoz (arab, vxp) 570129
#
Lucio Andrés Illanes Albornoz 2b85d0
# set +o errexit -o noglob is 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_patch() {
Lucio Andrés Illanes Albornoz 2b85d0
	local	_patch_dir="${MIDIPIX_BUILD_PWD}/patches" _patch_fname=""		\
Lucio Andrés Illanes Albornoz 2b85d0
		_patches_done="" _pkg_name_full="${PKG_NAME}${PKG_VERSION:+-${PKG_VERSION}}";
Lucio Andrés Illanes Albornoz 2b85d0
	set +o noglob;
Lucio Andrés Illanes Albornoz 2b85d0
	for _patch_fname in \
Lucio Andrés Illanes Albornoz 2b85d0
			"${_patch_dir}/${_pkg_name}/"*.patch				\
Lucio Andrés Illanes Albornoz 2b85d0
			"${_patch_dir}/${_pkg_name_full}.local.patch"			\
Lucio Andrés Illanes Albornoz 2b85d0
			"${_patch_dir}/${_pkg_name_full}.local@${BUILD_HNAME}.patch"	\
Lucio Andrés Illanes Albornoz 2b85d0
			${PKG_PATCHES_EXTRA}; do
Lucio Andrés Illanes Albornoz (arab, vxp) 0ddc1e
		if [ -r "${_patch_fname}" ]\
Lucio Andrés Illanes Albornoz 2b85d0
		&& ! ex_rtl_lmatch "${_patches_done}" "${_patch_fname}"; then
Lucio Andrés Illanes Albornoz 2b85d0
			patch -b -d "${PKG_BASE_DIR}/${PKG_SUBDIR}" -p1 < "${_patch_fname}" || return "${?}";
Lucio Andrés Illanes Albornoz 2b85d0
			_patches_done="$(ex_rtl_lconcat "${_patches_done}" "${_patch_fname}")";
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
		fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 0ddc1e
	done; set -o noglob;
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