From f9e2f9647688aa09980972fc3ba7e9b2dc914195 Mon Sep 17 00:00:00 2001 From: Minecrell Date: Mon, 10 Feb 2020 12:58:02 +0100 Subject: abuild: default_prepare: Apply GZIP/XZ-compressed *.patch files This allows using default_prepare to apply compressed patches, e.g. the linux-lts kernel patches (compressed using XZ). --- abuild.in | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/abuild.in b/abuild.in index 5c5f560..57c8587 100644 --- a/abuild.in +++ b/abuild.in @@ -680,7 +680,7 @@ have_patches() { local i for i in $source; do case ${i%::*} in - *.patch) return 0;; + *.patch|*.patch.gz|*.patch.xz) return 0;; esac done return 1 @@ -699,6 +699,14 @@ default_prepare() { msg "${i%::*}" patch ${patch_args:--p1} -i "$srcdir/$(filename_from_uri $i)" || return 1 ;; + *.patch.gz) + msg "${i%::*}" + gunzip -c "$srcdir/$(filename_from_uri $i)" | patch ${patch_args:--p1} || return 1 + ;; + *.patch.xz) + msg "${i%::*}" + unxz -c "$srcdir/$(filename_from_uri $i)" | patch ${patch_args:--p1} || return 1 + ;; esac done } -- cgit v1.2.3