diff options
author | Timo Teräs <timo.teras@iki.fi> | 2013-09-27 14:15:47 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2013-09-27 14:22:26 +0000 |
commit | ee152f9e0dce8017d033e01e018f1482d27e7e1d (patch) | |
tree | aca69f666c035a941be50683f7784b726d67fe55 | |
parent | 99b94bcdf468a789c7ba70e26da623a974df9e2a (diff) | |
download | aports-ee152f9e0dce8017d033e01e018f1482d27e7e1d.tar.bz2 aports-ee152f9e0dce8017d033e01e018f1482d27e7e1d.tar.xz |
main/squashfs-tools: fix build against musl
-rw-r--r-- | main/squashfs-tools/APKBUILD | 25 | ||||
-rw-r--r-- | main/squashfs-tools/fix-compat.patch | 36 |
2 files changed, 57 insertions, 4 deletions
diff --git a/main/squashfs-tools/APKBUILD b/main/squashfs-tools/APKBUILD index 7d5c7cd543..e2de2d3de7 100644 --- a/main/squashfs-tools/APKBUILD +++ b/main/squashfs-tools/APKBUILD @@ -1,17 +1,29 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=squashfs-tools pkgver=4.2 -pkgrel=1 +pkgrel=2 pkgdesc="Tools for squashfs, a highly compressed read-only filesystem for Linux." url="http://squashfs.sourceforge.net" arch="all" license="GPL" depends= makedepends="zlib-dev xz-dev lzo-dev attr-dev" -source="http://downloads.sourceforge.net/sourceforge/squashfs/squashfs$pkgver.tar.gz" +source="http://downloads.sourceforge.net/sourceforge/squashfs/squashfs$pkgver.tar.gz + fix-compat.patch" + +_builddir="$srcdir/squashfs$pkgver/$pkgname" + +prepare() { + cd "$_builddir"/.. + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} build() { - cd "$srcdir"/squashfs$pkgver/$pkgname + cd "$_builddir" make XZ_SUPPORT=1 LZO_SUPPORT=1 } @@ -20,4 +32,9 @@ package() { mkdir -p "$pkgdir"/sbin cp -a mksquashfs unsquashfs "$pkgdir"/sbin } -md5sums="1b7a781fb4cf8938842279bd3e8ee852 squashfs4.2.tar.gz" +md5sums="1b7a781fb4cf8938842279bd3e8ee852 squashfs4.2.tar.gz +da3de5c99f6ef34f83a88a066447eac0 fix-compat.patch" +sha256sums="d9e0195aa922dbb665ed322b9aaa96e04a476ee650f39bbeadb0d00b24022e96 squashfs4.2.tar.gz +1b10b07691253a97dba93d6a80220b59d2a4be21e306e3ea91265690570a4ed2 fix-compat.patch" +sha512sums="4b69c5d3008803347d0ce7628957e3873c9ebd799662b25dfb739afb6a1ce97bdd02b0465ac4d949bc38af2155880ac068209dc638b94e5c86a8011ec3a00de0 squashfs4.2.tar.gz +9532d29e06a691c0628cff21bb4a361d5e6f888adbeef150f52ab65f20678e3ada0a60489d73eba6f0ca8b3eab4c18baf87c6d24c23da0cf81afacf940d1eb91 fix-compat.patch" diff --git a/main/squashfs-tools/fix-compat.patch b/main/squashfs-tools/fix-compat.patch new file mode 100644 index 0000000000..2ecb17176f --- /dev/null +++ b/main/squashfs-tools/fix-compat.patch @@ -0,0 +1,36 @@ +--- squashfs4.2.orig/squashfs-tools/mksquashfs.c ++++ squashfs4.2/squashfs-tools/mksquashfs.c +@@ -60,6 +60,10 @@ + #include <sys/sysinfo.h> + #endif + ++#if !defined(FNM_EXTMATCH) ++#define FNM_EXTMATCH 0 ++#endif ++ + #ifdef SQUASHFS_TRACE + #define TRACE(s, args...) \ + do { \ +--- squashfs4.2.orig/squashfs-tools/pseudo.c ++++ squashfs4.2/squashfs-tools/pseudo.c +@@ -32,6 +32,7 @@ + #include <stdlib.h> + #include <sys/types.h> + #include <sys/wait.h> ++#include <sys/stat.h> + + #include "pseudo.h" + +--- squashfs4.2.orig/squashfs-tools/unsquashfs.c ++++ squashfs4.2/squashfs-tools/unsquashfs.c +@@ -32,6 +32,10 @@ + #include <sys/sysinfo.h> + #include <sys/types.h> + ++#ifndef FNM_EXTMATCH ++#define FNM_EXTMATCH 0 ++#endif ++ + struct cache *fragment_cache, *data_cache; + struct queue *to_reader, *to_deflate, *to_writer, *from_writer; + pthread_t *thread, *deflator_thread; |