commit:     83d8f86b59eb96b9cd26e8fd8e780fc0768a5598
Author:     Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
AuthorDate: Wed Dec 17 08:10:56 2025 +0000
Commit:     Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
CommitDate: Wed Dec 17 08:19:22 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=83d8f86b

x11-misc/i3status-rust: add 0.35.0

Signed-off-by: Lucio Sauer <watermanpaint <AT> posteo.net>

 x11-misc/i3status-rust/Manifest                    |   3 +
 .../files/i3status-rust-0.35.0-gitless.patch       |  25 +++++
 x11-misc/i3status-rust/i3status-rust-0.35.0.ebuild | 101 +++++++++++++++++++++
 3 files changed, 129 insertions(+)

diff --git a/x11-misc/i3status-rust/Manifest b/x11-misc/i3status-rust/Manifest
index 94d5b52e01..ea6fc42091 100644
--- a/x11-misc/i3status-rust/Manifest
+++ b/x11-misc/i3status-rust/Manifest
@@ -1,3 +1,6 @@
 DIST i3status-rust-0.34.0-crates.tar.xz 24456404 BLAKE2B 
a2e1669aa54a6ed22aa0034e0a24e9e9271880a8d55d9739627676ffec471dabcab9e99db0102781c21c906dc3bc30257d123f259a224880e9f37a302bdb81f7
 SHA512 
f7d63cd7f5f8c6bc59483e7a3efd37a53a61d10c9d2059b3fee75df775af67f09edb443a276767c7937e79d3b8f429232c23a1828a6765f2c7e4090dcdfb79f4
 DIST i3status-rust-0.34.0-man.1 139854 BLAKE2B 
0a73d9b89594011d7b03a632b43a3767242924bb8743cdd58e7ac6e93629af47458cc25c13a2b5888576ca52b62fbf59b676af7aaf7c38870c8a00a13186ac61
 SHA512 
ba440a8a20bb11f7705e1d717a2da769725dce68231e27541777c193807647d7d79f72722fb8c14b8c31f3733d3c9242e1145b9225205ebe3c6aed8e2680f103
 DIST i3status-rust-0.34.0.gh.tar.gz 462330 BLAKE2B 
ff89f9f6db6021166a78bfd04d89ebf0ccf525916f0295f1b7dc25bc3a28502b54d8e2354dccf7d8512a0dcc71ce4a1f2a12d433b0b53111b595a7b9a0726cb0
 SHA512 
d8c840bbdce63718eceeca5b8cefa21accfee8f44cc095bbe57eb92b0f49ab73b1fdcc4a09cceebe0ec75f0beaab630d35205f5e0bc39686a3dc3eb0e2a6cf6b
+DIST i3status-rust-0.35.0-crates.tar.xz 23381376 BLAKE2B 
82c0dd21c91ab6e5e154e72f5ef561cd7edcfa08f1c19a98280efd6e08b0d751b66e63a2483a17ada87c17e64b926c95d45f3756ac4d3740bce57808954fe229
 SHA512 
876a3fb0e6250abb4ccf44eecc6c8f382b6a692e1272d05d7d343aafbd4650e14ce6e21d51d5fb4f6f7fa75c57a7ee1fadeed63b5a1779ad623b7aec912e9dc1
+DIST i3status-rust-0.35.0-man.1 140463 BLAKE2B 
9dcf6da75d5ae1b3575af2eaf975c2e08e1a0d4d540ba73ad89a7fb0e606d1ab232a47cc3949990737d19d9269b8a0fe8a14fe3ff38b75897ded94e388fbbe62
 SHA512 
c96e2254e78daa762f3ba56b0b7bb9b72ac3328e2f9f72dcde1f908a232196b0be41623598eab46c910a5c64caea99c5e1ba458e81da8c199fe5dc9f24d497f6
+DIST i3status-rust-0.35.0.gh.tar.gz 474566 BLAKE2B 
8e78b14161837a349b6d0810b9486485ed80044319819ef2a7cdde6409102173e580e03a72a9c3eab0df3e349c184c3d184aee6b5505c25df9fd3a1a9f0a9b8d
 SHA512 
ffa0a9ff253b20a7a7a297bd4d6160024ab5b9e2af0692f74051da1878842bbfc74c731fcd402f7079abe6d3a4af849f19314e5a93ba5a5ba7cea5817412445e

