summaryrefslogtreecommitdiff
path: root/sys-process
diff options
context:
space:
mode:
Diffstat (limited to 'sys-process')
-rw-r--r--sys-process/Manifest.gzbin10151 -> 10152 bytes
-rw-r--r--sys-process/btop/Manifest3
-rw-r--r--sys-process/btop/btop-1.2.13-r2.ebuild71
-rw-r--r--sys-process/btop/files/btop-1.2.13-allow-clang.patch191
-rw-r--r--sys-process/btop/files/btop-1.2.13-musl-1.2.4-lfs64.patch39
5 files changed, 304 insertions, 0 deletions
diff --git a/sys-process/Manifest.gz b/sys-process/Manifest.gz
index d54fe0d85368..ea7db1e94b8d 100644
--- a/sys-process/Manifest.gz
+++ b/sys-process/Manifest.gz
Binary files differ
diff --git a/sys-process/btop/Manifest b/sys-process/btop/Manifest
index 8d9cc9300bc1..ade02b40b4aa 100644
--- a/sys-process/btop/Manifest
+++ b/sys-process/btop/Manifest
@@ -1,6 +1,9 @@
+AUX btop-1.2.13-allow-clang.patch 7765 BLAKE2B 9acf679cf610c0bfd5cb01052cbc9ecdfb22fd83c20780f32387efa412db41570d2d3f41a79bc25097d2c335a38dd125909f13f367a4c8faa5d927a87391a24f SHA512 f8c679db3862074e1b20b2ac1d0666069d1bf111ac232daabd8d32de83cc499f94b6ac1f7d9671c0ce4eec987549ee1f6ea4c9840ed72c6a832e46b504d243f9
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
DIST btop-1.2.13.tar.gz 982660 BLAKE2B 053c1ef87203b894c2cbe6007c3b5962dca232733d28f97d82a2f70e771d4cc92fe4c49d3582c80cb79974d65329d3e95e758b9e8a7fa51a2ff0cdbf6cbd9a75 SHA512 324e572d43e57e5e65e646aa743f7730e6d535fdc52e848aeb55d60c8d73945850c5b89fe0b541e98495ddf2bae71427a6ec8fe8a495b41cef885c535d01019b
EBUILD btop-1.2.13-r1.ebuild 1387 BLAKE2B 6f59075e0154fd1791400a2899e8b1cb0c545ab67b09bb877fe55989fa03a67e8edba144929e29f19917035c98c1658820c63bb6673f0ab187a119003195dab0 SHA512 de73834bc3672008e56b3eff45896e1fee4b22cb039d4bf9acef52da4060c4c5610a6cf9bc539714ff22766536ffeba07b6e9371352f38f50098af9e9b1367b2
+EBUILD btop-1.2.13-r2.ebuild 1778 BLAKE2B 3ce3b8c8ba59ec8cd5b501c37c35c107e959887254d21d864d6100553b2df83773e9b8dda85fcc1d98904905e49c3e4472114c6beccf81f7397ca3320cc1d034 SHA512 13df8a0742be4b881d286b97a9a8f01d7619327c541e9cfaed556794add5ab00a0df3c1915163e5bea5fb4c026574c270da954fea0f49c0fafaa2f696ffd86a2
EBUILD btop-1.2.13.ebuild 1186 BLAKE2B a32f46e360180e5ffa670093905d89935c5112201cd7b563f4b3549c307b3860f5a8dff0e0e4ff3d67852d919d359153ec5aa83ccef458fd30f2edc0a1165b80 SHA512 317625f55c5b140d1c9c4a33d6595b850ed76719fdc37860d2128c82403bc301d02a21d93bf3c458c1e957dd08bff74a4698635772e8fa599907f0c4729717e9
MISC metadata.xml 548 BLAKE2B 74762cdc63011b363a4c06de8190541f862d70f0006461c7a1cf2d734caf20601ba0769dc067e261957fe42a64bdaf26297bf3d080c3c08203eabd73165f2f8c SHA512 bb16944df9321001ca5c9e9fff49ea39069386117f0cfde67e8f19e3f44c13d360effb578d2c44c67f792d1ff574830f13cb9ef183f594e39ad3669083f2cf41
diff --git a/sys-process/btop/btop-1.2.13-r2.ebuild b/sys-process/btop/btop-1.2.13-r2.ebuild
new file mode 100644
index 000000000000..a061530402ae
--- /dev/null
+++ b/sys-process/btop/btop-1.2.13-r2.ebuild
@@ -0,0 +1,71 @@
+# Copyright 2021-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs xdg-utils
+
+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 ~mips ~ppc ~ppc64 ~riscv ~x86"
+
+PATCHES=(
+ # Backported fixes for https://bugs.gentoo.org/884005,
+ # can be removed in 1.2.14 or later
+ "${FILESDIR}/${P}-fix-makefile-deps.patch"
+ "${FILESDIR}/${P}-verbose-mkdir.patch"
+
+ # Backported fix for https://bugs.gentoo.org/908670
+ # can be removed in 1.2.14 or later
+ "${FILESDIR}/${P}-musl-1.2.4-lfs64.patch"
+
+ # Backported patch to allow compilation with clang 16 or above
+ # can be removed in 1.2.14 or later
+ "${FILESDIR}/${P}-allow-clang.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_prepare() {
+ default
+ # btop installs README.md to /usr/share/btop by default
+ sed -i '/^.*cp -p README.md.*$/d' Makefile || die
+}
+
+src_compile() {
+ # Disable btop optimization flags, since we have our flags in CXXFLAGS
+ emake VERBOSE=true OPTFLAGS="" CXX="$(tc-getCXX)"
+}
+
+src_install() {
+ emake \
+ PREFIX="${EPREFIX}/usr" \
+ DESTDIR="${D}" \
+ install
+
+ dodoc README.md CHANGELOG.md
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+ xdg_icon_cache_update
+}
+
+pkg_postrm() {
+ xdg_desktop_database_update
+ xdg_icon_cache_update
+}
diff --git a/sys-process/btop/files/btop-1.2.13-allow-clang.patch b/sys-process/btop/files/btop-1.2.13-allow-clang.patch
new file mode 100644
index 000000000000..68f2434dc7e8
--- /dev/null
+++ b/sys-process/btop/files/btop-1.2.13-allow-clang.patch
@@ -0,0 +1,191 @@
+Support compiling with clang 16 or above.
+
+Bug: https://bugs.gentoo.org/839318
+Upstream Commit: https://github.com/aristocratos/btop/commit/7e50b03e391a346b2b6ce92be332c58d91f75a000w
+
+With hunks from:
+From af7d5086fce8d995f3f8b10677d107a1124a12bf Mon Sep 17 00:00:00 2001
+From: "Jakob P. Liljenberg" <admin@qvantnet.com>
+Date: Thu, 15 Jun 2023 17:45:05 +0200
+Subject: [PATCH] Merge pull request #510 from nobounce/LLVM
+--- a/Makefile
++++ b/Makefile
+@@ -1,4 +1,4 @@
+-#* Btop++ makefile v1.5
++#* Btop++ makefile v1.6
+
+ BANNER = \n \033[38;5;196m██████\033[38;5;240m╗ \033[38;5;196m████████\033[38;5;240m╗ \033[38;5;196m██████\033[38;5;240m╗ \033[38;5;196m██████\033[38;5;240m╗\n \033[38;5;160m██\033[38;5;239m╔══\033[38;5;160m██\033[38;5;239m╗╚══\033[38;5;160m██\033[38;5;239m╔══╝\033[38;5;160m██\033[38;5;239m╔═══\033[38;5;160m██\033[38;5;239m╗\033[38;5;160m██\033[38;5;239m╔══\033[38;5;160m██\033[38;5;239m╗ \033[38;5;160m██\033[38;5;239m╗ \033[38;5;160m██\033[38;5;239m╗\n \033[38;5;124m██████\033[38;5;238m╔╝ \033[38;5;124m██\033[38;5;238m║ \033[38;5;124m██\033[38;5;238m║ \033[38;5;124m██\033[38;5;238m║\033[38;5;124m██████\033[38;5;238m╔╝ \033[38;5;124m██████\033[38;5;238m╗\033[38;5;124m██████\033[38;5;238m╗\n \033[38;5;88m██\033[38;5;237m╔══\033[38;5;88m██\033[38;5;237m╗ \033[38;5;88m██\033[38;5;237m║ \033[38;5;88m██\033[38;5;237m║ \033[38;5;88m██\033[38;5;237m║\033[38;5;88m██\033[38;5;237m╔═══╝ ╚═\033[38;5;88m██\033[38;5;237m╔═╝╚═\033[38;5;88m██\033[38;5;237m╔═╝\n \033[38;5;52m██████\033[38;5;236m╔╝ \033[38;5;52m██\033[38;5;236m║ ╚\033[38;5;52m██████\033[38;5;236m╔╝\033[38;5;52m██\033[38;5;236m║ ╚═╝ ╚═╝\n \033[38;5;235m╚═════╝ ╚═╝ ╚═════╝ ╚═╝ \033[1;3;38;5;240mMakefile v1.5\033[0m
+
+@@ -39,6 +39,46 @@ endif
+
+ override PLATFORM_LC := $(shell echo $(PLATFORM) | tr '[:upper:]' '[:lower:]')
+
++#? Compiler and Linker
++ifeq ($(shell $(CXX) --version | grep clang >/dev/null 2>&1; echo $$?),0)
++ override CXX_IS_CLANG := true
++endif
++override CXX_VERSION := $(shell $(CXX) -dumpfullversion -dumpversion || echo 0)
++override CXX_VERSION_MAJOR := $(shell echo $(CXX_VERSION) | cut -d '.' -f 1)
++
++CLANG_WORKS = false
++GCC_WORKS = false
++
++#? Supported is Clang 16.0.0 and later
++ifeq ($(CXX_IS_CLANG),true)
++ ifneq ($(shell test $(CXX_VERSION_MAJOR) -lt 16; echo $$?),0)
++ CLANG_WORKS := true
++ endif
++endif
++ifeq ($(CLANG_WORKS),false)
++ #? Try to find a newer GCC version
++ ifeq ($(shell command -v g++-12 >/dev/null; echo $$?),0)
++ CXX := g++-12
++ else ifeq ($(shell command -v g++-11 >/dev/null; echo $$?),0)
++ CXX := g++-11
++ else ifeq ($(shell command -v g++11 >/dev/null; echo $$?),0)
++ CXX := g++11
++ else ifeq ($(shell command -v g++ >/dev/null; echo $$?),0)
++ CXX := g++
++ endif
++ override CXX_VERSION := $(shell $(CXX) -dumpfullversion -dumpversion || echo 0)
++ override CXX_VERSION_MAJOR := $(shell echo $(CXX_VERSION) | cut -d '.' -f 1)
++ ifneq ($(shell test $(CXX_VERSION_MAJOR) -lt 10; echo $$?),0)
++ GCC_WORKS := true
++ endif
++endif
++
++ifeq ($(CLANG_WORKS),false)
++ ifeq ($(GCC_WORKS),false)
++$(error $(shell printf "\033[1;91mERROR: \033[97mCompiler too old. (Requires Clang 16.0.0, GCC 10.1.0)\033[0m"))
++ endif
++endif
++
+ #? Any flags added to TESTFLAGS must not contain whitespace for the testing to work
+ override TESTFLAGS := -fexceptions -fstack-clash-protection -fcf-protection
+ ifneq ($(PLATFORM) $(ARCH),macos arm64)
+@@ -46,7 +86,13 @@ ifneq ($(PLATFORM) $(ARCH),macos arm64)
+ endif
+
+ ifeq ($(STATIC),true)
+- override ADDFLAGS += -static-libgcc -static-libstdc++
++ ifeq ($(CXX_IS_CLANG),true)
++ ifeq ($(shell $(CXX) -print-target-triple | grep gnu >/dev/null; echo $$?),0)
++$(error $(shell printf "\033[1;91mERROR: \033[97m$(CXX) can't statically link glibc\033[0m"))
++ endif
++ else
++ override ADDFLAGS += -static-libgcc -static-libstdc++
++ endif
+ ifneq ($(PLATFORM),macos)
+ override ADDFLAGS += -DSTATIC_BUILD -static -Wl,--fatal-warnings
+ endif
+@@ -62,33 +108,6 @@ else
+ override VERBOSE := true
+ endif
+
+-#? Compiler and Linker
+-ifeq ($(shell command -v g++-12 >/dev/null; echo $$?),0)
+- CXX := g++-12
+-else ifeq ($(shell command -v g++-11 >/dev/null; echo $$?),0)
+- CXX := g++-11
+-else ifeq ($(shell command -v g++11 >/dev/null; echo $$?),0)
+- CXX := g++11
+-else ifeq ($(shell command -v g++ >/dev/null; echo $$?),0)
+- CXX := g++
+-endif
+-override CXX_VERSION := $(shell $(CXX) -dumpfullversion -dumpversion || echo 0)
+-
+-#? Try to make sure we are using GCC/G++ version 11 or later if not instructed to use g++-10
+-ifeq ($(CXX),g++)
+- ifeq ($(shell g++ --version | grep clang >/dev/null 2>&1; echo $$?),0)
+- V_MAJOR := 0
+- else
+- V_MAJOR := $(shell echo $(CXX_VERSION) | cut -f1 -d".")
+- endif
+- ifneq ($(shell test $(V_MAJOR) -ge 11; echo $$?),0)
+- ifeq ($(shell command -v g++-11 >/dev/null; echo $$?),0)
+- override CXX := g++-11
+- override CXX_VERSION := $(shell $(CXX) -dumpfullversion -dumpversion || echo 0)
+- endif
+- endif
+-endif
+-
+ #? Pull in platform specific source files and get thread count
+ ifeq ($(PLATFORM_LC),linux)
+ PLATFORM_DIR := linux
+@@ -115,6 +134,13 @@ ifeq ($(THREADS),1)
+ override THREADS := auto
+ endif
+
++#? LTO command line
++ifeq ($(CLANG_WORKS),true)
++ LTO := thin
++else
++ LTO := $(THREADS)
++endif
++
+ #? The Directories, Source, Includes, Objects and Binary
+ SRCDIR := src
+ INCDIR := include
+@@ -130,8 +156,8 @@ override GOODFLAGS := $(foreach flag,$(TESTFLAGS),$(strip $(shell echo "int main
+ #? Flags, Libraries and Includes
+ override REQFLAGS := -std=c++20
+ WARNFLAGS := -Wall -Wextra -pedantic
+-OPTFLAGS := -O2 -ftree-loop-vectorize -flto=$(THREADS)
++OPTFLAGS := -O2 -ftree-vectorize -flto=$(LTO)
+ LDCXXFLAGS := -pthread -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -D_FILE_OFFSET_BITS=64 $(GOODFLAGS) $(ADDFLAGS)
+ override CXXFLAGS += $(REQFLAGS) $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS)
+ override LDFLAGS += $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS)
+ INC := -I$(INCDIR) -I$(SRCDIR)
+--- a/src/btop.cpp
++++ b/src/btop.cpp
+@@ -37,6 +37,11 @@ tab-size = 4
+ #include <mach-o/dyld.h>
+ #include <limits.h>
+ #endif
++#if !defined(__clang__) && __GNUC__ < 11
++ #include <semaphore.h>
++#else
++ #include <semaphore>
++#endif
+
+ #include <btop_shared.hpp>
+ #include <btop_tools.hpp>
+@@ -321,14 +326,12 @@ namespace Runner {
+ atomic<bool> coreNum_reset (false);
+
+ //* Setup semaphore for triggering thread to do work
+-#if __GNUC__ < 11
+- #include <semaphore.h>
++#if !defined(__clang__) && __GNUC__ < 11
+ sem_t do_work;
+ inline void thread_sem_init() { sem_init(&do_work, 0, 0); }
+ inline void thread_wait() { sem_wait(&do_work); }
+ inline void thread_trigger() { sem_post(&do_work); }
+ #else
+- #include <semaphore>
+ std::binary_semaphore do_work(0);
+ inline void thread_sem_init() { ; }
+ inline void thread_wait() { do_work.acquire(); }
+--- a/src/btop_tools.cpp
++++ b/src/btop_tools.cpp
+@@ -17,6 +17,7 @@ tab-size = 4
+ */
+
+ #include <cmath>
++#include <codecvt>
+ #include <iostream>
+ #include <fstream>
+ #include <ctime>
+--- a/src/btop.cpp
++++ b/src/btop.cpp
+@@ -657,7 +657,7 @@ namespace Runner {
+ << Term::sync_end << flush;
+ }
+ //* ----------------------------------------------- THREAD LOOP -----------------------------------------------
+- pthread_exit(NULL);
++ return {};
+ }
+ //? ------------------------------------------ Secondary thread end -----------------------------------------------
+
+--
+2.41.0
diff --git a/sys-process/btop/files/btop-1.2.13-musl-1.2.4-lfs64.patch b/sys-process/btop/files/btop-1.2.13-musl-1.2.4-lfs64.patch
new file mode 100644
index 000000000000..e91fa7d7de9c
--- /dev/null
+++ b/sys-process/btop/files/btop-1.2.13-musl-1.2.4-lfs64.patch
@@ -0,0 +1,39 @@
+Fix for building on musl 1.2.4 and above due to deprecation of LFS64 interfaces.
+
+Bug: https://bugs.gentoo.org/908670
+Upstream Commit: https://github.com/aristocratos/btop/commit/7e50b03e391a346b2b6ce92be332c58d91f75a000w
+
+With hunks from:
+From af7d5086fce8d995f3f8b10677d107a1124a12bf Mon Sep 17 00:00:00 2001
+From: "Jakob P. Liljenberg" <admin@qvantnet.com>
+Date: Thu, 15 Jun 2023 17:45:05 +0200
+Subject: [PATCH] Merge pull request #510 from nobounce/LLVM
+--- a/src/linux/btop_collect.cpp
++++ b/src/linux/btop_collect.cpp
+@@ -1079,9 +1079,9 @@ namespace Mem {
+ bool new_ignored = false;
+ for (auto& [mountpoint, disk] : disks) {
+ if (std::error_code ec; not fs::exists(mountpoint, ec) or v_contains(ignore_list, mountpoint)) continue;
+- struct statvfs64 vfs;
+- if (statvfs64(mountpoint.c_str(), &vfs) < 0) {
+- Logger::warning("Failed to get disk/partition stats for mount \""+ mountpoint + "\" with statvfs64 error code: " + to_string(errno) + ". Ignoring...");
++ struct statvfs vfs;
++ if (statvfs(mountpoint.c_str(), &vfs) < 0) {
++ Logger::warning("Failed to get disk/partition stats for mount \""+ mountpoint + "\" with statvfs error code: " + to_string(errno) + ". Ignoring...");
+ ignore_list.push_back(mountpoint);
+ new_ignored = true;
+ continue;
+--- a/Makefile
++++ b/Makefile
+@@ -130,8 +156,8 @@ override GOODFLAGS := $(foreach flag,$(TESTFLAGS),$(strip $(shell echo "int main
+ #? Flags, Libraries and Includes
+ override REQFLAGS := -std=c++20
+ WARNFLAGS := -Wall -Wextra -pedantic
+ OPTFLAGS := -O2 -ftree-loop-vectorize -flto=$(THREADS)
+-LDCXXFLAGS := -pthread -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS $(GOODFLAGS) $(ADDFLAGS)
++LDCXXFLAGS := -pthread -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -D_FILE_OFFSET_BITS=64 $(GOODFLAGS) $(ADDFLAGS)
+ override CXXFLAGS += $(REQFLAGS) $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS)
+ override LDFLAGS += $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS)
+ INC := -I$(INCDIR) -I$(SRCDIR)
+--
+2.41.0