From 658724d61b3035ed372a743fc075e2dafef3cb9e Mon Sep 17 00:00:00 2001 From: Matt Jolly Date: Wed, 21 May 2025 15:17:19 +1000 Subject: [PATCH] app-misc/pipes-rs: make live ebuild a live template; fix keywords Since we need to fix KEYWORDS on the live ebuild anyway, make it a template. - Also rename the patch in filesdir to include `${P}`. - Sync 1.6.3 with live (patch needed updating anyway) - Minor QA issues addressed Signed-off-by: Matt Jolly --- ...atch => pipes-rs-1.6.3-do-not-strip.patch} | 0 app-misc/pipes-rs/pipes-rs-1.6.3.ebuild | 29 ++++++++++++++----- app-misc/pipes-rs/pipes-rs-9999.ebuild | 29 +++++++++++++------ 3 files changed, 41 insertions(+), 17 deletions(-) rename app-misc/pipes-rs/files/{do-not-strip.patch => pipes-rs-1.6.3-do-not-strip.patch} (100%) diff --git a/app-misc/pipes-rs/files/do-not-strip.patch b/app-misc/pipes-rs/files/pipes-rs-1.6.3-do-not-strip.patch similarity index 100% rename from app-misc/pipes-rs/files/do-not-strip.patch rename to app-misc/pipes-rs/files/pipes-rs-1.6.3-do-not-strip.patch diff --git a/app-misc/pipes-rs/pipes-rs-1.6.3.ebuild b/app-misc/pipes-rs/pipes-rs-1.6.3.ebuild index e9a9cbe729..148945b695 100644 --- a/app-misc/pipes-rs/pipes-rs-1.6.3.ebuild +++ b/app-misc/pipes-rs/pipes-rs-1.6.3.ebuild @@ -67,21 +67,34 @@ inherit cargo DESCRIPTION="An over-engineered rewrite of pipes.sh in Rust" HOMEPAGE="https://github.com/lhvy/pipes-rs" -SRC_URI=" - https://github.com/lhvy/pipes-rs/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz - ${CARGO_CRATE_URIS} -" + +if [[ ${PV} == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/lhvy/pipes-rs.git" +else + SRC_URI="https://github.com/lhvy/pipes-rs/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz + ${CARGO_CRATE_URIS}" + KEYWORDS="~amd64" +fi LICENSE="BlueOak-1.0.0 Apache-2.0 MIT Unicode-DFS-2016" SLOT="0" -KEYWORDS="~amd64" PATCHES=( - "${FILESDIR}/do-not-strip.patch" + "${FILESDIR}/${PN}-1.6.3-do-not-strip.patch" ) +QA_FLAGS_IGNORED="usr/bin/${PN}" + +src_unpack() { + if [[ ${PV} == *9999* ]]; then + git-r3_src_unpack + cargo_live_src_unpack + else + cargo_src_unpack + fi +} + src_install() { cargo_src_install --path ./crates/${PN} } - -QA_FLAGS_IGNORED="usr/bin/${PN}" diff --git a/app-misc/pipes-rs/pipes-rs-9999.ebuild b/app-misc/pipes-rs/pipes-rs-9999.ebuild index 1059d9f836..0747c6a058 100644 --- a/app-misc/pipes-rs/pipes-rs-9999.ebuild +++ b/app-misc/pipes-rs/pipes-rs-9999.ebuild @@ -5,27 +5,38 @@ EAPI=8 -inherit cargo git-r3 +inherit cargo DESCRIPTION="An over-engineered rewrite of pipes.sh in Rust" HOMEPAGE="https://github.com/lhvy/pipes-rs" -EGIT_REPO_URI="https://github.com/lhvy/pipes-rs.git" + +if [[ ${PV} == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/lhvy/pipes-rs.git" +else + SRC_URI="https://github.com/lhvy/pipes-rs/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz + ${CARGO_CRATE_URIS}" + KEYWORDS="~amd64" +fi LICENSE="BlueOak-1.0.0 Apache-2.0 MIT Unicode-DFS-2016" SLOT="0" -KEYWORDS="~amd64" PATCHES=( - "${FILESDIR}/do-not-strip.patch" + "${FILESDIR}/${PN}-1.6.3-do-not-strip.patch" ) +QA_FLAGS_IGNORED="usr/bin/${PN}" + src_unpack() { - git-r3_src_unpack - cargo_live_src_unpack + if [[ ${PV} == *9999* ]]; then + git-r3_src_unpack + cargo_live_src_unpack + else + cargo_src_unpack + fi } src_install() { - cargo_src_install --path ./crates/${PN} + cargo_src_install --path ./crates/${PN} } - -QA_FLAGS_IGNORED="usr/bin/${PN}"