diff --git a/x11-misc/i3status-rust/files/i3status-rust-0.35.0-gitless.patch 
b/x11-misc/i3status-rust/files/i3status-rust-0.35.0-gitless.patch
new file mode 100644
index 0000000000..edf552aa6e
--- /dev/null
+++ b/x11-misc/i3status-rust/files/i3status-rust-0.35.0-gitless.patch
@@ -0,0 +1,25 @@
+Statically provide the release commit hash and date by replacing the
+placeholder values within the ebuild.
+
+Author: Lucio Sauer <[email protected]>
+--- a/build.rs
++++ b/build.rs
+@@ -1,16 +1,8 @@
+ use std::process::Command;
+ 
+ fn main() {
+-    let hash = Command::new("git")
+-        .args(["rev-parse", "--short", "HEAD"])
+-        .env("GIT_CONFIG_GLOBAL", "/dev/null")
+-        .output()
+-        .map(|o| String::from_utf8(o.stdout).unwrap());
+-    let date = Command::new("git")
+-        .args(["log", "--pretty=format:'%ad'", "-n1", "--date=short"])
+-        .env("GIT_CONFIG_GLOBAL", "/dev/null")
+-        .output()
+-        .map(|o| String::from_utf8(o.stdout).unwrap());
++    let hash: Result<&str, &str> = Ok("%COMMIT%");
++    let date: Result<&str, &str> = Ok("%DATE%");
+     if let Ok(hash) = hash
+         && let Ok(date) = date
+     {

diff --git a/x11-misc/i3status-rust/i3status-rust-0.35.0.ebuild 
b/x11-misc/i3status-rust/i3status-rust-0.35.0.ebuild
new file mode 100644
index 0000000000..f6054f9d6c
--- /dev/null
+++ b/x11-misc/i3status-rust/i3status-rust-0.35.0.ebuild
@@ -0,0 +1,101 @@
+# Copyright 2020-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+RUST_MIN_VER="1.88.0"
+LLVM_OPTIONAL=1
+LLVM_COMPAT=( {18..21} )
+
+inherit cargo llvm-r2 optfeature
+
+DESCRIPTION="Feature-rich and resource-friendly replacement for i3status, 
written in Rust"
+HOMEPAGE="https://github.com/greshake/i3status-rust/";
+SRC_URI="
+       
https://github.com/greshake/i3status-rust/archive/refs/tags/v${PV}.tar.gz -> 
${P}.gh.tar.gz
+       https://home.cit.tum.de/~salu/distfiles/${P}-crates.tar.xz
+       https://home.cit.tum.de/~salu/distfiles/${P}-man.1
+"
+
+LICENSE="GPL-3"
+# Dependent crate licenses
+LICENSE+="
+       0BSD Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD CC0-1.0
+       GPL-3+ ISC MIT MPL-2.0 MirOS Unicode-3.0 Unicode-DFS-2016
+"
+# ring crate
+LICENSE+=" openssl"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="notmuch pipewire pulseaudio"
+REQUIRED_USE="pipewire? ( ${LLVM_REQUIRED_USE} )"
+
+DEPEND="
+       dev-libs/openssl:=
+       sys-apps/lm-sensors:=
+       notmuch? ( net-mail/notmuch:= )
+       pulseaudio? ( media-libs/libpulse )
+       pipewire? ( >=media-video/pipewire-0.3:= )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+       virtual/pkgconfig
+       pipewire? ( $(llvm_gen_dep 'llvm-core/clang:${LLVM_SLOT}') )
+"
+
+PATCHES=( "${FILESDIR}"/${P}-gitless.patch )
+
+QA_FLAGS_IGNORED="usr/bin/i3status-rs"
+
+pkg_setup() {
+       if use pipewire; then
+               llvm-r2_pkg_setup
+       fi
+       rust_pkg_setup
+}
+
+src_prepare() {
+       default
+       local COMMIT="b5433fde865496a1b70c0d74ee7a7d37f64f4f73"
+       local DATE="2025-12-15"
+       sed -e "s/%COMMIT%/${COMMIT:0:9}/" -e "s/%DATE%/${DATE}/" \
+               -i build.rs || die
+}
+
+src_configure() {
+       local myfeatures=(
+               $(usev debug debug_borders)
+               $(usev notmuch)
+               $(usev pipewire)
+               icu_calendar
+               maildir
+       )
+       cargo_src_configure $(usex pulseaudio '' --no-default-features)
+}
+
+src_install() {
+       cargo_src_install
+       newman "${DISTDIR}"/${P}-man.1 i3status-rs.1
+       insinto /usr/share/i3status-rust
+       doins -r files/icons files/themes
+       dodoc NEWS.md CONTRIBUTING.md
+       docinto examples
+       dodoc examples/*.toml
+}
+
+pkg_postinst() {
+       optfeature_header "Configurable fonts for themes and icons:"
+       optfeature "themes using the Powerline arrow char" 
media-fonts/powerline-symbols
+       optfeature "the awesome{5,6} icon set" media-fonts/fontawesome
+       optfeature_header "Status bar blocks with additional requirements:"
+       optfeature "ALSA volume support" media-sound/alsa-utils
+       optfeature "advanced/non-standard battery support" sys-power/apcupsd 
sys-power/upower
+       optfeature "bluetooth support" net-wireless/bluez
+       optfeature "KDE Connect support" kde-misc/kdeconnect
+       optfeature "speedtest support" net-analyzer/speedtest-cli
+       # optfeature "VPN support" net-vpn/nordvpn # nordvpn overlay
+       elog "The music block supports all music players that implement the 
MPRIS"
+       elog "interface. These include media-sound/rhythmbox, media-sound/mpv 
and"
+       elog "www-client/firefox among others. MPRIS support may be built-in or"
+       elog "require additional plugins."
+}

Reply via email to