From 30d36452b689a5bc950559638a06c8996a3b2b61 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 28 Dec 2014 08:10:43 +0100 Subject: [PATCH] squashfs-tools: unbreak musl builds (patch from Alpine). --- .../squashfs-tools/patches/fix-compat.patch | 46 +++++++++++++++++++ srcpkgs/squashfs-tools/template | 6 +-- 2 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 srcpkgs/squashfs-tools/patches/fix-compat.patch diff --git a/srcpkgs/squashfs-tools/patches/fix-compat.patch b/srcpkgs/squashfs-tools/patches/fix-compat.patch new file mode 100644 index 00000000000..91ebfd97af3 --- /dev/null +++ b/srcpkgs/squashfs-tools/patches/fix-compat.patch @@ -0,0 +1,46 @@ +--- squashfs-tools/action.c ++++ squashfs-tools/action.c +@@ -1905,6 +1905,9 @@ + return 1; + } + ++#ifndef FNM_EXTMATCH ++#define FNM_EXTMATCH 0 ++#endif + + TEST_FN(name, ACTION_ALL_LNK, \ + return fnmatch(atom->argv[0], action_data->name, +--- squashfs-tools/mksquashfs.c ++++ squashfs-tools/mksquashfs.c +@@ -4391,6 +4391,9 @@ + return paths; + } + ++#ifndef FNM_EXTMATCH ++#define FNM_EXTMATCH 0 ++#endif + + int excluded_match(char *name, struct pathname *path, struct pathnames **new) + { +--- squashfs-tools/pseudo.c ++++ squashfs-tools/pseudo.c +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + #include + + #include "pseudo.h" +--- squashfs-tools/unsquashfs.c ++++ squashfs-tools/unsquashfs.c +@@ -1410,6 +1410,9 @@ + free(paths); + } + ++#ifndef FNM_EXTMATCH ++#define FNM_EXTMATCH 0 ++#endif + + int matches(struct pathnames *paths, char *name, struct pathnames **new) + { diff --git a/srcpkgs/squashfs-tools/template b/srcpkgs/squashfs-tools/template index 916231d548c..9e87b905c0f 100644 --- a/srcpkgs/squashfs-tools/template +++ b/srcpkgs/squashfs-tools/template @@ -1,7 +1,7 @@ # Template file for 'squashfs-tools' pkgname=squashfs-tools version=4.3 -revision=1 +revision=2 wrksrc="squashfs${version}" makedepends="zlib-devel lzo-devel liblzma-devel" license="GPL" @@ -16,6 +16,6 @@ do_build() { make -C ${pkgname} ${makejobs} XZ_SUPPORT=1 LZO_SUPPORT=1 LZMA_XZ_SUPPORT=1 } do_install() { - vmkdir usr/bin - install -m755 ${pkgname}/{mk,un}squashfs ${DESTDIR}/usr/bin + vbin ${pkgname}/mksquashfs + vbin ${pkgname}/unsquashfs }