From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E5EC815808B for ; Fri, 4 Oct 2024 11:03:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A7AD8E2A05; Fri, 4 Oct 2024 11:03:44 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4EC81E29FD for ; Fri, 4 Oct 2024 11:03:44 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3C094343026 for ; Fri, 4 Oct 2024 11:03:43 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A351727F6 for ; Fri, 4 Oct 2024 11:03:41 +0000 (UTC) From: "Jakov Smolić" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jakov Smolić" Message-ID: <1728039514.980c22cc9204900d96783cf44e750072258e748f.jsmolic@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/ncdu/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-fs/ncdu/Manifest sys-fs/ncdu/ncdu-2.6.ebuild X-VCS-Directories: sys-fs/ncdu/ X-VCS-Committer: jsmolic X-VCS-Committer-Name: Jakov Smolić X-VCS-Revision: 980c22cc9204900d96783cf44e750072258e748f X-VCS-Branch: master Date: Fri, 4 Oct 2024 11:03:41 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 1ca142c1-f1ce-45ec-a48d-07f02308f155 X-Archives-Hash: 73f769bc3502124da979f8ab5eeb82f2 commit: 980c22cc9204900d96783cf44e750072258e748f Author: Eric Joldasov landless-city net> AuthorDate: Sun Sep 29 11:56:14 2024 +0000 Commit: Jakov Smolić gentoo org> CommitDate: Fri Oct 4 10:58:34 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=980c22cc sys-fs/ncdu: add 2.6 Signed-off-by: Eric Joldasov landless-city.net> Closes: https://github.com/gentoo/gentoo/pull/38816 Signed-off-by: Jakov Smolić gentoo.org> sys-fs/ncdu/Manifest | 2 + sys-fs/ncdu/ncdu-2.6.ebuild | 131 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 133 insertions(+) diff --git a/sys-fs/ncdu/Manifest b/sys-fs/ncdu/Manifest index 322a6c0dc38e..3609e01cf375 100644 --- a/sys-fs/ncdu/Manifest +++ b/sys-fs/ncdu/Manifest @@ -2,3 +2,5 @@ DIST ncdu-1.20.tar.gz 150835 BLAKE2B 0bb6576ecbb3df281c67a48409db2118521760f378d DIST ncdu-1.20.tar.gz.asc 833 BLAKE2B 487e3b4b1e83a2211e91307ff1ca1778059cc3f923e04b57bc5d4780d0108589a062861a25bafa58c357ad4495edce814a58eeb24087e06b958d8e23a02bbf22 SHA512 168bcc4255bbb7a576af39422797804726f84134dc342f59abfc825f93c5ee4e9fcaa9e0c18626ee87b96b2d19a7c57beaa8e1b3dc57eff2bd659add18027140 DIST ncdu-2.5.tar.gz 56019 BLAKE2B c10fb19f87c3d26334038ee96d857e547f9f6881518a675d9777a6c46cf456748861d84df190c14d6d2582f5ad3998ecdf9d00f0969c996221c0d1d9787570a3 SHA512 f4d499a3ab98a56667c75554c77951e4a42f5acdc1353875c108b0da469665777564405b8fcea5a731de473afacfda9f2c8701ba0ba989de1260119c64d7a9f8 DIST ncdu-2.5.tar.gz.asc 833 BLAKE2B 86babaf8720898a5bd83a2cc290deb2f0a8041087b9f0afddd2306766b82877bbf51f45ac3622761f231359b2e5f60b8d6c5479963aaf7a6abdf67d24fb18496 SHA512 a28751371f7e7a033379fb5f5dc885c69e716f8b6654b8ee9e5eb023a22b67ca99e3ee813ddc2e335d6e8db9bd5a9a19359910a1b8aad13132f7a8bed1d67d78 +DIST ncdu-2.6.tar.gz 72088 BLAKE2B 21d45bb428a56a040083165b9d467a526cd83eaa05b6f88b90a0b5dac0fa70dc4fd7e37ff52debc619b06103a95dad8ddc26fc9e77b6118eeb39aa97bfa0fd0e SHA512 e94612a56db3831d993d6ffd8c69a4cc2418ebf4b9a810e28444c103225ccc1f53ae31e448b94d40ccf2ab7d3a0af6e8ee02bc700123aca872b3bb35108e3d14 +DIST ncdu-2.6.tar.gz.asc 833 BLAKE2B 110bbb6e2db221316004d4491f174c40cdf8fca44e91290f7ea87fc6788de20c3fd6d90bd4b55e4e720736514509af87bcc5b6533b37a2889e20c023939776e6 SHA512 478afe4a51244bc11dfbea2c12fb217392186c1efe1403b44309e0f0e3d431393173282ebae32ceeca32f4ec3a93f35ca19ac962728cd3d7f06f26bccd56169b diff --git a/sys-fs/ncdu/ncdu-2.6.ebuild b/sys-fs/ncdu/ncdu-2.6.ebuild new file mode 100644 index 000000000000..fdcf0d107cab --- /dev/null +++ b/sys-fs/ncdu/ncdu-2.6.ebuild @@ -0,0 +1,131 @@ +# Copyright 1999-2024 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.13" +EZIG_MAX_EXCLUSIVE="0.14" + +DEPEND=" + app-arch/zstd + sys-libs/ncurses:=[unicode(+)] +" +RDEPEND="${DEPEND}" +BDEPEND=" + || ( dev-lang/zig:${EZIG_MIN} dev-lang/zig-bin:${EZIG_MIN} ) + virtual/pkgconfig + verify-sig? ( sec-keys/openpgp-keys-yorhel ) +" + +VERIFY_SIG_OPENPGP_KEY_PATH=/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 candidate selected selected_ver ver + + for candidate in "${BROOT}"/usr/bin/zig-*; do + if [[ ! -L ${candidate} || ${candidate} != */zig?(-bin)-+([0-9.]) ]]; then + continue + fi + + ver=${candidate##*-} + + 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 ${BROOT}/usr/bin" + fi + + export EZIG="${selected}" + export EZIG_VER="${selected_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_configure() { + zig-set_EZIG + export ZIG=${EZIG} +} + +src_test() { + ezig build test -Doptimize=ReleaseFast +} + +src_install() { + emake PREFIX="${ED}"/usr install + + dodoc README.md ChangeLog +}