diff options
author | Mubashshir | 2022-01-09 23:58:41 +0600 |
---|---|---|
committer | Mubashshir | 2022-01-09 23:58:41 +0600 |
commit | f7940931133538289294301bca702440bd06401f (patch) | |
tree | 09eda7c122df2e0a0b88ce947bd4d5d3d5cd0847 | |
parent | 486ade231b0a406dea3bdd59f4175b52e8df2489 (diff) | |
download | aur-f7940931133538289294301bca702440bd06401f.tar.gz |
anbox: Check before applying patches
Signed-off-by: Mubashshir <ahmubashshir@gmail.com>
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 19 |
2 files changed, 16 insertions, 5 deletions
@@ -1,7 +1,7 @@ pkgbase = anbox-git pkgdesc = Running Android in a container pkgver = r1358.84f0268 - pkgrel = 2 + pkgrel = 3 epoch = 1 url = http://anbox.io/ arch = x86_64 @@ -5,7 +5,7 @@ pkgname=anbox-git pkgver=r1358.84f0268 -pkgrel=2 +pkgrel=3 epoch=1 arch=('x86_64') url="http://anbox.io/" @@ -61,9 +61,20 @@ prepare() { truncate -s 0 cmake/FindGMock.cmake truncate -s 0 tests/CMakeLists.txt sed -i '1i\#include <cstdint>' "$srcdir/anbox/src/anbox/input/manager.cpp" - for each in lxc sdbus delayed-start desktop-dir;do - patch -p1 < "$srcdir/$each.patch" - done + + # Thanks to @bartus <arch-user-repo@bartus.33mail.com> for suggesting the patch + # checking before applying it. + # Original patch: http://ix.io/3Clr + printf '%s\n' "${source[@]%%::*}" \ + | awk -F . '/\.patch/{print $1}' \ + | while read -r patch;do + if patch --dry-run -Np1 -Rsf < "$srcdir/$patch.patch" &> /dev/null; then + warning "Patch already applied, please remove $patch.patch from source[]!" + read -t5 -p 'press enter to continue...' || true + else + patch -Np1 < "$srcdir/$patch.patch" + fi + done git submodule init git config submodule.external/cpu_features.url $srcdir/cpu_features |