blob: 1ec43ea6a0c3975b1160916a3d543ce7809ee476 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
# Copyright 2023-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{9..13} )
PATHFINDER_COMMIT=ec56924f660e6faa83c81c6b62b3c69b9a9fa00e
NVTOP_COMMIT=45a1796375cd617d16167869bb88e5e69c809468
inherit git-r3 gnome2-utils meson python-any-r1 xdg
DESCRIPTION="Monitor your CPU, Memory, Disk, Network and GPU usage."
HOMEPAGE="https://missioncenter.io/"
EGIT_REPO_URI="https://gitlab.com/mission-center-devs/mission-center.git"
EGIT_CHECKOUT_DIR="${WORKDIR}/${PN}-v${PV}"
SRC_URI="
https://github.com/Syllo/nvtop/archive/${NVTOP_COMMIT}.tar.gz -> nvtop-${NVTOP_COMMIT}.tar.gz
"
S="${WORKDIR}/${PN}-v${PV}"
BUILD_DIR="${S}-build"
LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD BSD-2 Boost-1.0 CC0-1.0 CeCILL-2 MIT Unicode-DFS-2016 Unlicense ZLIB"
SLOT="0"
IUSE="debug"
DEPEND="
>=dev-libs/appstream-0.16.4
>=dev-libs/glib-2.80:2
dev-libs/wayland
gui-libs/egl-gbm
>=dev-util/gdbus-codegen-2.80
>=gui-libs/gtk-4.14:4
>=gui-libs/libadwaita-1.5.0:1
media-libs/graphene
media-libs/libglvnd
media-libs/mesa
sys-apps/dbus
virtual/rust
virtual/udev
x11-libs/cairo
x11-libs/gdk-pixbuf:2
x11-libs/libdrm
>=x11-libs/pango-1.51.0
"
RDEPEND="
${DEPEND}
sys-apps/dmidecode
"
BDEPEND="
${PYTHON_DEPS}
dev-libs/gobject-introspection
>=dev-build/meson-0.63
dev-util/blueprint-compiler
"
src_unpack() {
git-r3_fetch
git-r3_checkout
unpack nvtop-${NVTOP_COMMIT}.tar.gz
GATHERER_BUILD_DIR=$(usex debug debug release)
mkdir -p "${BUILD_DIR}/src/sys_info_v2/gatherer/src/${GATHERER_BUILD_DIR}/build/native" || die
mv nvtop-${NVTOP_COMMIT} "${BUILD_DIR}/src/sys_info_v2/gatherer/src/${GATHERER_BUILD_DIR}/build/native" || die
}
src_prepare() {
eapply_user
GATHERER_BUILD_DIR=$(usex debug debug release)
cd "${BUILD_DIR}/src/sys_info_v2/gatherer/src/${GATHERER_BUILD_DIR}/build/native/nvtop-${NVTOP_COMMIT}" || die
find "${S}/src/sys_info_v2/gatherer/3rdparty/nvtop/patches" \
-type f \
-name 'nvtop-*' \
-exec sh -c 'patch -p1 < {}' \; || die
}
src_configure() {
local emesonargs=(
--buildtype $(usex debug debug release)
--prefix=/usr
)
meson_src_configure
}
src_test() {
# patch the appstream-util validate command to use --nonet when validating the urls
sed -i "s/args: \['validate',/args: \['validate', '--nonet',/g" "${S}/data/meson.build" || die
meson_src_test
}
pkg_postinst() {
gnome2_schemas_update
xdg_pkg_postinst
}
pkg_postrm() {
gnome2_schemas_update
xdg_pkg_postrm
}
# rust does not use *FLAGS from make.conf, silence portage warning
# update with proper path to binaries this crate installs, omit leading /
QA_FLAGS_IGNORED="
usr/bin/missioncenter
usr/bin/missioncenter-gatherer
"
|