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) 570129
	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) 802215
		for _patch_fname in ${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}/*.patch; do
Lucio Andrés Illanes Albornoz (arab, vxp) 802215
			patch -b -d ${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) 802215
	for _patch_fname in 									\
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
			${MIDIPIX_BUILD_PWD}/../${PKG_SUBDIR}.local.patch			\
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
			${MIDIPIX_BUILD_PWD}/../${PKG_SUBDIR}.local@${BUILD_HNAME}.patch	\
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
			${WORKDIR}/chainport/${PKG_SUBDIR}.midipix.patch			\
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
			${MIDIPIX_BUILD_PWD}/patches/${PKG_SUBDIR}.local.patch			\
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
			${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) 802215
			patch -b -d ${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