diff --git a/PKGBUILD b/PKGBUILD index 52e253cb3cbc3be82f6f29fea1bcdfd3b7ee6d5a..f7b12ddfaed58c0a5f7580dc4a8496c073e5cacd 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -24,12 +24,15 @@ prepare() { cd linux - # apply patches - for _f in "${source[@]}"; do - if [[ "$_f" =~ \.patch$ ]]; then - msg2 "Patching $_f" - patch -p1 < "$srcdir/$_f" - fi + + # apply patch from the source array (should be a pacman feature) + local src + for src in "${source[@]}"; do + src="${src%%::*}" + src="${src##*/}" + [[ $src = *.patch ]] || continue + msg2 "Applying patch $src..." + patch -Np1 < "../$src" done # loading default config