summaryrefslogtreecommitdiff
path: root/core/pacman
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-03-05 09:43:18 +0100
committerErich Eckner <git@eckner.net>2020-03-05 09:43:18 +0100
commit3271f6ab8a92141c0e6e696b327198795f611006 (patch)
tree7c38bb731628e23bcd4e42ac7ede61ac3b71bdeb /core/pacman
parent8519e7241ce991c9bf4e26da4d2416bcac3ac861 (diff)
downloadpackages-3271f6ab8a92141c0e6e696b327198795f611006.tar.xz
core/pacman: append to prepare() if it already exists
Diffstat (limited to 'core/pacman')
-rw-r--r--core/pacman/PKGBUILD15
1 files changed, 11 insertions, 4 deletions
diff --git a/core/pacman/PKGBUILD b/core/pacman/PKGBUILD
index a6d00a35..7de432f7 100644
--- a/core/pacman/PKGBUILD
+++ b/core/pacman/PKGBUILD
@@ -25,10 +25,17 @@ fi
source+=('replace-i686-by-pentium4-when-architecture-is-auto.patch')
sha256sums+=('e8d5f8979c4dfab49e7ac058846f2454b865c1da451e086c23e61034fd820c19')
-prepare() {
- cd "$pkgname-$pkgver"
- patch -p1 -i ../replace-i686-by-pentium4-when-architecture-is-auto.patch
-}
+
+eval "$(
+ {
+ declare -f prepare || \
+ printf 'prepare() {\n}\n'
+ } \
+ | sed '
+ $i cd "$srcdir/$pkgname-$pkgver" \
+ patch -p1 -i ../replace-i686-by-pentium4-when-architecture-is-auto.patch
+ '
+)"
# FAIL: test 600 (also 64-bit), ignore for now
eval "$(