Gentoo Archives: gentoo-commits

From: Mart Raudsepp <leio@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/sysprof/
Date: Mon, 02 Mar 2020 19:23:08
Message-Id: 1583176777.d767e92a6ca74b4fdf31b96a43c32607cb379bf6.leio@gentoo
1 commit: d767e92a6ca74b4fdf31b96a43c32607cb379bf6
2 Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
3 AuthorDate: Mon Mar 2 19:19:37 2020 +0000
4 Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
5 CommitDate: Mon Mar 2 19:19:37 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d767e92a
7
8 dev-util/sysprof: Ship org.gnome.Sysprof3.Profiler.xml in -capture
9
10 Package-Manager: Portage-2.3.84, Repoman-2.3.20
11 Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>
12
13 dev-util/sysprof/sysprof-3.34.1-r1.ebuild | 80 +++++++++++++++++++++++++++++++
14 1 file changed, 80 insertions(+)
15
16 diff --git a/dev-util/sysprof/sysprof-3.34.1-r1.ebuild b/dev-util/sysprof/sysprof-3.34.1-r1.ebuild
17 new file mode 100644
18 index 00000000000..e4924b71fee
19 --- /dev/null
20 +++ b/dev-util/sysprof/sysprof-3.34.1-r1.ebuild
21 @@ -0,0 +1,80 @@
22 +# Copyright 1999-2020 Gentoo Authors
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=7
26 +
27 +inherit gnome.org gnome2-utils meson systemd xdg
28 +
29 +DESCRIPTION="System-wide Linux Profiler"
30 +HOMEPAGE="http://sysprof.com/"
31 +
32 +LICENSE="GPL-3+ GPL-2+"
33 +API_VERSION="3"
34 +SLOT="0/${API_VERSION}"
35 +KEYWORDS="~amd64 ~x86"
36 +IUSE="gtk"
37 +
38 +RDEPEND="
39 + >=dev-libs/glib-2.61.3:2
40 + gtk? (
41 + >=x11-libs/gtk+-3.22.0:3
42 + >=dev-libs/libdazzle-3.30.0
43 + )
44 + >=sys-auth/polkit-0.114
45 + >=dev-util/sysprof-capture-3.34.1-r1:${API_VERSION}
46 +"
47 +DEPEND="${RDEPEND}"
48 +BDEPEND="
49 + dev-libs/appstream-glib
50 + dev-util/gdbus-codegen
51 + dev-util/itstool
52 + >=sys-devel/gettext-0.19.8
53 + >=sys-kernel/linux-headers-2.6.32
54 + virtual/pkgconfig
55 +"
56 +
57 +src_prepare() {
58 + xdg_src_prepare
59 + # These are installed by dev-util/sysprof-capture
60 + sed -i -e '/install/d' src/libsysprof-capture/meson.build || die
61 + sed -i -e 's/pkgconfig\.generate/subdir_done()\npkgconfig\.generate/' src/libsysprof-capture/meson.build || die
62 +}
63 +
64 +src_configure() {
65 + # -Dwith_sysprofd=host currently unavailable from ebuild
66 + local emesonargs=(
67 + $(meson_use gtk enable_gtk)
68 + -Dlibsysprof=true
69 + -Dwith_sysprofd=bundled
70 + -Dsystemdunitdir=$(systemd_get_systemunitdir)
71 + # -Ddebugdir
72 + -Dhelp=true
73 + )
74 + meson_src_configure
75 +}
76 +
77 +src_install() {
78 + meson_src_install
79 + # installed by sysprof-capture, as mutter needs it at build time
80 + rm "${ED}"/usr/share/dbus-1/interfaces/org.gnome.Sysprof3.Profiler.xml || die
81 +}
82 +
83 +pkg_postinst() {
84 + xdg_pkg_postinst
85 + gnome2_schemas_update
86 +
87 + elog "On many systems, especially amd64, it is typical that with a modern"
88 + elog "toolchain -fomit-frame-pointer for gcc is the default, because"
89 + elog "debugging is still possible thanks to gcc4/gdb location list feature."
90 + elog "However sysprof is not able to construct call trees if frame pointers"
91 + elog "are not present. Therefore -fno-omit-frame-pointer CFLAGS is suggested"
92 + elog "for the libraries and applications involved in the profiling. That"
93 + elog "means a CPU register is used for the frame pointer instead of other"
94 + elog "purposes, which means a very minimal performance loss when there is"
95 + elog "register pressure."
96 +}
97 +
98 +pkg_postrm() {
99 + xdg_pkg_postrm
100 + gnome2_schemas_update
101 +}