diff options
-rw-r--r-- | sys-fs/xfsprogs/Manifest | 1 | ||||
-rw-r--r-- | sys-fs/xfsprogs/files/xfsprogs-4.12.0-sharedlibs.patch | 81 | ||||
-rw-r--r-- | sys-fs/xfsprogs/xfsprogs-4.12.0.ebuild | 94 |
3 files changed, 176 insertions, 0 deletions
diff --git a/sys-fs/xfsprogs/Manifest b/sys-fs/xfsprogs/Manifest index 1bfb6196753d..e53813498e61 100644 --- a/sys-fs/xfsprogs/Manifest +++ b/sys-fs/xfsprogs/Manifest @@ -1,5 +1,6 @@ DIST xfsprogs-4.10.0.tar.xz 1091648 SHA256 d8cb9ab2c686699d37914354ce3992b4aff3677093cbce06ad18bf798da8a8a7 SHA512 a29b5e714320d5fcbda7df6e8d81a07bdcba92d7d528ce1c354f1c1b41cb3719443a98cb37ca052f566eb3a08967bcf45492d0b9d95460da90b8a070a7a032e8 WHIRLPOOL cc2ed46749c6840ccc6521c6ef5d1ca79156245faf18ef2b03b7a0f86ac460a0f011d828caa51f57db6ad8445f8cc218f30b1d0ab557db290935fd9d0a941ef0 DIST xfsprogs-4.11.0.tar.xz 1113480 SHA256 c3a6d87b564d7738243c507df82276bed982265e345363a95f2c764e8a5f5bb2 SHA512 2db59553e4442c999a718ccf712b01de80b1e3acd1c3e5f9f7f5dc59e6c9180aa1a42085363303fe454d441bc2f886e118fc2958320afa49c7a8886fcfb5d72c WHIRLPOOL df267970bbcbc3c8a05d02a5e334bdeb686acea74e647dee6e874bc083a64cecef7c45072619edfd4841856cf0b7c91056504207bbcd5f021b1a1b452ef794da +DIST xfsprogs-4.12.0.tar.xz 1128400 SHA256 b330ad8d737f4152ae511580102e2fc49212bb51dfb4b614084344abae46d0df SHA512 1dc4a0a5f40baf1d6398c8f07b4cb3ab796cf052c34b811d60b08c60a4700c2ced8d4d1adb878f8b85ba58cf3e1276db1477109de538fd427d3e359a52f59d4a WHIRLPOOL c18d3c9dfab8ccb877eb6fa9fa05be3c614a587c6cb616a9f18b52debb8ecacbd22056cb397ff9e69407c66e105d034458b41f0ba4275352f31398e64d303c02 DIST xfsprogs-4.5.0.tar.gz 1524382 SHA256 e49beb314984efbd0d758abb5c6137db3bb60a88e59e1e94c00defb536cf89f8 SHA512 19c95551dc91ec46916f9a7e3d7976907664d32dd5fdc26af0ca62ca74c4b3c10f9e843aac8214ea9d1c0bf140c9f4e321d059808af01a623abedd5067011314 WHIRLPOOL 54d742635df024a63181da76c3220671610068363af85be2677521f20342595a5cebb2fd169945572351901ee2c9384f79f54a381ab3620dde22d863aa66d469 DIST xfsprogs-4.8.0.tar.xz 1088376 SHA256 82ce9cb3a55f4e208e8fe3471ff0aff0602b8300f3e50bdf05cc7e11549686f9 SHA512 9c83763ae4925980969e66827edef41774e4dc09ae42637630167b5e0329675517ea7b50de751fcb9485fbcf8e470d24dd20b51475bcb56723dae6ee9fb140c7 WHIRLPOOL dc9f9b5c0b4e9b61f023fb972137126f22909c77908990e1beb391689fe6512a7810d9bd1ccfc0cfe4cd5379d99c123ddc9d0b6194e0a81e946e2304f964f180 DIST xfsprogs-4.9.0.tar.xz 1087940 SHA256 f1e60a9a54583dba82fa506dd9b59bdec110a968f80f507bf5f93b263af7a4df SHA512 990946f0a34381f57afb39bcda0ff539e18af4de2ecc19c833ffd4fb7c22c25b501091c1f0953db103a62204d952c9eecba21f22f3c5910286456da65fb09fa7 WHIRLPOOL a9b582a42967ce1e314cd0ac3518792c2e10f7bb1370151a68a09a8e21e40cc6818b9778dfdd248961c3a1a08a70424f0150219488a18bc5d60e5669702c472f 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/xfsprogs-4.12.0.ebuild b/sys-fs/xfsprogs/xfsprogs-4.12.0.ebuild new file mode 100644 index 000000000000..0cfd1dd972a3 --- /dev/null +++ b/sys-fs/xfsprogs/xfsprogs-4.12.0.ebuild @@ -0,0 +1,94 @@ +# 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="~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.12.0-sharedlibs.patch + "${FILESDIR}"/${PN}-4.7.0-libxcmd-link.patch + "${FILESDIR}"/${PN}-4.9.0-underlinking.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 \ + $(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 +} |