From: "Florian Schmaus" <flow@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/ncdu/
Date: Thu, 9 Mar 2023 10:54:07 +0000 (UTC) [thread overview]
Message-ID: <1678359238.195bde1f0ccb747b72a492cfdbe6be0270e5caf8.flow@gentoo> (raw)
commit: 195bde1f0ccb747b72a492cfdbe6be0270e5caf8
Author: Eric Joldasov <bratishkaerik <AT> getgoogleoff <DOT> me>
AuthorDate: Wed Jan 25 07:58:00 2023 +0000
Commit: Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Mar 9 10:53:58 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=195bde1f
sys-fs/ncdu: adjust ebuild for slotted Zig
Closes: https://github.com/gentoo/gentoo/pull/29257
Signed-off-by: Eric Joldasov <bratishkaerik <AT> getgoogleoff.me>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>
sys-fs/ncdu/ncdu-2.2.2-r1.ebuild | 136 +++++++++++++++++++++++++++++++++++++++
1 file changed, 136 insertions(+)
diff --git a/sys-fs/ncdu/ncdu-2.2.2-r1.ebuild b/sys-fs/ncdu/ncdu-2.2.2-r1.ebuild
new file mode 100644
index 000000000000..22518d804b8f
--- /dev/null
+++ b/sys-fs/ncdu/ncdu-2.2.2-r1.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit verify-sig edo
+
+DESCRIPTION="NCurses Disk Usage"
+HOMEPAGE="https://dev.yorhel.nl/ncdu"
+SRC_URI="
+ https://dev.yorhel.nl/download/${P}.tar.gz
+ verify-sig? ( https://dev.yorhel.nl/download/${P}.tar.gz.asc )
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+EZIG_MIN="0.10.0"
+EZIG_MAX_EXCLUSIVE="0.11.0"
+
+DEPEND="sys-libs/ncurses:=[unicode(+)]"
+RDEPEND="${DEPEND}"
+BDEPEND="
+ || ( dev-lang/zig:0.10 dev-lang/zig-bin:0.10 )
+ virtual/pkgconfig
+ dev-lang/perl
+ verify-sig? ( sec-keys/openpgp-keys-yorhel )
+"
+
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/yoranheling.asc
+
+# see https://github.com/ziglang/zig/issues/3382
+# For now, Zig doesn't support CFLAGS/LDFLAGS/etc.
+QA_FLAGS_IGNORED="usr/bin/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}" "${@}"
+}
+
+src_unpack() {
+ if use verify-sig; then
+ verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc}
+ fi
+ default
+}
+
+src_compile() {
+ ezig build -Drelease-fast
+ edo pod2man --center "ncdu manual" --release "ncdu-${PV}" ncdu.pod >ncdu.1
+}
+
+src_test() {
+ ezig build test -Drelease-fast
+}
+
+src_install() {
+ emake PREFIX="${ED}"/usr install
+
+ dodoc README.md ChangeLog
+}
next reply other threads:[~2023-03-09 10:54 UTC|newest]
Thread overview: 107+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-09 10:54 Florian Schmaus [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-10-04 11:03 [gentoo-commits] repo/gentoo:master commit in: sys-fs/ncdu/ Jakov Smolić
2024-08-26 12:24 Jakov Smolić
2024-08-25 19:24 WANG Xuerui
2024-08-25 14:37 Sam James
2024-08-25 14:37 Sam James
2024-08-25 14:37 Sam James
2024-08-25 14:37 Sam James
2024-08-25 13:59 Sam James
2024-08-25 13:59 Sam James
2024-08-23 2:08 Eli Schwartz
2024-08-23 2:08 Eli Schwartz
2024-07-27 15:26 Jakov Smolić
2024-06-18 17:50 Jakov Smolić
2024-06-09 10:37 Jakov Smolić
2023-12-12 23:22 Sam James
2023-12-12 17:51 Arthur Zamarin
2023-12-12 17:32 Arthur Zamarin
2023-12-12 16:55 Arthur Zamarin
2023-12-12 16:55 Arthur Zamarin
2023-12-12 15:56 Arthur Zamarin
2023-09-13 3:40 Sam James
2023-08-25 3:58 Jakov Smolić
2023-07-26 4:40 Sam James
2023-06-27 15:05 Florian Schmaus
2023-03-17 9:44 Florian Schmaus
2023-03-09 10:54 Florian Schmaus
2023-01-20 17:00 Sam James
2023-01-20 17:00 Sam James
2023-01-20 14:09 Arthur Zamarin
2023-01-20 14:09 Arthur Zamarin
2023-01-20 14:09 Arthur Zamarin
2023-01-20 14:09 Arthur Zamarin
2023-01-20 3:54 Sam James
2023-01-20 1:17 Sam James
2022-12-11 11:38 Jakov Smolić
2022-12-01 13:57 Michał Górny
2022-11-25 1:31 Jakov Smolić
2022-11-25 1:31 Jakov Smolić
2022-11-25 1:31 Jakov Smolić
2022-11-08 4:09 Sam James
2022-10-29 11:03 Jakov Smolić
2022-10-19 8:58 Jakov Smolić
2022-10-19 8:58 Jakov Smolić
2022-10-01 6:19 Arthur Zamarin
2022-09-14 19:18 Arthur Zamarin
2022-08-27 16:03 Sam James
2022-08-27 16:03 Sam James
2022-08-27 15:53 Jakov Smolić
2022-08-27 15:49 Arthur Zamarin
2022-08-27 15:49 Arthur Zamarin
2022-08-22 8:18 Jakov Smolić
2022-06-07 7:04 Jakov Smolić
2022-06-06 14:30 Jakov Smolić
2022-06-05 16:45 Jakov Smolić
2022-06-05 16:21 Jakov Smolić
2022-06-05 15:28 Jakov Smolić
2022-06-05 15:28 Jakov Smolić
2022-06-05 15:28 Jakov Smolić
2022-06-05 14:23 Jakov Smolić
2022-06-05 14:20 Jakov Smolić
2022-06-05 14:20 Jakov Smolić
2022-06-05 13:37 Jakov Smolić
2022-05-25 16:50 Jakov Smolić
2021-07-17 21:30 David Seifert
2021-07-06 23:44 Thomas Deutschmann
2021-05-07 19:49 Thomas Deutschmann
2020-12-22 18:57 Sam James
2020-12-22 18:57 Sam James
2020-12-22 18:57 Sam James
2020-12-22 18:57 Sam James
2020-12-22 18:57 Sam James
2020-12-22 17:08 Thomas Deutschmann
2020-06-14 23:30 Thomas Deutschmann
2020-06-01 19:23 Thomas Deutschmann
2020-06-01 19:23 Thomas Deutschmann
2020-06-01 19:23 Thomas Deutschmann
2020-02-14 15:08 Thomas Deutschmann
2019-12-31 3:17 Thomas Deutschmann
2019-12-31 3:17 Thomas Deutschmann
2019-12-24 15:18 Mikle Kolyada
2019-12-10 10:54 Agostino Sarubbo
2019-12-09 12:10 Agostino Sarubbo
2019-12-09 8:48 Agostino Sarubbo
2019-12-04 13:05 Agostino Sarubbo
2019-12-04 0:56 Aaron Bauman
2019-08-07 19:12 Thomas Deutschmann
2019-02-09 15:37 Thomas Deutschmann
2018-11-26 19:22 Thomas Deutschmann
2018-11-26 19:22 Thomas Deutschmann
2018-11-11 10:09 Mikle Kolyada
2018-10-14 9:14 Sergei Trofimovich
2018-10-14 8:59 Sergei Trofimovich
2018-10-13 6:56 Tobias Klausmann
2018-07-09 15:53 Mikle Kolyada
2018-07-02 10:38 Mart Raudsepp
2018-07-02 0:49 Thomas Deutschmann
2018-02-16 21:51 Michael Weber
2018-02-12 11:11 Patrice Clement
2017-03-02 10:47 Agostino Sarubbo
2017-03-01 13:43 Tobias Klausmann
2017-02-28 23:43 Michael Weber
2017-02-13 0:08 Michael Weber
2016-08-29 14:02 Jeroen Roovers
2016-03-23 16:03 Mike Frysinger
2015-09-01 16:08 Markus Meier
2015-08-16 10:59 Justin Lecher
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=1678359238.195bde1f0ccb747b72a492cfdbe6be0270e5caf8.flow@gentoo \
--to=flow@gentoo.org \
--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