diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2016-04-05 20:50:41 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2016-04-05 20:51:30 +0000 |
commit | d9073aee1f8b6055106d6023812dd325bc3ef6e5 (patch) | |
tree | cb8c5103702af1a6f77b50ddf0d62a4524587c1e /main/abuild | |
parent | 8f187192736faf777cc2495ea3348fb2bbe8df25 (diff) | |
download | aports-d9073aee1f8b6055106d6023812dd325bc3ef6e5.tar.bz2 aports-d9073aee1f8b6055106d6023812dd325bc3ef6e5.tar.xz |
main/abuild: fix error when there are no patches and builddir is not set
Diffstat (limited to 'main/abuild')
-rw-r--r-- | main/abuild/0001-abuild-don-t-cd-to-builddir-unless-patches-exists.patch | 40 | ||||
-rw-r--r-- | main/abuild/APKBUILD | 14 |
2 files changed, 49 insertions, 5 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 + diff --git a/main/abuild/APKBUILD b/main/abuild/APKBUILD index 2fde4faf8f..f354967522 100644 --- a/main/abuild/APKBUILD +++ b/main/abuild/APKBUILD @@ -2,7 +2,7 @@ pkgname=abuild pkgver=2.27.0 _ver=${pkgver%_git*} -pkgrel=0 +pkgrel=1 pkgdesc="Script to build Alpine Packages" url="http://git.alpinelinux.org/cgit/abuild/" arch="all" @@ -20,7 +20,8 @@ subpackages="apkbuild-cpan:cpan apkbuild-gem-resolver:gems" options="suid" pkggroups="abuild" source="http://dev.alpinelinux.org/archive/abuild/abuild-$_ver.tar.xz - " + 0001-abuild-don-t-cd-to-builddir-unless-patches-exists.patch +" _builddir="$srcdir/$pkgname-$_ver" prepare() { @@ -64,6 +65,9 @@ gems() { mv "$pkgdir"/usr/bin/apkbuild-gem-resolver "$subpkgdir"/usr/bin/ } -md5sums="c67e4c971c54b4d550e16db3ba331f96 abuild-2.27.0.tar.xz" -sha256sums="c8db017e3dd168edb20ceeb91971535cf66b8c95f29d3288f88ac755bffc60e5 abuild-2.27.0.tar.xz" -sha512sums="98e1da4e47f3ab68700b3bc992c83e103f770f3196e433788ee74145f57cd33e5239c87f0a7a15f7266840d5bad893fc8c0d4c826d663df53deaee2678c56984 abuild-2.27.0.tar.xz" +md5sums="c67e4c971c54b4d550e16db3ba331f96 abuild-2.27.0.tar.xz +3ed285c19846a4f48883ffc02b534d33 0001-abuild-don-t-cd-to-builddir-unless-patches-exists.patch" +sha256sums="c8db017e3dd168edb20ceeb91971535cf66b8c95f29d3288f88ac755bffc60e5 abuild-2.27.0.tar.xz +ba429d632056f0d5bae97867e251eaa585aa8286e064682d47b2149aa273f52f 0001-abuild-don-t-cd-to-builddir-unless-patches-exists.patch" +sha512sums="98e1da4e47f3ab68700b3bc992c83e103f770f3196e433788ee74145f57cd33e5239c87f0a7a15f7266840d5bad893fc8c0d4c826d663df53deaee2678c56984 abuild-2.27.0.tar.xz +4e448ac42576764c8813ba2f83153b7029adbc462e59e35e22ddff204fc5f125860d0c7eb3cc9beda17624a6f93dd869c79a9c21368cf1366c308c655f793a8e 0001-abuild-don-t-cd-to-builddir-unless-patches-exists.patch" |