commit: 6a74d464d5dbd592c4c8e18c0153b248cc8c2042
Author: Aric Belsito <lluixhi <AT> gmail <DOT> com>
AuthorDate: Mon Nov 21 21:16:45 2016 +0000
Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Mon Nov 21 21:16:45 2016 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=6a74d464
sys-fs/xfsprogs: Add 4.5.0 and 4.7.0
Drop 3.2.4 (Keywords in 4.5.0 support more arch's)
sys-fs/xfsprogs/Manifest | 16 +-
.../files/xfsprogs-3.2.2-add-limits-h.patch | 10 --
.../files/xfsprogs-3.2.2-musl-compat.patch | 154 ------------------
.../files/xfsprogs-4.3.0-cross-compile.patch | 181 +++++++++++++++++++++
sys-fs/xfsprogs/files/xfsprogs-4.3.0-musl.patch | 131 +++++++++++++++
...dlibs.patch => 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 ++++
sys-fs/xfsprogs/files/xfsprogs-4.7.0-musl.patch | 132 +++++++++++++++
.../xfsprogs/files/xfsprogs-4.7.0-sharedlibs.patch | 81 +++++++++
...rogs-3.2.4-r99.ebuild => xfsprogs-4.5.0.ebuild} | 37 +++--
...rogs-3.2.4-r99.ebuild => xfsprogs-4.7.0.ebuild} | 51 +++---
12 files changed, 671 insertions(+), 264 deletions(-)
diff --git a/sys-fs/xfsprogs/Manifest b/sys-fs/xfsprogs/Manifest
index a04cda0..1644488 100644
--- a/sys-fs/xfsprogs/Manifest
+++ b/sys-fs/xfsprogs/Manifest
@@ -1,6 +1,12 @@
-AUX xfsprogs-3.2.2-add-limits-h.patch 271 SHA256
6d8e49de188fc9932ea488a8945601bf2035b03dfa4c3667bd55689445582696 SHA512
62125c90ff22e52142927d3e1ca8411a757679a304fcf1acf780c692fee1ef8c8d1d4bdbd97dce3e9f6d6678f9640f189fd96400e91c974978f0455966b80c6c
WHIRLPOOL
8c9aa0e5ec61319e53c983c8484e1770beaf5c229b5c99735fb473d4a973034060bf5cdd2e6295f0d673eade4c393de43adcb5711c0e964dd6fac8fa68e8a53d
-AUX xfsprogs-3.2.2-musl-compat.patch 3599 SHA256
b62b258a56ba5ffbead385a390541fa34b8b545322ad6984bc5c1bb01d2e0c58 SHA512
1c6936fdee3cebf81a1ef9828cbf28175533dab46b47aead3f4165f725b7a66d1ac214314818f639313ebfef8e0fe245d21bb7f804423f934c2505c493dbce97
WHIRLPOOL
a314521a2e68e5f22a3d4dd6f88c2cf86c7ea1ca778f27efda090490dae19a30a9f2015ba7f7cec364831b1a203832484651355e6a446e3418a64763cffdc5de
-AUX xfsprogs-3.2.2-sharedlibs.patch 2776 SHA256
a687cbd95bdd3948ab50a2d945b5c73197dbf6f2a2b5190071dd67003753fa8b SHA512
cb54e4e1a15e45b801788d0a189c3cdb4a02ff8ad9e3d31814c73532e33a0c47e3b0226179142c9f79a87511eaa89387c30794c1651718e36bf6cd4efbba5f6a
WHIRLPOOL
0c42f6194a99372acbc914f71a73217cd29fc9256cd39ae832f245d2526f9bfa7ff3e76c2e2bc0ce6d39d05744c4f8ef8e9b7a6624c0a258014f5c99471a04a2
-DIST xfsprogs-3.2.4.tar.gz 1482424 SHA256
dde65ead82d3cbfa9b4ded9796b6d22095d7d759a22d41ae6f1a4ec458bb0465 SHA512
fb1ea5beb933b86970cac198fa4e296457f0f5b30bd72fda54452644730277929dee28f11f35a154910e4a19857455ecffdd21b3df456023e0da95e2fd0aa0eb
WHIRLPOOL
dec87905b5a5af053e71e88f1670470c00b94a758dbb77773adbc601db61b4efaaba306f344a4334b11680973d5153fcc7f8b5d59c4698f21d654570e8355fe9
-EBUILD xfsprogs-3.2.4-r99.ebuild 2640 SHA256
c6aea0f0f2af0955a66f62c011436f16e02af94fdcec761b8240825a62a09711 SHA512
e764aad7c3e63a68825fbb8b94005faec41f4d8143cc40d0a65e86ac2c5f2ba7b440434fdc941b18acde2a41d808ca25c99e4d09dc7802a02c49d6b75e12274d
WHIRLPOOL
17b4f2aa422fe971bdf2d4437e62b803790fa1ecac732cad6dc537234e12451e481eb075e48e86e0330ed645e71acd17b90eafc5583475b142ecb6378e153e72
+AUX xfsprogs-4.3.0-cross-compile.patch 5112 SHA256
5654447555115bce22e443623f6fc17b767681741f043a9dc5e6887967a27db9 SHA512
2d6303b7c89b3e1ca2ba1d95a4477d0d1c2360ed68bf9c9d3630f990081be98ace9b9c164729635fa582cc5c8bd418e1824e35f613512d43cc6116fcda379582
WHIRLPOOL
1fee9f56739d13c1b04b2d0d190b193c97a846902fce8ccba0210cbce6a61bcd2cab118a2c59fb66cd89a957e32e714c3f1dc534697819165a505a8eb8f225b6
+AUX xfsprogs-4.3.0-musl.patch 3543 SHA256
afe6ea3f95d88abc0b2c276e1c88dd8acc3bdbf10cf93cba54cae9d1de6e1e67 SHA512
7c86c402bda6630699e63b55389931d8a43c9ed6489c248bf090ca724516c56d4b2b3204dd07272a2e84e11abda8f0aa0735851c3f66330f6be258390a8dafe6
WHIRLPOOL
8fb46034afbea1b78c23e931d36920228ee401c0a72b4496eb40771b245c8a0f9800eb8794631362937ad0192fe959c1789fcee5a98d1788035c19219365cce7
+AUX xfsprogs-4.3.0-sharedlibs.patch 2310 SHA256
23bf3127cd1eab6e96055d2a5f3ae61f417a8d4ae52d5c421be2bbb05576bb46 SHA512
6d7ad2bc8b74390f81ecfa3774c837d083dc7e3332bd2e5450c4d67805d54f9727afeace39755e5d1185a230abcc9644bf2eb1544708d81b4f93a419aad8fdf4
WHIRLPOOL
5adb3dbffcd788e27e228d9d04a5991a20fd4ae9b8c7e32996b33fe71451ce2a468299f5abb40ff416b8abff399a7c0f7b4d3102b10f4e6bd830b3d0b57768c8
+AUX xfsprogs-4.5.0-linguas.patch 967 SHA256
79c3b0b1faacd8ec52d060f05dcf0e72b83d5892e96ab01c4e6821394e2344de SHA512
6d812dce622a3d38fe2b23e47c8f188012522dee3eaa6f002080f2b2ba8e50dc31ed8fc56d9e10b13d4f0dc54d6377b77d8a3823494176e843480e5226e79679
WHIRLPOOL
2a3de6cf5ed3463bc8299600c6c1a00dfe995d089034ae15a0a07c46e7f24507a3a98cb28641bb29a4e5193338deca1c18fa11c0bc9084b97786938ec2c19778
+AUX xfsprogs-4.7.0-libxcmd-link.patch 880 SHA256
06cced4aeeb9a2d8c90e6d6fd1ff6571020122dbfe62140513f52bd82bf9abe8 SHA512
4484570c4bb387b6dfde5f31d8527f2222d33e120c365e3cbc6f488403b9e9d969d3f2a883ffcb145a11d57ace70c76fb1ba4a8ed75533f2089a197d463c8dd9
WHIRLPOOL
c975535bbf431b86ee82806ce6dbfc0196d7c175d13b00aeccd747820a817169aa1d4958b62f97fb4c36a24f964692ef3ea1d3e0ff11c5cfbd04ba60ce2317df
+AUX xfsprogs-4.7.0-musl.patch 3379 SHA256
14888da03cd10f0c332bdd2868e55adad0e06f4c19de57bd88263302089e15ad SHA512
75412a92f29c62fac24c699874f27ef9e5308f549f96ad8b1062c96cfa203e817be322caa3d2afa5a6f46988bf7e930d80dbf92b7f8b0ba266bf6d7312a08a22
WHIRLPOOL
de9068d3715fe971ad2f400e260376742f408782930a917fd3bdd4a8f18ca5b73521e092ae044ed477e2a489d5a7849fb0656c977363de3ebfb5793168838347
+AUX xfsprogs-4.7.0-sharedlibs.patch 2355 SHA256
983b08b2a4a4ee91be21f14063167a3752554b41fd78aead6dfd6ac38702a5a7 SHA512
f0006ec0a987e44a1e60d642f9938d35c14ccb765c6a040c80e483a0e073e54608571b53793b7d4c2b9eb1f5c4e2f077fb713dfab9abaa99022d24d8a17443fe
WHIRLPOOL
939841084292f598c32aa3be784d6235b6803abd86062790191b7959be73d9f8afc31cbb0d330abaee253c141dcbe0d4a4e20ae76ba64146d41acfbf7f3e0fa4
+DIST xfsprogs-4.5.0.tar.gz 1524382 SHA256
e49beb314984efbd0d758abb5c6137db3bb60a88e59e1e94c00defb536cf89f8 SHA512
19c95551dc91ec46916f9a7e3d7976907664d32dd5fdc26af0ca62ca74c4b3c10f9e843aac8214ea9d1c0bf140c9f4e321d059808af01a623abedd5067011314
WHIRLPOOL
54d742635df024a63181da76c3220671610068363af85be2677521f20342595a5cebb2fd169945572351901ee2c9384f79f54a381ab3620dde22d863aa66d469
+DIST xfsprogs-4.7.0.tar.gz 1534909 SHA256
88580bb3e6847c3edef436703a4fae403fc19b20739db4c31166ee4b256178d7 SHA512
5184f1dbc3989f3c1f1b103d5cbd70462db107cfe113424166581ebcfaad4041c9c78f5d038f4bd4728ff99a2f9705219582ba9bfd10745354a1cab0b7dfe613
WHIRLPOOL
8157b2e8df5946acacc22ed761e38b382ef464f4984971148069b2f215418f4e23ac142721394439c041c236cbd460e0b56ff071d1c10e343070147709f42af3
+EBUILD xfsprogs-4.5.0.ebuild 2943 SHA256
f4ffec8f7b659a4f6c0915fa545e946399884b6ac4c9407d81ab905a129d88d1 SHA512
2e7698b5d3b37203643c5e1bbba776f8d871fcd1c770c7aa09a61d785177751040abe2da372b7a7d4bb76d48ca1c85bd6641f7ca98feb489142534822da09f97
WHIRLPOOL
c299f388ef6da99135ba26403fab96036fb9b7b1731a10207762c959b16e485791eb8418ba932f5974d69ee282ed58ab9fe6dbdfbc833bf5bb75b71d2b08db00
+EBUILD xfsprogs-4.7.0.ebuild 2795 SHA256
e374eceff3c654d90c8b185d67edd81148ad9e0c752c4daeb0cb7b4bd6939ab4 SHA512
9f471d22be91a3ff32454c942342b9b5ec7c012006d9d723275b907f1dbfc54e61499ad9d2cee7fc6e861991dc0a1774d1726ecdb1fc14337c941eae3661f057
WHIRLPOOL
39736443b5c9274443663b3fa26d9f7d902918247baf7361b46d104166ac9bf924d983fd75becb9e5da1076a7b8a83b145542bb33198e0af364c701ff8ef4673
MISC metadata.xml 253 SHA256
d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512
54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555
WHIRLPOOL
e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-fs/xfsprogs/files/xfsprogs-3.2.2-add-limits-h.patch
b/sys-fs/xfsprogs/files/xfsprogs-3.2.2-add-limits-h.patch
deleted file mode 100644
index 813119f..0000000
--- a/sys-fs/xfsprogs/files/xfsprogs-3.2.2-add-limits-h.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- ./libxfs/xfs_attr_remote.c.orig
-+++ ./libxfs/xfs_attr_remote.c
-@@ -17,6 +17,7 @@
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
- #include <xfs.h>
-+#include <linux/limits.h>
-
- #define ATTR_RMTVALUE_MAPSIZE 1 /* # of map entries at once */
-
diff --git a/sys-fs/xfsprogs/files/xfsprogs-3.2.2-musl-compat.patch
b/sys-fs/xfsprogs/files/xfsprogs-3.2.2-musl-compat.patch
deleted file mode 100644
index bffa6fb..0000000
--- a/sys-fs/xfsprogs/files/xfsprogs-3.2.2-musl-compat.patch
+++ /dev/null
@@ -1,154 +0,0 @@
-diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c
-index 6f00b41..5b4af53 100644
---- a/fsr/xfs_fsr.c
-+++ b/fsr/xfs_fsr.c
-@@ -44,6 +44,10 @@
- #define _PATH_FSRLAST "/var/tmp/.fsrlast_xfs"
- #define _PATH_PROC_MOUNTS "/proc/mounts"
-
-+#ifndef _PATH_MOUNTED
-+#define _PATH_MOUNTED MOUNTED
-+#endif
-+
-
- char *progname;
-
-diff --git a/include/platform_defs.h.in b/include/platform_defs.h.in
-index ac260bc..0e7fccf 100644
---- a/include/platform_defs.h.in
-+++ b/include/platform_defs.h.in
-@@ -68,6 +68,32 @@ typedef __u64 __bitwise __be64;
-
- typedef struct filldir filldir_t;
-
-+#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
-+
- #if defined(__linux__)
- #include <xfs/linux.h>
- #elif defined(__FreeBSD__)
-diff --git a/libhandle/handle.c b/libhandle/handle.c
-index 9a232fa..1db7772 100644
---- a/libhandle/handle.c
-+++ b/libhandle/handle.c
-@@ -20,6 +20,9 @@
- #include <xfs/xfs.h>
- #include <xfs/handle.h>
- #include <xfs/parent.h>
-+#if defined(__linux__)
-+#include <linux/limits.h>
-+#endif
-
- /* just pick a value we know is more than big enough */
- #define MAXHANSIZ 64
-diff --git a/libhandle/jdm.c b/libhandle/jdm.c
-index 070407b..8dd6322 100644
---- a/libhandle/jdm.c
-+++ b/libhandle/jdm.c
-@@ -20,6 +20,9 @@
- #include <xfs/handle.h>
- #include <xfs/jdm.h>
- #include <xfs/parent.h>
-+#if defined(__linux__)
-+#include <linux/limits.h>
-+#endif
-
- /* internal fshandle - typecast to a void for external use */
- #define FSHANDLE_SZ 8
-diff --git a/libxfs/linux.c b/libxfs/linux.c
-index 2e07d54..4075786 100644
---- a/libxfs/linux.c
-+++ b/libxfs/linux.c
-@@ -16,12 +16,9 @@
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
--#define ustat __kernel_ustat
- #include <xfs/libxfs.h>
- #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>
-@@ -49,9 +46,12 @@ static int max_block_alignment;
- 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)
-@@ -61,14 +61,25 @@ platform_check_ismounted(char *name, char *block, struct
stat64 *s, int verbose)
- 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
---- ./repair/attr_repair.c.orig
-+++ ./repair/attr_repair.c
-@@ -24,6 +24,10 @@
- #include "bmap.h"
- #include "protos.h"
- #include "dir2.h"
-+#if defined(__linux__)
-+#include <linux/limits.h>
-+#endif
-+
-
- static int xfs_acl_valid(struct xfs_mount *mp, struct xfs_acl *daclp);
- static int xfs_mac_valid(xfs_mac_label_t *lp);
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
new file mode 100644
index 0000000..c545664
--- /dev/null
+++ b/sys-fs/xfsprogs/files/xfsprogs-4.3.0-cross-compile.patch
@@ -0,0 +1,181 @@
+From 1a366eedc0eb4da46da48e9f6e2da27c7b5d2076 Mon Sep 17 00:00:00 2001
+From: Gwendal Grignou <[email protected]>
+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 <[email protected]>
+---
+ 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
new file mode 100644
index 0000000..f9c9a5d
--- /dev/null
+++ b/sys-fs/xfsprogs/files/xfsprogs-4.3.0-musl.patch
@@ -0,0 +1,131 @@
+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-3.2.2-sharedlibs.patch
b/sys-fs/xfsprogs/files/xfsprogs-4.3.0-sharedlibs.patch
similarity index 52%
rename from sys-fs/xfsprogs/files/xfsprogs-3.2.2-sharedlibs.patch
rename to sys-fs/xfsprogs/files/xfsprogs-4.3.0-sharedlibs.patch
index 118874a..a39af0d 100644
--- a/sys-fs/xfsprogs/files/xfsprogs-3.2.2-sharedlibs.patch
+++ b/sys-fs/xfsprogs/files/xfsprogs-4.3.0-sharedlibs.patch
@@ -1,9 +1,5 @@
-use libtool to do all installing. do not use the manual file install as
-that'll copy files directly from the .libs/ subdir which might have rpaths
-that we do not want.
-
---- xfsprogs-3.2.2/include/buildmacros
-+++ xfsprogs-3.2.2/include/buildmacros
+--- xfsprogs-4.3.0/include/buildmacros
++++ xfsprogs-4.3.0/include/buildmacros
@@ -70,18 +70,9 @@
# /usr/lib.
ifeq ($(ENABLE_SHARED),yes)
@@ -15,7 +11,7 @@ that we do not want.
- ../$(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 \
+- "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; \
@@ -26,53 +22,31 @@ that we do not want.
else
INSTALL_LTLIB_DEV = $(INSTALL_LTLIB_STATIC)
endif
---- xfsprogs-3.2.2/libdisk/Makefile
-+++ xfsprogs-3.2.2/libdisk/Makefile
-@@ -31,6 +31,7 @@
- install: default
-
- install-dev: default
-+ $(INSTALL_LTLIB_DEV)
-
- install-qa: install-dev
-
---- xfsprogs-3.2.2/libhandle/Makefile
-+++ xfsprogs-3.2.2/libhandle/Makefile
-@@ -20,7 +20,6 @@
- include $(BUILDRULES)
-
- install: default
-- $(INSTALL_LTLIB)
-
- install-dev: default
- $(INSTALL_LTLIB_DEV)
---- xfsprogs-3.2.2/libxcmd/Makefile
-+++ xfsprogs-3.2.2/libxcmd/Makefile
-@@ -34,6 +34,11 @@
+--- xfsprogs-4.3.0/libxcmd/Makefile
++++ xfsprogs-4.3.0/libxcmd/Makefile
+@@ -34,6 +34,9 @@
include $(BUILDRULES)
--install install-dev install-qa: default
+-install install-dev: default
+install: default
+
-+ install-dev: default
++install-dev: default
+ $(INSTALL_LTLIB_DEV)
-+
-+install-qa: default
-include .ltdep
---- xfsprogs-3.2.2/libxfs/Makefile
-+++ xfsprogs-3.2.2/libxfs/Makefile
-@@ -86,6 +86,7 @@
- install: default
+--- xfsprogs-4.3.0/libxfs/Makefile
++++ xfsprogs-4.3.0/libxfs/Makefile
+@@ -138,6 +138,7 @@
- install-dev: default
+ install-dev: install
+ $(INSTALL) -m 644 $(PKGHFILES) $(PKG_INC_DIR)
+ $(INSTALL_LTLIB_DEV)
- install-qa: default
-
---- xfsprogs-3.2.2/libxlog/Makefile
-+++ xfsprogs-3.2.2/libxlog/Makefile
+ # 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
@@ -82,27 +56,25 @@ that we do not want.
# don't want to link xfs_repair with a debug libxlog.
DEBUG = -DNDEBUG
-@@ -19,6 +21,11 @@
+@@ -19,6 +21,9 @@
include $(BUILDRULES)
--install install-dev install-qa: default
+-install install-dev: default
+install: default
+
+install-dev: default
+ $(INSTALL_LTLIB_DEV)
-+
-+install-qa: default
-include .ltdep
---- xfsprogs-3.2.2/Makefile
-+++ xfsprogs-3.2.2/Makefile
-@@ -63,6 +63,8 @@
- mkfs: libxfs
+--- xfsprogs-4.3.0/Makefile
++++ xfsprogs-4.3.0/Makefile
+@@ -82,6 +82,8 @@
quota: libxcmd
- repair: libxfs libxlog
+ repair: libxlog
+ copy: libxlog
+libxlog: libxfs
+libxlog-install-dev: libxfs-install-dev
- ifneq ($(ENABLE_BLKID), yes)
- mkfs: libdisk
+ 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
new file mode 100644
index 0000000..9912e49
--- /dev/null
+++ b/sys-fs/xfsprogs/files/xfsprogs-4.5.0-linguas.patch
@@ -0,0 +1,32 @@
+From 2212e8bb59e7c3930d49da2ec5f4f0a9ceb086c7 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <[email protected]>
+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 <[email protected]>
+---
+ 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
new file mode 100644
index 0000000..77ded53
--- /dev/null
+++ b/sys-fs/xfsprogs/files/xfsprogs-4.7.0-libxcmd-link.patch
@@ -0,0 +1,30 @@
+From d01d3689fd512811b9d860598ddf26089bb5955c Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <[email protected]>
+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 <[email protected]>
+---
+ 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-musl.patch
b/sys-fs/xfsprogs/files/xfsprogs-4.7.0-musl.patch
new file mode 100644
index 0000000..0346907
--- /dev/null
+++ b/sys-fs/xfsprogs/files/xfsprogs-4.7.0-musl.patch
@@ -0,0 +1,132 @@
+diff -Naur xfsprogs-4.7.0.orig/fsr/xfs_fsr.c xfsprogs-4.7.0/fsr/xfs_fsr.c
+--- xfsprogs-4.7.0.orig/fsr/xfs_fsr.c 2016-08-09 12:15:13.030533264 -0700
++++ xfsprogs-4.7.0/fsr/xfs_fsr.c 2016-08-09 12:16:06.079242655 -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.7.0.orig/include/linux.h xfsprogs-4.7.0/include/linux.h
+--- xfsprogs-4.7.0.orig/include/linux.h 2016-08-09 12:15:13.033533304
-0700
++++ xfsprogs-4.7.0/include/linux.h 2016-08-09 12:17:26.447317100 -0700
+@@ -33,6 +33,35 @@
+ #include <asm/types.h>
+ #include <mntent.h>
+ #include <linux/fs.h> /* fsxattr defintion for new kernels */
++#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 -Naur xfsprogs-4.7.0.orig/io/readdir.c xfsprogs-4.7.0/io/readdir.c
+--- xfsprogs-4.7.0.orig/io/readdir.c 2016-08-09 12:15:13.038533371 -0700
++++ xfsprogs-4.7.0/io/readdir.c 2016-08-09 12:18:16.185982058 -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
++
+ static struct cmdinfo readdir_cmd;
+
+ const char *d_type_str(unsigned int type)
+diff -Naur xfsprogs-4.7.0.orig/libxfs/linux.c xfsprogs-4.7.0/libxfs/linux.c
+--- xfsprogs-4.7.0.orig/libxfs/linux.c 2016-08-09 12:15:13.043533438 -0700
++++ xfsprogs-4.7.0/libxfs/linux.c 2016-08-09 12:23:08.978520714 -0700
+@@ -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.7.0-sharedlibs.patch
b/sys-fs/xfsprogs/files/xfsprogs-4.7.0-sharedlibs.patch
new file mode 100644
index 0000000..b5395ff
--- /dev/null
+++ b/sys-fs/xfsprogs/files/xfsprogs-4.7.0-sharedlibs.patch
@@ -0,0 +1,81 @@
+--- 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/xfsprogs-3.2.4-r99.ebuild
b/sys-fs/xfsprogs/xfsprogs-4.5.0.ebuild
similarity index 69%
copy from sys-fs/xfsprogs/xfsprogs-3.2.4-r99.ebuild
copy to sys-fs/xfsprogs/xfsprogs-4.5.0.ebuild
index 07461c6..4a03151 100644
--- a/sys-fs/xfsprogs/xfsprogs-3.2.4-r99.ebuild
+++ b/sys-fs/xfsprogs/xfsprogs-4.5.0.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI="4"
+EAPI=5
inherit eutils toolchain-funcs multilib
@@ -13,22 +13,29 @@ SRC_URI="ftp://oss.sgi.com/projects/xfs/cmd_tars/${P}.tar.gz
LICENSE="LGPL-2.1"
SLOT="0"
-KEYWORDS="amd64 arm ~mips ppc ppc64 x86"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 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[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[static-libs] )
+ 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."
@@ -37,19 +44,16 @@ pkg_setup() {
}
src_prepare() {
- epatch "${FILESDIR}"/${PN}-3.2.2-sharedlibs.patch
- epatch "${FILESDIR}"/${PN}-3.2.2-musl-compat.patch
- epatch "${FILESDIR}"/${PN}-3.2.2-add-limits-h.patch
+ 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
- sed -i \
- -e '1iLLDFLAGS = -static' \
- {estimate,fsr}/Makefile || die
- sed -i \
- -e "/LLDFLAGS/s:-static-libtool-libs:$(use static && echo
-all-static):" \
- $(find -name Makefile) || die
+ find -name Makefile -exec \
+ sed -i -r -e '/^LLDFLAGS [+]?= -static(-libtool-libs)?$/d' {} +
# libdisk has broken blkid conditional checking
sed -i \
@@ -80,6 +84,7 @@ src_configure() {
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)) \
@@ -90,9 +95,11 @@ src_configure() {
src_install() {
emake DIST_ROOT="${ED}" install
- # parallel install fails on these targets for >=xfsprogs-3.2.0
- emake -j1 DIST_ROOT="${ED}" install-{dev,qa}
+ # 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-3.2.4-r99.ebuild
b/sys-fs/xfsprogs/xfsprogs-4.7.0.ebuild
similarity index 61%
rename from sys-fs/xfsprogs/xfsprogs-3.2.4-r99.ebuild
rename to sys-fs/xfsprogs/xfsprogs-4.7.0.ebuild
index 07461c6..1db7e11 100644
--- a/sys-fs/xfsprogs/xfsprogs-3.2.4-r99.ebuild
+++ b/sys-fs/xfsprogs/xfsprogs-4.7.0.ebuild
@@ -1,8 +1,7 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Id$
-EAPI="4"
+EAPI="5"
inherit eutils toolchain-funcs multilib
@@ -13,22 +12,29 @@ SRC_URI="ftp://oss.sgi.com/projects/xfs/cmd_tars/${P}.tar.gz
LICENSE="LGPL-2.1"
SLOT="0"
-KEYWORDS="amd64 arm ~mips ppc ppc64 x86"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~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[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[static-libs] )
+ 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.3.0-cross-compile.patch
+ "${FILESDIR}"/${PN}-4.7.0-musl.patch
+)
+
pkg_setup() {
if use readline && use libedit ; then
ewarn "You have USE='readline libedit' but these are exclusive."
@@ -37,30 +43,22 @@ pkg_setup() {
}
src_prepare() {
- epatch "${FILESDIR}"/${PN}-3.2.2-sharedlibs.patch
- epatch "${FILESDIR}"/${PN}-3.2.2-musl-compat.patch
- epatch "${FILESDIR}"/${PN}-3.2.2-add-limits-h.patch
+ 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
- sed -i \
- -e '1iLLDFLAGS = -static' \
- {estimate,fsr}/Makefile || die
- sed -i \
- -e "/LLDFLAGS/s:-static-libtool-libs:$(use static && echo
-all-static):" \
- $(find -name Makefile) || die
-
- # libdisk has broken blkid conditional checking
- sed -i \
- -e '/LIB_SUBDIRS/s:libdisk::' \
- Makefile || die
+ find -name Makefile -exec \
+ sed -i -r -e '/^LLDFLAGS [+]?= -static(-libtool-libs)?$/d' {} +
- # TODO: write a patch for configure.in to use pkg-config for the
uuid-part
+ # 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|\0 -lncurses|' \
- -e 's|-lblkid|\0 -luuid|' \
+ -e 's|-lreadline|& -lncurses|' \
+ -e 's|-lblkid|& -luuid|' \
configure || die
fi
}
@@ -78,8 +76,7 @@ src_configure() {
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)) \
@@ -90,9 +87,11 @@ src_configure() {
src_install() {
emake DIST_ROOT="${ED}" install
- # parallel install fails on these targets for >=xfsprogs-3.2.0
- emake -j1 DIST_ROOT="${ED}" install-{dev,qa}
+ # 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
}