From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1009843-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id ADBD0138331
	for <garchives@archives.gentoo.org>; Fri, 16 Mar 2018 13:21:19 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 6636BE087D;
	Fri, 16 Mar 2018 13:21:18 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 25E4CE087D
	for <gentoo-commits@lists.gentoo.org>; Fri, 16 Mar 2018 13:21:17 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 3F237335C7F
	for <gentoo-commits@lists.gentoo.org>; Fri, 16 Mar 2018 13:21:16 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 8E71D1F1
	for <gentoo-commits@lists.gentoo.org>; Fri, 16 Mar 2018 13:21:14 +0000 (UTC)
From: "Anthony G. Basile" <blueness@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" <blueness@gentoo.org>
Message-ID: <1521206413.2b8ff64eab59a5a9e6408301e914b7e781105192.blueness@gentoo>
Subject: [gentoo-commits] proj/musl:master commit in: sys-fs/xfsprogs/files/, sys-fs/xfsprogs/
X-VCS-Repository: proj/musl
X-VCS-Files: sys-fs/xfsprogs/Manifest sys-fs/xfsprogs/files/xfsprogs-4.11.0-musl.patch sys-fs/xfsprogs/files/xfsprogs-4.12.0-fix_musl.patch sys-fs/xfsprogs/files/xfsprogs-4.12.0-sharedlibs.patch sys-fs/xfsprogs/files/xfsprogs-4.3.0-cross-compile.patch sys-fs/xfsprogs/files/xfsprogs-4.3.0-musl.patch sys-fs/xfsprogs/files/xfsprogs-4.3.0-sharedlibs.patch sys-fs/xfsprogs/files/xfsprogs-4.5.0-linguas.patch sys-fs/xfsprogs/files/xfsprogs-4.7.0-libxcmd-link.patch sys-fs/xfsprogs/files/xfsprogs-4.7.0-sharedlibs.patch sys-fs/xfsprogs/files/xfsprogs-4.9.0-cross-compile.patch sys-fs/xfsprogs/files/xfsprogs-4.9.0-musl.patch sys-fs/xfsprogs/files/xfsprogs-4.9.0-underlinking.patch sys-fs/xfsprogs/metadata.xml sys-fs/xfsprogs/xfsprogs-4.12.0.ebuild sys-fs/xfsprogs/xfsprogs-4.13.1.ebuild sys-fs/xfsprogs/xfsprogs-4.5.0.ebuild sys-fs/xfsprogs/xfsprogs-4.9.0.ebuild
X-VCS-Directories: sys-fs/xfsprogs/ sys-fs/xfsprogs/files/
X-VCS-Committer: blueness
X-VCS-Committer-Name: Anthony G. Basile
X-VCS-Revision: 2b8ff64eab59a5a9e6408301e914b7e781105192
X-VCS-Branch: master
Date: Fri, 16 Mar 2018 13:21:14 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: e2cd1381-ed14-48ba-a5ae-8c72dd48d479
X-Archives-Hash: 56d5730e7a83c0d0ba7a7239c462d989

commit:     2b8ff64eab59a5a9e6408301e914b7e781105192
Author:     stefson <herrtimson <AT> yahoo <DOT> de>
AuthorDate: Fri Mar  9 11:06:12 2018 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Fri Mar 16 13:20:13 2018 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=2b8ff64e

sys-fs/xfsprogs: all relevant bugs fixed upstream with 4.14, which is stable on all musl arches

 sys-fs/xfsprogs/Manifest                           |   4 -
 sys-fs/xfsprogs/files/xfsprogs-4.11.0-musl.patch   |  71 --------
 .../xfsprogs/files/xfsprogs-4.12.0-fix_musl.patch  | 117 -------------
 .../files/xfsprogs-4.12.0-sharedlibs.patch         |  81 ---------
 .../files/xfsprogs-4.3.0-cross-compile.patch       | 181 ---------------------
 sys-fs/xfsprogs/files/xfsprogs-4.3.0-musl.patch    | 131 ---------------
 .../xfsprogs/files/xfsprogs-4.3.0-sharedlibs.patch |  80 ---------
 sys-fs/xfsprogs/files/xfsprogs-4.5.0-linguas.patch |  32 ----
 .../files/xfsprogs-4.7.0-libxcmd-link.patch        |  30 ----
 .../xfsprogs/files/xfsprogs-4.7.0-sharedlibs.patch |  81 ---------
 .../files/xfsprogs-4.9.0-cross-compile.patch       | 143 ----------------
 sys-fs/xfsprogs/files/xfsprogs-4.9.0-musl.patch    |  71 --------
 .../files/xfsprogs-4.9.0-underlinking.patch        |  30 ----
 sys-fs/xfsprogs/metadata.xml                       |   8 -
 sys-fs/xfsprogs/xfsprogs-4.12.0.ebuild             |  97 -----------
 sys-fs/xfsprogs/xfsprogs-4.13.1.ebuild             |  96 -----------
 sys-fs/xfsprogs/xfsprogs-4.5.0.ebuild              | 104 ------------
 sys-fs/xfsprogs/xfsprogs-4.9.0.ebuild              |  97 -----------
 18 files changed, 1454 deletions(-)

