summaryrefslogtreecommitdiff
path: root/sys-process/btop
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-01-12 01:06:33 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-01-12 01:06:33 +0000
commit5c273534e10d0e86a5941f9ba9c4ed87b90f0dd1 (patch)
tree6fc2a78d8d62da19b832c6506988b3c5bcccf6f4 /sys-process/btop
parent427aed27427f356a75db3288d7b96ce7e2a044b2 (diff)
gentoo auto-resync : 12:01:2024 - 01:06:32
Diffstat (limited to 'sys-process/btop')
-rw-r--r--sys-process/btop/Manifest3
-rw-r--r--sys-process/btop/btop-1.3.0.ebuild50
-rw-r--r--sys-process/btop/files/btop-1.3.0-configurable-fortification.patch49
3 files changed, 102 insertions, 0 deletions
diff --git a/sys-process/btop/Manifest b/sys-process/btop/Manifest
index 0e2faef99989..6184a67e4fea 100644
--- a/sys-process/btop/Manifest
+++ b/sys-process/btop/Manifest
@@ -2,6 +2,9 @@ AUX btop-1.2.13-allow-clang.patch 7765 BLAKE2B 9acf679cf610c0bfd5cb01052cbc9ecdf
AUX btop-1.2.13-fix-makefile-deps.patch 1289 BLAKE2B adde21eb39016350f48fddfd98655074c6c29b3116ea5c7f19bc0373ef464ab611e6a183a8f3fd25b10eea944e6e3809596b988364796fcf26991837826444f8 SHA512 10fb0b76eac61e510bcfed4f7eda368d3e4d2935462ebe67a0355e38df0b4f503e95fe0cbf619fc3ef640ecea4d80d622d445ef57c5da16add6f89765f602a36
AUX btop-1.2.13-musl-1.2.4-lfs64.patch 1997 BLAKE2B 09c2f097f0e5da03911e139b9374c42c39ec12b639934c4069c45447ade2577fd0eeb53772a6d4b152976f4c9d445fccbce7e5d92e2a8cbd903bcc4d71463e2a SHA512 cee92b95d23cc86d770a5d981d1f0a54f2bbf03575f58eaf3fd9dbda40cd48a5c8fec62d38832c62e958353254be127dba535111a315ffd67d37797d46766ebc
AUX btop-1.2.13-verbose-mkdir.patch 669 BLAKE2B f8d4ae11816a511302a206e7ca4a32ac7704a739df69b45dd925e1fe2e572b7fc00a36c8f2c4c26f4adabddf794b478c02ba4f029a5831acbb66e5dcd31e2bdc SHA512 ef4b43c30bc286f6f96602934df32645e2b28706e824f3312fab8134a99c49cf4b8c634fadb76bc86e3e6bb9a2ef865bdcfbc0bd09933d9d833dfb4cc137089f
+AUX btop-1.3.0-configurable-fortification.patch 2108 BLAKE2B b05a12888d7cc71da57fda33499dd82573be79d94d782f40b0185d53eab6431cac73ab45978bb86b61bd7ea7589a640e944aed68bedbce77c5224e04d28a37ca SHA512 168b014ec127a19390f43d9be013eaef6ccba66d57f831d5b253de44bc29145343f4dfbdf6f13bb1f117ab7b3f5ff5ed6a68baa26674004878d0aef2f14a0567
DIST btop-1.2.13.tar.gz 982660 BLAKE2B 053c1ef87203b894c2cbe6007c3b5962dca232733d28f97d82a2f70e771d4cc92fe4c49d3582c80cb79974d65329d3e95e758b9e8a7fa51a2ff0cdbf6cbd9a75 SHA512 324e572d43e57e5e65e646aa743f7730e6d535fdc52e848aeb55d60c8d73945850c5b89fe0b541e98495ddf2bae71427a6ec8fe8a495b41cef885c535d01019b
+DIST btop-1.3.0.tar.gz 1142088 BLAKE2B 9f29828e646a8a4de2cacb8d5eb2885afbb5cf7764c9e4344f0da79b44c7481ca2591524789d753bc227f5a28c18717eda3aa3d1bb9f307f37e2732e9bbbde55 SHA512 0c20e3e1648dcf7d416e8f0072d40ed4b3e558eeb749150e4881d260cd675932c9b25315578e378f880172fe6470a8afc2687e011b491a79bd3e29618448f397
EBUILD btop-1.2.13-r2.ebuild 1780 BLAKE2B d9827a95372e03d53ce07d17d694ca4b87dbb9d3c935e27152fe3fa9fa56aa1f9c61cad7c2e6934df4d191ffb17feefb1cacdbfda98fcd8c510c5d71c77498ae SHA512 eee2cacd39794ca82cede5fa59d69939e3f503b1c36ef91d714c7ceb12141563b21f6106e4431cd13a0dedc434e0e14373c099118c6fb9e2a48f354c09e82193
+EBUILD btop-1.3.0.ebuild 1284 BLAKE2B de1635a413f8c70b7e906ca465dc499dbd77d0f9e32b61fc4e90e7ae8ce8e8067548cdd5e4f25ed8b1935cf9c3641b331683b816857c79edbb8cd8824a806a3b SHA512 2173d8f57b8e6c51df69b5a03f5ba5036397c2184dc40f7507a403e7cd096eab328e8f96c12efff15f08f08d970f63b95d2665dbecdb0a122a6d40ebf201242b
MISC metadata.xml 548 BLAKE2B 74762cdc63011b363a4c06de8190541f862d70f0006461c7a1cf2d734caf20601ba0769dc067e261957fe42a64bdaf26297bf3d080c3c08203eabd73165f2f8c SHA512 bb16944df9321001ca5c9e9fff49ea39069386117f0cfde67e8f19e3f44c13d360effb578d2c44c67f792d1ff574830f13cb9ef183f594e39ad3669083f2cf41
diff --git a/sys-process/btop/btop-1.3.0.ebuild b/sys-process/btop/btop-1.3.0.ebuild
new file mode 100644
index 000000000000..753495ab9c7f
--- /dev/null
+++ b/sys-process/btop/btop-1.3.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 2021-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs optfeature xdg cmake
+
+DESCRIPTION="A monitor of resources"
+HOMEPAGE="https://github.com/aristocratos/btop"
+SRC_URI="
+ https://github.com/aristocratos/btop/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
+"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~x86"
+
+PATCHES=(
+ # Backport of upstream PR 648. Remove after 1.3.0
+ "${FILESDIR}/${P}-configurable-fortification.patch"
+)
+
+pkg_setup() {
+ if [[ "${MERGE_TYPE}" != "binary" ]]; then
+ if tc-is-clang ; then
+ if [[ "$(clang-major-version)" -lt 16 ]]; then
+ die "sys-process/btop requires >=sys-devel/clang-16.0.0 to build."
+ fi
+ elif ! tc-is-gcc ; then
+ die "$(tc-getCXX) is not a supported compiler. Please use sys-devel/gcc or >=sys-devel/clang-16.0.0 instead."
+ fi
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBTOP_GPU=true
+ -DBTOP_RSMI_STATIC=false
+ # Fortification can be set in CXXFLAGS instead
+ -DBTOP_FORTIFY=false
+ )
+ 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
+}
diff --git a/sys-process/btop/files/btop-1.3.0-configurable-fortification.patch b/sys-process/btop/files/btop-1.3.0-configurable-fortification.patch
new file mode 100644
index 000000000000..f6fd873edb13
--- /dev/null
+++ b/sys-process/btop/files/btop-1.3.0-configurable-fortification.patch
@@ -0,0 +1,49 @@
+Patch from https://github.com/aristocratos/btop/pull/648/files.
+Allows to disable setting -D_FORTIFY_SOURCE in the build system,
+so the fortification level can be configured freely in make.conf.
+
+Bug: https://bugs.gentoo.org/898148
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -41,6 +41,7 @@ option(BTOP_LTO "Enable LTO" ON)
+ option(BTOP_USE_MOLD "Use mold to link btop" OFF)
+ option(BTOP_PEDANTIC "Enable a bunch of additional warnings" OFF)
+ option(BTOP_WERROR "Compile with warnings as errors" OFF)
++option(BTOP_FORTIFY "Detect buffer overflows with _FORTIFY_SOURCE=3" ON)
+ option(BTOP_GPU "Enable GPU support" ON)
+ cmake_dependent_option(BTOP_RSMI_STATIC "Link statically to ROCm SMI" OFF "BTOP_GPU" OFF)
+
+@@ -112,7 +113,7 @@ target_compile_definitions(btop PRIVATE
+ _FILE_OFFSET_BITS=64
+ $<$<CONFIG:Debug>:_GLIBCXX_ASSERTIONS _LIBCPP_ENABLE_ASSERTIONS=1>
+ # Only has an effect with optimizations enabled
+- $<$<NOT:$<CONFIG:Debug>>:_FORTIFY_SOURCE=2>
++ $<$<AND:$<NOT:$<CONFIG:Debug>>,$<BOOL:${BTOP_FORTIFY}>>:_FORTIFY_SOURCE=3>
+ )
+
+ target_include_directories(btop SYSTEM PRIVATE include)
+--- a/Makefile
++++ b/Makefile
+@@ -50,6 +50,11 @@ ifeq ($(GPU_SUPPORT),true)
+ override ADDFLAGS += -DGPU_SUPPORT
+ endif
+
++FORTIFY_SOURCE ?= true
++ifeq ($(FORTIFY_SOURCE),true)
++ override ADDFLAGS += -D_FORTIFY_SOURCE=3
++endif
++
+ #? Compiler and Linker
+ ifeq ($(shell $(CXX) --version | grep clang >/dev/null 2>&1; echo $$?),0)
+ override CXX_IS_CLANG := true
+@@ -174,7 +179,7 @@ override GOODFLAGS := $(foreach flag,$(TESTFLAGS),$(strip $(shell echo "int main
+ override REQFLAGS := -std=c++20
+ WARNFLAGS := -Wall -Wextra -pedantic
+ OPTFLAGS := -O2 -ftree-vectorize -flto=$(LTO)
+-LDCXXFLAGS := -pthread -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -D_FILE_OFFSET_BITS=64 $(GOODFLAGS) $(ADDFLAGS)
++LDCXXFLAGS := -pthread -D_GLIBCXX_ASSERTIONS -D_FILE_OFFSET_BITS=64 $(GOODFLAGS) $(ADDFLAGS)
+ override CXXFLAGS += $(REQFLAGS) $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS)
+ override LDFLAGS += $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS)
+ INC := $(foreach incdir,$(INCDIRS),-isystem $(incdir)) -I$(SRCDIR)
+