midipix / build / midipix_build

Forked from build/midipix_build 4 years ago
Clone

Blame subr/pkg_patch.subr

Lucio Andrés Illanes Albornoz (arab, vxp) 570129
#
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
# . ./build.vars and set -o errexit -o noglob are assumed.
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
# See warning at the top of build.vars.
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) 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) 570129
		for __patch_fname in ${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}/*.patch; do
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
			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) 570129
	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) 570129
		if [ -r "${__patch_fname}" ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
			patch -b -d ${PKG_SUBDIR} -p1 < ${__patch_fname};
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
		fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
	done; unset __patch_fname;
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
	if test_cmd pkg_${PKG_NAME}_patch_post; then
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
		pkg_${PKG_NAME}_patch_post;
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
	fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
	set_build_script_done patch -setup;
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