diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-fs/xfsprogs/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-fs/xfsprogs/files')
9 files changed, 775 insertions, 0 deletions
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 new file mode 100644 index 000000000000..efc57e4f693d --- /dev/null +++ b/sys-fs/xfsprogs/files/xfsprogs-4.12.0-fix_musl.patch @@ -0,0 +1,117 @@ +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 new file mode 100644 index 000000000000..cb59d44a46b7 --- /dev/null +++ b/sys-fs/xfsprogs/files/xfsprogs-4.12.0-sharedlibs.patch @@ -0,0 +1,81 @@ +--- 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 new file mode 100644 index 000000000000..c54566451a9e --- /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 <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-sharedlibs.patch b/sys-fs/xfsprogs/files/xfsprogs-4.3.0-sharedlibs.patch new file mode 100644 index 000000000000..a39af0d8cb43 --- /dev/null +++ b/sys-fs/xfsprogs/files/xfsprogs-4.3.0-sharedlibs.patch @@ -0,0 +1,80 @@ +--- 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 new file mode 100644 index 000000000000..9912e49ebf84 --- /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 <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 new file mode 100644 index 000000000000..77ded5393d52 --- /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 <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 new file mode 100644 index 000000000000..b5395ffaed6c --- /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/files/xfsprogs-4.9.0-cross-compile.patch b/sys-fs/xfsprogs/files/xfsprogs-4.9.0-cross-compile.patch new file mode 100644 index 000000000000..fade1028301d --- /dev/null +++ b/sys-fs/xfsprogs/files/xfsprogs-4.9.0-cross-compile.patch @@ -0,0 +1,143 @@ +--- 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-underlinking.patch b/sys-fs/xfsprogs/files/xfsprogs-4.9.0-underlinking.patch new file mode 100644 index 000000000000..e6904a53bc2a --- /dev/null +++ b/sys-fs/xfsprogs/files/xfsprogs-4.9.0-underlinking.patch @@ -0,0 +1,30 @@ + 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 + |