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@pm.me>
This commit is contained in:
Filip Kobierski
2025-04-05 22:50:35 +02:00
parent 87647bb209
commit 1261a8a8e3
2 changed files with 67 additions and 13 deletions

View File

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