Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/xfsprogs/, sys-fs/xfsprogs/files/
Date: Fri, 21 Jul 2017 07:35:54
Message-Id: 1500622542.93d3fdda6c9f6225d83e952f12d4c070c9eaaa55.polynomial-c@gentoo
1 commit: 93d3fdda6c9f6225d83e952f12d4c070c9eaaa55
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jul 21 07:34:31 2017 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Fri Jul 21 07:35:42 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93d3fdda
7
8 sys-fs/xfsprogs: Bump to version 4.12.0
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.3
11
12 sys-fs/xfsprogs/Manifest | 1 +
13 .../files/xfsprogs-4.12.0-sharedlibs.patch | 81 +++++++++++++++++++
14 sys-fs/xfsprogs/xfsprogs-4.12.0.ebuild | 94 ++++++++++++++++++++++
15 3 files changed, 176 insertions(+)
16
17 diff --git a/sys-fs/xfsprogs/Manifest b/sys-fs/xfsprogs/Manifest
18 index 1bfb6196753..e53813498e6 100644
19 --- a/sys-fs/xfsprogs/Manifest
20 +++ b/sys-fs/xfsprogs/Manifest
21 @@ -1,5 +1,6 @@
22 DIST xfsprogs-4.10.0.tar.xz 1091648 SHA256 d8cb9ab2c686699d37914354ce3992b4aff3677093cbce06ad18bf798da8a8a7 SHA512 a29b5e714320d5fcbda7df6e8d81a07bdcba92d7d528ce1c354f1c1b41cb3719443a98cb37ca052f566eb3a08967bcf45492d0b9d95460da90b8a070a7a032e8 WHIRLPOOL cc2ed46749c6840ccc6521c6ef5d1ca79156245faf18ef2b03b7a0f86ac460a0f011d828caa51f57db6ad8445f8cc218f30b1d0ab557db290935fd9d0a941ef0
23 DIST xfsprogs-4.11.0.tar.xz 1113480 SHA256 c3a6d87b564d7738243c507df82276bed982265e345363a95f2c764e8a5f5bb2 SHA512 2db59553e4442c999a718ccf712b01de80b1e3acd1c3e5f9f7f5dc59e6c9180aa1a42085363303fe454d441bc2f886e118fc2958320afa49c7a8886fcfb5d72c WHIRLPOOL df267970bbcbc3c8a05d02a5e334bdeb686acea74e647dee6e874bc083a64cecef7c45072619edfd4841856cf0b7c91056504207bbcd5f021b1a1b452ef794da
24 +DIST xfsprogs-4.12.0.tar.xz 1128400 SHA256 b330ad8d737f4152ae511580102e2fc49212bb51dfb4b614084344abae46d0df SHA512 1dc4a0a5f40baf1d6398c8f07b4cb3ab796cf052c34b811d60b08c60a4700c2ced8d4d1adb878f8b85ba58cf3e1276db1477109de538fd427d3e359a52f59d4a WHIRLPOOL c18d3c9dfab8ccb877eb6fa9fa05be3c614a587c6cb616a9f18b52debb8ecacbd22056cb397ff9e69407c66e105d034458b41f0ba4275352f31398e64d303c02
25 DIST xfsprogs-4.5.0.tar.gz 1524382 SHA256 e49beb314984efbd0d758abb5c6137db3bb60a88e59e1e94c00defb536cf89f8 SHA512 19c95551dc91ec46916f9a7e3d7976907664d32dd5fdc26af0ca62ca74c4b3c10f9e843aac8214ea9d1c0bf140c9f4e321d059808af01a623abedd5067011314 WHIRLPOOL 54d742635df024a63181da76c3220671610068363af85be2677521f20342595a5cebb2fd169945572351901ee2c9384f79f54a381ab3620dde22d863aa66d469
26 DIST xfsprogs-4.8.0.tar.xz 1088376 SHA256 82ce9cb3a55f4e208e8fe3471ff0aff0602b8300f3e50bdf05cc7e11549686f9 SHA512 9c83763ae4925980969e66827edef41774e4dc09ae42637630167b5e0329675517ea7b50de751fcb9485fbcf8e470d24dd20b51475bcb56723dae6ee9fb140c7 WHIRLPOOL dc9f9b5c0b4e9b61f023fb972137126f22909c77908990e1beb391689fe6512a7810d9bd1ccfc0cfe4cd5379d99c123ddc9d0b6194e0a81e946e2304f964f180
27 DIST xfsprogs-4.9.0.tar.xz 1087940 SHA256 f1e60a9a54583dba82fa506dd9b59bdec110a968f80f507bf5f93b263af7a4df SHA512 990946f0a34381f57afb39bcda0ff539e18af4de2ecc19c833ffd4fb7c22c25b501091c1f0953db103a62204d952c9eecba21f22f3c5910286456da65fb09fa7 WHIRLPOOL a9b582a42967ce1e314cd0ac3518792c2e10f7bb1370151a68a09a8e21e40cc6818b9778dfdd248961c3a1a08a70424f0150219488a18bc5d60e5669702c472f
28
29 diff --git a/sys-fs/xfsprogs/files/xfsprogs-4.12.0-sharedlibs.patch b/sys-fs/xfsprogs/files/xfsprogs-4.12.0-sharedlibs.patch
30 new file mode 100644
31 index 00000000000..cb59d44a46b
32 --- /dev/null
33 +++ b/sys-fs/xfsprogs/files/xfsprogs-4.12.0-sharedlibs.patch
34 @@ -0,0 +1,81 @@
35 +--- xfsprogs-4.12.0/include/buildmacros
36 ++++ xfsprogs-4.12.0/include/buildmacros
37 +@@ -70,18 +70,9 @@
38 + # /usr/lib.
39 + ifeq ($(ENABLE_SHARED),yes)
40 + INSTALL_LTLIB_DEV = \
41 +- cd $(TOPDIR)/$(LIBNAME)/.libs; \
42 +- ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
43 +- ../$(INSTALL) -m 644 -T old_lib $(LIBNAME).lai $(PKG_LIB_DIR); \
44 +- ../$(INSTALL) -m 644 $(LIBNAME).lai $(PKG_LIB_DIR)/$(LIBNAME).la ; \
45 +- ../$(INSTALL) -m 755 -d $(PKG_ROOT_LIB_DIR); \
46 +- ../$(INSTALL) -T so_base $(LIBNAME).lai $(PKG_ROOT_LIB_DIR); \
47 +- if [ "x$(shell readlink -f $(PKG_LIB_DIR))" != \
48 +- "x$(shell readlink -f $(PKG_ROOT_LIB_DIR))" ]; then \
49 +- ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).a $(PKG_ROOT_LIB_DIR)/$(LIBNAME).a; \
50 +- ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).la $(PKG_ROOT_LIB_DIR)/$(LIBNAME).la; \
51 +- ../$(INSTALL) -S $(PKG_ROOT_LIB_DIR)/$(LIBNAME).so $(PKG_LIB_DIR)/$(LIBNAME).so; \
52 +- fi
53 ++ set -e; cd $(TOPDIR)/$(LIBNAME); \
54 ++ $(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
55 ++ env -uDIST_ROOT $(LTINSTALL) $(TOPDIR)/$(LIBNAME)/$(LIBNAME).la $(DIST_ROOT)$(PKG_LIB_DIR)/$(LIBNAME).la
56 + else
57 + INSTALL_LTLIB_DEV = $(INSTALL_LTLIB_STATIC)
58 + endif
59 +--- xfsprogs-4.12.0/libhandle/Makefile
60 ++++ xfsprogs-4.12.0/libhandle/Makefile
61 +@@ -24,7 +24,6 @@
62 + include $(BUILDRULES)
63 +
64 + install: default
65 +- $(INSTALL_LTLIB)
66 +
67 + install-dev: default
68 + $(INSTALL_LTLIB_DEV)
69 +--- xfsprogs-4.12.0/libxcmd/Makefile
70 ++++ xfsprogs-4.12.0/libxcmd/Makefile
71 +@@ -34,6 +34,9 @@
72 +
73 + include $(BUILDRULES)
74 +
75 +-install install-dev: default
76 ++install: default
77 ++
78 ++install-dev: default
79 ++ $(INSTALL_LTLIB_DEV)
80 +
81 + -include .ltdep
82 +--- xfsprogs-4.12.0/libxfs/Makefile
83 ++++ xfsprogs-4.12.0/libxfs/Makefile
84 +@@ -151,6 +151,7 @@
85 +
86 + install-dev: install
87 + $(INSTALL) -m 644 $(PKGHFILES) $(PKG_INC_DIR)
88 ++ $(INSTALL_LTLIB_DEV)
89 +
90 + # We need to install the headers before building the dependencies. If we
91 + # include the .ltdep file, the makefile decides that it needs to build the
92 +--- xfsprogs-4.12.0/libxlog/Makefile
93 ++++ xfsprogs-4.12.0/libxlog/Makefile
94 +@@ -19,6 +19,9 @@
95 +
96 + include $(BUILDRULES)
97 +
98 +-install install-dev: default
99 ++install: default
100 ++
101 ++install-dev: default
102 ++ $(INSTALL_LTLIB_DEV)
103 +
104 + -include .ltdep
105 +--- xfsprogs-4.12.0/Makefile
106 ++++ xfsprogs-4.12.0/Makefile
107 +@@ -89,6 +89,8 @@
108 + copy: libxlog
109 + mkfs: libxcmd
110 + spaceman: libxcmd
111 ++libxlog: libxfs
112 ++libxlog-install-dev: libxfs-install-dev
113 +
114 + ifeq ($(HAVE_BUILDDEFS), yes)
115 + include $(BUILDRULES)
116
117 diff --git a/sys-fs/xfsprogs/xfsprogs-4.12.0.ebuild b/sys-fs/xfsprogs/xfsprogs-4.12.0.ebuild
118 new file mode 100644
119 index 00000000000..0cfd1dd972a
120 --- /dev/null
121 +++ b/sys-fs/xfsprogs/xfsprogs-4.12.0.ebuild
122 @@ -0,0 +1,94 @@
123 +# Copyright 1999-2017 Gentoo Foundation
124 +# Distributed under the terms of the GNU General Public License v2
125 +
126 +EAPI=5
127 +
128 +inherit eutils toolchain-funcs multilib
129 +
130 +DESCRIPTION="xfs filesystem utilities"
131 +HOMEPAGE="http://oss.sgi.com/projects/xfs/"
132 +SRC_URI="https://www.kernel.org/pub/linux/utils/fs/xfs/${PN}/${P}.tar.xz"
133 +
134 +LICENSE="LGPL-2.1"
135 +SLOT="0"
136 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
137 +IUSE="libedit nls readline static static-libs"
138 +REQUIRED_USE="static? ( static-libs )"
139 +
140 +LIB_DEPEND=">=sys-apps/util-linux-2.17.2[static-libs(+)]
141 + readline? ( sys-libs/readline:0=[static-libs(+)] )
142 + !readline? ( libedit? ( dev-libs/libedit[static-libs(+)] ) )"
143 +RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
144 + !<sys-fs/xfsdump-3"
145 +DEPEND="${RDEPEND}
146 + static? (
147 + ${LIB_DEPEND}
148 + readline? ( sys-libs/ncurses:0=[static-libs] )
149 + )
150 + nls? ( sys-devel/gettext )"
151 +
152 +PATCHES=(
153 + "${FILESDIR}"/${PN}-4.12.0-sharedlibs.patch
154 + "${FILESDIR}"/${PN}-4.7.0-libxcmd-link.patch
155 + "${FILESDIR}"/${PN}-4.9.0-underlinking.patch
156 +)
157 +
158 +pkg_setup() {
159 + if use readline && use libedit ; then
160 + ewarn "You have USE='readline libedit' but these are exclusive."
161 + ewarn "Defaulting to readline; please disable this USE flag if you want libedit."
162 + fi
163 +}
164 +
165 +src_prepare() {
166 + epatch "${PATCHES[@]}"
167 +
168 + # LLDFLAGS is used for programs, so apply -all-static when USE=static is enabled.
169 + # Clear out -static from all flags since we want to link against dynamic xfs libs.
170 + sed -i \
171 + -e "/^PKG_DOC_DIR/s:@pkg_name@:${PF}:" \
172 + -e "1iLLDFLAGS += $(usex static '-all-static' '')" \
173 + include/builddefs.in || die
174 + find -name Makefile -exec \
175 + sed -i -r -e '/^LLDFLAGS [+]?= -static(-libtool-libs)?$/d' {} +
176 +
177 + # TODO: Write a patch for configure.ac to use pkg-config for the uuid-part.
178 + if use static && use readline ; then
179 + sed -i \
180 + -e 's|-lreadline|& -lncurses|' \
181 + -e 's|-lblkid|& -luuid|' \
182 + configure || die
183 + fi
184 +}
185 +
186 +src_configure() {
187 + export DEBUG=-DNDEBUG
188 + export OPTIMIZER=${CFLAGS}
189 + unset PLATFORM # if set in user env, this breaks configure
190 +
191 + local myconf
192 + if use static || use static-libs ; then
193 + myconf+=" --enable-static"
194 + else
195 + myconf+=" --disable-static"
196 + fi
197 +
198 + econf \
199 + $(use_enable nls gettext) \
200 + $(use_enable readline) \
201 + $(usex readline --disable-editline $(use_enable libedit editline)) \
202 + ${myconf}
203 +
204 + MAKEOPTS+=" V=1"
205 +}
206 +
207 +src_install() {
208 + emake DIST_ROOT="${ED}" install
209 + # parallel install fails on this target for >=xfsprogs-3.2.0
210 + emake -j1 DIST_ROOT="${ED}" install-dev
211 +
212 + # handle is for xfsdump, the rest for xfsprogs
213 + gen_usr_ldscript -a handle xcmd xfs xlog
214 + # removing unnecessary .la files if not needed
215 + use static-libs || find "${ED}" -name '*.la' -delete
216 +}