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/files/, sys-fs/xfsprogs/
Date: Mon, 26 Feb 2018 10:01:41
Message-Id: 1519639283.2517dd766cf84d251631f4324f7ec4bce912abb9.polynomial-c@gentoo
1 commit: 2517dd766cf84d251631f4324f7ec4bce912abb9
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 26 10:01:23 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 26 10:01:23 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2517dd76
7
8 sys-fs/xfsprogs: Bump to version 4.15.0
9
10 Package-Manager: Portage-2.3.24, Repoman-2.3.6
11
12 sys-fs/xfsprogs/Manifest | 1 +
13 sys-fs/xfsprogs/files/xfsprogs-4.15.0-docdir.patch | 11 ++
14 .../files/xfsprogs-4.15.0-sharedlibs.patch | 114 +++++++++++++++++++++
15 sys-fs/xfsprogs/xfsprogs-4.15.0.ebuild | 96 +++++++++++++++++
16 4 files changed, 222 insertions(+)
17
18 diff --git a/sys-fs/xfsprogs/Manifest b/sys-fs/xfsprogs/Manifest
19 index 522eafb116f..897ba826eb8 100644
20 --- a/sys-fs/xfsprogs/Manifest
21 +++ b/sys-fs/xfsprogs/Manifest
22 @@ -1,2 +1,3 @@
23 DIST xfsprogs-4.14.0.tar.xz 1137048 BLAKE2B b58373ca7f58e5d887cf18ed2aab169aed4ba233a50f1f1ff41eaf0dcd039ae290f1e49b385da19ceff3a34e770f90943502eefd7c1469c5cba74f45185fd07e SHA512 69832a1b9636dc5a77ad277122bb24bc09c71ad743c3ab5bf830d398557e63fa1477dd08c6115a53a94f01fc27e58d70268416013cc25e026baed7a74af8d506
24 +DIST xfsprogs-4.15.0.tar.xz 1186416 BLAKE2B a7d8c74498231e63a0fe7c5a37366852ed8dbe1db6d2deff8c4500c8e113f2e5180e547cdeabc87629922d184982bacb4be40969b78b87fcc07c5c29f22972bd SHA512 78d67a603c45a0d2b69d2cd0f7400b1e2c7b8b9bca3fa78529b8558bebda082e24d683d275ca546bb63c6cfd53d3b6048109b815e9fc5ced34d1c32533c2e77f
25 DIST xfsprogs-4.9.0.tar.xz 1087940 BLAKE2B f896a1248e978b4d7c879c91e73f16fd5894cb95c22143e2f805ab2f54b75cafef63cd574fbf3ccbaebb59914b3759a1f8b3a49790c8c05df145d01416723c62 SHA512 990946f0a34381f57afb39bcda0ff539e18af4de2ecc19c833ffd4fb7c22c25b501091c1f0953db103a62204d952c9eecba21f22f3c5910286456da65fb09fa7
26
27 diff --git a/sys-fs/xfsprogs/files/xfsprogs-4.15.0-docdir.patch b/sys-fs/xfsprogs/files/xfsprogs-4.15.0-docdir.patch
28 new file mode 100644
29 index 00000000000..53ba3ec0f5d
30 --- /dev/null
31 +++ b/sys-fs/xfsprogs/files/xfsprogs-4.15.0-docdir.patch
32 @@ -0,0 +1,11 @@
33 +--- xfsprogs-4.15.0/scrub/Makefile
34 ++++ xfsprogs-4.15.0/scrub/Makefile
35 +@@ -25,7 +25,7 @@
36 + CRONTABS = xfs_scrub_all.cron
37 + OPTIONAL_TARGETS += $(CRONTABS)
38 + # Don't enable the crontab by default for now
39 +-CROND_DIR = $(PKG_LIB_DIR)/$(PKG_NAME)
40 ++CROND_DIR = $(PKG_DOC_DIR)
41 + endif
42 +
43 + endif # scrub_prereqs
44
45 diff --git a/sys-fs/xfsprogs/files/xfsprogs-4.15.0-sharedlibs.patch b/sys-fs/xfsprogs/files/xfsprogs-4.15.0-sharedlibs.patch
46 new file mode 100644
47 index 00000000000..1080e440094
48 --- /dev/null
49 +++ b/sys-fs/xfsprogs/files/xfsprogs-4.15.0-sharedlibs.patch
50 @@ -0,0 +1,114 @@
51 +--- xfsprogs-4.15.0/include/buildmacros
52 ++++ xfsprogs-4.15.0/include/buildmacros
53 +@@ -70,18 +70,9 @@
54 + # /usr/lib.
55 + ifeq ($(ENABLE_SHARED),yes)
56 + INSTALL_LTLIB_DEV = \
57 +- cd $(TOPDIR)/$(LIBNAME)/.libs; \
58 +- ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
59 +- ../$(INSTALL) -m 644 -T old_lib $(LIBNAME).lai $(PKG_LIB_DIR); \
60 +- ../$(INSTALL) -m 644 $(LIBNAME).lai $(PKG_LIB_DIR)/$(LIBNAME).la ; \
61 +- ../$(INSTALL) -m 755 -d $(PKG_ROOT_LIB_DIR); \
62 +- ../$(INSTALL) -T so_base $(LIBNAME).lai $(PKG_ROOT_LIB_DIR); \
63 +- if [ "x$(shell readlink -f $(PKG_LIB_DIR))" != \
64 +- "x$(shell readlink -f $(PKG_ROOT_LIB_DIR))" ]; then \
65 +- ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).a $(PKG_ROOT_LIB_DIR)/$(LIBNAME).a; \
66 +- ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).la $(PKG_ROOT_LIB_DIR)/$(LIBNAME).la; \
67 +- ../$(INSTALL) -S $(PKG_ROOT_LIB_DIR)/$(LIBNAME).so $(PKG_LIB_DIR)/$(LIBNAME).so; \
68 +- fi
69 ++ set -e; cd $(TOPDIR)/$(LIBNAME); \
70 ++ $(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
71 ++ env -uDIST_ROOT $(LTINSTALL) $(TOPDIR)/$(LIBNAME)/$(LIBNAME).la $(DIST_ROOT)$(PKG_LIB_DIR)/$(LIBNAME).la
72 + else
73 + INSTALL_LTLIB_DEV = $(INSTALL_LTLIB_STATIC)
74 + endif
75 +--- xfsprogs-4.15.0/libfrog/Makefile
76 ++++ xfsprogs-4.15.0/libfrog/Makefile
77 +@@ -5,6 +5,8 @@
78 + TOPDIR = ..
79 + include $(TOPDIR)/include/builddefs
80 +
81 ++LTLIBS = $(LIBXFS) $(LIBBLKID)
82 ++
83 + LTLIBRARY = libfrog.la
84 + LT_CURRENT = 0
85 + LT_REVISION = 0
86 +@@ -34,6 +36,9 @@
87 +
88 + include $(BUILDRULES)
89 +
90 +-install install-dev: default
91 ++install: default
92 ++
93 ++install-dev: default
94 ++ $(INSTALL_LTLIB_DEV)
95 +
96 + -include .ltdep
97 +--- xfsprogs-4.15.0/libhandle/Makefile
98 ++++ xfsprogs-4.15.0/libhandle/Makefile
99 +@@ -24,7 +24,6 @@
100 + include $(BUILDRULES)
101 +
102 + install: default
103 +- $(INSTALL_LTLIB)
104 +
105 + install-dev: default
106 + $(INSTALL_LTLIB_DEV)
107 +--- xfsprogs-4.15.0/libxcmd/Makefile
108 ++++ xfsprogs-4.15.0/libxcmd/Makefile
109 +@@ -12,6 +12,8 @@
110 +
111 + CFILES = command.c input.c help.c quit.c
112 +
113 ++LTLIBS = $(LIBXFS) $(LIBBLKID)
114 ++
115 + ifeq ($(ENABLE_READLINE),yes)
116 + LCFLAGS += -DENABLE_READLINE
117 + LTLIBS += $(LIBREADLINE) $(LIBTERMCAP)
118 +@@ -26,6 +28,9 @@
119 +
120 + include $(BUILDRULES)
121 +
122 +-install install-dev: default
123 ++install: default
124 ++
125 ++install-dev: default
126 ++ $(INSTALL_LTLIB_DEV)
127 +
128 + -include .ltdep
129 +--- xfsprogs-4.15.0/libxfs/Makefile
130 ++++ xfsprogs-4.15.0/libxfs/Makefile
131 +@@ -151,6 +151,7 @@
132 +
133 + install-dev: install
134 + $(INSTALL) -m 644 $(PKGHFILES) $(PKG_INC_DIR)
135 ++ $(INSTALL_LTLIB_DEV)
136 +
137 + # We need to install the headers before building the dependencies. If we
138 + # include the .ltdep file, the makefile decides that it needs to build the
139 +--- xfsprogs-4.15.0/libxlog/Makefile
140 ++++ xfsprogs-4.15.0/libxlog/Makefile
141 +@@ -19,6 +19,9 @@
142 +
143 + include $(BUILDRULES)
144 +
145 +-install install-dev: default
146 ++install: default
147 ++
148 ++install-dev: default
149 ++ $(INSTALL_LTLIB_DEV)
150 +
151 + -include .ltdep
152 +--- xfsprogs-4.15.0/Makefile
153 ++++ xfsprogs-4.15.0/Makefile
154 +@@ -92,6 +92,10 @@
155 + mkfs: libxcmd
156 + spaceman: libxcmd
157 + scrub: libhandle libxcmd
158 ++libfrog: libxfs
159 ++libfrog-install-dev: libxfs-install-dev
160 ++libxlog: libxfs
161 ++libxlog-install-dev: libxfs-install-dev
162 +
163 + ifeq ($(HAVE_BUILDDEFS), yes)
164 + include $(BUILDRULES)
165
166 diff --git a/sys-fs/xfsprogs/xfsprogs-4.15.0.ebuild b/sys-fs/xfsprogs/xfsprogs-4.15.0.ebuild
167 new file mode 100644
168 index 00000000000..148d4aa1cf8
169 --- /dev/null
170 +++ b/sys-fs/xfsprogs/xfsprogs-4.15.0.ebuild
171 @@ -0,0 +1,96 @@
172 +# Copyright 1999-2018 Gentoo Foundation
173 +# Distributed under the terms of the GNU General Public License v2
174 +
175 +EAPI=6
176 +
177 +inherit toolchain-funcs multilib systemd
178 +
179 +DESCRIPTION="xfs filesystem utilities"
180 +HOMEPAGE="http://oss.sgi.com/projects/xfs/"
181 +SRC_URI="https://www.kernel.org/pub/linux/utils/fs/xfs/${PN}/${P}.tar.xz"
182 +
183 +LICENSE="LGPL-2.1"
184 +SLOT="0"
185 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
186 +IUSE="libedit nls readline static static-libs"
187 +REQUIRED_USE="static? ( static-libs )"
188 +
189 +LIB_DEPEND=">=sys-apps/util-linux-2.17.2[static-libs(+)]
190 + readline? ( sys-libs/readline:0=[static-libs(+)] )
191 + !readline? ( libedit? ( dev-libs/libedit[static-libs(+)] ) )"
192 +RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
193 + !<sys-fs/xfsdump-3"
194 +DEPEND="${RDEPEND}
195 + static? (
196 + ${LIB_DEPEND}
197 + readline? ( sys-libs/ncurses:0=[static-libs] )
198 + )
199 + nls? ( sys-devel/gettext )"
200 +
201 +PATCHES=(
202 + "${FILESDIR}"/${PN}-4.9.0-underlinking.patch
203 + "${FILESDIR}"/${PN}-4.15.0-sharedlibs.patch
204 + "${FILESDIR}"/${PN}-4.15.0-docdir.patch
205 +)
206 +
207 +pkg_setup() {
208 + if use readline && use libedit ; then
209 + ewarn "You have USE='readline libedit' but these are exclusive."
210 + ewarn "Defaulting to readline; please disable this USE flag if you want libedit."
211 + fi
212 +}
213 +
214 +src_prepare() {
215 + default
216 +
217 + # LLDFLAGS is used for programs, so apply -all-static when USE=static is enabled.
218 + # Clear out -static from all flags since we want to link against dynamic xfs libs.
219 + sed -i \
220 + -e "/^PKG_DOC_DIR/s:@pkg_name@:${PF}:" \
221 + -e "1iLLDFLAGS += $(usex static '-all-static' '')" \
222 + include/builddefs.in || die
223 + find -name Makefile -exec \
224 + sed -i -r -e '/^LLDFLAGS [+]?= -static(-libtool-libs)?$/d' {} +
225 +
226 + # TODO: Write a patch for configure.ac to use pkg-config for the uuid-part.
227 + if use static && use readline ; then
228 + sed -i \
229 + -e 's|-lreadline|& -lncurses|' \
230 + -e 's|-lblkid|& -luuid|' \
231 + configure || die
232 + fi
233 +}
234 +
235 +src_configure() {
236 + export DEBUG=-DNDEBUG
237 + export OPTIMIZER=${CFLAGS}
238 + unset PLATFORM # if set in user env, this breaks configure
239 +
240 + local myconf=(
241 + --with-crond-dir="${EPREFIX}/etc/cron.d"
242 + --with-systemd-unit-dir="$(systemd_get_systemunitdir)"
243 + $(use_enable nls gettext)
244 + $(use_enable readline)
245 + $(usex readline --disable-editline $(use_enable libedit editline))
246 + )
247 + if use static || use static-libs ; then
248 + myconf+=( --enable-static )
249 + else
250 + myconf+=( --disable-static )
251 + fi
252 +
253 + econf "${myconf[@]}"
254 +
255 + MAKEOPTS+=" V=1"
256 +}
257 +
258 +src_install() {
259 + emake DIST_ROOT="${ED}" install
260 + # parallel install fails on this target for >=xfsprogs-3.2.0
261 + emake -j1 DIST_ROOT="${ED}" install-dev
262 +
263 + # handle is for xfsdump, the rest for xfsprogs
264 + gen_usr_ldscript -a handle xcmd xfs xlog frog
265 + # removing unnecessary .la files if not needed
266 + use static-libs || find "${ED}" -name '*.la' -delete
267 +}