xfsprogs: update to 4.9.0
Refreshed musl patch. Fixed cross compilation (patch via Gentoo)
This commit is contained in:
parent
49ceb6d65b
commit
75c7547904
5 changed files with 175 additions and 103 deletions
143
srcpkgs/xfsprogs/patches/cross-compile.patch
Normal file
143
srcpkgs/xfsprogs/patches/cross-compile.patch
Normal file
|
@ -0,0 +1,143 @@
|
|||
--- configure.orig
|
||||
+++ 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.
|
||||
--- configure.ac.orig
|
||||
+++ 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,
|
||||
--- include/builddefs.in.orig
|
||||
+++ 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
|
||||
|
||||
--- libxfs/Makefile.orig
|
||||
+++ 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
|
|
@ -1,22 +0,0 @@
|
|||
--- libxfs/Makefile.orig 2014-09-08 15:26:46.443766634 +0200
|
||||
+++ libxfs/Makefile 2014-09-08 15:27:31.618767187 +0200
|
||||
@@ -66,8 +66,8 @@
|
||||
default: crc32selftest ltdepend $(LTLIBRARY)
|
||||
|
||||
crc32table.h: gen_crc32table.c
|
||||
- @echo " [CC] gen_crc32table"
|
||||
- $(Q) $(BUILD_CC) $(CFLAGS) -o gen_crc32table $<
|
||||
+ @echo " [BUILD_CC] gen_crc32table"
|
||||
+ $(Q) $(BUILD_CC) $(BUILD_CFLAGS) -o gen_crc32table $<
|
||||
@echo " [GENERATE] $@"
|
||||
$(Q) ./gen_crc32table > crc32table.h
|
||||
|
||||
@@ -78,7 +78,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) -I. -I../include -D CRC32_SELFTEST=1 crc32.c -o $@
|
||||
$(Q) ./$@
|
||||
|
||||
include $(BUILDRULES)
|
|
@ -1,80 +1,21 @@
|
|||
--- fsr/xfs_fsr.c.orig 2015-08-27 02:17:57.000000000 +0200
|
||||
+++ fsr/xfs_fsr.c 2015-10-03 21:15:14.888366570 +0200
|
||||
@@ -43,6 +43,10 @@
|
||||
--- fsr/xfs_fsr.c.orig 2016-12-21 06:36:07.000000000 +0100
|
||||
+++ fsr/xfs_fsr.c 2017-01-16 15:13:16.077553350 +0100
|
||||
@@ -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;
|
||||
|
||||
--- include/linux.h.orig 2016-02-29 00:39:26.000000000 +0100
|
||||
+++ include/linux.h 2016-03-15 16:19:01.326430077 +0100
|
||||
@@ -142,6 +144,10 @@
|
||||
#define EFSCORRUPTED EUCLEAN /* Filesystem is corrupted */
|
||||
#define EFSBADCRC EBADMSG /* Bad CRC detected */
|
||||
|
||||
+#ifndef off64_t
|
||||
+#define off64_t off_t
|
||||
+#endif
|
||||
+
|
||||
typedef off64_t xfs_off_t;
|
||||
typedef __uint64_t xfs_ino_t;
|
||||
typedef __uint32_t xfs_dev_t;
|
||||
--- libhandle/handle.c.orig 2015-10-03 21:15:14.890366562 +0200
|
||||
+++ libhandle/handle.c 2015-10-03 21:19:28.903266874 +0200
|
||||
@@ -21,6 +21,9 @@
|
||||
#include "xfs.h"
|
||||
#include "handle.h"
|
||||
#include "parent.h"
|
||||
+#if defined(__linux__)
|
||||
+#include <linux/limits.h>
|
||||
+#endif
|
||||
|
||||
/* just pick a value we know is more than big enough */
|
||||
#define MAXHANSIZ 64
|
||||
--- libhandle/jdm.c.orig 2015-10-03 21:15:14.890366562 +0200
|
||||
+++ libhandle/jdm.c 2015-10-03 21:19:38.716224218 +0200
|
||||
@@ -21,6 +21,9 @@
|
||||
#include "handle.h"
|
||||
#include "jdm.h"
|
||||
#include "parent.h"
|
||||
+#if defined(__linux__)
|
||||
+#include <linux/limits.h>
|
||||
+#endif
|
||||
|
||||
/* internal fshandle - typecast to a void for external use */
|
||||
#define FSHANDLE_SZ 8
|
||||
--- include/xfs.h.orig 2015-08-04 01:37:12.000000000 +0200
|
||||
+++ include/xfs.h 2015-10-03 21:42:48.317971365 +0200
|
||||
@@ -33,6 +33,8 @@
|
||||
#ifndef __XFS_H__
|
||||
#define __XFS_H__
|
||||
|
||||
+#include <xfs/xfs_types.h>
|
||||
+
|
||||
#if defined(__linux__)
|
||||
#include <xfs/linux.h>
|
||||
#elif defined(__FreeBSD__)
|
||||
@@ -60,7 +62,6 @@
|
||||
#define __user
|
||||
--- include/linux.h.orig 2016-12-21 06:36:07.000000000 +0100
|
||||
+++ include/linux.h 2017-01-16 15:15:39.600759063 +0100
|
||||
@@ -40,6 +40,32 @@
|
||||
# undef fsxattr
|
||||
#endif
|
||||
|
||||
-#include <xfs/xfs_types.h>
|
||||
#include <xfs/xfs_fs.h>
|
||||
|
||||
#endif /* __XFS_H__ */
|
||||
--- libxfs/xfs_types.h.orig 2015-08-03 02:39:42.000000000 +0200
|
||||
+++ libxfs/xfs_types.h 2015-10-03 21:42:38.897015215 +0200
|
||||
@@ -18,6 +18,34 @@
|
||||
#ifndef __XFS_TYPES_H__
|
||||
#define __XFS_TYPES_H__
|
||||
|
||||
+#include <stdint.h>
|
||||
+
|
||||
+#ifndef __uint8_t
|
||||
+#define __uint8_t uint8_t
|
||||
+#endif
|
||||
|
@ -101,6 +42,27 @@
|
|||
+#define __int64_t int64_t
|
||||
+#endif
|
||||
+
|
||||
typedef __uint32_t prid_t; /* project ID */
|
||||
static __inline__ int xfsctl(const char *path, int fd, int cmd, void *p)
|
||||
{
|
||||
return ioctl(fd, cmd, p);
|
||||
--- io/readdir.c.orig 2017-01-05 18:41:55.000000000 +0100
|
||||
+++ io/readdir.c 2017-01-16 15:19:55.995553687 +0100
|
||||
@@ -24,6 +24,18 @@
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
|
||||
typedef __uint32_t xfs_agblock_t; /* blockno in alloc. group */
|
||||
+#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)
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
--- libxfs/xfs_attr_remote.c.orig
|
||||
+++ libxfs/xfs_attr_remote.c
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "xfs_trans_space.h"
|
||||
#include "xfs_trace.h"
|
||||
#include "xfs_cksum.h"
|
||||
+#include <linux/limits.h>
|
||||
|
||||
#define ATTR_RMTVALUE_MAPSIZE 1 /* # of map entries at once */
|
||||
|
|
@ -1,10 +1,9 @@
|
|||
# Template file for 'xfsprogs'
|
||||
pkgname=xfsprogs
|
||||
version=4.8.0
|
||||
version=4.9.0
|
||||
revision=1
|
||||
build_style=gnu-configure
|
||||
configure_args="--enable-readline=yes --enable-lib64=no"
|
||||
CFLAGS=-D_DIRENT_HAVE_D_RECLEN
|
||||
hostmakedepends="libuuid-devel"
|
||||
makedepends="libuuid-devel libblkid-devel readline-devel"
|
||||
short_desc="Utilities for managing the XFS filesystem"
|
||||
|
@ -12,7 +11,7 @@ maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
|||
license="LGPL-2.1"
|
||||
homepage="http://xfs.org/"
|
||||
distfiles="ftp://ftp.kernel.org/pub/linux/utils/fs/xfs/${pkgname}/${pkgname}-${version}.tar.xz"
|
||||
checksum=82ce9cb3a55f4e208e8fe3471ff0aff0602b8300f3e50bdf05cc7e11549686f9
|
||||
checksum=f1e60a9a54583dba82fa506dd9b59bdec110a968f80f507bf5f93b263af7a4df
|
||||
|
||||
do_install() {
|
||||
make install install-dev DIST_ROOT=${DESTDIR} \
|
||||
|
|
Loading…
Reference in a new issue