summaryrefslogtreecommitdiffhomepage
path: root/subr
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2017-02-16 12:54:42 +0000
committerLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2017-02-16 12:55:47 +0000
commite497667bcbc2ca055fa79fb3d68d9ee14677a1b4 (patch)
tree2434a6113a97a106b451b209e0180a9684547876 /subr
parentc2b35f231dcc2fe0e877de0791ff82180caec422 (diff)
downloadmidipix_build-e497667bcbc2ca055fa79fb3d68d9ee14677a1b4.tar.bz2
midipix_build-e497667bcbc2ca055fa79fb3d68d9ee14677a1b4.tar.xz
subr/pkg_patch.subr: {,un}set noglob correctly, don't apply the same patch multiple times.
vars/build.vars: override ${PKG_BZIP2_INSTALL_FILES} for bzip2_flavour_minipix.
Diffstat (limited to 'subr')
-rw-r--r--subr/pkg_patch.subr10
1 files changed, 6 insertions, 4 deletions
diff --git a/subr/pkg_patch.subr b/subr/pkg_patch.subr
index 94fe780b..eba8f6f2 100644
--- a/subr/pkg_patch.subr
+++ b/subr/pkg_patch.subr
@@ -3,8 +3,8 @@
#
pkg_patch() {
- local _patch_fname;
- set -o noglob;
+ local _patch_fname _patches_done;
+ set +o noglob;
for _patch_fname in \
${WORKDIR}/chainport/${PKG_NAME}.midipix.patch \
${WORKDIR}/chainport/${PKG_SUBDIR}.midipix.patch \
@@ -18,11 +18,13 @@ pkg_patch() {
${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}.local@${BUILD_HNAME}.patch \
${MIDIPIX_BUILD_PWD}/patches/${PKG_SUBDIR}.local@${BUILD_HNAME}.patch \
${MIDIPIX_BUILD_PWD}/patches/${PKG_SUBDIR%-*}.local@${BUILD_HNAME}.patch; do
- if [ -r "${_patch_fname}" ]; then
+ if ! lmatch "${_patches_done}" " " "${_patch_fname}"\
+ && [ -r "${_patch_fname}" ]; then
patch -b -d "${WORKDIR}/${PKG_SUBDIR}" -p1 < "${_patch_fname}";
+ _patches_done="${_patches_done:+${_patches_done} }${_patch_fname}";
fi;
done;
- set +o noglob;
+ set -o noglob;
};
# vim:filetype=sh