commit:     02a691c14c0244d9a5c6bd3ed86047ac71b1c9ab
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Sep  4 07:53:44 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Sep  4 07:53:44 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02a691c1

sys-fs/xfsdump: add 3.2.0, filter LTO

Filter LTO as well while here and pass CFLAGS when linking so -Werror=x
actually works.

The filtering is because of lto-type-mismatch errors but xfsdump is on
life support: https://lore.kernel.org/linux-xfs/20240829175925.59281-1-bodonnel 
<AT> redhat.com/

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-fs/xfsdump/Manifest             |  1 +
 sys-fs/xfsdump/xfsdump-3.2.0.ebuild | 85 +++++++++++++++++++++++++++++++++++++
 2 files changed, 86 insertions(+)

diff --git a/sys-fs/xfsdump/Manifest b/sys-fs/xfsdump/Manifest
index 36ae26c8d448..ccb2ec6018e5 100644
--- a/sys-fs/xfsdump/Manifest
+++ b/sys-fs/xfsdump/Manifest
@@ -1 +1,2 @@
 DIST xfsdump-3.1.12.tar.xz 609500 BLAKE2B 
2cd39e9f66459d75e9a254c3409279fecb95883468fc933d4d8326d00e89422ce433472c98073aa2aef8c6c4a3a1ed7e5ef94584993eb4087b2a4667187c6aee
 SHA512 
803a3b639aef35ec882f40faeaabf381973ba2636ce0c9d06568361f5398c3c6842ffe184fc01441bf51bb1ed1b9e40b012715c09c8cc942484cc031a8eb1757
+DIST xfsdump-3.2.0.tar.xz 615312 BLAKE2B 
2971608b1ae3e280cba31ffefc379995211088338926f9c3f1679c825742b585bb1ab875b3da2afd48f6cd2bad04831e5e61d0251f018e2bebf72af4009ef764
 SHA512 
339317a92d7fda3e63b292db5e8a6d4a107a7f2ec269d54c109b6ade2f76cd823fb53db7a3a7e8a6c4883d6ce5626c7bc85fef6741f44699a4a8dfecfaa5231f

diff --git a/sys-fs/xfsdump/xfsdump-3.2.0.ebuild 
b/sys-fs/xfsdump/xfsdump-3.2.0.ebuild
new file mode 100644
index 000000000000..d02e15647bca
--- /dev/null
+++ b/sys-fs/xfsdump/xfsdump-3.2.0.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="XFS dump/restore utilities"
+HOMEPAGE="https://xfs.wiki.kernel.org/ 
https://git.kernel.org/pub/scm/fs/xfs/xfsdump-dev.git/";
+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 ~loong ~mips ~ppc ~ppc64 
~riscv ~sparc ~x86"
+IUSE="ncurses nls"
+
+RDEPEND="
+       >=sys-apps/attr-2.4.19
+       sys-apps/util-linux
+       sys-fs/e2fsprogs
+       >=sys-fs/xfsprogs-3.2.0
+       ncurses? ( sys-libs/ncurses:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       ncurses? ( virtual/pkgconfig )
+       nls? ( sys-devel/gettext )
+"
+
+PATCHES=(
+       # bug #335115
+       "${FILESDIR}"/${PN}-3.1.9-prompt-overflow.patch
+       # bug #311881
+       "${FILESDIR}"/${PN}-3.1.9-no-symlink.patch
+       # bug #561664
+       "${FILESDIR}"/${PN}-3.1.6-linguas.patch
+
+       "${FILESDIR}"/${PN}-3.1.9-fix-docs.patch
+       "${FILESDIR}"/${PN}-3.1.9-skip-inventory-debian-subfolder.patch
+)
+
+src_prepare() {
+       sed -i \
+               -e "/^PKG_DOC_DIR/s:@pkg_name@:${PF}:" \
+               include/builddefs.in \
+               || die
+
+       # bug #605852
+       sed -i \
+               -e "s:enable_curses=[a-z]*:enable_curses=$(usex ncurses):" \
+               -e "s:libcurses=\"[^\"]*\":libcurses='$(use ncurses && 
$(tc-getPKG_CONFIG) --libs ncurses)':" \
+               configure || die
+
+       default
+}
+
+src_configure() {
+       # bug #184564
+       unset PLATFORM
+
+       # bug 925234
+       use elibc_musl && append-flags -D_LARGEFILE64_SOURCE
+
+       # lto-type-mismatch warnings but xfsdump is on life support
+       filter-lto
+
+       export OPTIMIZER="${CFLAGS}"
+       # Pass CFLAGS here too per GCC documentation for LTO
+       export LDFLAGS="${CFLAGS} ${LDFLAGS}"
+       export DEBUG=-DNDEBUG
+
+       local myeconfargs=(
+               $(use_enable nls gettext)
+               --libdir="${EPREFIX}/$(get_libdir)"
+               --libexecdir="${EPREFIX}/usr/$(get_libdir)"
+               --sbindir="${EPREFIX}/sbin"
+       )
+
+       econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+       # Enable verbose build
+       emake V=1
+}

Reply via email to