diff --git a/squashfs-tools/0001-fix-cygwin.patch b/squashfs-tools/0001-fix-cygwin.patch new file mode 100644 index 00000000..4ce2c9ad --- /dev/null +++ b/squashfs-tools/0001-fix-cygwin.patch @@ -0,0 +1,22 @@ +--- squashfs-tools-4.7/squashfs-tools/nprocessors_compat.c.orig 2025-06-03 21:09:33.000000000 +0200 ++++ squashfs-tools-4.7/squashfs-tools/nprocessors_compat.c 2025-07-10 19:30:14.754787900 +0200 +@@ -23,7 +23,7 @@ + + static int processors = -1; + +-#ifdef __linux__ ++#if defined(__linux__) || defined(__CYGWIN__) + #include + #include + +--- squashfs-tools-4.7/squashfs-tools/print_pager.h.orig 2025-07-10 19:33:03.683114600 +0200 ++++ squashfs-tools-4.7/squashfs-tools/print_pager.h 2025-07-10 19:32:33.860852300 +0200 +@@ -23,6 +23,8 @@ + * print_pager.h + */ + ++#include ++ + #define TRUE 1 + #define FALSE 0 + diff --git a/squashfs-tools/PKGBUILD b/squashfs-tools/PKGBUILD new file mode 100644 index 00000000..30281c61 --- /dev/null +++ b/squashfs-tools/PKGBUILD @@ -0,0 +1,64 @@ +# Maintainer: Christoph Reiter + +pkgname=squashfs-tools +pkgver=4.7 +pkgrel=1 +pkgdesc='Tools for squashfs, a highly compressed read-only filesystem for Linux' +arch=(i686 x86_64) +url='https://github.com/plougher/squashfs-tools' +license=(spdx:GPL-2.0-or-later) +depends=( + gcc-libs + liblz4 + liblzo2 + liblzma + zlib + libzstd +) +makedepends=( + gcc + make + liblz4-devel + liblzo2-devel + liblzma-devel + zlib-devel + libzstd-devel + help2man +) +source=("https://github.com/plougher/squashfs-tools/archive/$pkgver/$pkgname-$pkgver.tar.gz" + "0001-fix-cygwin.patch") +sha256sums=('f1605ef720aa0b23939a49ef4491f6e734333ccc4bda4324d330da647e105328' + '9947c28d2745be50e762c3472c54cdac972da9d37dfe9ec2eec1c70c9cb4eb0f') + +prepare() { + cd "$pkgname-$pkgver" + + patch -p1 -i "$srcdir/0001-fix-cygwin.patch" +} + +build() { + local make_options=( + GZIP_SUPPORT=1 + LZ4_SUPPORT=1 + LZMA_XZ_SUPPORT=1 + LZO_SUPPORT=1 + XATTR_SUPPORT=1 + XZ_SUPPORT=1 + ZSTD_SUPPORT=1 + -C $pkgname-$pkgver/$pkgname + ) + + make "${make_options[@]}" +} + +package() { + local make_options=( + INSTALL_PREFIX="$pkgdir/usr" + INSTALL_MANPAGES_DIR='$(INSTALL_PREFIX)/share/man/man1' + install + -C "$pkgname-$pkgver/$pkgname" + ) + + make "${make_options[@]}" + install -vDm 644 "$pkgname-$pkgver/Documentation/${pkgver}"/* -t "$pkgdir/usr/share/doc/$pkgname/" +}