diff --git a/testing/xfsdump/APKBUILD b/testing/xfsdump/APKBUILD new file mode 100644 index 00000000000..639da3b0fe5 --- /dev/null +++ b/testing/xfsdump/APKBUILD @@ -0,0 +1,46 @@ +# Contributor: Adam Thiede +# Maintainer: Adam Thiede +pkgname=xfsdump +pkgver=3.2.0 +pkgrel=0 +pkgdesc="xfs filesystem utilities" +url="https://mirrors.edge.kernel.org/pub/linux/utils/fs/xfs/xfsdump/" +arch="all" +license="GPL-2.0-only" +depends="xfsprogs" +makedepends=" + attr-dev + bash + intltool + libtool + libuuid + linux-headers + musl-libintl + ncurses-dev + util-linux-dev + xfsprogs-dev +" +subpackages="$pkgname-doc" +source=" + https://mirrors.edge.kernel.org/pub/linux/utils/fs/xfs/xfsdump/xfsdump-$pkgver.tar.xz + basename.patch +" +# patch from +# https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-fs/xfsdump/files/xfsdump-3.1.12-mimic-basename-for-nonglibc.patch +options="!check" # no tests + +build() { + CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE" + ./configure --prefix=/usr + make + +} + +package() { + make DESTDIR="$pkgdir" install +} + +sha512sums=" +339317a92d7fda3e63b292db5e8a6d4a107a7f2ec269d54c109b6ade2f76cd823fb53db7a3a7e8a6c4883d6ce5626c7bc85fef6741f44699a4a8dfecfaa5231f xfsdump-3.2.0.tar.xz +e7f3799d9ac55eaf173abcf47d92a4a19bcf4acd90b414dd5324863b9c58bd047702149a73bd911966313e9149f454de17cccd963003adc9cc1234ef6c7bd549 basename.patch +" diff --git a/testing/xfsdump/basename.patch b/testing/xfsdump/basename.patch new file mode 100644 index 00000000000..4edd1c80dda --- /dev/null +++ b/testing/xfsdump/basename.patch @@ -0,0 +1,43 @@ +https://bugs.gentoo.org/937495 +From: Brahmajit Das +Date: Tue, 3 Sep 2024 06:14:54 +0000 +Subject: [PATCH 1/1] xfsdump: Mimic GNU basename() API for non-glibc library + e.g. musl + +musl only provides POSIX version of basename and it has also removed +providing it via string.h header [1] which now results in compile errors +with newer compilers e.g. clang-18 + +[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 + +Please also reffer: https://bugs.gentoo.org/937495 + +Signed-off-by: Brahmajit Das +--- a/common/main.c ++++ b/common/main.c +@@ -77,6 +77,9 @@ + #define MINSTACKSZ 0x02000000 + #define MAXSTACKSZ 0x08000000 + ++#if !defined(__GLIBC__) ++#define basename(src) (strrchr(src, '/') ? strrchr(src, '/') + 1 : src) ++#endif + + /* declarations of externally defined global symbols *************************/ + +--- a/invutil/invidx.c ++++ b/invutil/invidx.c +@@ -41,6 +41,10 @@ + #include "stobj.h" + #include "timeutil.h" + ++#if !defined(__GLIBC__) ++#define basename(src) (strrchr(src, '/') ? strrchr(src, '/') + 1 : src) ++#endif ++ + invidx_fileinfo_t *invidx_file; + int invidx_numfiles; + +-- +2.46.0 +