aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-12-27 13:46:42 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-12-27 13:47:10 +0000
commit40ae1a200ead6ed5a5ea9f3cd24c57d663b11c4b (patch)
treecef5877f4e9438c1f355f58531783348a9412f10
parentc78919586e9f9fe1969f153a65b70e195d7e3c41 (diff)
downloadaports-40ae1a200ead6ed5a5ea9f3cd24c57d663b11c4b.tar.bz2
aports-40ae1a200ead6ed5a5ea9f3cd24c57d663b11c4b.tar.xz
main/btrfs-progs: build fix for musl
-rw-r--r--main/btrfs-progs/APKBUILD17
-rw-r--r--main/btrfs-progs/includes.patch26
2 files changed, 39 insertions, 4 deletions
diff --git a/main/btrfs-progs/APKBUILD b/main/btrfs-progs/APKBUILD
index 00c9a0d063..ea81a6593e 100644
--- a/main/btrfs-progs/APKBUILD
+++ b/main/btrfs-progs/APKBUILD
@@ -10,11 +10,17 @@ depends=""
makedepends="util-linux-dev bash attr-dev acl-dev e2fsprogs-dev zlib-dev lzo-dev"
install=
subpackages="$pkgname-doc $pkgname-dev"
-source="https://www.kernel.org/pub/linux/kernel/people/mason/btrfs-progs/btrfs-progs-v${pkgver}.tar.xz"
+source="https://www.kernel.org/pub/linux/kernel/people/mason/btrfs-progs/btrfs-progs-v${pkgver}.tar.xz
+ includes.patch"
_builddir="$srcdir"/$pkgname-v$pkgver
prepare() {
cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
}
build() {
@@ -32,6 +38,9 @@ dev() {
mv "$pkgdir"/usr/lib/*.so* "$subpkgdir"/usr/lib
}
-md5sums="cd96bb73acd864e577cddba5fe310650 btrfs-progs-v3.12.tar.xz"
-sha256sums="097e63561c91c1fbfdf99e7a60ed55b51fa0f057b3875c08413e362c93938cdf btrfs-progs-v3.12.tar.xz"
-sha512sums="655e8d9ecf297281d07312bd19a6ab942f354a370147e0ca46a22e5bcd7485ed0d415247ba21162617a23b7f9def202cab3bb5dc23ccfa96496043b48dfda785 btrfs-progs-v3.12.tar.xz"
+md5sums="cd96bb73acd864e577cddba5fe310650 btrfs-progs-v3.12.tar.xz
+e6e23724e95b3684631385c0f2898cad includes.patch"
+sha256sums="097e63561c91c1fbfdf99e7a60ed55b51fa0f057b3875c08413e362c93938cdf btrfs-progs-v3.12.tar.xz
+e4a7f8b749f11e5b7074c014a169cee83c73a7a06f53e3f9ba18e3b7d433e027 includes.patch"
+sha512sums="655e8d9ecf297281d07312bd19a6ab942f354a370147e0ca46a22e5bcd7485ed0d415247ba21162617a23b7f9def202cab3bb5dc23ccfa96496043b48dfda785 btrfs-progs-v3.12.tar.xz
+64d9ae9dd3c080a69f80fcd2986f096b881bbfb7c415abfbf7538b334a926da440c4098014a3d8f87a862524c21bc6654a98b5afde3939cefd40b8b4708f9ca1 includes.patch"
diff --git a/main/btrfs-progs/includes.patch b/main/btrfs-progs/includes.patch
new file mode 100644
index 0000000000..ae69dae492
--- /dev/null
+++ b/main/btrfs-progs/includes.patch
@@ -0,0 +1,26 @@
+diff --git a/bitops.h b/bitops.h
+index 323c571..7f30b06 100644
+--- a/bitops.h
++++ b/bitops.h
+@@ -65,6 +65,9 @@ static inline unsigned long hweight_long(unsigned long w)
+ }
+
+ #define BITOP_WORD(nr) ((nr) / BITS_PER_LONG)
++#ifndef __always_inline
++#define __always_inline inline __attribute__((always_inline))
++#endif
+
+ /**
+ * __ffs - find first bit in word.
+diff --git a/kerncompat.h b/kerncompat.h
+index 1fc2b34..e7d3ca5 100644
+--- a/kerncompat.h
++++ b/kerncompat.h
+@@ -28,6 +28,7 @@
+ #include <assert.h>
+ #include <stddef.h>
+ #include <linux/types.h>
++#include <linux/limits.h>
+
+ #ifndef READ
+ #define READ 0