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:
e19c6d5744 (commitcomment-172006236)

Signed-off-by: ingenarel <ingenarelitems@gmail.com>
This commit is contained in:
ingenarel
2025-12-09 05:42:12 +06:00
parent 0883a2c682
commit ce6290ad07
2 changed files with 24 additions and 14 deletions

View File

@@ -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
}

View File

@@ -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
}