From 15f5a8668b4d033b5ead8510f9a58ba45aa9ec31 Mon Sep 17 00:00:00 2001 From: tibequadorian Date: Wed, 30 Mar 2022 00:38:27 +0200 Subject: [PATCH] patch_args: allow use of --directory parameter patch(1) has a -d/--directory parameter which allows us to specify a directory where the patch will be applied. This is especially useful when we have multiple distfiles and want to patch in $build_wrksrc because that's where the patch is usually applied. Problem is, that the -i parameter is also relative to the the -d parameter and thus fails to find the patch, when -d is set. We solve that by using standard input instead of -i. --- common/hooks/do-patch/00-patches.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/hooks/do-patch/00-patches.sh b/common/hooks/do-patch/00-patches.sh index 9f7e21f017..64659dc302 100644 --- a/common/hooks/do-patch/00-patches.sh +++ b/common/hooks/do-patch/00-patches.sh @@ -31,7 +31,7 @@ _process_patch() { cd "$wrksrc" msg_normal "$pkgver: patching: ${_patch}.\n" - patch -s ${_args} -i ${_patch} 2>/dev/null + patch -s ${_args} <${_patch} 2>/dev/null } hook() {