Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/e2fsprogs/
Date: Sun, 31 Oct 2021 01:29:33
Message-Id: 1635643579.f93bf60f2cb44d2172dbd546f741c78020780048.sam@gentoo
1 commit: f93bf60f2cb44d2172dbd546f741c78020780048
2 Author: Matt Whitlock <gentoo <AT> mattwhitlock <DOT> name>
3 AuthorDate: Sun Oct 31 01:21:51 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 31 01:26:19 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f93bf60f
7
8 sys-fs/e2fsprogs: merge sys-libs/e2fsprogs-libs back in (unkeyworded)
9
10 [sam:
11 As noted in the bug, we'll need to adjust reverse dependencies to tools(-) if
12 anything needs libext2fs or libe2p.
13
14 In terms of why we're doing this in the first place, the reason is that
15 for quite some time, e2fsprogs has been using internal copies of
16 the libraries provided by sys-fs/e2fsprogs-libs anyway, as observed when
17 applying a patch for a test failure which then re-appeared in progs.
18
19 That is, the split has been ineffective/a no-op for quite some time,
20 and this just makes the ebuilds reflect reality.
21
22 Splitting out the packages isn't supported upstream and requires
23 some ugly work and it's not something we're interested in rebasing
24 very often.]
25
26 Bug: https://bugs.gentoo.org/806875
27 Signed-off-by: Sam James <sam <AT> gentoo.org>
28
29 sys-fs/e2fsprogs/e2fsprogs-1.46.4-r50.ebuild | 183 +++++++++++++++++++++++++++
30 sys-fs/e2fsprogs/metadata.xml | 1 +
31 2 files changed, 184 insertions(+)
32
33 diff --git a/sys-fs/e2fsprogs/e2fsprogs-1.46.4-r50.ebuild b/sys-fs/e2fsprogs/e2fsprogs-1.46.4-r50.ebuild
34 new file mode 100644
35 index 00000000000..328bca250b3
36 --- /dev/null
37 +++ b/sys-fs/e2fsprogs/e2fsprogs-1.46.4-r50.ebuild
38 @@ -0,0 +1,183 @@
39 +# Copyright 1999-2021 Gentoo Authors
40 +# Distributed under the terms of the GNU General Public License v2
41 +
42 +EAPI=7
43 +
44 +inherit flag-o-matic systemd toolchain-funcs udev usr-ldscript multilib-minimal
45 +
46 +DESCRIPTION="Standard EXT2/EXT3/EXT4 filesystem utilities"
47 +HOMEPAGE="http://e2fsprogs.sourceforge.net/"
48 +SRC_URI="https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v${PV}/${P}.tar.xz
49 + elibc_mintlib? ( mirror://gentoo/${PN}-1.42.9-mint-r1.patch.xz )"
50 +
51 +LICENSE="GPL-2 BSD"
52 +SLOT="0"
53 +# Unkeyworded for testing unsplitting of e2fsprogs-libs, bug #806875
54 +#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
55 +IUSE="cron fuse lto nls static-libs +threads +tools elibc_FreeBSD"
56 +
57 +RDEPEND="!sys-libs/com_err
58 + !sys-libs/ss
59 + !sys-libs/${PN}-libs
60 + >=sys-apps/util-linux-2.16
61 + cron? ( sys-fs/lvm2[-device-mapper-only(-)] )
62 + fuse? ( sys-fs/fuse:0 )
63 + nls? ( virtual/libintl )
64 + tools? ( >=sys-apps/util-linux-2.16 )"
65 +DEPEND="${RDEPEND}"
66 +BDEPEND="virtual/pkgconfig
67 + sys-apps/texinfo
68 + nls? ( sys-devel/gettext )"
69 +
70 +PATCHES=(
71 + "${FILESDIR}"/${PN}-1.40-fbsd.patch
72 + "${FILESDIR}"/${PN}-1.42.13-fix-build-cflags.patch #516854
73 +
74 + # Upstream patches (can usually removed with next version bump)
75 +)
76 +
77 +pkg_setup() {
78 + if use tools ; then
79 + MULTILIB_WRAPPED_HEADERS=(
80 + /usr/include/ext2fs/ext2_types.h
81 + )
82 + fi
83 +}
84 +
85 +src_prepare() {
86 + if [[ ${CHOST} == *-mint* ]] ; then
87 + PATCHES+=( "${WORKDIR}"/${PN}-1.42.9-mint-r1.patch )
88 + fi
89 +
90 + default
91 +
92 + cp doc/RelNotes/v${PV}.txt ChangeLog || die "Failed to copy Release Notes"
93 +
94 + # Get rid of doc -- we don't use them. This also prevents a sandbox
95 + # violation due to mktexfmt invocation
96 + rm -r doc || die "Failed to remove doc dir"
97 +
98 + # prevent included intl cruft from building #81096
99 + sed -i -r \
100 + -e 's:@LIBINTL@:@LTLIBINTL@:' \
101 + MCONFIG.in || die 'intl cruft'
102 +}
103 +
104 +multilib_src_configure() {
105 + # Keep the package from doing silly things #261411
106 + export VARTEXFONTS="${T}/fonts"
107 +
108 + # needs open64() prototypes and friends
109 + append-cppflags -D_GNU_SOURCE
110 +
111 + local myeconfargs=(
112 + --with-root-prefix="${EPREFIX}"
113 + $(use_with cron crond-dir "${EPREFIX}/etc/cron.d")
114 + --with-systemd-unit-dir="$(systemd_get_systemunitdir)"
115 + --with-udev-rules-dir="${EPREFIX}$(get_udevdir)/rules.d"
116 + --enable-symlink-install
117 + --enable-elf-shlibs
118 + $(tc-has-tls || echo --disable-tls)
119 + $(multilib_native_use_enable fuse fuse2fs)
120 + $(use_enable nls)
121 + --disable-libblkid
122 + --disable-libuuid
123 + $(multilib_native_use_enable tools e2initrd-helper)
124 + --disable-fsck
125 + --disable-uuidd
126 + $(use_enable lto)
127 + $(use_with threads pthread)
128 + )
129 +
130 + # we use blkid/uuid from util-linux now
131 + if use kernel_linux ; then
132 + export ac_cv_lib_{uuid_uuid_generate,blkid_blkid_get_cache}=yes
133 + fi
134 +
135 + ac_cv_path_LDCONFIG=: \
136 + ECONF_SOURCE="${S}" \
137 + CC="$(tc-getCC)" \
138 + BUILD_CC="$(tc-getBUILD_CC)" \
139 + BUILD_LD="$(tc-getBUILD_LD)" \
140 + econf "${myeconfargs[@]}"
141 +
142 + if [[ ${CHOST} != *-uclibc ]] && grep -qs 'USE_INCLUDED_LIBINTL.*yes' config.{log,status} ; then
143 + eerror "INTL sanity check failed, aborting build."
144 + eerror "Please post your ${S}/config.log file as an"
145 + eerror "attachment to https://bugs.gentoo.org/show_bug.cgi?id=81096"
146 + die "Preventing included intl cruft from building"
147 + fi
148 +}
149 +
150 +multilib_src_compile() {
151 + if ! multilib_is_native_abi || ! use tools ; then
152 + emake -C lib/et V=1
153 + emake -C lib/ss V=1
154 + if use tools ; then
155 + emake -C lib/ext2fs V=1
156 + emake -C lib/e2p V=1
157 + fi
158 + return 0
159 + fi
160 +
161 + emake V=1
162 +
163 + # Build the FreeBSD helper
164 + if use elibc_FreeBSD ; then
165 + cp "${FILESDIR}"/fsck_ext2fs.c . || die
166 + emake V=1 fsck_ext2fs
167 + fi
168 +}
169 +
170 +multilib_src_install() {
171 + if ! multilib_is_native_abi || ! use tools ; then
172 + emake -C lib/et V=1 DESTDIR="${D}" install
173 + emake -C lib/ss V=1 DESTDIR="${D}" install
174 +
175 + if use tools ; then
176 + emake -C lib/ext2fs V=1 DESTDIR="${D}" install
177 + emake -C lib/e2p V=1 DESTDIR="${D}" install
178 + fi
179 + else
180 + emake \
181 + STRIP=: \
182 + DESTDIR="${D}" \
183 + install
184 +
185 + # Move shared libraries to /lib/, install static libraries to
186 + # /usr/lib/, and install linker scripts to /usr/lib/.
187 + gen_usr_ldscript -a e2p ext2fs
188 +
189 + if use elibc_FreeBSD ; then
190 + # Install helpers for us
191 + into /
192 + dosbin "${S}"/fsck_ext2fs
193 + fi
194 + fi
195 +
196 + gen_usr_ldscript -a com_err ss $(usex kernel_linux '' 'uuid blkid')
197 +
198 + # configure doesn't have an option to disable static libs :/
199 + if ! use static-libs ; then
200 + find "${ED}" -name '*.a' -delete || die
201 + fi
202 +}
203 +
204 +multilib_src_install_all() {
205 + einstalldocs
206 +
207 + if use tools ; then
208 + insinto /etc
209 + doins "${FILESDIR}"/e2fsck.conf
210 +
211 + if use elibc_FreeBSD ; then
212 + into /
213 + doman "${FILESDIR}"/fsck_ext2fs.8
214 +
215 + # filefrag is linux only
216 + rm \
217 + "${ED}"/usr/sbin/filefrag \
218 + "${ED}"/usr/share/man/man8/filefrag.8 || die
219 + fi
220 + fi
221 +}
222
223 diff --git a/sys-fs/e2fsprogs/metadata.xml b/sys-fs/e2fsprogs/metadata.xml
224 index 87f72d5af23..902c90f4f05 100644
225 --- a/sys-fs/e2fsprogs/metadata.xml
226 +++ b/sys-fs/e2fsprogs/metadata.xml
227 @@ -9,6 +9,7 @@
228 <flag name="cron">Install e2scrub_all cron script</flag>
229 <flag name="fuse">Build fuse2fs, a FUSE file system client for ext2/ext3/ext4 file systems</flag>
230 <flag name="lto">Build with link time optimization (LTO)</flag>
231 + <flag name="tools">Build extfs tools (mke2fs, e2fsck, tune2fs, etc.)</flag>
232 </use>
233 <upstream>
234 <remote-id type="cpe">cpe:/a:e2fsprogs_project:e2fsprogs</remote-id>