commit:     fb2238db0f32eafac1bcd68d722143b6d6499043
Author:     Adrian Schollmeyer <nex+b-g-o <AT> nexadn <DOT> de>
AuthorDate: Sun Dec 28 10:48:23 2025 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Sun Jan  4 12:14:10 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb2238db

sys-process/btop: add 1.4.6

This also adds a workaround for relocation issues due to weird build
system behavior. Furthermore, this is the first version with a test
suite, so IUSE="test" is introduced.

See-Also: https://github.com/gentoo/gentoo/pull/45185
Closes: https://github.com/gentoo/gentoo/pull/45192
Signed-off-by: Adrian Schollmeyer <nex+b-g-o <AT> nexadn.de>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 sys-process/btop/Manifest          |  1 +
 sys-process/btop/btop-1.4.6.ebuild | 66 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 67 insertions(+)

diff --git a/sys-process/btop/Manifest b/sys-process/btop/Manifest
index 4aea1fda2682..f01b02746264 100644
--- a/sys-process/btop/Manifest
+++ b/sys-process/btop/Manifest
@@ -1 +1,2 @@
 DIST btop-1.4.5.gh.tar.gz 1250099 BLAKE2B 
8720a9c8660942f95770023d1910016180c138eeb5606d98ad4ffbee55b8d80ee8f3b8803662ac9b0f240cc2069bab339eba091a7ae1ac5c82b936a948cdcb73
 SHA512 
36e278c832d984e5d882dcf861855945edc31dd00cbe0a6c16b09de42b2416d865585985e999302a470068037fdecca754c8ee9e25940c9ae1df5196893f93a8
+DIST btop-1.4.6.gh.tar.gz 1261873 BLAKE2B 
f19983f7df10edb6d85965efe827895ecb6e3d8b290c8174998507e9d50f5c8e97454138efcbb7629f0f95b2441a53bc81338049650a9df7ae26b5825af3cc7b
 SHA512 
b57c9cc6a5602d57b230ff7296dc2b80876d189a0e8410458c308d7946241392708bd96e777d749a43110d1bcb147e26f4f8d9f99bfaa5828c42c3de7b1dea7e

diff --git a/sys-process/btop/btop-1.4.6.ebuild 
b/sys-process/btop/btop-1.4.6.ebuild
new file mode 100644
index 000000000000..3b434af464ba
--- /dev/null
+++ b/sys-process/btop/btop-1.4.6.ebuild
@@ -0,0 +1,66 @@
+# Copyright 2021-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake optfeature toolchain-funcs xdg
+
+DESCRIPTION="A monitor of resources"
+HOMEPAGE="https://github.com/aristocratos/btop";
+SRC_URI="
+       https://github.com/aristocratos/btop/archive/v${PV}.tar.gz -> 
${P}.gh.tar.gz
+"
+
+LICENSE="Apache-2.0 MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+       test? (
+               dev-cpp/gtest
+       )
+"
+BDEPEND="
+       app-text/lowdown
+"
+
+DOCS=( "README.md" "CHANGELOG.md" )
+
+pkg_setup() {
+       if [[ "${MERGE_TYPE}" != "binary" ]]; then
+               if tc-is-clang ; then
+                       if [[ "$(clang-major-version)" -lt 19 ]]; then
+                               die "sys-process/btop requires 
>=llvm-core/clang-19.0.0 to build."
+                       fi
+               elif tc-is-gcc ; then
+                       if [[ "$(gcc-major-version)" -lt 14 ]]; then
+                               die "sys-process/btop requires 
>=sys-devel/gcc-14.0.0 to build."
+                       fi
+               else
+                       die "$(tc-getCXX) is not a supported compiler. Please 
use >=sys-devel/gcc-14.0.0 or >=llvm-core/clang-19.0.0 instead."
+               fi
+       fi
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DBTOP_GPU=true
+               -DBTOP_RSMI_STATIC=false
+               -DBTOP_STATIC=false
+               # These settings can be controlled in make.conf CFLAGS/CXXFLAGS
+               -DBTOP_LTO=false
+               -DBUILD_TESTING="$(usex test)"
+               # Workaround for relocation errors
+               -DCMAKE_POSITION_INDEPENDENT_CODE=true
+       )
+       cmake_src_configure
+}
+
+pkg_postinst() {
+       xdg_pkg_postinst
+
+       optfeature "GPU monitoring support (Radeon GPUs)" dev-util/rocm-smi
+       optfeature "GPU monitoring support (NVIDIA GPUs)" 
x11-drivers/nvidia-drivers
+}

Reply via email to