From 3271f6ab8a92141c0e6e696b327198795f611006 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 5 Mar 2020 09:43:18 +0100 Subject: core/pacman: append to prepare() if it already exists --- core/pacman/PKGBUILD | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'core/pacman') 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 "$( -- cgit v1.2.3-70-g09d2