diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-03-09 12:02:14 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-03-09 12:02:14 +0000 |
commit | 0fd62365fc104d7e6d5f3ef67800df09225a4019 (patch) | |
tree | 163b4a5055e07325ae1dc4f9bbbc2021ca1b6afa /sys-fs/ncdu | |
parent | 442eaf1780a48ddbd7a39f5a3f34d959c3c6d27e (diff) |
gentoo auto-resync : 09:03:2023 - 12:02:14
Diffstat (limited to 'sys-fs/ncdu')
-rw-r--r-- | sys-fs/ncdu/Manifest | 1 | ||||
-rw-r--r-- | sys-fs/ncdu/ncdu-2.2.2-r1.ebuild | 136 |
2 files changed, 137 insertions, 0 deletions
diff --git a/sys-fs/ncdu/Manifest b/sys-fs/ncdu/Manifest index dfe4f9289e4c..53bab1caad77 100644 --- a/sys-fs/ncdu/Manifest +++ b/sys-fs/ncdu/Manifest @@ -10,5 +10,6 @@ DIST ncdu-2.2.2.tar.gz.asc 833 BLAKE2B 5c6e886853aefec7615774b0c10e4a873d4e51da6 EBUILD ncdu-1.17.ebuild 683 BLAKE2B c5566d9059a9ee0d9466a5e6f9605402b25a8e3e7e09fd951ccd0ed75c839bee71492ea50118b633cd3b1332280178296d9cf31e055409ea26d845961e297e9c SHA512 0ebac8ef306b017c515340b127ee98df3ab67f27f6fa2fff441ccf161dc1970aa432e37d9e74a1c6220ff303a7e54362df8c6a13065e20306523227fe7e49fbf EBUILD ncdu-1.18.ebuild 683 BLAKE2B 5a8eecd8b29af30456f750b4ceaa245bc80d6c9557a05f7932c6e8d5c509258fcf8516e993579ca4a70d4708282529930b0ac34fce4158b801b7f5140b890d39 SHA512 5cc81a788760ee2d41c88b41a50371721f5abae91381fad55bc0ec6458f264b1f309ebf69beb80168570795747411007b243e640116e7f9543caf8b30134691b EBUILD ncdu-2.2.1.ebuild 1209 BLAKE2B 31a2f4a4fda0a307acd74696e099fddde1e20d4dcf29d52322122d7bf133295d01511d392233070bb22722127619de19234e96c6bda2b9fd16a5101e4fe88a75 SHA512 2fc2b8a905169b13f8a826d60992a4f9e2f64f4210c0fd907bf0c23fd5a2e3a8fd7519b4b0542c1e10421d4755f082748ccd62f60304d2c57528dee67c19c1cb +EBUILD ncdu-2.2.2-r1.ebuild 3149 BLAKE2B 88f0288298863ef5948bb15ace501bbce0ceea92b914fceafc219e3a80f46970fe49b7b2223ab94b5ec42b9431e665ee234468685d8100f54caac10976f69839 SHA512 79588363b7f5acb58ed7f8c87e0c43af9ad196f0ddaa6cae3b77114efde95053cf3995556a93971008785361431a358d63a4c51a18ca000a90f3a4991bbc603a EBUILD ncdu-2.2.2.ebuild 1023 BLAKE2B 72b0501d2e38704d87eed6b28dc8d90eca7e07993a7be4cf2850020023e13126be68fccca242cf8b3c9692c0a515fb9131cd8616a63931a78e57c6f2683ad0be SHA512 2d5d135a1f3be2c26bbaf113a4d35bef16589e4cba97506a6b3769e9fb7627342acd42d170b28f6505141162cd25d1814823c10b2ecab7348ce47adccd8ae147 MISC metadata.xml 862 BLAKE2B aecbc2cfec9351b2be9087d297016826f9bea5f81ea690e480cbe0dce5c627f554875fb9db5b19f21373391ef4fb28c7cea3129d911e80b7be007a9a0a79ac0a SHA512 2c722040961b930791780f704edddd4cdf010df05e462a0d333f2fbf4966c0ecac08eef3b1e05baf34013c95a91cc79dc38ef5616e07ffcb4e386b8760f89683 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..b8f45c71bf2c --- /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" +EZIG_MAX_EXCLUSIVE="0.11" + +DEPEND="sys-libs/ncurses:=[unicode(+)]" +RDEPEND="${DEPEND}" +BDEPEND=" + || ( dev-lang/zig:${EZIG_MIN} dev-lang/zig-bin:${EZIG_MIN} ) + 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 +} |