Gentoo Archives: gentoo-commits

From: Alessandro Barbieri <lssndrbarbieri@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: dev-libs/perfstubs/
Date: Sun, 05 Jun 2022 20:58:07
Message-Id: 1654462678.e217e6d8aa086065308964b7227a236819b76bbf.Alessandro-Barbieri@gentoo
1 commit: e217e6d8aa086065308964b7227a236819b76bbf
2 Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
3 AuthorDate: Sun Jun 5 17:23:39 2022 +0000
4 Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
5 CommitDate: Sun Jun 5 20:57:58 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=e217e6d8
7
8 dev-libs/perfstubs: new package, add 0_pre20210915
9
10 Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
11
12 dev-libs/perfstubs/Manifest | 1 +
13 dev-libs/perfstubs/metadata.xml | 22 ++++++++++
14 dev-libs/perfstubs/perfstubs-0_pre20210915.ebuild | 49 +++++++++++++++++++++++
15 3 files changed, 72 insertions(+)
16
17 diff --git a/dev-libs/perfstubs/Manifest b/dev-libs/perfstubs/Manifest
18 new file mode 100644
19 index 000000000..c72a89d04
20 --- /dev/null
21 +++ b/dev-libs/perfstubs/Manifest
22 @@ -0,0 +1 @@
23 +DIST perfstubs-0_pre20210915.gh.tar.gz 27236 BLAKE2B 79eb382f9562581ba98f641e3f70cce16370b293129e2cf3264ccaea16ae108e2f63c8bd0b82399c6925112a121d05b5e9b442f21dcd1a247bb843c7839fb370 SHA512 5830c7a81200627951c7870065e44a166c560c19154d7a8d9ec015caa6a99501fbfe0a25c88e1200304da125956958a41da90362e14b06f9f2808a35756936c3
24
25 diff --git a/dev-libs/perfstubs/metadata.xml b/dev-libs/perfstubs/metadata.xml
26 new file mode 100644
27 index 000000000..bc30a247b
28 --- /dev/null
29 +++ b/dev-libs/perfstubs/metadata.xml
30 @@ -0,0 +1,22 @@
31 +<?xml version="1.0" encoding="UTF-8"?>
32 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
33 +<pkgmetadata>
34 + <maintainer type="person">
35 + <email>lssndrbarieri@×××××.com</email>
36 + <name>Alessandro Barbieri</name>
37 + </maintainer>
38 + <longdescription lang="en">
39 +Profiling API for adding external tool instrumentation support to any project.
40 +This was motivated by the need to quickly add instrumentation to the ADIOS2 library without adding a build dependency, or tying to a specific measurement tool.
41 +The initial prototype implementation was tied to TAU, but evolved to this more generic version, which was extracted as a separate repository for testing and demonstration purposes.
42 + </longdescription>
43 + <upstream>
44 + <bugs-to>https://github.com/khuck/perfstubs/issues</bugs-to>
45 + <remote-id type="github">khuck/perfstubs</remote-id>
46 + </upstream>
47 + <use>
48 + <flag name="default">Use provided perfstubs tool_example</flag>
49 + <flag name="timers">Use our own tool_example of timers</flag>
50 + <flag name="tools">Build libperfstsubs_n</flag>
51 + </use>
52 +</pkgmetadata>
53
54 diff --git a/dev-libs/perfstubs/perfstubs-0_pre20210915.ebuild b/dev-libs/perfstubs/perfstubs-0_pre20210915.ebuild
55 new file mode 100644
56 index 000000000..8c29921fd
57 --- /dev/null
58 +++ b/dev-libs/perfstubs/perfstubs-0_pre20210915.ebuild
59 @@ -0,0 +1,49 @@
60 +# Copyright 1999-2022 Gentoo Authors
61 +# Distributed under the terms of the GNU General Public License v2
62 +
63 +EAPI=8
64 +
65 +inherit cmake fortran-2
66 +
67 +COMMIT="bdd9118a6e4af9245640ccb58b4f49cbf5aaa899"
68 +
69 +DESCRIPTION="Profiling API for adding external tool instrumentation support to any project"
70 +HOMEPAGE="https://github.com/khuck/perfstubs"
71 +SRC_URI="https://github.com/khuck/${PN}/archive/${COMMIT}.tar.gz -> ${PF}.gh.tar.gz"
72 +S="${WORKDIR}/${PN}-${COMMIT}"
73 +
74 +LICENSE="BSD"
75 +SLOT="0/${PV}"
76 +KEYWORDS="~amd64"
77 +IUSE="+default examples +timers tools"
78 +
79 +pkg_setup() {
80 + fortran-2_pkg_setup
81 +}
82 +
83 +src_prepare() {
84 + sed \
85 + -e "s|/lib|/$(get_libdir)|g" \
86 + -e "s|DESTINATION lib|DESTINATION $(get_libdir)|g" \
87 + -i CMakeLists.txt || die
88 +
89 + cmake_src_prepare
90 +}
91 +
92 +src_configure() {
93 + local mycmakeargs=(
94 + -DBUILD_SHARED_LIBS=ON
95 + -DPERFSTUBS_USE_STATIC=OFF
96 +
97 + -DPERFSTUBS_BUILD_EXAMPLES=$(usex examples)
98 + -DPERFSTUBS_BUILD_MULTI_TOOL=$(usex tools)
99 + -DPERFSTUBS_USE_DEFAULT_IMPLEMENTATION=$(usex default)
100 + -DPERFSTUBS_USE_TIMERS=$(usex timers)
101 + )
102 + cmake_src_configure
103 +}
104 +
105 +src_install() {
106 + cmake_src_install
107 + dodoc README.md
108 +}