aboutsummaryrefslogtreecommitdiffstats
path: root/main/abuild/0001-abuild-don-t-cd-to-builddir-unless-patches-exists.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/abuild/0001-abuild-don-t-cd-to-builddir-unless-patches-exists.patch')
-rw-r--r--main/abuild/0001-abuild-don-t-cd-to-builddir-unless-patches-exists.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/main/abuild/0001-abuild-don-t-cd-to-builddir-unless-patches-exists.patch b/main/abuild/0001-abuild-don-t-cd-to-builddir-unless-patches-exists.patch
new file mode 100644
index 0000000000..96dcb5a33f
--- /dev/null
+++ b/main/abuild/0001-abuild-don-t-cd-to-builddir-unless-patches-exists.patch
@@ -0,0 +1,40 @@
+From d413730550eb1d6fa28be5b48778f156c504d75d Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Tue, 5 Apr 2016 20:35:34 +0000
+Subject: [PATCH] abuild: don't cd to $builddir unless patches exists
+
+some packages don't have patches. We should not error if builddir is not
+set in this case.
+---
+ abuild.in | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/abuild.in b/abuild.in
+index ac43a11..d6cdf6c 100644
+--- a/abuild.in
++++ b/abuild.in
+@@ -530,8 +530,21 @@ getpkgver() {
+ fi
+ }
+
++have_patches() {
++ local i
++ for i in $source; do
++ case "$i" in
++ *.patch) return 0;;
++ esac
++ done
++ return 1
++}
++
+ default_prepare() {
+ local i
++ if ! have_patches; then
++ return 0
++ fi
+ cd "${builddir:-$srcdir/$pkgname-$pkgver}" \
+ || { error "Is \$builddir set correctly?"; return 1; }
+ for i in $source; do
+--
+2.8.0
+