diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-06-25 13:30:01 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-06-25 13:30:01 +0100 |
commit | e564f1661521043bc9e03e613c3cd8c79d5d7713 (patch) | |
tree | 15a54c918d3a6a7de74cc56ce001856a561165ab /sys-process/btop/btop-1.2.13-r2.ebuild | |
parent | e59b99df9503539c0231e655a17bccf83f8a270d (diff) |
gentoo auto-resync : 25:06:2023 - 13:30:01
Diffstat (limited to 'sys-process/btop/btop-1.2.13-r2.ebuild')
-rw-r--r-- | sys-process/btop/btop-1.2.13-r2.ebuild | 71 |
1 files changed, 71 insertions, 0 deletions
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 +} |