diff options
author | Peter Levine <plevine457@gmail.com> | 2023-09-03 04:43:56 -0400 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-09-06 09:36:01 +0100 |
commit | da73f74fca7c8f4c3eb015e762bb23c737fda85d (patch) | |
tree | 87cdb47b88c1725e9838d26f0b4d24978a954d0e /sys-block | |
parent | sys-block/thin-provisioning-tools: remove src_compile (diff) | |
download | gentoo-da73f74fca7c8f4c3eb015e762bb23c737fda85d.tar.gz gentoo-da73f74fca7c8f4c3eb015e762bb23c737fda85d.tar.bz2 gentoo-da73f74fca7c8f4c3eb015e762bb23c737fda85d.zip |
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>
Diffstat (limited to 'sys-block')
-rw-r--r-- | sys-block/thin-provisioning-tools/files/thin-provisioning-tools-1.0.6-build-with-cargo.patch | 21 | ||||
-rw-r--r-- | sys-block/thin-provisioning-tools/thin-provisioning-tools-9999.ebuild | 8 |
2 files changed, 28 insertions, 1 deletions
diff --git a/sys-block/thin-provisioning-tools/files/thin-provisioning-tools-1.0.6-build-with-cargo.patch b/sys-block/thin-provisioning-tools/files/thin-provisioning-tools-1.0.6-build-with-cargo.patch new file mode 100644 index 000000000000..5e06583164f8 --- /dev/null +++ b/sys-block/thin-provisioning-tools/files/thin-provisioning-tools-1.0.6-build-with-cargo.patch @@ -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 diff --git a/sys-block/thin-provisioning-tools/thin-provisioning-tools-9999.ebuild b/sys-block/thin-provisioning-tools/thin-provisioning-tools-9999.ebuild index 92ce1cf581dd..74337833b2ca 100644 --- a/sys-block/thin-provisioning-tools/thin-provisioning-tools-9999.ebuild +++ b/sys-block/thin-provisioning-tools/thin-provisioning-tools-9999.ebuild @@ -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 } |