[arch-commits] Commit in patch/trunk (PKGBUILD)
Levente Polyak
anthraxx at archlinux.org
Tue Nov 13 23:13:43 UTC 2018
Date: Tuesday, November 13, 2018 @ 23:13:41
Author: anthraxx
Revision: 339660
patch: respect source prefixes when applying patches
Modified:
patch/trunk/PKGBUILD
----------+
PKGBUILD | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-11-13 23:06:14 UTC (rev 339659)
+++ PKGBUILD 2018-11-13 23:13:41 UTC (rev 339660)
@@ -34,14 +34,14 @@
prepare() {
cd $pkgname-$pkgver
# apply patch from the source array (should be a pacman feature)
- local filename
- for filename in "${source[@]}"; do
- if [[ "$filename" =~ \.patch$ ]]; then
- msg2 "Applying patch ${filename##*/}"
- patch -p1 -N -i "$srcdir/${filename##*/}"
- fi
+ local src
+ for src in "${source[@]}"; do
+ src="${src%%::*}"
+ src="${src##*/}"
+ [[ $src = *.patch ]] || continue
+ msg2 "Applying patch $src..."
+ patch -Np1 < "../$src"
done
- :
}
build() {
More information about the arch-commits
mailing list