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.
This commit is contained in:
tibequadorian 2022-03-30 00:38:27 +02:00 committed by Echo
parent ba082a801e
commit 15f5a8668b

View file

@ -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() {