aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Joldasov <bratishkaerik@landless-city.net>2024-08-07 15:09:53 +0500
committerEric Joldasov <bratishkaerik@landless-city.net>2024-08-07 15:14:59 +0500
commitdef6d46411c6008422bd13d342a3986a9ac9c170 (patch)
tree5916203ecaceb2c346804af87d0b21b4b69e32f9 /dev-zig
parentdev-util/shellspec: revbump (diff)
downloadguru-def6d46411c6008422bd13d342a3986a9ac9c170.tar.gz
guru-def6d46411c6008422bd13d342a3986a9ac9c170.tar.bz2
guru-def6d46411c6008422bd13d342a3986a9ac9c170.zip
dev-zig/zls: combine and unify 0.13.0 and 9999 ebuilds
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net>
Diffstat (limited to 'dev-zig')
-rw-r--r--dev-zig/zls/zls-0.13.0.ebuild44
-rw-r--r--dev-zig/zls/zls-9999.ebuild46
2 files changed, 65 insertions, 25 deletions
diff --git a/dev-zig/zls/zls-0.13.0.ebuild b/dev-zig/zls/zls-0.13.0.ebuild
index 691fe9037..45d25ec9a 100644
--- a/dev-zig/zls/zls-0.13.0.ebuild
+++ b/dev-zig/zls/zls-0.13.0.ebuild
@@ -8,21 +8,30 @@ inherit edo
DESCRIPTION="The officially unofficial Ziglang language server"
HOMEPAGE="https://github.com/zigtools/zls"
-SRC_URI="
- https://github.com/zigtools/zls/archive/refs/tags/${PV}.tar.gz -> zls-${PV}.tar.gz
- https://codeberg.org/BratishkaErik/distfiles/releases/download/zls-${PV}/zls-${PV}-deps.tar.xz
- https://codeberg.org/BratishkaErik/distfiles/releases/download/zls-${PV}/zls-${PV}-version_data.tar.xz
-"
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://github.com/zigtools/zls"
+ inherit git-r3
+
+ EZIG_MIN="9999"
+ EZIG_MAX_EXCLUSIVE="99991"
+ BDEPEND="dev-lang/zig:9999"
+else
+ SRC_URI="
+ https://github.com/zigtools/zls/archive/refs/tags/${PV}.tar.gz -> zls-${PV}.tar.gz
+ https://codeberg.org/BratishkaErik/distfiles/releases/download/zls-${PV}/zls-${PV}-deps.tar.xz
+ https://codeberg.org/BratishkaErik/distfiles/releases/download/zls-${PV}/zls-${PV}-version_data.tar.xz
+ "
+ KEYWORDS="~amd64"
+
+ EZIG_MIN="0.13"
+ EZIG_MAX_EXCLUSIVE="0.14"
+ BDEPEND="|| ( dev-lang/zig:${EZIG_MIN} dev-lang/zig-bin:${EZIG_MIN} )"
+fi
LICENSE="MIT"
SLOT="0"
-KEYWORDS="~amd64"
-EZIG_MIN="0.13"
-EZIG_MAX_EXCLUSIVE="0.14"
-
-DEPEND="|| ( dev-lang/zig:${EZIG_MIN} dev-lang/zig-bin:${EZIG_MIN} )"
-RDEPEND="${DEPEND}"
+RDEPEND="${BDEPEND}"
DOCS=( README.md )
@@ -110,6 +119,19 @@ ezig() {
edo "${EZIG}" "${@}"
}
+src_unpack() {
+ if [[ ${PV} == 9999 ]]; then
+ git-r3_src_unpack
+
+ cd "${S}" || die
+ ezig build --fetch --global-cache-dir "${WORKDIR}/zig-eclass/" || die "Pre-fetching Zig modules failed"
+ local ZLS_GEN_FLAGS="--generate-version-data master --generate-version-data-path version_data.zig"
+ ezig build gen --verbose -- ${ZLS_GEN_FLAGS} || die "Pre-generating Zig version data failed"
+ else
+ default_src_unpack
+ fi
+}
+
src_configure() {
export ZBS_ARGS=(
--prefix usr/
diff --git a/dev-zig/zls/zls-9999.ebuild b/dev-zig/zls/zls-9999.ebuild
index 3cdd0da1d..45d25ec9a 100644
--- a/dev-zig/zls/zls-9999.ebuild
+++ b/dev-zig/zls/zls-9999.ebuild
@@ -3,21 +3,35 @@
EAPI=8
-inherit edo git-r3
-
-EGIT_REPO_URI="https://github.com/zigtools/zls"
+inherit edo
DESCRIPTION="The officially unofficial Ziglang language server"
HOMEPAGE="https://github.com/zigtools/zls"
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://github.com/zigtools/zls"
+ inherit git-r3
+
+ EZIG_MIN="9999"
+ EZIG_MAX_EXCLUSIVE="99991"
+ BDEPEND="dev-lang/zig:9999"
+else
+ SRC_URI="
+ https://github.com/zigtools/zls/archive/refs/tags/${PV}.tar.gz -> zls-${PV}.tar.gz
+ https://codeberg.org/BratishkaErik/distfiles/releases/download/zls-${PV}/zls-${PV}-deps.tar.xz
+ https://codeberg.org/BratishkaErik/distfiles/releases/download/zls-${PV}/zls-${PV}-version_data.tar.xz
+ "
+ KEYWORDS="~amd64"
+
+ EZIG_MIN="0.13"
+ EZIG_MAX_EXCLUSIVE="0.14"
+ BDEPEND="|| ( dev-lang/zig:${EZIG_MIN} dev-lang/zig-bin:${EZIG_MIN} )"
+fi
+
LICENSE="MIT"
SLOT="0"
-EZIG_MIN="9999"
-EZIG_MAX_EXCLUSIVE="99991"
-
-DEPEND="dev-lang/zig:${EZIG_MIN}"
-RDEPEND="${DEPEND}"
+RDEPEND="${BDEPEND}"
DOCS=( README.md )
@@ -106,12 +120,16 @@ ezig() {
}
src_unpack() {
- git-r3_src_unpack
-
- cd "${S}" || die
- ezig build --fetch --global-cache-dir "${WORKDIR}/zig-eclass/" || die "Pre-fetching Zig modules failed"
- local ZLS_GEN_FLAGS="--generate-version-data master --generate-version-data-path version_data.zig"
- ezig build gen --verbose -- ${ZLS_GEN_FLAGS} || die "Pre-generating Zig version data failed"
+ if [[ ${PV} == 9999 ]]; then
+ git-r3_src_unpack
+
+ cd "${S}" || die
+ ezig build --fetch --global-cache-dir "${WORKDIR}/zig-eclass/" || die "Pre-fetching Zig modules failed"
+ local ZLS_GEN_FLAGS="--generate-version-data master --generate-version-data-path version_data.zig"
+ ezig build gen --verbose -- ${ZLS_GEN_FLAGS} || die "Pre-generating Zig version data failed"
+ else
+ default_src_unpack
+ fi
}
src_configure() {