summaryrefslogtreecommitdiff
path: root/sys-process/btop/btop-1.2.13-r1.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-12-23 13:59:28 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-12-23 13:59:28 +0000
commit1ffbeeb1643e9197d8a58c65a1d76bbaf3656292 (patch)
tree2cb5d912afaf290c355b58f8a7334b0e6c5277f0 /sys-process/btop/btop-1.2.13-r1.ebuild
parent7819ef4baadbb9171070ce385f7051989fe64e49 (diff)
gentoo auto-resync : 23:12:2022 - 13:59:28
Diffstat (limited to 'sys-process/btop/btop-1.2.13-r1.ebuild')
-rw-r--r--sys-process/btop/btop-1.2.13-r1.ebuild64
1 files changed, 64 insertions, 0 deletions
diff --git a/sys-process/btop/btop-1.2.13-r1.ebuild b/sys-process/btop/btop-1.2.13-r1.ebuild
new file mode 100644
index 000000000000..9383842c640d
--- /dev/null
+++ b/sys-process/btop/btop-1.2.13-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 2021-2022 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 ~arm64 ~ppc ~ppc64 ~riscv ~x86"
+
+BDEPEND="
+ >=sys-devel/gcc-8
+"
+
+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"
+)
+
+pkg_setup() {
+ if [[ "${MERGE_TYPE}" != "binary" ]]; then
+ if ! tc-is-gcc ; then
+ # https://bugs.gentoo.org/839318
+ die "$(tc-getCXX) is not a supported compiler. Please use sys-devel/gcc 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
+}