1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit toolchain-funcs multilib-minimal
11 DESCRIPTION="e2fsprogs libraries (common error and subsystem)"
12 HOMEPAGE="http://e2fsprogs.sourceforge.net/"
13 SRC_URI="mirror://sourceforge/e2fsprogs/${MY_P}.tar.xz
14 mirror://kernel/linux/kernel/people/tytso/e2fsprogs/v${PV}/${MY_P}.tar.xz"
18 KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~m68k-mint ~x86-solaris"
21 RDEPEND="!sys-libs/com_err
23 !<sys-fs/e2fsprogs-1.41.8"
24 DEPEND="virtual/pkgconfig"
26 S="${WORKDIR}/${MY_P}"
29 "${FILESDIR}"/${PN}-1.42.13-fix-build-cflags.patch #516854
35 cp doc/RelNotes/v${PV}.txt ChangeLog || die "Failed to copy Release Notes"
38 multilib_src_configure() {
41 $(tc-has-tls || echo --disable-tls)
42 --disable-e2initrd-helper
46 # we use blkid/uuid from util-linux now
47 if use kernel_linux ; then
48 export ac_cv_lib_{uuid_uuid_generate,blkid_blkid_get_cache}=yes
49 myconf+=( --disable-lib{blkid,uuid} )
52 ac_cv_path_LDCONFIG=: \
55 BUILD_CC="$(tc-getBUILD_CC)" \
56 BUILD_LD="$(tc-getBUILD_LD)" \
60 multilib_src_compile() {
61 emake -C lib/et V=1 || die "Failed to build libcom"
63 emake -C lib/ss V=1 || die "Failed to build libss"
67 if multilib_is_native_abi; then
68 emake -C lib/et V=1 check || die "Failed to test libcom"
70 emake -C lib/ss V=1 check || die "Failed to test libss"
74 multilib_src_install() {
75 emake -C lib/et V=1 DESTDIR="${D%/}" install || die "Failed to install libcom"
77 emake -C lib/ss V=1 DESTDIR="${D%/}" install || die "Failed to install libss"
79 # We call "gen_usr_ldscript -a" to ensure libs are present in /lib to support
80 # split /usr (e.g. "e2fsck" from sys-fs/e2fsprogs is installed in /sbin and
81 # links to libcom_err.so).
82 gen_usr_ldscript -a com_err ss $(usex kernel_linux '' 'uuid blkid')
84 if ! use static-libs ; then
85 find "${ED%/}" -name '*.a' -delete || die
89 multilib_src_install_all() {
90 # Package installs same header twice -- use symlink instead
91 dosym et/com_err.h /usr/include/com_err.h