diff --git a/sys-fs/xfsprogs/Manifest b/sys-fs/xfsprogs/Manifest
deleted file mode 100644
index bb002f7..0000000
--- a/sys-fs/xfsprogs/Manifest
+++ /dev/null
@@ -1,4 +0,0 @@
-DIST xfsprogs-4.12.0.tar.xz 1128400 SHA256 b330ad8d737f4152ae511580102e2fc49212bb51dfb4b614084344abae46d0df SHA512 1dc4a0a5f40baf1d6398c8f07b4cb3ab796cf052c34b811d60b08c60a4700c2ced8d4d1adb878f8b85ba58cf3e1276db1477109de538fd427d3e359a52f59d4a WHIRLPOOL c18d3c9dfab8ccb877eb6fa9fa05be3c614a587c6cb616a9f18b52debb8ecacbd22056cb397ff9e69407c66e105d034458b41f0ba4275352f31398e64d303c02
-DIST xfsprogs-4.13.1.tar.xz 1133556 SHA256 8c64d349d191e24c84eeb1611be767e4a11b81016bd5b73f3a20a0bf39dd3536 SHA512 6c234a6c22aa3cabe0ea698c11175dca6c19d803989127ccb13b526ff6d34dcef9dd6e19ff0c4fb3903078f24210a8cfcd0508dac29d52fbee4dfed37d5888f3 WHIRLPOOL 89a84ce7b59fa52cd245493a28c6ad7f6e114dfe8044b2dad57b2cc626308ad1187ef812ace618085a083745acd3c37538903a6e2f935d9cd351c923559d9732
-DIST xfsprogs-4.5.0.tar.gz 1524382 SHA256 e49beb314984efbd0d758abb5c6137db3bb60a88e59e1e94c00defb536cf89f8 SHA512 19c95551dc91ec46916f9a7e3d7976907664d32dd5fdc26af0ca62ca74c4b3c10f9e843aac8214ea9d1c0bf140c9f4e321d059808af01a623abedd5067011314 WHIRLPOOL 54d742635df024a63181da76c3220671610068363af85be2677521f20342595a5cebb2fd169945572351901ee2c9384f79f54a381ab3620dde22d863aa66d469
-DIST xfsprogs-4.9.0.tar.xz 1087940 SHA256 f1e60a9a54583dba82fa506dd9b59bdec110a968f80f507bf5f93b263af7a4df SHA512 990946f0a34381f57afb39bcda0ff539e18af4de2ecc19c833ffd4fb7c22c25b501091c1f0953db103a62204d952c9eecba21f22f3c5910286456da65fb09fa7 WHIRLPOOL a9b582a42967ce1e314cd0ac3518792c2e10f7bb1370151a68a09a8e21e40cc6818b9778dfdd248961c3a1a08a70424f0150219488a18bc5d60e5669702c472f

