forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sys-process/bottom: Patch to use newer time
The version of time that bottom 0.9.6 uses does not build with Rust 1.80.0[0][1]. This bumps time to 0.3.36 to address the issue. [0] ClementTsang/bottom#1500 [1] rust-lang/rust#127343 Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
- Loading branch information
1 parent
adef34d
commit fd226ce
Showing
3 changed files
with
349 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,242 @@ | ||
# Copyright 2020-2024 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
|
||
CRATES=" | ||
addr2line-0.21.0 | ||
adler-1.0.2 | ||
ahash-0.8.3 | ||
aho-corasick-1.0.4 | ||
allocator-api2-0.2.16 | ||
anstream-0.3.2 | ||
anstyle-1.0.1 | ||
anstyle-parse-0.2.1 | ||
anstyle-query-1.0.0 | ||
anstyle-wincon-1.0.2 | ||
anyhow-1.0.75 | ||
assert_cmd-2.0.12 | ||
autocfg-1.1.0 | ||
backtrace-0.3.69 | ||
bitflags-1.3.2 | ||
bitflags-2.4.0 | ||
bottom-0.9.6 | ||
bstr-1.6.0 | ||
byteorder-1.4.3 | ||
cargo-husky-1.5.0 | ||
cassowary-0.3.0 | ||
cc-1.0.82 | ||
cfg-if-1.0.0 | ||
clap-4.3.23 | ||
clap_builder-4.3.23 | ||
clap_complete-4.3.2 | ||
clap_lex-0.5.0 | ||
clap_mangen-0.2.12 | ||
colorchoice-1.0.0 | ||
concat-string-1.0.1 | ||
core-foundation-0.9.3 | ||
core-foundation-sys-0.8.4 | ||
crossbeam-channel-0.5.8 | ||
crossbeam-deque-0.8.3 | ||
crossbeam-epoch-0.9.15 | ||
crossbeam-utils-0.8.16 | ||
crossterm-0.26.1 | ||
crossterm-0.27.0 | ||
crossterm_winapi-0.9.1 | ||
ctrlc-3.4.0 | ||
darling-0.10.2 | ||
darling_core-0.10.2 | ||
darling_macro-0.10.2 | ||
deranged-0.3.11 | ||
difflib-0.4.0 | ||
dirs-5.0.1 | ||
dirs-sys-0.4.1 | ||
doc-comment-0.3.3 | ||
either-1.9.0 | ||
enum-as-inner-0.5.1 | ||
equivalent-1.0.1 | ||
errno-0.3.2 | ||
errno-dragonfly-0.1.2 | ||
fern-0.6.2 | ||
filedescriptor-0.8.2 | ||
float-cmp-0.9.0 | ||
fnv-1.0.7 | ||
getrandom-0.2.10 | ||
gimli-0.28.0 | ||
hashbrown-0.14.0 | ||
heck-0.4.1 | ||
hermit-abi-0.3.2 | ||
humantime-2.1.0 | ||
ident_case-1.0.1 | ||
indexmap-2.0.0 | ||
indoc-2.0.3 | ||
io-lifetimes-1.0.11 | ||
is-terminal-0.4.9 | ||
itertools-0.10.5 | ||
itertools-0.11.0 | ||
itoa-1.0.9 | ||
kstring-2.0.0 | ||
lazycell-1.3.0 | ||
libc-0.2.147 | ||
libloading-0.7.4 | ||
linux-raw-sys-0.3.8 | ||
linux-raw-sys-0.4.5 | ||
lock_api-0.4.10 | ||
log-0.4.20 | ||
mach2-0.4.1 | ||
memchr-2.5.0 | ||
memoffset-0.9.0 | ||
miniz_oxide-0.7.1 | ||
mio-0.8.8 | ||
nix-0.26.2 | ||
normalize-line-endings-0.3.0 | ||
ntapi-0.4.1 | ||
num-conv-0.1.0 | ||
num-traits-0.2.16 | ||
num_cpus-1.16.0 | ||
nvml-wrapper-0.9.0 | ||
nvml-wrapper-sys-0.7.0 | ||
object-0.32.0 | ||
once_cell-1.18.0 | ||
option-ext-0.2.0 | ||
parking_lot-0.12.1 | ||
parking_lot_core-0.9.8 | ||
paste-1.0.14 | ||
powerfmt-0.2.0 | ||
predicates-3.0.3 | ||
predicates-core-1.0.6 | ||
predicates-tree-1.0.9 | ||
proc-macro2-1.0.66 | ||
quote-1.0.33 | ||
ratatui-0.22.0 | ||
rayon-1.7.0 | ||
rayon-core-1.11.0 | ||
redox_syscall-0.2.16 | ||
redox_syscall-0.3.5 | ||
redox_users-0.4.3 | ||
regex-1.9.4 | ||
regex-automata-0.3.7 | ||
regex-syntax-0.7.5 | ||
roff-0.2.1 | ||
rustc-demangle-0.1.23 | ||
rustix-0.37.23 | ||
rustix-0.38.9 | ||
ryu-1.0.15 | ||
same-file-1.0.6 | ||
scopeguard-1.2.0 | ||
serde-1.0.188 | ||
serde_derive-1.0.188 | ||
serde_json-1.0.105 | ||
serde_spanned-0.6.3 | ||
signal-hook-0.3.17 | ||
signal-hook-mio-0.2.3 | ||
signal-hook-registry-1.4.1 | ||
smallvec-1.11.0 | ||
starship-battery-0.8.2 | ||
static_assertions-1.1.0 | ||
strsim-0.9.3 | ||
strsim-0.10.0 | ||
syn-1.0.109 | ||
syn-2.0.29 | ||
sysctl-0.5.4 | ||
sysinfo-0.29.8 | ||
terminal_size-0.2.6 | ||
termtree-0.4.1 | ||
thiserror-1.0.47 | ||
thiserror-impl-1.0.47 | ||
time-0.3.36 | ||
time-core-0.1.2 | ||
time-macros-0.2.18 | ||
toml_datetime-0.6.3 | ||
toml_edit-0.19.14 | ||
typenum-1.16.0 | ||
unicode-ident-1.0.11 | ||
unicode-segmentation-1.10.1 | ||
unicode-width-0.1.10 | ||
uom-0.35.0 | ||
utf8parse-0.2.1 | ||
version_check-0.9.4 | ||
wait-timeout-0.2.0 | ||
walkdir-2.3.3 | ||
wasi-0.11.0+wasi-snapshot-preview1 | ||
winapi-0.3.9 | ||
winapi-i686-pc-windows-gnu-0.4.0 | ||
winapi-util-0.1.5 | ||
winapi-x86_64-pc-windows-gnu-0.4.0 | ||
windows-0.51.1 | ||
windows-core-0.51.1 | ||
windows-sys-0.48.0 | ||
windows-targets-0.48.5 | ||
windows_aarch64_gnullvm-0.48.5 | ||
windows_aarch64_msvc-0.48.5 | ||
windows_i686_gnu-0.48.5 | ||
windows_i686_msvc-0.48.5 | ||
windows_x86_64_gnu-0.48.5 | ||
windows_x86_64_gnullvm-0.48.5 | ||
windows_x86_64_msvc-0.48.5 | ||
winnow-0.5.14 | ||
wrapcenum-derive-0.4.0 | ||
" | ||
|
||
inherit bash-completion-r1 cargo | ||
|
||
DESCRIPTION="A graphical process/system monitor with a customizable interface" | ||
HOMEPAGE="https://github.com/ClementTsang/bottom" | ||
SRC_URI="$(cargo_crate_uris)" | ||
|
||
LICENSE="0BSD Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 Boost-1.0 ISC MIT MPL-2.0 Unicode-DFS-2016 Unlicense ZLIB" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~arm64 ~ppc64" | ||
IUSE="+battery +gpu +zfs" | ||
|
||
# Rust packages ignore CFLAGS and LDFLAGS so let's silence the QA warnings | ||
QA_FLAGS_IGNORED="usr/bin/btm" | ||
|
||
PATCHES=( | ||
# This patch won't be needed once bottom releases a new version. It works | ||
# around https://github.com/rust-lang/rust/issues/127343 | ||
"${FILESDIR}"/bottom-0.9.6-bump-deps.patch | ||
) | ||
|
||
src_prepare() { | ||
# Stripping symbols should be the choice of the user. | ||
sed -i '/strip = "symbols"/d' Cargo.toml || die "Unable to patch out symbol stripping" | ||
|
||
eapply_user | ||
|
||
default | ||
} | ||
|
||
src_configure() { | ||
myfeatures=( | ||
$(usev battery) | ||
$(usev gpu) | ||
$(usev zfs) | ||
) | ||
|
||
# This will turn on generation of shell completion scripts | ||
export BTM_GENERATE=true | ||
|
||
# https://github.com/ClementTsang/bottom/blob/bacaca5548c2b23d261ef961ee6584b609529567/Cargo.toml#L63 | ||
# fern and log features are for debugging only, so disable default features | ||
cargo_src_configure $(usev !debug --no-default-features) | ||
} | ||
|
||
src_install() { | ||
cargo_src_install | ||
|
||
# Find generated shell completion files. btm.bash can be present in multiple dirs if we build | ||
# additional features, so grab the first match only. | ||
local BUILD_DIR="$(dirname $(find target -name btm.bash -print -quit || die) || die)" | ||
|
||
newbashcomp "${BUILD_DIR}"/btm.bash btm | ||
|
||
insinto /usr/share/fish/vendor_completions.d | ||
doins "${BUILD_DIR}"/btm.fish | ||
|
||
insinto /usr/share/zsh/site-functions | ||
doins "${BUILD_DIR}"/_btm | ||
|
||
local DOCS=( README.md ) | ||
einstalldocs | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
From ea863b17485382259c5faef8e2f48c3b2f07ce49 Mon Sep 17 00:00:00 2001 | ||
From: Randy Barlow <randy@electronsweatshop.com> | ||
Date: Thu, 25 Jul 2024 20:25:33 -0400 | ||
Subject: [PATCH] Update time to 0.9.6 | ||
|
||
Bump time for https://github.com/ClementTsang/bottom/issues/1500 | ||
|
||
See also: https://github.com/rust-lang/rust/issues/127343 | ||
|
||
Signed-off-by: Randy Barlow <randy@electronsweatshop.com> | ||
--- | ||
Cargo.lock | 34 ++++++++++++++++++++++++++-------- | ||
1 file changed, 26 insertions(+), 8 deletions(-) | ||
|
||
diff --git a/Cargo.lock b/Cargo.lock | ||
index 01c20c8e..4d9f7268 100644 | ||
--- a/Cargo.lock | ||
+++ b/Cargo.lock | ||
@@ -443,9 +443,12 @@ dependencies = [ | ||
|
||
[[package]] | ||
name = "deranged" | ||
-version = "0.3.7" | ||
+version = "0.3.11" | ||
source = "registry+https://github.com/rust-lang/crates.io-index" | ||
-checksum = "7684a49fb1af197853ef7b2ee694bc1f5b4179556f1e5710e1760c5db6f5e929" | ||
+checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" | ||
+dependencies = [ | ||
+ "powerfmt", | ||
+] | ||
|
||
[[package]] | ||
name = "difflib" | ||
@@ -804,6 +807,12 @@ dependencies = [ | ||
"winapi", | ||
] | ||
|
||
+[[package]] | ||
+name = "num-conv" | ||
+version = "0.1.0" | ||
+source = "registry+https://github.com/rust-lang/crates.io-index" | ||
+checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" | ||
+ | ||
[[package]] | ||
name = "num-traits" | ||
version = "0.2.16" | ||
@@ -896,6 +905,12 @@ version = "1.0.14" | ||
source = "registry+https://github.com/rust-lang/crates.io-index" | ||
checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" | ||
|
||
+[[package]] | ||
+name = "powerfmt" | ||
+version = "0.2.0" | ||
+source = "registry+https://github.com/rust-lang/crates.io-index" | ||
+checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" | ||
+ | ||
[[package]] | ||
name = "predicates" | ||
version = "3.0.3" | ||
@@ -1300,12 +1315,14 @@ dependencies = [ | ||
|
||
[[package]] | ||
name = "time" | ||
-version = "0.3.27" | ||
+version = "0.3.36" | ||
source = "registry+https://github.com/rust-lang/crates.io-index" | ||
-checksum = "0bb39ee79a6d8de55f48f2293a830e040392f1c5f16e336bdd1788cd0aadce07" | ||
+checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" | ||
dependencies = [ | ||
"deranged", | ||
"itoa", | ||
+ "num-conv", | ||
+ "powerfmt", | ||
"serde", | ||
"time-core", | ||
"time-macros", | ||
@@ -1313,16 +1330,17 @@ dependencies = [ | ||
|
||
[[package]] | ||
name = "time-core" | ||
-version = "0.1.1" | ||
+version = "0.1.2" | ||
source = "registry+https://github.com/rust-lang/crates.io-index" | ||
-checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" | ||
+checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" | ||
|
||
[[package]] | ||
name = "time-macros" | ||
-version = "0.2.13" | ||
+version = "0.2.18" | ||
source = "registry+https://github.com/rust-lang/crates.io-index" | ||
-checksum = "733d258752e9303d392b94b75230d07b0b9c489350c69b851fc6c065fde3e8f9" | ||
+checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" | ||
dependencies = [ | ||
+ "num-conv", | ||
"time-core", | ||
] | ||
|
||
-- | ||
2.44.2 | ||
|