Lucio Andrés Illanes Albornoz (arab, vxp) 570129
#
Lucio Andrés Illanes Albornoz e1d469
# set +o errexit -o noglob -o nounset 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 e1d469
			${PKG_PATCHES_EXTRA:-}; do
Lucio Andrés Illanes Albornoz (arab, vxp) 0ddc1e
		if [ -r "${_patch_fname}" ]\
Lucio Andrés Illanes Albornoz c6d6e0
		&& ! rtl_lmatch "${_patches_done}" "${_patch_fname}"; then
Lucio Andrés Illanes Albornoz bf9edf
			if ! patch -b -d "${PKG_BASE_DIR}/${PKG_SUBDIR}" -p1 < "${_patch_fname}"; then
Lucio Andrés Illanes Albornoz bf9edf
				set -o noglob; return 1;
Lucio Andrés Illanes Albornoz bf9edf
			else
Lucio Andrés Illanes Albornoz bf9edf
				_patches_done="$(rtl_lconcat "${_patches_done}" "${_patch_fname}")";
Lucio Andrés Illanes Albornoz bf9edf
			fi;
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