xfsprogs: upgraded package to upstream

Upgraded sys-fs/xfsprogs to version 5.10.0-r1 on amd64, arm64

BUG=b/186803593
TEST=Presubmit
RELEASE_NOTE=Upgraded xfsprogs to version 5.10

Change-Id: I5b35524491e5fd7a3f69df3cae7e465f6403ab14
Reviewed-on: https://cos-review.googlesource.com/c/third_party/overlays/portage-stable/+/19231
Tested-by: Cusky Presubmit Bot <presubmit@cos-infra-prod.iam.gserviceaccount.com>
Reviewed-by: Robert Kolchmeyer <rkolchmeyer@google.com>
diff --git a/metadata/md5-cache/sys-fs/xfsprogs-4.14.0 b/metadata/md5-cache/sys-fs/xfsprogs-4.14.0
deleted file mode 100644
index f05da6f..0000000
--- a/metadata/md5-cache/sys-fs/xfsprogs-4.14.0
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=configure install prepare setup
-DEPEND=!static? ( >=sys-apps/util-linux-2.17.2 readline? ( sys-libs/readline:0= ) !readline? ( libedit? ( dev-libs/libedit ) ) ) !<sys-fs/xfsdump-3 static? ( >=sys-apps/util-linux-2.17.2[static-libs(+)] readline? ( sys-libs/readline:0=[static-libs(+)] ) !readline? ( libedit? ( dev-libs/libedit[static-libs(+)] ) ) readline? ( sys-libs/ncurses:0=[static-libs] ) ) nls? ( sys-devel/gettext )
-DESCRIPTION=xfs filesystem utilities
-EAPI=6
-HOMEPAGE=https://xfs.wiki.kernel.org/
-IUSE=libedit nls readline static static-libs
-KEYWORDS=*
-LICENSE=LGPL-2.1
-RDEPEND=!static? ( >=sys-apps/util-linux-2.17.2 readline? ( sys-libs/readline:0= ) !readline? ( libedit? ( dev-libs/libedit ) ) ) !<sys-fs/xfsdump-3
-REQUIRED_USE=static? ( static-libs )
-SLOT=0
-SRC_URI=https://www.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/xfsprogs-4.14.0.tar.xz
-_eclasses_=multilib	2477ebe553d3e4d2c606191fe6c33602	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb
-_md5_=752ff16998b814edbe6bec7a62c9d6f9
diff --git a/metadata/md5-cache/sys-fs/xfsprogs-4.14.0-r3 b/metadata/md5-cache/sys-fs/xfsprogs-4.14.0-r3
deleted file mode 100644
index f05da6f..0000000
--- a/metadata/md5-cache/sys-fs/xfsprogs-4.14.0-r3
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=configure install prepare setup
-DEPEND=!static? ( >=sys-apps/util-linux-2.17.2 readline? ( sys-libs/readline:0= ) !readline? ( libedit? ( dev-libs/libedit ) ) ) !<sys-fs/xfsdump-3 static? ( >=sys-apps/util-linux-2.17.2[static-libs(+)] readline? ( sys-libs/readline:0=[static-libs(+)] ) !readline? ( libedit? ( dev-libs/libedit[static-libs(+)] ) ) readline? ( sys-libs/ncurses:0=[static-libs] ) ) nls? ( sys-devel/gettext )
-DESCRIPTION=xfs filesystem utilities
-EAPI=6
-HOMEPAGE=https://xfs.wiki.kernel.org/
-IUSE=libedit nls readline static static-libs
-KEYWORDS=*
-LICENSE=LGPL-2.1
-RDEPEND=!static? ( >=sys-apps/util-linux-2.17.2 readline? ( sys-libs/readline:0= ) !readline? ( libedit? ( dev-libs/libedit ) ) ) !<sys-fs/xfsdump-3
-REQUIRED_USE=static? ( static-libs )
-SLOT=0
-SRC_URI=https://www.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/xfsprogs-4.14.0.tar.xz
-_eclasses_=multilib	2477ebe553d3e4d2c606191fe6c33602	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb
-_md5_=752ff16998b814edbe6bec7a62c9d6f9
diff --git a/metadata/md5-cache/sys-fs/xfsprogs-5.10.0-r1 b/metadata/md5-cache/sys-fs/xfsprogs-5.10.0-r1
new file mode 100644
index 0000000..6268fa3
--- /dev/null
+++ b/metadata/md5-cache/sys-fs/xfsprogs-5.10.0-r1
@@ -0,0 +1,14 @@
+BDEPEND=nls? ( sys-devel/gettext ) virtual/pkgconfig
+DEFINED_PHASES=compile configure install prepare
+DEPEND=>=sys-apps/util-linux-2.17.2 dev-libs/inih icu? ( dev-libs/icu:= ) libedit? ( dev-libs/libedit )
+DESCRIPTION=xfs filesystem utilities
+EAPI=7
+HOMEPAGE=https://xfs.wiki.kernel.org/
+IUSE=icu libedit nls split-usr
+KEYWORDS=*
+LICENSE=LGPL-2.1
+RDEPEND=>=sys-apps/util-linux-2.17.2 dev-libs/inih icu? ( dev-libs/icu:= ) libedit? ( dev-libs/libedit )
+SLOT=0
+SRC_URI=https://www.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/xfsprogs-5.10.0.tar.xz
+_eclasses_=eutils	fcb2aa98e1948b835b5ae66ca52868c5	flag-o-matic	5d5921a298e95441da2f85be419894c0	multilib	2477ebe553d3e4d2c606191fe6c33602	systemd	71fd8d2065d102753fb9e4d20eaf3e9f	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb	usr-ldscript	766f0a506b45f02361ad1b8ca205b7e1
+_md5_=9a2325843920791b2f044aafef333f90
diff --git a/sys-fs/xfsprogs/Manifest b/sys-fs/xfsprogs/Manifest
index 6616511..ed48cd0 100644
--- a/sys-fs/xfsprogs/Manifest
+++ b/sys-fs/xfsprogs/Manifest
@@ -1 +1 @@
-DIST xfsprogs-4.14.0.tar.xz 1137048 SHA256 b1b710b268bc95d6f45eca06e1262c29eb38865a19cd4404e48ba446e043b7ec SHA512 69832a1b9636dc5a77ad277122bb24bc09c71ad743c3ab5bf830d398557e63fa1477dd08c6115a53a94f01fc27e58d70268416013cc25e026baed7a74af8d506 WHIRLPOOL 0fab741a5d180be8d77cda3dcf1aaf8a77186e656dec47bf96abd97a053da73b98e80793fdb477dcf4818001d6ded19dfa095f5baf51a1106e3a06c24d09f6b6
+DIST xfsprogs-5.10.0.tar.xz 1273332 BLAKE2B 8caaa0ca8a94480f131d36b383afcf732b3a5a7a3c7927b4b4da4855fc5a0fb97a56fcebb98391a4dd0f02465868a4bd857e57eeba053a419df47d42f74bc958 SHA512 da09e687c87c4b133888dba7b4458017ec028020637ea5066be0232bf5c7da18239cc33eadd02d9b99d1c835aab38cab1ec9d45ae8b83897f9157cfcb0271fbd
diff --git a/sys-fs/xfsprogs/files/xfsprogs-4.12.0-sharedlibs.patch b/sys-fs/xfsprogs/files/xfsprogs-4.12.0-sharedlibs.patch
deleted file mode 100644
index cb59d44..0000000
--- a/sys-fs/xfsprogs/files/xfsprogs-4.12.0-sharedlibs.patch
+++ /dev/null
@@ -1,81 +0,0 @@
---- xfsprogs-4.12.0/include/buildmacros
-+++ xfsprogs-4.12.0/include/buildmacros
-@@ -70,18 +70,9 @@
- # /usr/lib.
- ifeq ($(ENABLE_SHARED),yes)
- INSTALL_LTLIB_DEV = \
--	cd $(TOPDIR)/$(LIBNAME)/.libs; \
--	../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
--	../$(INSTALL) -m 644 -T old_lib $(LIBNAME).lai $(PKG_LIB_DIR); \
--	../$(INSTALL) -m 644 $(LIBNAME).lai $(PKG_LIB_DIR)/$(LIBNAME).la ; \
--	../$(INSTALL) -m 755 -d $(PKG_ROOT_LIB_DIR); \
--	../$(INSTALL) -T so_base $(LIBNAME).lai $(PKG_ROOT_LIB_DIR); \
--	if [ "x$(shell readlink -f $(PKG_LIB_DIR))" != \
--	     "x$(shell readlink -f $(PKG_ROOT_LIB_DIR))" ]; then \
--		../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).a $(PKG_ROOT_LIB_DIR)/$(LIBNAME).a; \
--		../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).la $(PKG_ROOT_LIB_DIR)/$(LIBNAME).la; \
--		../$(INSTALL) -S $(PKG_ROOT_LIB_DIR)/$(LIBNAME).so $(PKG_LIB_DIR)/$(LIBNAME).so; \
--	fi
-+	set -e; cd $(TOPDIR)/$(LIBNAME); \
-+	$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
-+	env -uDIST_ROOT $(LTINSTALL) $(TOPDIR)/$(LIBNAME)/$(LIBNAME).la $(DIST_ROOT)$(PKG_LIB_DIR)/$(LIBNAME).la
- else
- INSTALL_LTLIB_DEV = $(INSTALL_LTLIB_STATIC)
- endif
---- xfsprogs-4.12.0/libhandle/Makefile
-+++ xfsprogs-4.12.0/libhandle/Makefile
-@@ -24,7 +24,6 @@
- include $(BUILDRULES)
- 
- install: default
--	$(INSTALL_LTLIB)
- 
- install-dev: default
- 	$(INSTALL_LTLIB_DEV)
---- xfsprogs-4.12.0/libxcmd/Makefile
-+++ xfsprogs-4.12.0/libxcmd/Makefile
-@@ -34,6 +34,9 @@
- 
- include $(BUILDRULES)
- 
--install install-dev: default
-+install: default
-+
-+install-dev: default
-+	$(INSTALL_LTLIB_DEV)
- 
- -include .ltdep
---- xfsprogs-4.12.0/libxfs/Makefile
-+++ xfsprogs-4.12.0/libxfs/Makefile
-@@ -151,6 +151,7 @@
- 
- install-dev: install
- 	$(INSTALL) -m 644 $(PKGHFILES) $(PKG_INC_DIR)
-+	$(INSTALL_LTLIB_DEV)
- 
- # We need to install the headers before building the dependencies.  If we
- # include the .ltdep file, the makefile decides that it needs to build the
---- xfsprogs-4.12.0/libxlog/Makefile
-+++ xfsprogs-4.12.0/libxlog/Makefile
-@@ -19,6 +19,9 @@
- 
- include $(BUILDRULES)
- 
--install install-dev: default
-+install: default
-+
-+install-dev: default
-+	$(INSTALL_LTLIB_DEV)
- 
- -include .ltdep
---- xfsprogs-4.12.0/Makefile
-+++ xfsprogs-4.12.0/Makefile
-@@ -89,6 +89,8 @@
- copy: libxlog
- mkfs: libxcmd
- spaceman: libxcmd
-+libxlog: libxfs
-+libxlog-install-dev: libxfs-install-dev
- 
- ifeq ($(HAVE_BUILDDEFS), yes)
- include $(BUILDRULES)
diff --git a/sys-fs/xfsprogs/files/xfsprogs-4.14-copy_file_rage.patch b/sys-fs/xfsprogs/files/xfsprogs-4.14-copy_file_rage.patch
deleted file mode 100644
index 77eacce..0000000
--- a/sys-fs/xfsprogs/files/xfsprogs-4.14-copy_file_rage.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-This backports an upstream patch to fix build time issue with glibc 2.27
-commit 8041435de7ed028a27ecca64302945ad455c69a6
-Author: Darrick J. Wong <darrick.wong@oracle.com>
-Date:   Mon Feb 5 14:38:02 2018 -0600
-
-    xfs_io: fix copy_file_range symbol name collision
-    
-    glibc 2.27 has a copy_file_range wrapper, so we need to change our
-    internal function out of the way to avoid compiler warnings.
-    
-    Reported-by: fredrik@crux.nu
-    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-    Reviewed-by: Eric Sandeen <sandeen@redhat.com>
-    Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
-
-diff --git a/io/copy_file_range.c b/io/copy_file_range.c
-index d1dfc5a5..99fba20a 100644
---- a/io/copy_file_range.c
-+++ b/io/copy_file_range.c
-@@ -42,13 +42,18 @@ copy_range_help(void)
- "));
- }
- 
-+/*
-+ * Issue a raw copy_file_range syscall; for our test program we don't want the
-+ * glibc buffered copy fallback.
-+ */
- static loff_t
--copy_file_range(int fd, loff_t *src, loff_t *dst, size_t len)
-+copy_file_range_cmd(int fd, loff_t *src, loff_t *dst, size_t len)
- {
- 	loff_t ret;
- 
- 	do {
--		ret = syscall(__NR_copy_file_range, fd, src, file->fd, dst, len, 0);
-+		ret = syscall(__NR_copy_file_range, fd, src, file->fd, dst,
-+				len, 0);
- 		if (ret == -1) {
- 			perror("copy_range");
- 			return errno;
-@@ -130,7 +135,7 @@ copy_range_f(int argc, char **argv)
- 		copy_dst_truncate();
- 	}
- 
--	ret = copy_file_range(fd, &src, &dst, len);
-+	ret = copy_file_range_cmd(fd, &src, &dst, len);
- 	close(fd);
- 	return ret;
- }
diff --git a/sys-fs/xfsprogs/files/xfsprogs-4.14.0-BUILD_CC-fsmap.patch b/sys-fs/xfsprogs/files/xfsprogs-4.14.0-BUILD_CC-fsmap.patch
deleted file mode 100644
index 8bf1c6c..0000000
--- a/sys-fs/xfsprogs/files/xfsprogs-4.14.0-BUILD_CC-fsmap.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 34ff47a4e48ac0f387e7bb185a28dafa786d6538 Mon Sep 17 00:00:00 2001
-From: Brian Norris <briannorris@chromium.org>
-Date: Thu, 6 Sep 2018 11:28:13 -0700
-Subject: [PATCH] build: don't assume $BUILD_CC has fsmap.h just because $CC
- does
-
-The $BUILD_CC toolchain might have an older set of Linux headers than
-the $CC toolchain. It's generally unsafe to try to build both with the
-same definitions, but in particular, this one can cause compilation
-failures in the local crc32selftest build:
-
- In file included from crc32.c:37:
- In file included from ../include/xfs.h:37:
- ../include/xfs/linux.h:226:11: fatal error: 'linux/fsmap.h' file not found
- # include <linux/fsmap.h>
-           ^~~~~~~~~~~~~~~
-
-It's safe to always assume that the headers don't have getfsmap, since
-the alternative just includes our local definitions anyway.
-
-Signed-off-by: Brian Norris <briannorris@chromium.org>
----
-Submitted upstream:
-  http://lkml.kernel.org/m/20180906183529.117251-1-briannorris@chromium.org
-
- include/builddefs.in | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/include/builddefs.in b/include/builddefs.in
-index f7d39a4e4094..209abe1d84dd 100644
---- a/include/builddefs.in
-+++ b/include/builddefs.in
-@@ -156,8 +156,9 @@ endif
- ifeq ($(NEED_INTERNAL_FSXATTR),yes)
- PCFLAGS+= -DOVERRIDE_SYSTEM_FSXATTR
- endif
-+# Don't assume $BUILD_CC has getfsmap just because $CC does.
- ifeq ($(HAVE_GETFSMAP),yes)
--PCFLAGS+= -DHAVE_GETFSMAP
-+CFLAGS+= -DHAVE_GETFSMAP
- endif
- 
- LIBICU_LIBS = @libicu_LIBS@
--- 
-2.19.0.rc2.392.g5ba43deb5a-goog
-
diff --git a/sys-fs/xfsprogs/files/xfsprogs-4.15.0-docdir.patch b/sys-fs/xfsprogs/files/xfsprogs-4.15.0-docdir.patch
new file mode 100644
index 0000000..53ba3ec
--- /dev/null
+++ b/sys-fs/xfsprogs/files/xfsprogs-4.15.0-docdir.patch
@@ -0,0 +1,11 @@
+--- xfsprogs-4.15.0/scrub/Makefile
++++ xfsprogs-4.15.0/scrub/Makefile
+@@ -25,7 +25,7 @@
+ CRONTABS = xfs_scrub_all.cron
+ OPTIONAL_TARGETS += $(CRONTABS)
+ # Don't enable the crontab by default for now
+-CROND_DIR = $(PKG_LIB_DIR)/$(PKG_NAME)
++CROND_DIR = $(PKG_DOC_DIR)
+ endif
+ 
+ endif	# scrub_prereqs
diff --git a/sys-fs/xfsprogs/files/xfsprogs-4.7.0-libxcmd-link.patch b/sys-fs/xfsprogs/files/xfsprogs-4.7.0-libxcmd-link.patch
deleted file mode 100644
index 77ded53..0000000
--- a/sys-fs/xfsprogs/files/xfsprogs-4.7.0-libxcmd-link.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From d01d3689fd512811b9d860598ddf26089bb5955c Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Tue, 9 Aug 2016 22:37:45 +0800
-Subject: [PATCH xfsprogs] libxcmd: link against used libs
-
-Since this lib uses symbols from libxfs (platform_findsizes) and many
-symbols from libblkid, link against both.  Otherwise, the resulting
-shared lib has missing symbols which makes linking against annoying.
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- libxcmd/Makefile | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/libxcmd/Makefile b/libxcmd/Makefile
-index aab8d6d63624..46ba138a37e2 100644
---- a/libxcmd/Makefile
-+++ b/libxcmd/Makefile
-@@ -12,6 +12,8 @@ LT_AGE = 0
- 
- CFILES = command.c input.c paths.c projects.c help.c quit.c topology.c
- 
-+LTLIBS = $(LIBXFS) $(LIBBLKID)
-+
- ifeq ($(HAVE_GETMNTENT),yes)
- LCFLAGS += -DHAVE_GETMNTENT
- endif
--- 
-2.9.0
-
diff --git a/sys-fs/xfsprogs/files/xfsprogs-4.9.0-underlinking.patch b/sys-fs/xfsprogs/files/xfsprogs-4.9.0-underlinking.patch
deleted file mode 100644
index e6904a5..0000000
--- a/sys-fs/xfsprogs/files/xfsprogs-4.9.0-underlinking.patch
+++ /dev/null
@@ -1,30 +0,0 @@
- libxfs/Makefile  | 2 +-
- libxlog/Makefile | 2 ++
- 2 files changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/libxfs/Makefile b/libxfs/Makefile
-index 6499731..00447c4 100644
---- a/libxfs/Makefile
-+++ b/libxfs/Makefile
-@@ -113,7 +113,7 @@ LSRCFILES += gen_crc32table.c
- 
- FCFLAGS = -I.
- 
--LTLIBS = $(LIBPTHREAD) $(LIBRT)
-+LTLIBS = $(LIBPTHREAD) $(LIBRT) $(LIBUUID)
- 
- # don't try linking xfs_repair with a debug libxfs.
- DEBUG = -DNDEBUG
-diff --git a/libxlog/Makefile b/libxlog/Makefile
-index 3417eed..fda1343 100644
---- a/libxlog/Makefile
-+++ b/libxlog/Makefile
-@@ -12,6 +12,8 @@ LT_AGE = 0
- 
- CFILES = xfs_log_recover.c util.c
- 
-+LTLIBS = $(LIBUUID)
-+
- # don't want to link xfs_repair with a debug libxlog.
- DEBUG = -DNDEBUG
- 
diff --git a/sys-fs/xfsprogs/files/xfsprogs-5.3.0-libdir.patch b/sys-fs/xfsprogs/files/xfsprogs-5.3.0-libdir.patch
new file mode 100644
index 0000000..f943817
--- /dev/null
+++ b/sys-fs/xfsprogs/files/xfsprogs-5.3.0-libdir.patch
@@ -0,0 +1,28 @@
+In Gentoo we install libs to /usr/lib* and let gen_usr_ldscript
+handle /lib*.
+
+--- a/include/buildmacros
++++ b/include/buildmacros
+@@ -57,9 +57,10 @@ endif
+ ifeq ($(ENABLE_SHARED),yes)
+ INSTALL_LTLIB = \
+ 	cd $(TOPDIR)/$(LIBNAME)/.libs; \
+-	../$(INSTALL) -m 755 -d $(PKG_ROOT_LIB_DIR); \
+-	../$(INSTALL) -m 755 -T so_dot_version $(LIBNAME).lai $(PKG_ROOT_LIB_DIR); \
+-	../$(INSTALL) -T so_dot_current $(LIBNAME).lai $(PKG_ROOT_LIB_DIR)
++	../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
++	../$(INSTALL) -m 755 -T so_dot_version $(LIBNAME).lai $(PKG_LIB_DIR); \
++	../$(INSTALL) -T so_dot_current $(LIBNAME).lai $(PKG_LIB_DIR); \
++	../$(INSTALL) -T so_base $(LIBNAME).lai $(PKG_LIB_DIR)
+ endif
+ 
+ # Libtool thinks the static and shared libs should be in the same dir, so
+@@ -68,7 +69,7 @@ endif
+ # Other things want the shared libs to appear in /usr/lib, else they'll
+ # link with the static libs there.  So, another symlink to get the .so into
+ # /usr/lib.
+-ifeq ($(ENABLE_SHARED),yes)
++ifeq ($(ENABLE_SHARED_HANDLED_BY_gen_usr_ldscript),yes)
+ INSTALL_LTLIB_DEV = \
+ 	cd $(TOPDIR)/$(LIBNAME)/.libs; \
+ 	../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
diff --git a/sys-fs/xfsprogs/xfsprogs-4.14.0-r3.ebuild b/sys-fs/xfsprogs/xfsprogs-4.14.0-r3.ebuild
deleted file mode 120000
index 2e5b2f7..0000000
--- a/sys-fs/xfsprogs/xfsprogs-4.14.0-r3.ebuild
+++ /dev/null
@@ -1 +0,0 @@
-xfsprogs-4.14.0.ebuild
\ No newline at end of file
diff --git a/sys-fs/xfsprogs/xfsprogs-4.14.0.ebuild b/sys-fs/xfsprogs/xfsprogs-4.14.0.ebuild
deleted file mode 100644
index d060bc7..0000000
--- a/sys-fs/xfsprogs/xfsprogs-4.14.0.ebuild
+++ /dev/null
@@ -1,96 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit toolchain-funcs multilib
-
-DESCRIPTION="xfs filesystem utilities"
-HOMEPAGE="https://xfs.wiki.kernel.org/"
-SRC_URI="https://www.kernel.org/pub/linux/utils/fs/xfs/${PN}/${P}.tar.xz"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="*"
-IUSE="libedit nls readline static static-libs"
-REQUIRED_USE="static? ( static-libs )"
-
-LIB_DEPEND=">=sys-apps/util-linux-2.17.2[static-libs(+)]
-	readline? ( sys-libs/readline:0=[static-libs(+)] )
-	!readline? ( libedit? ( dev-libs/libedit[static-libs(+)] ) )"
-RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
-	!<sys-fs/xfsdump-3"
-DEPEND="${RDEPEND}
-	static? (
-		${LIB_DEPEND}
-		readline? ( sys-libs/ncurses:0=[static-libs] )
-	)
-	nls? ( sys-devel/gettext )"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-4.12.0-sharedlibs.patch
-	"${FILESDIR}"/${PN}-4.7.0-libxcmd-link.patch
-	"${FILESDIR}"/${PN}-4.9.0-underlinking.patch
-	"${FILESDIR}"/${PN}-4.14.0-BUILD_CC-fsmap.patch
-	"${FILESDIR}"/${PN}-4.14-copy_file_rage.patch
-)
-
-pkg_setup() {
-	if use readline && use libedit ; then
-		ewarn "You have USE='readline libedit' but these are exclusive."
-		ewarn "Defaulting to readline; please disable this USE flag if you want libedit."
-	fi
-}
-
-src_prepare() {
-	default
-
-	# LLDFLAGS is used for programs, so apply -all-static when USE=static is enabled.
-	# Clear out -static from all flags since we want to link against dynamic xfs libs.
-	sed -i \
-		-e "/^PKG_DOC_DIR/s:@pkg_name@:${PF}:" \
-		-e "1iLLDFLAGS += $(usex static '-all-static' '')" \
-		include/builddefs.in || die
-	find -name Makefile -exec \
-		sed -i -r -e '/^LLDFLAGS [+]?= -static(-libtool-libs)?$/d' {} +
-
-	# TODO: Write a patch for configure.ac to use pkg-config for the uuid-part.
-	if use static && use readline ; then
-		sed -i \
-			-e 's|-lreadline|& -lncurses|' \
-			-e 's|-lblkid|& -luuid|' \
-			configure || die
-	fi
-}
-
-src_configure() {
-	export DEBUG=-DNDEBUG
-	export OPTIMIZER=${CFLAGS}
-	unset PLATFORM # if set in user env, this breaks configure
-
-	local myconf=(
-		$(use_enable nls gettext)
-		$(use_enable readline)
-		$(usex readline --disable-editline $(use_enable libedit editline))
-	)
-	if use static || use static-libs ; then
-		myconf+=( --enable-static )
-	else
-		myconf+=( --disable-static )
-	fi
-
-	econf "${myconf[@]}"
-
-	MAKEOPTS+=" V=1"
-}
-
-src_install() {
-	emake DIST_ROOT="${ED}" install
-	# parallel install fails on this target for >=xfsprogs-3.2.0
-	emake -j1 DIST_ROOT="${ED}" install-dev
-
-	# handle is for xfsdump, the rest for xfsprogs
-	gen_usr_ldscript -a handle xcmd xfs xlog
-	# removing unnecessary .la files if not needed
-	use static-libs || find "${ED}" -name '*.la' -delete
-}
diff --git a/sys-fs/xfsprogs/xfsprogs-5.10.0-r1.ebuild b/sys-fs/xfsprogs/xfsprogs-5.10.0-r1.ebuild
new file mode 100644
index 0000000..0ded40f
--- /dev/null
+++ b/sys-fs/xfsprogs/xfsprogs-5.10.0-r1.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic toolchain-funcs systemd usr-ldscript
+
+DESCRIPTION="xfs filesystem utilities"
+HOMEPAGE="https://xfs.wiki.kernel.org/"
+SRC_URI="https://www.kernel.org/pub/linux/utils/fs/xfs/${PN}/${P}.tar.xz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="*"
+IUSE="icu libedit nls"
+
+RDEPEND=">=sys-apps/util-linux-2.17.2
+	dev-libs/inih
+	icu? ( dev-libs/icu:= )
+	libedit? ( dev-libs/libedit )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	nls? ( sys-devel/gettext )
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-4.15.0-docdir.patch
+	"${FILESDIR}"/${PN}-5.3.0-libdir.patch
+)
+
+src_prepare() {
+	default
+
+	# Fix doc dir
+	sed -i \
+		-e "/^PKG_DOC_DIR/s:@pkg_name@:${PF}:" \
+		include/builddefs.in || die
+
+	# Don't install compressed docs
+	sed 's@\(CHANGES\)\.gz[[:space:]]@\1 @' -i doc/Makefile || die
+}
+
+src_configure() {
+	# include/builddefs.in will add FCFLAGS to CFLAGS which will
+	# unnecessarily clutter CFLAGS (and fortran isn't used)
+	unset FCFLAGS
+
+	export DEBUG=-DNDEBUG
+
+	# Package is honoring CFLAGS; No need to use OPTIMIZER anymore.
+	# However, we have to provide an empty value to avoid default
+	# flags.
+	export OPTIMIZER=" "
+
+	unset PLATFORM # if set in user env, this breaks configure
+
+	# Avoid automagic on libdevmapper, #709694
+	export ac_cv_search_dm_task_create=no
+
+	# Build fails with -O3 (bug #712698)
+	replace-flags -O3 -O2
+
+	# Upstream does NOT support --disable-static anymore,
+	# https://www.spinics.net/lists/linux-xfs/msg30185.html
+	# https://www.spinics.net/lists/linux-xfs/msg30272.html
+	local myconf=(
+		--enable-blkid
+		--with-crond-dir="${EPREFIX}/etc/cron.d"
+		--with-systemd-unit-dir="$(systemd_get_systemunitdir)"
+		$(use_enable icu libicu)
+		$(use_enable nls gettext)
+		$(use_enable libedit editline)
+	)
+
+	if is-flagq -flto ; then
+		myconf+=( --enable-lto )
+	else
+		myconf+=( --disable-lto )
+	fi
+
+	econf "${myconf[@]}"
+}
+
+src_compile() {
+	emake V=1
+}
+
+src_install() {
+	emake DIST_ROOT="${ED}" HAVE_ZIPPED_MANPAGES=false install
+	emake DIST_ROOT="${ED}" HAVE_ZIPPED_MANPAGES=false install-dev
+
+	gen_usr_ldscript -a handle
+}