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) 570129
pkg_patch() {
Lucio Andrés Illanes Albornoz (arab, vxp) 802215
	local _patch_fname;
Lucio Andrés Illanes Albornoz (arab, vxp) 8ee843
	if [ -d "${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}" ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
		set +o noglob;
Lucio Andrés Illanes Albornoz (arab, vxp) d5afb4
		for _patch_fname in ${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}/*.patch; do
Lucio Andrés Illanes Albornoz (arab, vxp) d5afb4
			patch -b -d "${WORKDIR}/${PKG_SUBDIR}" -p1 < "${_patch_fname}";
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
		done;
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
		set -o noglob;
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
	fi;
Lucio Andrés Illanes Albornoz (arab, vxp) d5afb4
	for _patch_fname in 										\
Lucio Andrés Illanes Albornoz (arab, vxp) d5afb4
			${MIDIPIX_BUILD_PWD}/${WORKDIR}/${PKG_SUBDIR}.local.patch			\
Lucio Andrés Illanes Albornoz (arab, vxp) d5afb4
			${MIDIPIX_BUILD_PWD}/${WORKDIR}/${PKG_SUBDIR}.local@${BUILD_HNAME}.patch	\
Lucio Andrés Illanes Albornoz (arab, vxp) d5afb4
			${WORKDIR}/chainport/${PKG_SUBDIR}.midipix.patch				\
Lucio Andrés Illanes Albornoz (arab, vxp) d5afb4
			${MIDIPIX_BUILD_PWD}/patches/${PKG_SUBDIR}.local.patch				\
Lucio Andrés Illanes Albornoz (arab, vxp) d5afb4
			${MIDIPIX_BUILD_PWD}/patches/${PKG_SUBDIR}.local@${BUILD_HNAME}.patch; do
Lucio Andrés Illanes Albornoz (arab, vxp) 802215
		if [ -r "${_patch_fname}" ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) d5afb4
			patch -b -d "${WORKDIR}/${PKG_SUBDIR}" -p1 < "${_patch_fname}";
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
		fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 802215
	done;
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