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 2b85d0
pkgp_configure_patch_pre() {
Lucio Andrés Illanes Albornoz 907bd3
	local _patch_path="";
Lucio Andrés Illanes Albornoz 2b85d0
	for _patch_path in \
Lucio Andrés Illanes Albornoz 2b85d0
			"${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}${PKG_VERSION:+-${PKG_VERSION}}_pre.local.patch"		\
Lucio Andrés Illanes Albornoz 2b85d0
			"${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}${PKG_VERSION:+-${PKG_VERSION}}_pre.local@${BUILD_HNAME}.patch"; do
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
		if [ -r "${_patch_path}" ]; then
Lucio Andrés Illanes Albornoz 2b85d0
			patch -b -d "${PKG_BASE_DIR}/${PKG_SUBDIR}" -p1 < "${_patch_path}" || return "${?}";
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 2b85d0
pkgp_configure_patch_pre_chainport() {
Lucio Andrés Illanes Albornoz 2b85d0
	local	_chainport_patch_fname="${BUILD_WORKDIR}/chainport/patches/${PKG_NAME%%_*}/${PKG_NAME%%_*}-${PKG_VERSION}.midipix.patch"\
Lucio Andrés Illanes Albornoz 2b85d0
		_chainport_patch_dname="${PKG_BASE_DIR}/${PKG_SUBDIR}/patches/${PKG_NAME%%_*}" _oldpwd="";
Lucio Andrés Illanes Albornoz 2b85d0
	if [ -e "${_chainport_patch_fname}" ]; then
Lucio Andrés Illanes Albornoz c6d6e0
		rtl_fileop mkdir "${_chainport_patch_dname}" || return "${?}";
Lucio Andrés Illanes Albornoz c6d6e0
		rtl_fileop cp "${_chainport_patch_fname}" "${_chainport_patch_dname}" || return "${?}";
Lucio Andrés Illanes Albornoz 2b85d0
	fi;
Lucio Andrés Illanes Albornoz 2b85d0
};
Lucio Andrés Illanes Albornoz 2b85d0
Lucio Andrés Illanes Albornoz 2b85d0
pkg_configure_patch_pre() {
Lucio Andrés Illanes Albornoz 2b85d0
	if ! pkgp_configure_patch_pre_chainport\
Lucio Andrés Illanes Albornoz 2b85d0
	|| ! pkgp_configure_patch_pre; then
Lucio Andrés Illanes Albornoz 2b85d0
		return 1;
Lucio Andrés Illanes Albornoz 2b85d0
	fi;
Lucio Andrés Illanes Albornoz 2b85d0
};
Lucio Andrés Illanes Albornoz 2b85d0
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
# vim:filetype=sh