commit:     bfce42c504f03fd3b5825566ba9589ea3d9e6f95
Author:     Filip Kobierski <fkobi <AT> pm <DOT> me>
AuthorDate: Mon Apr  7 14:58:22 2025 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Sat May 10 18:46:19 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=bfce42c5

dev-zig/zls: improve ebuild a bit

- DESCRIPTION: reflect the `--help` message
- redefine live's src_unpack near git-r3 inherit
  - inspired by 06ba1f0f708bd11d5e4710dcaad1ed99c829678c
- do not hardcode ZIG_SLOT

Signed-off-by: Filip Kobierski <fkobi <AT> pm.me>
Part-of: https://github.com/gentoo/guru/pull/313
Closes: https://github.com/gentoo/guru/pull/313
Signed-off-by: David Roman <davidroman96 <AT> gmail.com>

 dev-zig/zls/zls-0.14.0.ebuild | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/dev-zig/zls/zls-0.14.0.ebuild b/dev-zig/zls/zls-0.14.0.ebuild
index c37929d1e..f8651590d 100644
--- a/dev-zig/zls/zls-0.14.0.ebuild
+++ b/dev-zig/zls/zls-0.14.0.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-DESCRIPTION="The officially unofficial Ziglang language server"
+DESCRIPTION="Non-official language server for Zig"
 HOMEPAGE="https://zigtools.org/zls/ https://github.com/zigtools/zls";
 
 declare -g -r -A ZBS_DEPENDENCIES=(
@@ -12,14 +12,18 @@ declare -g -r -A ZBS_DEPENDENCIES=(
        
[N-V-__8AABhrAQAQLLLGadghhPsdxTgBk9N9aLVOjXW3ay0V.tar.gz]='https://github.com/ziglibs/diffz/archive/ef45c00d655e5e40faf35afbbde81a1fa5ed7ffb.tar.gz'
 )
 
-# Sync with "minimum_build_zig_version" from upstream's "build.zig".
 if [[ ${PV} == 9999 ]]; then
        ZIG_SLOT="9999"
 
        EGIT_REPO_URI="https://github.com/zigtools/zls";
        inherit git-r3
+       src_unpack() {
+               git-r3_src_unpack
+               zig_live_fetch -Denable-tracy=false
+       }
 else
-       ZIG_SLOT="0.14"
+       # Should be the "minimum_build_zig_version" from upstream's "build.zig".
+       ZIG_SLOT="$(ver_cut 1-2)" # works only for releases, but that's okay
 
        SRC_URI="
                https://github.com/zigtools/zls/archive/refs/tags/${PV}.tar.gz 
-> zls-${PV}.tar.gz
@@ -43,15 +47,6 @@ RDEPEND="
 
 DOCS=( README.md )
 
-src_unpack() {
-       if [[ ${PV} == 9999 ]]; then
-               git-r3_src_unpack
-               zig_live_fetch -Denable-tracy=false
-       else
-               zig_src_unpack
-       fi
-}
-
 src_configure() {
        local my_zbs_args=(
                -Dpie=true

Reply via email to