diff options
author | Jory A. Pratt <anarchy@gentoo.org> | 2018-04-09 11:10:06 -0500 |
---|---|---|
committer | Jory A. Pratt <anarchy@gentoo.org> | 2018-04-09 11:10:06 -0500 |
commit | 8ff13e2e9a08aa1c2881194e4a1b0cb81a79a0a7 (patch) | |
tree | 3b4cda23a01c0509ec1b244420689e050872a687 /sys-fs | |
parent | sys-process/procps - remove unused macro and glibc header, thanks parazyd (diff) | |
download | musl-8ff13e2e9a08aa1c2881194e4a1b0cb81a79a0a7.tar.gz musl-8ff13e2e9a08aa1c2881194e4a1b0cb81a79a0a7.tar.bz2 musl-8ff13e2e9a08aa1c2881194e4a1b0cb81a79a0a7.zip |
sys-fs/xfsprogs - Fix missing headers support
Diffstat (limited to 'sys-fs')
-rw-r--r-- | sys-fs/xfsprogs/Manifest | 1 | ||||
-rw-r--r-- | sys-fs/xfsprogs/files/xfsprogs-4.15.0-docdir.patch | 11 | ||||
-rw-r--r-- | sys-fs/xfsprogs/files/xfsprogs-4.15.0-missing_includes.patch | 39 | ||||
-rw-r--r-- | sys-fs/xfsprogs/files/xfsprogs-4.15.0-sharedlibs.patch | 114 | ||||
-rw-r--r-- | sys-fs/xfsprogs/files/xfsprogs-4.9.0-underlinking.patch | 30 | ||||
-rw-r--r-- | sys-fs/xfsprogs/metadata.xml | 8 | ||||
-rw-r--r-- | sys-fs/xfsprogs/xfsprogs-4.15.1.ebuild | 97 |
7 files changed, 300 insertions, 0 deletions
diff --git a/sys-fs/xfsprogs/Manifest b/sys-fs/xfsprogs/Manifest new file mode 100644 index 00000000..26b7912b --- /dev/null +++ b/sys-fs/xfsprogs/Manifest @@ -0,0 +1 @@ +DIST xfsprogs-4.15.1.tar.xz 1188964 BLAKE2B 7b4d1d2f71a0678f9246045e576262d6f3b3c59322e0b33b37dc46d84cdf5407a4b2fd6f2b99dd7647e9bfe9fe312fefe8162013dec9162f3a071421323aa52d SHA512 4ec3f0438f33322f0ff6e5acb27cbb554ab48df3ae0ef11071992b085016f84b49ca7bdbaf3a6859427877ea9c419bcd37ac3058914d67409ba2d65e586508ee diff --git a/sys-fs/xfsprogs/files/xfsprogs-4.15.0-docdir.patch b/sys-fs/xfsprogs/files/xfsprogs-4.15.0-docdir.patch new file mode 100644 index 00000000..53ba3ec0 --- /dev/null +++ b/sys-fs/xfsprogs/files/xfsprogs-4.15.0-docdir.patch @@ -0,0 +1,11 @@ +--- xfsprogs-4.15.0/scrub/Makefile ++++ xfsprogs-4.15.0/scrub/Makefile +@@ -25,7 +25,7 @@ + CRONTABS = xfs_scrub_all.cron + OPTIONAL_TARGETS += $(CRONTABS) + # Don't enable the crontab by default for now +-CROND_DIR = $(PKG_LIB_DIR)/$(PKG_NAME) ++CROND_DIR = $(PKG_DOC_DIR) + endif + + endif # scrub_prereqs diff --git a/sys-fs/xfsprogs/files/xfsprogs-4.15.0-missing_includes.patch b/sys-fs/xfsprogs/files/xfsprogs-4.15.0-missing_includes.patch new file mode 100644 index 00000000..5fe27761 --- /dev/null +++ b/sys-fs/xfsprogs/files/xfsprogs-4.15.0-missing_includes.patch @@ -0,0 +1,39 @@ +From b354707a4acae9a09264e40195ba1c3b88b562b1 Mon Sep 17 00:00:00 2001 +From: "Jory A. Pratt" <anarchy@gentoo.org> +Date: Mon, 9 Apr 2018 11:04:54 -0500 +Subject: [PATCH] Add support for missing includes + +Signed-off-by: Jory A. Pratt <anarchy@gentoo.org> +--- + include/workqueue.h | 2 ++ + scrub/xfs_scrub.c | 1 + + 2 files changed, 3 insertions(+) + +diff --git a/include/workqueue.h b/include/workqueue.h +index b4b3541..edb2f8a 100644 +--- a/include/workqueue.h ++++ b/include/workqueue.h +@@ -22,6 +22,8 @@ + #ifndef _WORKQUEUE_H_ + #define _WORKQUEUE_H_ + ++#include <pthread.h> ++ + struct workqueue; + + typedef void workqueue_func_t(struct workqueue *wq, uint32_t index, void *arg); +diff --git a/scrub/xfs_scrub.c b/scrub/xfs_scrub.c +index ab26e63..9f33bdc 100644 +--- a/scrub/xfs_scrub.c ++++ b/scrub/xfs_scrub.c +@@ -18,6 +18,7 @@ + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + */ + #include <stdio.h> ++#include <paths.h> + #include <pthread.h> + #include <stdbool.h> + #include <stdlib.h> +-- +2.17.0 + diff --git a/sys-fs/xfsprogs/files/xfsprogs-4.15.0-sharedlibs.patch b/sys-fs/xfsprogs/files/xfsprogs-4.15.0-sharedlibs.patch new file mode 100644 index 00000000..1080e440 --- /dev/null +++ b/sys-fs/xfsprogs/files/xfsprogs-4.15.0-sharedlibs.patch @@ -0,0 +1,114 @@ +--- xfsprogs-4.15.0/include/buildmacros ++++ xfsprogs-4.15.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.15.0/libfrog/Makefile ++++ xfsprogs-4.15.0/libfrog/Makefile +@@ -5,6 +5,8 @@ + TOPDIR = .. + include $(TOPDIR)/include/builddefs + ++LTLIBS = $(LIBXFS) $(LIBBLKID) ++ + LTLIBRARY = libfrog.la + LT_CURRENT = 0 + LT_REVISION = 0 +@@ -34,6 +36,9 @@ + + include $(BUILDRULES) + +-install install-dev: default ++install: default ++ ++install-dev: default ++ $(INSTALL_LTLIB_DEV) + + -include .ltdep +--- xfsprogs-4.15.0/libhandle/Makefile ++++ xfsprogs-4.15.0/libhandle/Makefile +@@ -24,7 +24,6 @@ + include $(BUILDRULES) + + install: default +- $(INSTALL_LTLIB) + + install-dev: default + $(INSTALL_LTLIB_DEV) +--- xfsprogs-4.15.0/libxcmd/Makefile ++++ xfsprogs-4.15.0/libxcmd/Makefile +@@ -12,6 +12,8 @@ + + CFILES = command.c input.c help.c quit.c + ++LTLIBS = $(LIBXFS) $(LIBBLKID) ++ + ifeq ($(ENABLE_READLINE),yes) + LCFLAGS += -DENABLE_READLINE + LTLIBS += $(LIBREADLINE) $(LIBTERMCAP) +@@ -26,6 +28,9 @@ + + include $(BUILDRULES) + +-install install-dev: default ++install: default ++ ++install-dev: default ++ $(INSTALL_LTLIB_DEV) + + -include .ltdep +--- xfsprogs-4.15.0/libxfs/Makefile ++++ xfsprogs-4.15.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.15.0/libxlog/Makefile ++++ xfsprogs-4.15.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.15.0/Makefile ++++ xfsprogs-4.15.0/Makefile +@@ -92,6 +92,10 @@ + mkfs: libxcmd + spaceman: libxcmd + scrub: libhandle libxcmd ++libfrog: libxfs ++libfrog-install-dev: libxfs-install-dev ++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-underlinking.patch b/sys-fs/xfsprogs/files/xfsprogs-4.9.0-underlinking.patch new file mode 100644 index 00000000..e6904a53 --- /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 + diff --git a/sys-fs/xfsprogs/metadata.xml b/sys-fs/xfsprogs/metadata.xml new file mode 100644 index 00000000..4eb20a04 --- /dev/null +++ b/sys-fs/xfsprogs/metadata.xml @@ -0,0 +1,8 @@ +<?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.15.1.ebuild b/sys-fs/xfsprogs/xfsprogs-4.15.1.ebuild new file mode 100644 index 00000000..9eafaa20 --- /dev/null +++ b/sys-fs/xfsprogs/xfsprogs-4.15.1.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit toolchain-funcs multilib systemd + +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="~alpha ~amd64 ~arm ~arm64 ~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: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.9.0-underlinking.patch + "${FILESDIR}"/${PN}-4.15.0-sharedlibs.patch + "${FILESDIR}"/${PN}-4.15.0-docdir.patch + "${FILESDIR}"/${PN}-4.15.0-missing_includes.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=( + --with-crond-dir="${EPREFIX}/etc/cron.d" + --with-systemd-unit-dir="$(systemd_get_systemunitdir)" + $(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 frog + # removing unnecessary .la files if not needed + use static-libs || find "${ED}" -name '*.la' -delete +} |