commit: 1261a8a8e32a2f2a822592d1089a577088373701
Author: Filip Kobierski <fkobi <AT> pm <DOT> me>
AuthorDate: Sat Apr 5 20:50:35 2025 +0000
Commit: David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Sat Apr 5 21:50:15 2025 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1261a8a8
dev-zig/zls: add unkeyworded 0.14.0-r1 with improvements
Changes in diff order:
- remove github as the second HOMEPAGE (it's already in remote-id)
- simplify & automatize ZIG_SLOT assignment
- also moved comment there so it's clearer
- simplify SRC_URI assignment
- use ZIG_SLOT in SLOT
- introduce minimum_runtime_zig_version
- unquote DOCS contents
- remove obsolete pkg_postinst
Signed-off-by: Filip Kobierski <fkobi <AT> pm.me>
.../{zls-0.14.0.ebuild => zls-0.14.0-r1.ebuild} | 30 +++++++++-------------
dev-zig/zls/zls-0.14.0.ebuild | 19 +++++---------
2 files changed, 18 insertions(+), 31 deletions(-)
diff --git a/dev-zig/zls/zls-0.14.0.ebuild b/dev-zig/zls/zls-0.14.0-r1.ebuild
similarity index 66%
copy from dev-zig/zls/zls-0.14.0.ebuild
copy to dev-zig/zls/zls-0.14.0-r1.ebuild
index 2d2ddc6cb..fc4f1f911 100644
--- a/dev-zig/zls/zls-0.14.0.ebuild
+++ b/dev-zig/zls/zls-0.14.0-r1.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DESCRIPTION="The officially unofficial Ziglang language server"
-HOMEPAGE="https://zigtools.org/zls/ https://github.com/zigtools/zls"
+HOMEPAGE="https://zigtools.org/zls/"
declare -g -r -A ZBS_DEPENDENCIES=(
[known_folders-0.0.0-Fy-PJtLDAADGDOwYwMkVydMSTp_aN-nfjCZw6qPQ2ECL.tar.gz]='https://github.com/ziglibs/known-folders/archive/aa24df42183ad415d10bc0a33e6238c437fc0f59.tar.gz'
@@ -12,36 +12,35 @@ 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"
+ ZIG_SLOT="${PV}"
EGIT_REPO_URI="https://github.com/zigtools/zls"
inherit git-r3
else
- ZIG_SLOT="0.14"
+ # Sync with "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
- "
- KEYWORDS="~amd64"
+ SRC_URI="https://github.com/zigtools/zls/archive/refs/tags/${PV}.tar.gz
-> ${P}.tar.gz"
+ # KEYWORDS="~amd64" uncomment to approve the changes
fi
inherit zig
SRC_URI+="${ZBS_DEPENDENCIES_SRC_URI}"
LICENSE="MIT"
-SLOT="0"
+SLOT="0/${ZIG_SLOT}"
-# Sync with "minimum_runtime_zig_version" from upstream's "build.zig".
+# Sync with upstream's build.zig. Seems to be the latest zig release
+minimum_runtime_zig_version="0.14.0"
RDEPEND="
|| (
- >=dev-lang/zig-0.14.0
- >=dev-lang/zig-bin-0.14.0
+ >=dev-lang/zig-${minimum_runtime_zig_version}
+ >=dev-lang/zig-bin-${minimum_runtime_zig_version}
)
"
-DOCS=( "README.md" )
+DOCS=( README.md )
src_unpack() {
if [[ ${PV} == 9999 ]]; then
@@ -60,8 +59,3 @@ src_configure() {
zig_src_configure
}
-
-pkg_postinst() {
- elog "You can find configuration guide here:"
- elog "https://zigtools.org/zls/"
-}
diff --git a/dev-zig/zls/zls-0.14.0.ebuild b/dev-zig/zls/zls-0.14.0.ebuild
index 2d2ddc6cb..b033fc803 100644
--- a/dev-zig/zls/zls-0.14.0.ebuild
+++ b/dev-zig/zls/zls-0.14.0.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DESCRIPTION="The officially unofficial Ziglang language server"
-HOMEPAGE="https://zigtools.org/zls/ https://github.com/zigtools/zls"
+HOMEPAGE="https://zigtools.org/zls/"
declare -g -r -A ZBS_DEPENDENCIES=(
[known_folders-0.0.0-Fy-PJtLDAADGDOwYwMkVydMSTp_aN-nfjCZw6qPQ2ECL.tar.gz]='https://github.com/ziglibs/known-folders/archive/aa24df42183ad415d10bc0a33e6238c437fc0f59.tar.gz'
@@ -14,16 +14,14 @@ declare -g -r -A ZBS_DEPENDENCIES=(
# Sync with "minimum_build_zig_version" from upstream's "build.zig".
if [[ ${PV} == 9999 ]]; then
- ZIG_SLOT="9999"
+ ZIG_SLOT="${PV}"
EGIT_REPO_URI="https://github.com/zigtools/zls"
inherit git-r3
else
- ZIG_SLOT="0.14"
+ ZIG_SLOT="$(ver_cut 1-2)"
- SRC_URI="
- https://github.com/zigtools/zls/archive/refs/tags/${PV}.tar.gz
-> zls-${PV}.tar.gz
- "
+ SRC_URI="https://github.com/zigtools/zls/archive/refs/tags/${PV}.tar.gz
-> ${P}.tar.gz"
KEYWORDS="~amd64"
fi
@@ -31,7 +29,7 @@ inherit zig
SRC_URI+="${ZBS_DEPENDENCIES_SRC_URI}"
LICENSE="MIT"
-SLOT="0"
+SLOT="0/${ZIG_SLOT}"
# Sync with "minimum_runtime_zig_version" from upstream's "build.zig".
RDEPEND="
@@ -41,7 +39,7 @@ RDEPEND="
)
"
-DOCS=( "README.md" )
+DOCS=( README.md )
src_unpack() {
if [[ ${PV} == 9999 ]]; then
@@ -60,8 +58,3 @@ src_configure() {
zig_src_configure
}
-
-pkg_postinst() {
- elog "You can find configuration guide here:"
- elog "https://zigtools.org/zls/"
-}