sys-block/thin-provisioning-tools: don't use emake to install binary

For USE=debug to work, portage needs to run cargo_src_compile(), but
if `emake` is used in src_install(), it will trigger a rebuild without
debug.  If cargo_src_install() is used instead, manpages and symlinks
won't be installed and the binary would have to be moved since there's
no way to make cargo install to /usr/sbin. So remove $(PDATA_TOOLS)
dependency in Makefile instead.  Might as well patch out $(STRIP) too.

Signed-off-by: Peter Levine <plevine457@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Peter Levine
2023-09-06 09:36:01 +01:00
committed by Sam James
parent 2dba2af1ad
commit da73f74fca
2 changed files with 28 additions and 1 deletions
@@ -0,0 +1,21 @@
For USE=debug to work, portage needs to run cargo_src_compile(), but if `emake`
is used in src_install(), it will trigger a rebuild without debug. If
cargo_src_install() is used instead, manpages and symlinks won't be installed
and the binary would have to be moved since there's no way to make cargo install
to /usr/sbin. So remove $(PDATA_TOOLS) dependency in Makefile instead. Might as
well patch out $(STRIP) too.
--- a/Makefile
+++ b/Makefile
@@ -56,10 +56,9 @@
MANPAGES:=$(patsubst %,man8/%.8,$(TOOLS))
-install: $(PDATA_TOOLS) $(MANPAGES)
+install: $(MANPAGES)
$(INSTALL_DIR) $(BINDIR)
$(INSTALL_PROGRAM) $(PDATA_TOOLS) $(BINDIR)
- $(STRIP) $(BINDIR)/pdata_tools
ln -s -f pdata_tools $(BINDIR)/cache_check
ln -s -f pdata_tools $(BINDIR)/cache_dump
ln -s -f pdata_tools $(BINDIR)/cache_metadata_size
@@ -153,6 +153,8 @@ LICENSE="Apache-2.0 BSD GPL-3 MIT Unicode-DFS-2016"
SLOT="0"
IUSE="io-uring"
PATCHES=( "${FILESDIR}/${PN}-1.0.6-build-with-cargo.patch" )
# Rust
QA_FLAGS_IGNORED="usr/sbin/pdata_tools"
@@ -171,5 +173,9 @@ src_configure() {
}
src_install() {
emake V= DESTDIR="${D}" DATADIR="${ED}/usr/share" STRIP=true install
emake \
DESTDIR="${D}" \
DATADIR="${ED}/usr/share" \
PDATA_TOOLS="target/$(usex debug debug release)/pdata_tools" \
install
}