From ce6290ad07b3a904053290c2c8d75d0d6a856c2b Mon Sep 17 00:00:00 2001 From: ingenarel Date: Tue, 9 Dec 2025 05:42:12 +0600 Subject: [PATCH] app-misc/ghq: modify src_unpack() internally instead of redefining functions should be defined on the order that they are called for more info, check: https://github.com/gentoo/guru/commit/e19c6d574461655f11cb1c6e1b37ff22c9a6ff70#commitcomment-172006236 Signed-off-by: ingenarel --- app-misc/ghq/ghq-1.8.0.ebuild | 19 ++++++++++++------- app-misc/ghq/ghq-9999.ebuild | 19 ++++++++++++------- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/app-misc/ghq/ghq-1.8.0.ebuild b/app-misc/ghq/ghq-1.8.0.ebuild index ab5f0dec36..4c2b006011 100644 --- a/app-misc/ghq/ghq-1.8.0.ebuild +++ b/app-misc/ghq/ghq-1.8.0.ebuild @@ -10,10 +10,7 @@ HOMEPAGE="https://github.com/x-motemen/ghq" if [[ "${PV}" == 9999 ]]; then inherit git-r3 EGIT_REPO_URI="https://github.com/x-motemen/ghq.git" - src_unpack() { - git-r3_src_unpack - go-module_live_vendor - } + RESTRICT="mirror" else SRC_URI="https://github.com/x-motemen/ghq/archive/v${PV}.tar.gz -> ${P}.tar.gz" SRC_URI+=" https://github.com/ingenarel/guru-depfiles/releases/download/${P}-deps.tar.xz/${P}-deps.tar.xz" @@ -24,7 +21,15 @@ fi LICENSE="MIT" SLOT="0" -RESTRICT="mirror" + +src_unpack() { + if [[ "${PV}" == 9999 ]];then + git-r3_src_unpack + go-module_live_vendor + else + default + fi +} src_prepare(){ default @@ -32,10 +37,10 @@ src_prepare(){ } src_compile() { - if [[ "$PV" == 9999 ]]; then + if [[ "${PV}" == 9999 ]]; then emake build else - emake build VERSION="${PV}" CURRENT_REVISION="$MY_GIT_REV" + emake build VERSION="${PV}" CURRENT_REVISION="${MY_GIT_REV}" fi } diff --git a/app-misc/ghq/ghq-9999.ebuild b/app-misc/ghq/ghq-9999.ebuild index ab5f0dec36..4c2b006011 100644 --- a/app-misc/ghq/ghq-9999.ebuild +++ b/app-misc/ghq/ghq-9999.ebuild @@ -10,10 +10,7 @@ HOMEPAGE="https://github.com/x-motemen/ghq" if [[ "${PV}" == 9999 ]]; then inherit git-r3 EGIT_REPO_URI="https://github.com/x-motemen/ghq.git" - src_unpack() { - git-r3_src_unpack - go-module_live_vendor - } + RESTRICT="mirror" else SRC_URI="https://github.com/x-motemen/ghq/archive/v${PV}.tar.gz -> ${P}.tar.gz" SRC_URI+=" https://github.com/ingenarel/guru-depfiles/releases/download/${P}-deps.tar.xz/${P}-deps.tar.xz" @@ -24,7 +21,15 @@ fi LICENSE="MIT" SLOT="0" -RESTRICT="mirror" + +src_unpack() { + if [[ "${PV}" == 9999 ]];then + git-r3_src_unpack + go-module_live_vendor + else + default + fi +} src_prepare(){ default @@ -32,10 +37,10 @@ src_prepare(){ } src_compile() { - if [[ "$PV" == 9999 ]]; then + if [[ "${PV}" == 9999 ]]; then emake build else - emake build VERSION="${PV}" CURRENT_REVISION="$MY_GIT_REV" + emake build VERSION="${PV}" CURRENT_REVISION="${MY_GIT_REV}" fi }