diff --git a/sys-fs/xfsprogs/files/xfsprogs-4.11.0-musl.patch b/sys-fs/xfsprogs/files/xfsprogs-4.11.0-musl.patch
deleted file mode 100644
index 6db6c65..0000000
--- a/sys-fs/xfsprogs/files/xfsprogs-4.11.0-musl.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-diff -Naur xfsprogs-4.11.0.orig/fsr/xfs_fsr.c xfsprogs-4.11.0/fsr/xfs_fsr.c
---- xfsprogs-4.11.0.orig/fsr/xfs_fsr.c	2017-05-05 11:47:11.000000000 -0700
-+++ xfsprogs-4.11.0/fsr/xfs_fsr.c	2017-05-19 09:33:36.408832645 -0700
-@@ -36,6 +36,9 @@
- #define _PATH_FSRLAST		"/var/tmp/.fsrlast_xfs"
- #define _PATH_PROC_MOUNTS	"/proc/mounts"
- 
-+#ifndef _PATH_MOUNTED
-+#define _PATH_MOUNTED MOUNTED
-+#endif
- 
- char *progname;
- 
-diff -Naur xfsprogs-4.11.0.orig/include/linux.h xfsprogs-4.11.0/include/linux.h
---- xfsprogs-4.11.0.orig/include/linux.h	2017-05-05 11:47:11.000000000 -0700
-+++ xfsprogs-4.11.0/include/linux.h	2017-05-19 09:33:36.409832654 -0700
-@@ -40,6 +40,32 @@
- # undef fsxattr
- #endif
- 
-+#ifndef __uint8_t
-+# define __uint8_t uint8_t
-+#endif
-+#ifndef __uint16_t
-+# define __uint16_t uint16_t
-+#endif
-+#ifndef __uint32_t
-+# define __uint32_t uint32_t
-+#endif
-+#ifndef __uint64_t
-+# define __uint64_t uint64_t
-+#endif
-+
-+#ifndef __int8_t
-+# define __int8_t int8_t
-+#endif
-+#ifndef __int16_t
-+# define __int16_t int16_t
-+#endif
-+#ifndef __int32_t
-+# define __int32_t int32_t
-+#endif
-+#ifndef __int64_t
-+# define __int64_t int64_t
-+#endif
-+ 
- static __inline__ int xfsctl(const char *path, int fd, int cmd, void *p)
- {
- 	return ioctl(fd, cmd, p);
-diff -Naur xfsprogs-4.11.0.orig/io/readdir.c xfsprogs-4.11.0/io/readdir.c
---- xfsprogs-4.11.0.orig/io/readdir.c	2017-05-05 11:47:11.000000000 -0700
-+++ xfsprogs-4.11.0/io/readdir.c	2017-05-19 09:34:45.156466211 -0700
-@@ -24,6 +24,18 @@
- #include <sys/types.h>
- #include <dirent.h>
- 
-+#if defined (__linux__)
-+# ifndef _DIRENT_HAVE_D_OFF
-+#  define _DIRENT_HAVE_D_OFF
-+# endif
-+# ifndef _DIRENT_HAVE_D_RECLEN
-+#  define _DIRENT_HAVE_D_RECLEN
-+# endif
-+# ifndef _DIRENT_HAVE_D_TYPE
-+#  define _DIRENT_HAVE_D_TYPE
-+# endif
-+#endif
-+
- #ifndef _DIRENT_HAVE_D_RECLEN
- #include <string.h>
- #endif

diff --git a/sys-fs/xfsprogs/files/xfsprogs-4.12.0-fix_musl.patch b/sys-fs/xfsprogs/files/xfsprogs-4.12.0-fix_musl.patch
deleted file mode 100644
index efc57e4..0000000
--- a/sys-fs/xfsprogs/files/xfsprogs-4.12.0-fix_musl.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-From 21253610f9ef87db8e2a75b863b7fcfbd0cdb421 Mon Sep 17 00:00:00 2001
-From: "Darrick J. Wong" <darrick.wong@oracle.com>
-Date: Tue, 25 Jul 2017 13:45:01 -0500
-Subject: [PATCH] In patch 4944defad4 ("xfs_db: redirect printfs when
- metadumping to stdout"), we solved the problem of xfs_db printfs ending up in
- the metadump stream by reassigning stdout for the duration of a stdout
- metadump.  Unfortunately, musl doesn't allow stdout to be reassigned (in
- their view "extern FILE *stdout" means "extern FILE * const stdout"), so we
- abandon the old approach in favor of playing games with dup() to switch the
- raw file descriptors.
-
-While we're at it, fix a regression where an unconverted outf test
-allows progress info to end up in the metadump stream.
-
-Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
----
- db/metadump.c | 47 ++++++++++++++++++++++++++++++++++++-----------
- 1 file changed, 36 insertions(+), 11 deletions(-)
-
-diff --git a/db/metadump.c b/db/metadump.c
-index 96641e0..4e2f648 100644
---- a/db/metadump.c
-+++ b/db/metadump.c
-@@ -78,6 +78,7 @@ static int		obfuscate = 1;
- static int		zero_stale_data = 1;
- static int		show_warnings = 0;
- static int		progress_since_warning = 0;
-+static bool		stdout_metadump;
- 
- void
- metadump_init(void)
-@@ -137,7 +138,7 @@ print_progress(const char *fmt, ...)
- 	va_end(ap);
- 	buf[sizeof(buf)-1] = '\0';
- 
--	f = (outf == stdout) ? stderr : stdout;
-+	f = stdout_metadump ? stderr : stdout;
- 	fprintf(f, "\r%-59s", buf);
- 	fflush(f);
- 	progress_since_warning = 1;
-@@ -2750,7 +2751,8 @@ metadump_f(
- 	xfs_agnumber_t	agno;
- 	int		c;
- 	int		start_iocur_sp;
--	bool		stdout_metadump = false;
-+	int		outfd = -1;
-+	int		ret;
- 	char		*p;
- 
- 	exitcode = 1;
-@@ -2870,16 +2872,35 @@ metadump_f(
- 		 * metadump operation so that dbprintf and other messages
- 		 * are sent to the console instead of polluting the
- 		 * metadump stream.
-+		 *
-+		 * We get to do this the hard way because musl doesn't
-+		 * allow reassignment of stdout.
- 		 */
--		outf = stdout;
--		stdout = stderr;
-+		fflush(stdout);
-+		outfd = dup(STDOUT_FILENO);
-+		if (outfd < 0) {
-+			perror("opening dump stream");
-+			goto out;
-+		}
-+		ret = dup2(STDERR_FILENO, STDOUT_FILENO);
-+		if (ret < 0) {
-+			perror("redirecting stdout");
-+			close(outfd);
-+			goto out;
-+		}
-+		outf = fdopen(outfd, "a");
-+		if (outf == NULL) {
-+			fprintf(stderr, "cannot create dump stream\n");
-+			dup2(outfd, 1);
-+			close(outfd);
-+			goto out;
-+		}
- 		stdout_metadump = true;
- 	} else {
- 		outf = fopen(argv[optind], "wb");
- 		if (outf == NULL) {
- 			print_warning("cannot create dump file");
--			free(metablock);
--			return 0;
-+			goto out;
- 		}
- 	}
- 
-@@ -2907,15 +2928,19 @@ metadump_f(
- 	if (progress_since_warning)
- 		fputc('\n', stdout_metadump ? stderr : stdout);
- 
--	if (stdout_metadump)
--		stdout = outf;
--	else
--		fclose(outf);
-+	if (stdout_metadump) {
-+		fflush(outf);
-+		fflush(stdout);
-+		ret = dup2(outfd, STDOUT_FILENO);
-+		if (ret < 0)
-+			perror("un-redirecting stdout");
-+	}
-+	fclose(outf);
- 
- 	/* cleanup iocur stack */
- 	while (iocur_sp > start_iocur_sp)
- 		pop_cur();
--
-+out:
- 	free(metablock);
- 
- 	return 0;
--- 
-2.13.3

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.3.0-cross-compile.patch b/sys-fs/xfsprogs/files/xfsprogs-4.3.0-cross-compile.patch
deleted file mode 100644
index c545664..0000000
--- a/sys-fs/xfsprogs/files/xfsprogs-4.3.0-cross-compile.patch
+++ /dev/null
@@ -1,181 +0,0 @@
-From 1a366eedc0eb4da46da48e9f6e2da27c7b5d2076 Mon Sep 17 00:00:00 2001
-From: Gwendal Grignou <gwendal@chromium.org>
-Date: Fri, 3 Jun 2016 09:17:28 -0700
-Subject: [PATCH] Allow compiling xfsprogs in a cross compile environment.
-
-Without this patch, we are using the same compiler and options for the host
-compiler (BUILD_CC) and the target compiler (CC), and we would get error
-messages at compilation:
-x86_64-pc-linux-gnu-gcc -O2 -O2 -pipe -march=armv7-a -mtune=cortex-a15 ...
-x86_64-pc-linux-gnu-gcc.real: error: unrecognized command line option
-'-mfpu=neon'
-'-mfloat-abi=hard'
-'-clang-syntax'
-'-mfpu=neon'
-'-mfloat-abi=hard'
-'-clang-syntax'
-
-Add BUILD_CC and BUILD_CFLAGS as precious variables to allow setting it up
-from the ebuild.
-
-Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
----
- configure            | 26 +++++++++++++++++++++-----
- configure.ac         | 20 +++++++++++++++-----
- include/builddefs.in |  6 ++++--
- libxfs/Makefile      |  4 ++--
- 4 files changed, 42 insertions(+), 14 deletions(-)
-
-diff --git a/configure b/configure
-index 325081f..863a447 100755
---- a/configure
-+++ b/configure
-@@ -700,6 +700,7 @@ libreadline
- enable_blkid
- enable_gettext
- enable_shared
-+BUILD_CFLAGS
- BUILD_CC
- CPP
- LT_SYS_LIBRARY_PATH
-@@ -806,7 +807,9 @@ LDFLAGS
- LIBS
- CPPFLAGS
- LT_SYS_LIBRARY_PATH
--CPP'
-+CPP
-+BUILD_CC
-+BUILD_CFLAGS'
- 
- 
- # Initialize some variables set by options.
-@@ -1456,6 +1459,9 @@ Some influential environment variables:
-   LT_SYS_LIBRARY_PATH
-               User-defined run-time library search path.
-   CPP         C preprocessor
-+  BUILD_CC    C compiler for build tools
-+  BUILD_CFLAGS
-+              C compiler flags for build tools
- 
- Use these variables to override the choices made by `configure' or to help
- it to find libraries and programs with nonstandard names/locations.
-@@ -11957,11 +11963,12 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_c_compiler_gnu
- 
--if test $cross_compiling = no; then
--  BUILD_CC="$CC"
- 
--else
--  for ac_prog in gcc cc
-+if test "${BUILD_CC+set}" != "set"; then
-+  if test $cross_compiling = no; then
-+    BUILD_CC="$CC"
-+  else
-+    for ac_prog in gcc cc
- do
-   # Extract the first word of "$ac_prog", so it can be a program name with args.
- set dummy $ac_prog; ac_word=$2
-@@ -12003,6 +12010,15 @@ fi
-   test -n "$BUILD_CC" && break
- done
- 
-+  fi
-+fi
-+
-+if test "${BUILD_CFLAGS+set}" != "set"; then
-+  if test $cross_compiling = no; then
-+    BUILD_CFLAGS="$CFLAGS"
-+  else
-+    BUILD_CFLAGS="-g -O2"
-+  fi
- fi
- 
- # Check whether --enable-shared was given.
-diff --git a/configure.ac b/configure.ac
-index d44438f..fc286b3 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -9,11 +9,21 @@ AC_PREFIX_DEFAULT(/usr)
- AC_PROG_LIBTOOL
- 
- AC_PROG_CC
--if test $cross_compiling = no; then
--  BUILD_CC="$CC"
--  AC_SUBST(BUILD_CC)
--else
--  AC_CHECK_PROGS(BUILD_CC, gcc cc)
-+AC_ARG_VAR(BUILD_CC, [C compiler for build tools])
-+if test "${BUILD_CC+set}" != "set"; then
-+  if test $cross_compiling = no; then
-+    BUILD_CC="$CC"
-+  else
-+    AC_CHECK_PROGS(BUILD_CC, gcc cc)
-+  fi
-+fi
-+AC_ARG_VAR(BUILD_CFLAGS, [C compiler flags for build tools])
-+if test "${BUILD_CFLAGS+set}" != "set"; then
-+  if test $cross_compiling = no; then
-+    BUILD_CFLAGS="$CFLAGS"
-+  else
-+    BUILD_CFLAGS="-g -O2"
-+  fi
- fi
- 
- AC_ARG_ENABLE(shared,
-diff --git a/include/builddefs.in b/include/builddefs.in
-index c2ca4cb..9ca57a6 100644
---- a/include/builddefs.in
-+++ b/include/builddefs.in
-@@ -27,6 +27,7 @@ MALLOCLIB = @malloc_lib@
- LOADERFLAGS = @LDFLAGS@
- LTLDFLAGS = @LDFLAGS@
- CFLAGS = @CFLAGS@
-+BUILD_CFLAGS = @BUILD_CFLAGS@
- 
- LIBRT = @librt@
- LIBUUID = @libuuid@
-@@ -150,7 +151,7 @@ PCFLAGS+= -DENABLE_BLKID
- endif
- 
- 
--GCFLAGS = $(OPTIMIZER) $(DEBUG) \
-+GCFLAGS = $(DEBUG) \
- 	  -DVERSION=\"$(PKG_VERSION)\" -DLOCALEDIR=\"$(PKG_LOCALE_DIR)\"  \
- 	  -DPACKAGE=\"$(PKG_NAME)\" -I$(TOPDIR)/include -I$(TOPDIR)/libxfs
- 
-@@ -158,8 +159,9 @@ ifeq ($(ENABLE_GETTEXT),yes)
- GCFLAGS += -DENABLE_GETTEXT
- endif
- 
-+BUILD_CFLAGS += $(GCFLAGS) $(PCFLAGS)
- # First, Global, Platform, Local CFLAGS
--CFLAGS += $(FCFLAGS) $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)
-+CFLAGS += $(FCFLAGS) $(OPTIMIZER) $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)
- 
- include $(TOPDIR)/include/buildmacros
- 
-diff --git a/libxfs/Makefile b/libxfs/Makefile
-index 873d4ec..8d728c0 100644
---- a/libxfs/Makefile
-+++ b/libxfs/Makefile
-@@ -111,7 +111,7 @@ default: crc32selftest ltdepend $(LTLIBRARY)
- 
- crc32table.h: gen_crc32table.c
- 	@echo "    [CC]     gen_crc32table"
--	$(Q) $(BUILD_CC) $(CFLAGS) -o gen_crc32table $<
-+	$(Q) $(BUILD_CC) $(BUILD_CFLAGS) -o gen_crc32table $<
- 	@echo "    [GENERATE] $@"
- 	$(Q) ./gen_crc32table > crc32table.h
- 
-@@ -122,7 +122,7 @@ crc32table.h: gen_crc32table.c
- # disk.
- crc32selftest: gen_crc32table.c crc32table.h crc32.c
- 	@echo "    [TEST]    CRC32"
--	$(Q) $(BUILD_CC) $(CFLAGS) -D CRC32_SELFTEST=1 crc32.c -o $@
-+	$(Q) $(BUILD_CC) $(BUILD_CFLAGS) -D CRC32_SELFTEST=1 crc32.c -o $@
- 	$(Q) ./$@
- 
- # set up include/xfs header directory
--- 
-2.8.0.rc3.226.g39d4020

diff --git a/sys-fs/xfsprogs/files/xfsprogs-4.3.0-musl.patch b/sys-fs/xfsprogs/files/xfsprogs-4.3.0-musl.patch
deleted file mode 100644
index f9c9a5d..0000000
--- a/sys-fs/xfsprogs/files/xfsprogs-4.3.0-musl.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-diff -Naurw xfsprogs-4.3.0.orig/fsr/xfs_fsr.c xfsprogs-4.3.0/fsr/xfs_fsr.c
---- xfsprogs-4.3.0.orig/fsr/xfs_fsr.c	2015-11-22 20:24:24.000000000 -0800
-+++ xfsprogs-4.3.0/fsr/xfs_fsr.c	2015-11-24 13:41:38.876680281 -0800
-@@ -39,6 +39,9 @@
- #define _PATH_FSRLAST		"/var/tmp/.fsrlast_xfs"
- #define _PATH_PROC_MOUNTS	"/proc/mounts"
- 
-+#ifndef _PATH_MOUNTED
-+# define _PATH_MOUNTED MOUNTED
-+#endif
- 
- char *progname;
- 
-diff -Naurw xfsprogs-4.3.0.orig/include/linux.h xfsprogs-4.3.0/include/linux.h
---- xfsprogs-4.3.0.orig/include/linux.h	2015-11-10 11:54:46.000000000 -0800
-+++ xfsprogs-4.3.0/include/linux.h	2015-11-24 14:16:02.070075093 -0800
-@@ -31,6 +31,34 @@
- #include <stdbool.h>
- #include <asm/types.h>
- #include <mntent.h>
-+#include <fcntl.h>
-+#include <stdio.h>
-+
-+#ifndef __uint8_t
-+# define __uint8_t uint8_t
-+#endif
-+#ifndef __uint16_t
-+# define __uint16_t uint16_t
-+#endif
-+#ifndef __uint32_t
-+# define __uint32_t uint32_t
-+#endif
-+#ifndef __uint64_t
-+# define __uint64_t uint64_t
-+#endif
-+
-+#ifndef __int8_t
-+# define __int8_t int8_t
-+#endif
-+#ifndef __int16_t
-+# define __int16_t int16_t
-+#endif
-+#ifndef __int32_t
-+# define __int32_t int32_t
-+#endif
-+#ifndef __int64_t
-+# define __int64_t int64_t
-+#endif
- 
- static __inline__ int xfsctl(const char *path, int fd, int cmd, void *p)
- {
-diff -Naurw xfsprogs-4.3.0.orig/io/readdir.c xfsprogs-4.3.0/io/readdir.c
---- xfsprogs-4.3.0.orig/io/readdir.c	2015-08-23 16:14:11.000000000 -0700
-+++ xfsprogs-4.3.0/io/readdir.c	2015-11-24 13:44:06.086684668 -0800
-@@ -24,6 +24,18 @@
- #include <sys/types.h>
- #include <dirent.h>
- 
-+#if defined (__linux__)
-+# ifndef _DIRENT_HAVE_D_OFF
-+#  define _DIRENT_HAVE_D_OFF
-+# endif
-+# ifndef _DIRENT_HAVE_D_RECLEN
-+#  define _DIRENT_HAVE_D_RECLEN
-+# endif
-+# ifndef _DIRENT_HAVE_D_TYPE
-+#  define _DIRENT_HAVE_D_TYPE
-+# endif
-+#endif
-+
- static struct cmdinfo readdir_cmd;
- 
- const char *d_type_str(unsigned int type)
-diff -Naurw xfsprogs-4.3.0.orig/libxfs/linux.c xfsprogs-4.3.0/libxfs/linux.c
---- xfsprogs-4.3.0.orig/libxfs/linux.c	2015-08-02 17:39:42.000000000 -0700
-+++ xfsprogs-4.3.0/libxfs/linux.c	2015-11-24 13:51:06.340030523 -0800
-@@ -16,11 +16,8 @@
-  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-  */
- 
--#define ustat __kernel_ustat
- #include <mntent.h>
- #include <sys/stat.h>
--#undef ustat
--#include <sys/ustat.h>
- #include <sys/mount.h>
- #include <sys/ioctl.h>
- #include <sys/sysinfo.h>
-@@ -51,9 +48,12 @@
- int
- platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose)
- {
--	/* Pad ust; pre-2.6.28 linux copies out too much in 32bit compat mode */
--	struct ustat	ust[2];
- 	struct stat64	st;
-+        FILE            *f;
-+        struct stat64   mst;
-+        struct mntent   *mnt;
-+        char            mounts[MAXPATHLEN];
-+        int             ismounted = 0;
- 
- 	if (!s) {
- 		if (stat64(block, &st) < 0)
-@@ -63,14 +63,24 @@
- 		s = &st;
- 	}
- 
--	if (ustat(s->st_rdev, ust) >= 0) {
-+        strcpy(mounts, (!access(PROC_MOUNTED, R_OK)) ? PROC_MOUNTED : MOUNTED);
-+        if ((f = setmntent(mounts, "r")) == NULL)
-+                return 0;
-+
-+        while ((mnt = getmntent(f)) != NULL) {
-+                if (stat64(mnt->mnt_dir, &mst) < 0)
-+                        continue;
-+                if (mst.st_dev != s->st_rdev)
-+                        continue;
- 		if (verbose)
- 			fprintf(stderr,
- 				_("%s: %s contains a mounted filesystem\n"),
- 				progname, name);
--		return 1;
-+		ismounted = 1;
-+                break;
- 	}
--	return 0;
-+        endmntent(f);
-+        return ismounted;
- }
- 
- int

diff --git a/sys-fs/xfsprogs/files/xfsprogs-4.3.0-sharedlibs.patch b/sys-fs/xfsprogs/files/xfsprogs-4.3.0-sharedlibs.patch
deleted file mode 100644
index a39af0d..0000000
--- a/sys-fs/xfsprogs/files/xfsprogs-4.3.0-sharedlibs.patch
+++ /dev/null
@@ -1,80 +0,0 @@
---- xfsprogs-4.3.0/include/buildmacros
-+++ xfsprogs-4.3.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.3.0/libxcmd/Makefile
-+++ xfsprogs-4.3.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.3.0/libxfs/Makefile
-+++ xfsprogs-4.3.0/libxfs/Makefile
-@@ -138,6 +138,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.3.0/libxlog/Makefile
-+++ xfsprogs-4.3.0/libxlog/Makefile
-@@ -12,6 +12,8 @@
- 
- CFILES = xfs_log_recover.c util.c
- 
-+LTLIBS = $(LIBUUID) $(LIBXFS)
-+
- # don't want to link xfs_repair with a debug libxlog.
- DEBUG = -DNDEBUG
- 
-@@ -19,6 +21,9 @@
- 
- include $(BUILDRULES)
- 
--install install-dev: default
-+install: default
-+
-+install-dev: default
-+	$(INSTALL_LTLIB_DEV)
- 
- -include .ltdep
---- xfsprogs-4.3.0/Makefile
-+++ xfsprogs-4.3.0/Makefile
-@@ -82,6 +82,8 @@
- quota: libxcmd
- repair: libxlog
- copy: libxlog
-+libxlog: libxfs
-+libxlog-install-dev: libxfs-install-dev
- 
- ifeq ($(HAVE_BUILDDEFS), yes)
- include $(BUILDRULES)

diff --git a/sys-fs/xfsprogs/files/xfsprogs-4.5.0-linguas.patch b/sys-fs/xfsprogs/files/xfsprogs-4.5.0-linguas.patch
deleted file mode 100644
index 9912e49..0000000
--- a/sys-fs/xfsprogs/files/xfsprogs-4.5.0-linguas.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 2212e8bb59e7c3930d49da2ec5f4f0a9ceb086c7 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Fri, 8 Apr 2016 16:41:31 -0400
-Subject: [PATCH] po: respect LINGUAS build setting
-
-It is common gettext practice to limit the translations a particular
-package will include by setting the LINGUAS environment variable.
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- po/Makefile | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/po/Makefile b/po/Makefile
-index edf92ad..a5250b3 100644
---- a/po/Makefile
-+++ b/po/Makefile
-@@ -6,7 +6,10 @@ TOPDIR = ..
- include $(TOPDIR)/include/builddefs
- 
- POTHEAD = $(PKG_NAME).pot
--LINGUAS = de pl
-+# If the user has requested a specific set of translations, only build those.
-+SUPPORTED_LINGUAS = $(patsubst %.po,%,$(wildcard *.po))
-+LINGUAS ?= $(SUPPORTED_LINGUAS)
-+LINGUAS := $(filter $(SUPPORTED_LINGUAS),$(LINGUAS))
- LSRCFILES = $(LINGUAS:%=%.po)
- LDIRT = $(POTHEAD)
- 
--- 
-2.7.4
-

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.7.0-sharedlibs.patch b/sys-fs/xfsprogs/files/xfsprogs-4.7.0-sharedlibs.patch
deleted file mode 100644
index b5395ff..0000000
--- a/sys-fs/xfsprogs/files/xfsprogs-4.7.0-sharedlibs.patch
+++ /dev/null
@@ -1,81 +0,0 @@
---- xfsprogs-4.7.0/include/buildmacros
-+++ xfsprogs-4.7.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.7.0/libhandle/Makefile
-+++ xfsprogs-4.7.0/libhandle/Makefile
-@@ -24,7 +24,6 @@
- include $(BUILDRULES)
- 
- install: default
--	$(INSTALL_LTLIB)
- 
- install-dev: default
- 	$(INSTALL_LTLIB_DEV)
---- xfsprogs-4.7.0/libxcmd/Makefile
-+++ xfsprogs-4.7.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.7.0/libxfs/Makefile
-+++ xfsprogs-4.7.0/libxfs/Makefile
-@@ -138,6 +138,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.7.0/libxlog/Makefile
-+++ xfsprogs-4.7.0/libxlog/Makefile
-@@ -19,6 +21,9 @@
- 
- include $(BUILDRULES)
- 
--install install-dev: default
-+install: default
-+
-+install-dev: default
-+	$(INSTALL_LTLIB_DEV)
- 
- -include .ltdep
---- xfsprogs-4.7.0/Makefile
-+++ xfsprogs-4.7.0/Makefile
-@@ -83,6 +83,8 @@
- repair: libxlog libxcmd
- copy: libxlog
- mkfs: libxcmd
-+libxlog: libxfs
-+libxlog-install-dev: libxfs-install-dev
- 
- ifeq ($(HAVE_BUILDDEFS), yes)
- include $(BUILDRULES)

diff --git a/sys-fs/xfsprogs/files/xfsprogs-4.9.0-cross-compile.patch b/sys-fs/xfsprogs/files/xfsprogs-4.9.0-cross-compile.patch
deleted file mode 100644
index fade102..0000000
--- a/sys-fs/xfsprogs/files/xfsprogs-4.9.0-cross-compile.patch
+++ /dev/null
@@ -1,143 +0,0 @@
---- xfsprogs-4.9.0/configure
-+++ xfsprogs-4.9.0/configure
-@@ -861,6 +861,7 @@
- enable_blkid
- enable_gettext
- enable_shared
-+BUILD_CFLAGS
- BUILD_CC
- CPP
- OTOOL64
-@@ -960,7 +961,9 @@
- LDFLAGS
- LIBS
- CPPFLAGS
--CPP'
-+CPP
-+BUILD_CC
-+BUILD_CFLAGS'
- 
- 
- # Initialize some variables set by options.
-@@ -1616,6 +1619,9 @@
-   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
-               you have headers in a nonstandard directory <include dir>
-   CPP         C preprocessor
-+  BUILD_CC    C compiler for build tools
-+  BUILD_CFLAGS
-+              C compiler flags for build tools
- 
- Use these variables to override the choices made by `configure' or to help
- it to find libraries and programs with nonstandard names/locations.
-@@ -11116,11 +11122,12 @@
- ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_c_compiler_gnu
- 
--if test $cross_compiling = no; then
--  BUILD_CC="$CC"
- 
--else
--  for ac_prog in gcc cc
-+if test "${BUILD_CC+set}" != "set"; then
-+  if test $cross_compiling = no; then
-+    BUILD_CC="$CC"
-+  else
-+    for ac_prog in gcc cc
- do
-   # Extract the first word of "$ac_prog", so it can be a program name with args.
- set dummy $ac_prog; ac_word=$2
-@@ -11162,6 +11169,15 @@
-   test -n "$BUILD_CC" && break
- done
- 
-+  fi
-+fi
-+
-+if test "${BUILD_CFLAGS+set}" != "set"; then
-+  if test $cross_compiling = no; then
-+    BUILD_CFLAGS="$CFLAGS"
-+  else
-+    BUILD_CFLAGS="-g -O2"
-+  fi
- fi
- 
- # Check whether --enable-shared was given.
---- xfsprogs-4.9.0/configure.ac
-+++ xfsprogs-4.9.0/configure.ac
-@@ -9,11 +9,21 @@
- AC_PROG_LIBTOOL
- 
- AC_PROG_CC
--if test $cross_compiling = no; then
--  BUILD_CC="$CC"
--  AC_SUBST(BUILD_CC)
--else
--  AC_CHECK_PROGS(BUILD_CC, gcc cc)
-+AC_ARG_VAR(BUILD_CC, [C compiler for build tools])
-+if test "${BUILD_CC+set}" != "set"; then
-+  if test $cross_compiling = no; then
-+    BUILD_CC="$CC"
-+  else
-+    AC_CHECK_PROGS(BUILD_CC, gcc cc)
-+  fi
-+fi
-+AC_ARG_VAR(BUILD_CFLAGS, [C compiler flags for build tools])
-+if test "${BUILD_CFLAGS+set}" != "set"; then
-+  if test $cross_compiling = no; then
-+    BUILD_CFLAGS="$CFLAGS"
-+  else
-+    BUILD_CFLAGS="-g -O2"
-+  fi
- fi
- 
- AC_ARG_ENABLE(shared,
---- xfsprogs-4.9.0/include/builddefs.in
-+++ xfsprogs-4.9.0/include/builddefs.in
-@@ -26,6 +26,7 @@
- LOADERFLAGS = @LDFLAGS@
- LTLDFLAGS = @LDFLAGS@
- CFLAGS = @CFLAGS@ -D_FILE_OFFSET_BITS=64
-+BUILD_CFLAGS = @BUILD_CFLAGS@ -D_FILE_OFFSET_BITS=64
- 
- LIBRT = @librt@
- LIBUUID = @libuuid@
-@@ -154,7 +155,7 @@
- endif
- 
- 
--GCFLAGS = $(OPTIMIZER) $(DEBUG) \
-+GCFLAGS = $(DEBUG) \
- 	  -DVERSION=\"$(PKG_VERSION)\" -DLOCALEDIR=\"$(PKG_LOCALE_DIR)\"  \
- 	  -DPACKAGE=\"$(PKG_NAME)\" -I$(TOPDIR)/include -I$(TOPDIR)/libxfs
- 
-@@ -162,8 +163,9 @@
- GCFLAGS += -DENABLE_GETTEXT
- endif
- 
-+BUILD_CFLAGS += $(GCFLAGS) $(PCFLAGS)
- # First, Global, Platform, Local CFLAGS
--CFLAGS += $(FCFLAGS) $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)
-+CFLAGS += $(FCFLAGS) $(OPTIMIZER) $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)
- 
- include $(TOPDIR)/include/buildmacros
- 
---- xfsprogs-4.9.0/libxfs/Makefile
-+++ xfsprogs-4.9.0/libxfs/Makefile
-@@ -124,7 +124,7 @@
- 
- crc32table.h: gen_crc32table.c
- 	@echo "    [CC]     gen_crc32table"
--	$(Q) $(BUILD_CC) $(CFLAGS) -o gen_crc32table $<
-+	$(Q) $(BUILD_CC) $(BUILD_CFLAGS) -o gen_crc32table $<
- 	@echo "    [GENERATE] $@"
- 	$(Q) ./gen_crc32table > crc32table.h
- 
-@@ -135,7 +135,7 @@
- # disk.
- crc32selftest: gen_crc32table.c crc32table.h crc32.c
- 	@echo "    [TEST]    CRC32"
--	$(Q) $(BUILD_CC) $(CFLAGS) -D CRC32_SELFTEST=1 crc32.c -o $@
-+	$(Q) $(BUILD_CC) $(BUILD_CFLAGS) -D CRC32_SELFTEST=1 crc32.c -o $@
- 	$(Q) ./$@
- 
- # set up include/xfs header directory

diff --git a/sys-fs/xfsprogs/files/xfsprogs-4.9.0-musl.patch b/sys-fs/xfsprogs/files/xfsprogs-4.9.0-musl.patch
deleted file mode 100644
index cbe6911..0000000
--- a/sys-fs/xfsprogs/files/xfsprogs-4.9.0-musl.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-diff -Naur xfsprogs-4.9.0.orig/fsr/xfs_fsr.c xfsprogs-4.9.0/fsr/xfs_fsr.c
---- xfsprogs-4.9.0.orig/fsr/xfs_fsr.c	2017-01-08 13:58:12.354784273 -0800
-+++ xfsprogs-4.9.0/fsr/xfs_fsr.c	2017-01-08 13:58:45.262063929 -0800
-@@ -36,6 +36,9 @@
- #define _PATH_FSRLAST		"/var/tmp/.fsrlast_xfs"
- #define _PATH_PROC_MOUNTS	"/proc/mounts"
- 
-+#ifndef _PATH_MOUNTED
-+#define _PATH_MOUNTED MOUNTED
-+#endif
- 
- char *progname;
- 
-diff -Naur xfsprogs-4.9.0.orig/include/linux.h xfsprogs-4.9.0/include/linux.h
---- xfsprogs-4.9.0.orig/include/linux.h	2017-01-08 13:58:12.335784111 -0800
-+++ xfsprogs-4.9.0/include/linux.h	2017-01-08 13:59:38.554516824 -0800
-@@ -40,6 +40,32 @@
- # undef fsxattr
- #endif
- 
-+#ifndef __uint8_t
-+# define __uint8_t uint8_t
-+#endif
-+#ifndef __uint16_t
-+# define __uint16_t uint16_t
-+#endif
-+#ifndef __uint32_t
-+# define __uint32_t uint32_t
-+#endif
-+#ifndef __uint64_t
-+# define __uint64_t uint64_t
-+#endif
-+
-+#ifndef __int8_t
-+# define __int8_t int8_t
-+#endif
-+#ifndef __int16_t
-+# define __int16_t int16_t
-+#endif
-+#ifndef __int32_t
-+# define __int32_t int32_t
-+#endif
-+#ifndef __int64_t
-+# define __int64_t int64_t
-+#endif
-+ 
- static __inline__ int xfsctl(const char *path, int fd, int cmd, void *p)
- {
- 	return ioctl(fd, cmd, p);
-diff -Naur xfsprogs-4.9.0.orig/io/readdir.c xfsprogs-4.9.0/io/readdir.c
---- xfsprogs-4.9.0.orig/io/readdir.c	2017-01-08 13:58:12.357784298 -0800
-+++ xfsprogs-4.9.0/io/readdir.c	2017-01-08 14:00:04.662738699 -0800
-@@ -24,6 +24,18 @@
- #include <sys/types.h>
- #include <dirent.h>
- 
-+#if defined (__linux__)
-+# ifndef _DIRENT_HAVE_D_OFF
-+#  define _DIRENT_HAVE_D_OFF
-+# endif
-+# ifndef _DIRENT_HAVE_D_RECLEN
-+#  define _DIRENT_HAVE_D_RECLEN
-+# endif
-+# ifndef _DIRENT_HAVE_D_TYPE
-+#  define _DIRENT_HAVE_D_TYPE
-+# endif
-+#endif
-+
- static struct cmdinfo readdir_cmd;
- 
- const char *d_type_str(unsigned int type)

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/metadata.xml b/sys-fs/xfsprogs/metadata.xml
deleted file mode 100644
index 4eb20a0..0000000
--- a/sys-fs/xfsprogs/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-	<maintainer type="project">
-		<email>base-system@gentoo.org</email>
-		<name>Gentoo Base System</name>
-	</maintainer>
-</pkgmetadata>

diff --git a/sys-fs/xfsprogs/xfsprogs-4.12.0.ebuild b/sys-fs/xfsprogs/xfsprogs-4.12.0.ebuild
deleted file mode 100644
index e270e75..0000000
--- a/sys-fs/xfsprogs/xfsprogs-4.12.0.ebuild
+++ /dev/null
@@ -1,97 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit eutils toolchain-funcs multilib
-
-DESCRIPTION="xfs filesystem utilities"
-HOMEPAGE="http://oss.sgi.com/projects/xfs/"
-SRC_URI="https://www.kernel.org/pub/linux/utils/fs/xfs/${PN}/${P}.tar.xz"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~ia64 ~mips ~ppc ~sh ~sparc ~x86"
-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.11.0-musl.patch
-	"${FILESDIR}"/${PN}-4.12.0-fix_musl.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() {
-	epatch "${PATCHES[@]}"
-
-	# 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
-	if use static || use static-libs ; then
-		myconf+=" --enable-static"
-	else
-		myconf+=" --disable-static"
-	fi
-
-	econf \
-		--enable-lib64=no \
-		$(use_enable nls gettext) \
-		$(use_enable readline) \
-		$(usex readline --disable-editline $(use_enable libedit editline)) \
-		${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-4.13.1.ebuild b/sys-fs/xfsprogs/xfsprogs-4.13.1.ebuild
deleted file mode 100644
index f19f14f..0000000
--- a/sys-fs/xfsprogs/xfsprogs-4.13.1.ebuild
+++ /dev/null
@@ -1,96 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit toolchain-funcs multilib
-
-DESCRIPTION="xfs filesystem utilities"
-HOMEPAGE="http://oss.sgi.com/projects/xfs/"
-SRC_URI="https://www.kernel.org/pub/linux/utils/fs/xfs/${PN}/${P}.tar.xz"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~ia64 ~mips ~ppc ~sh ~sparc ~x86"
-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.11.0-musl.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=(
-		--enable-lib64=no
-		$(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-4.5.0.ebuild b/sys-fs/xfsprogs/xfsprogs-4.5.0.ebuild
deleted file mode 100644
index 67e0e35..0000000
--- a/sys-fs/xfsprogs/xfsprogs-4.5.0.ebuild
+++ /dev/null
@@ -1,104 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit eutils toolchain-funcs multilib
-
-DESCRIPTION="xfs filesystem utilities"
-HOMEPAGE="http://oss.sgi.com/projects/xfs/"
-SRC_URI="ftp://oss.sgi.com/projects/xfs/cmd_tars/${P}.tar.gz
-	ftp://oss.sgi.com/projects/xfs/previous/cmd_tars/${P}.tar.gz"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="amd64 arm ia64 ~mips ppc sh sparc x86"
-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.3.0-sharedlibs.patch
-	"${FILESDIR}"/${PN}-4.5.0-linguas.patch
-	"${FILESDIR}"/${PN}-4.3.0-cross-compile.patch
-	"${FILESDIR}"/${PN}-4.3.0-musl.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() {
-	epatch "${PATCHES[@]}"
-
-	# 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' {} +
-
-	# libdisk has broken blkid conditional checking
-	sed -i \
-		-e '/LIB_SUBDIRS/s:libdisk::' \
-		Makefile || die
-
-	# TODO: write a patch for configure.in to use pkg-config for the uuid-part
-	if use static && use readline ; then
-		sed -i \
-			-e 's|-lreadline|\0 -lncurses|' \
-			-e 's|-lblkid|\0 -luuid|' \
-			configure || die
-	fi
-}
-
-src_configure() {
-	export DEBUG=-DNDEBUG
-	export OPTIMIZER=${CFLAGS}
-	unset PLATFORM # if set in user env, this breaks configure
-
-	local myconf
-	if use static || use static-libs ; then
-		myconf+=" --enable-static"
-	else
-		myconf+=" --disable-static"
-	fi
-
-	econf \
-		--bindir=/usr/bin \
-		--libexecdir=/usr/$(get_libdir) \
-		--enable-lib64=no \
-		$(use_enable nls gettext) \
-		$(use_enable readline) \
-		$(usex readline --disable-editline $(use_enable libedit editline)) \
-		${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 xfs xlog
-	# removing unnecessary .la files if not needed
-	use static-libs || find "${ED}" -name '*.la' -delete
-}

diff --git a/sys-fs/xfsprogs/xfsprogs-4.9.0.ebuild b/sys-fs/xfsprogs/xfsprogs-4.9.0.ebuild
deleted file mode 100644
index 70a7600..0000000
--- a/sys-fs/xfsprogs/xfsprogs-4.9.0.ebuild
+++ /dev/null
@@ -1,97 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit eutils toolchain-funcs multilib
-
-DESCRIPTION="xfs filesystem utilities"
-HOMEPAGE="http://oss.sgi.com/projects/xfs/"
-SRC_URI="ftp://ftp.kernel.org/pub/linux/utils/fs/xfs/${PN}/${P}.tar.xz"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="amd64 arm ia64 ~mips ppc ~sh sparc x86"
-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.7.0-sharedlibs.patch
-	"${FILESDIR}"/${PN}-4.7.0-libxcmd-link.patch
-	"${FILESDIR}"/${PN}-4.9.0-cross-compile.patch
-	"${FILESDIR}"/${P}-underlinking.patch
-	"${FILESDIR}"/${PN}-4.9.0-musl.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() {
-	epatch "${PATCHES[@]}"
-
-	# 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
-	if use static || use static-libs ; then
-		myconf+=" --enable-static"
-	else
-		myconf+=" --disable-static"
-	fi
-
-	econf \
-		--enable-lib64=no \
-		$(use_enable nls gettext) \
-		$(use_enable readline) \
-		$(usex readline --disable-editline $(use_enable libedit editline)) \
-		${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
-}