From: "Julien Roy" <julien@jroy.ca>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:master commit in: app-benchmarks/poop/
Date: Sun, 15 Dec 2024 18:10:04 +0000 (UTC) [thread overview]
Message-ID: <1734265657.a98632e914cdb95bf0d68c47f79e5d3cc475c6a1.julien@gentoo> (raw)
commit: a98632e914cdb95bf0d68c47f79e5d3cc475c6a1
Author: Eric Joldasov <bratishkaerik <AT> landless-city <DOT> net>
AuthorDate: Sun Dec 15 12:27:37 2024 +0000
Commit: Julien Roy <julien <AT> jroy <DOT> ca>
CommitDate: Sun Dec 15 12:27:37 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=a98632e9
app-benchmarks/poop: port 9999 to `zig.eclass`
Signed-off-by: Eric Joldasov <bratishkaerik <AT> landless-city.net>
app-benchmarks/poop/poop-9999.ebuild | 108 +++--------------------------------
1 file changed, 9 insertions(+), 99 deletions(-)
diff --git a/app-benchmarks/poop/poop-9999.ebuild b/app-benchmarks/poop/poop-9999.ebuild
index e44812399..478081f4b 100644
--- a/app-benchmarks/poop/poop-9999.ebuild
+++ b/app-benchmarks/poop/poop-9999.ebuild
@@ -3,9 +3,9 @@
EAPI=8
-inherit edo git-r3
-
EGIT_REPO_URI="https://github.com/andrewrk/poop"
+ZIG_SLOT="9999"
+inherit git-r3 zig
DESCRIPTION="Performance Optimizer Observation Platform"
HOMEPAGE="https://github.com/andrewrk/poop"
@@ -13,107 +13,17 @@ HOMEPAGE="https://github.com/andrewrk/poop"
LICENSE="MIT"
SLOT="0"
-EZIG_MIN="9999"
-EZIG_MAX_EXCLUSIVE="99991"
-
-DEPEND="dev-lang/zig:${EZIG_MIN}"
-
-# see https://github.com/ziglang/zig/issues/3382
-# For now, Zig Build System doesn't support CFLAGS/LDFLAGS/etc.
-QA_FLAGS_IGNORED="usr/bin/poop"
-
-# : copied from sys-fs/ncdu :
-# Many thanks to Florian Schmaus (Flowdalic)!
-# Adapted from https://github.com/gentoo/gentoo/pull/28986
-# Set the EZIG environment variable.
-zig-set_EZIG() {
- [[ -n ${EZIG} ]] && return
-
- if [[ -n ${EZIG_OVERWRITE} ]]; then
- export EZIG="${EZIG_OVERWRITE}"
- return
- fi
-
- local candidates candidate selected selected_ver
-
- candidates=$(compgen -c zig-)
-
- for candidate in ${candidates}; do
- if [[ ! ${candidate} =~ zig(-bin)?-([.0-9]+) ]]; then
- continue
- fi
-
- local ver
- if (( ${#BASH_REMATCH[@]} == 3 )); then
- ver="${BASH_REMATCH[2]}"
- else
- ver="${BASH_REMATCH[1]}"
- fi
-
- if [[ -n ${EZIG_EXACT_VER} ]]; then
- ver_test "${ver}" -ne "${EZIG_EXACT_VER}" && continue
-
- selected="${candidate}"
- selected_ver="${ver}"
- break
- fi
-
- if [[ -n ${EZIG_MIN} ]] \
- && ver_test "${ver}" -lt "${EZIG_MIN}"; then
- # Candidate does not satisfy EZIG_MIN condition.
- continue
- fi
-
- if [[ -n ${EZIG_MAX_EXCLUSIVE} ]] \
- && ver_test "${ver}" -ge "${EZIG_MAX_EXCLUSIVE}"; then
- # Candidate does not satisfy EZIG_MAX_EXCLUSIVE condition.
- continue
- fi
-
- if [[ -n ${selected_ver} ]] \
- && ver_test "${selected_ver}" -gt "${ver}"; then
- # Candidate is older than the currently selected candidate.
- continue
- fi
-
- selected="${candidate}"
- selected_ver="${ver}"
- done
-
- if [[ -z ${selected} ]]; then
- die "Could not find (suitable) zig installation in PATH"
- fi
-
- export EZIG="${selected}"
- export EZIG_VER="${ver}"
-}
-
-# Invoke zig with the optionally provided arguments.
-ezig() {
- zig-set_EZIG
-
- # Unfortunately, we cannot add more args here, since syntax is different
- # for every subcommands. Yes, even target/cpu :( f.i. :
- # -target/-mcpu for zig build-exe vs -Dtarget/-Dcpu for zig build-
- # -OReleaseSafe for zig build-exe vs -DReleaseSafe for zig build
- # (or even none, if hardcoded by upstream so choice is -Drelease=true/false)
- # Ofc we can patch this, but still...
-
- edo "${EZIG}" "${@}"
-}
+DOCS=( "README.md" )
src_unpack() {
git-r3_src_unpack
- cd "${S}" || die
- # "zig build" doesn't have "fetch" subcommand yet
- ezig build --help || die "Fetching Zig modules failed"
+ zig_live_fetch
}
-src_compile() {
- ezig build -Doptimize=ReleaseSafe --verbose || die
-}
+src_configure() {
+ local my_zbs_args=(
+ -Dstrip=false # Let Portage control this
+ )
-src_install() {
- DESTDIR="${ED}" ezig build install --prefix /usr -Doptimize=ReleaseSafe --verbose || die
- dodoc README.md
+ zig_src_configure
}
next reply other threads:[~2024-12-15 18:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-15 18:10 Julien Roy [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-04-01 11:40 [gentoo-commits] repo/proj/guru:dev commit in: app-benchmarks/poop/ Florian Schmaus
2025-04-01 11:40 ` [gentoo-commits] repo/proj/guru:master " Florian Schmaus
2025-04-01 11:40 [gentoo-commits] repo/proj/guru:dev " Florian Schmaus
2025-04-01 11:40 ` [gentoo-commits] repo/proj/guru:master " Florian Schmaus
2024-08-01 21:51 Lucio Sauer
2023-06-15 9:33 Florian Schmaus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1734265657.a98632e914cdb95bf0d68c47f79e5d3cc475c6a1.julien@gentoo \
--to=julien@jroy.ca \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox