1 |
commit: c2d0d989c57e0c2ec1256666c8cdeab3006c201b |
2 |
Author: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri May 13 21:35:15 2022 +0000 |
4 |
Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri May 13 21:35:15 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/dev/tamiko.git/commit/?id=c2d0d989 |
7 |
|
8 |
sys-apps/likwid: update EAPI 6 -> 8 |
9 |
|
10 |
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org> |
11 |
|
12 |
sys-apps/likwid/Manifest | 1 + |
13 |
sys-apps/likwid/likwid-5.2.1-r50.ebuild | 147 ++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 148 insertions(+) |
15 |
|
16 |
diff --git a/sys-apps/likwid/Manifest b/sys-apps/likwid/Manifest |
17 |
index 67808c4..cef42f0 100644 |
18 |
--- a/sys-apps/likwid/Manifest |
19 |
+++ b/sys-apps/likwid/Manifest |
20 |
@@ -1,2 +1,3 @@ |
21 |
DIST likwid-5.1.1.tar.gz 2226404 SHA256 faec7c62987967232f476a6ff0ee85af686fd24b5a360126896b7f435d1f943f SHA512 6f78f57ffddbc12c4861945b5aece86f94b1086911ff2972e1bb5fed08f263c57e73dd278f0d146a9ca3438159b14a8b5431f281972842269fc2f5adb52de6c1 WHIRLPOOL 349206045b365b2363618feb0f609852ac7d01c00e46488a172de3d4ba84d0140fdb2bd36f39473c65fc27420def598836e4e7bd30d9f0ac8ceb3b162ebadf7f |
22 |
DIST likwid-5.2.0.tar.gz 2299164 SHA256 aa6dccacfca59e52d8f3be187ffcf292b2a2fa1f51a81bf8912b9d48e5a257e0 SHA512 f69e44d51b8576db4af76395b5d0620660d9225e3114531b2d5822727f9bceb271ec99853a0f9e14ae4959a3d6f159c832cc0892101ddd12eb1c77a03f744e1f WHIRLPOOL f50138c7c5cd1b477b174613a4c0c56f3df3c26a5ec842d9969d0d99beffc8412e16e1ef341a90218f0ae648d84c67052808b53cad91cbe24b574e3abdf97a8e |
23 |
+DIST likwid-5.2.1.tar.gz 2308041 SHA256 1b8e668da117f24302a344596336eca2c69d2bc2f49fa228ca41ea0688f6cbc2 SHA512 f096dcc071e976284c874aeb254dcb83c66ae808876a8c6be7b05e359d06800f1da25c01c072950c3493eb9ca10f6f9d81624feef61cc7a01f40fc0d003f98a7 WHIRLPOOL e06a570674a1333481fb97796878eeeedda489dd53204b2eda25b64ce5e88d63f6436efe2ffe1ece0236b39e72df3b0ec12d51d48eb7f91ccabc8c5306ce7e89 |
24 |
|
25 |
diff --git a/sys-apps/likwid/likwid-5.2.1-r50.ebuild b/sys-apps/likwid/likwid-5.2.1-r50.ebuild |
26 |
new file mode 100644 |
27 |
index 0000000..499f382 |
28 |
--- /dev/null |
29 |
+++ b/sys-apps/likwid/likwid-5.2.1-r50.ebuild |
30 |
@@ -0,0 +1,147 @@ |
31 |
+# Copyright 1999-2021 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=8 |
35 |
+ |
36 |
+FORTRAN_NEEDED=fortran |
37 |
+ |
38 |
+inherit fcaps fortran-2 linux-info toolchain-funcs |
39 |
+ |
40 |
+DESCRIPTION="A performance-oriented tool suite for x86 multicore environments" |
41 |
+HOMEPAGE="https://github.com/rrze-likwid/likwid" |
42 |
+SRC_URI="https://ftp.fau.de/pub/likwid/${P}.tar.gz" |
43 |
+ |
44 |
+LICENSE="GPL-3+ BSD MIT" |
45 |
+ |
46 |
+SLOT="0" |
47 |
+KEYWORDS="~amd64" # upstream partial support exists for x86 arm arm64 |
48 |
+IUSE="fortran" |
49 |
+ |
50 |
+CDEPEND="dev-lang/perl" |
51 |
+ |
52 |
+RDEPEND="${CDEPEND}" |
53 |
+DEPEND="${CDEPEND}" |
54 |
+ |
55 |
+CONFIG_CHECK="~X86_MSR" |
56 |
+ |
57 |
+FILECAPS=( |
58 |
+ -M 755 cap_sys_rawio+ep usr/sbin/likwid-accessD |
59 |
+ -- |
60 |
+ -M 755 cap_sys_rawio+ep usr/sbin/likwid-setFreq |
61 |
+) |
62 |
+ |
63 |
+PATCHES=( |
64 |
+ "${FILESDIR}/${PN}-4.3.1-fix-gnustack.patch" |
65 |
+) |
66 |
+ |
67 |
+pkg_setup() { |
68 |
+ fortran-2_pkg_setup |
69 |
+} |
70 |
+ |
71 |
+src_prepare() { |
72 |
+ # Ensure we build with a non executable stack |
73 |
+ sed \ |
74 |
+ -e '/^SHARED_CFLAGS/s/$/ -Wa,--noexecstack/' \ |
75 |
+ -i make/include_{GCC*,CLANG}.mk \ |
76 |
+ || die "Failed to set nonexecstack" |
77 |
+ |
78 |
+ # Make the install targets respect Q= for being quiet or not |
79 |
+ # MUCH easier for debugging |
80 |
+ sed -r \ |
81 |
+ -e '/^install/,/^[a-z]/{/^\t@/{ s/@/$(Q)/; }}' \ |
82 |
+ -i \ |
83 |
+ Makefile || die "Failed to sed Makefile" |
84 |
+ |
85 |
+ sed -i \ |
86 |
+ -e '/^\.NOTPARALLEL:/d' \ |
87 |
+ Makefile \ |
88 |
+ bench/Makefile \ |
89 |
+ ext/hwloc/Makefile || die "Failed to re-enable parallel" |
90 |
+ |
91 |
+ default |
92 |
+} |
93 |
+ |
94 |
+export_emake_opts() { |
95 |
+ # Warning: this build system uses PREFIX in a way that differs from |
96 |
+ # autoconf! It's more like: |
97 |
+ # PREFIX=$(DESTDIR)$(INSTALLED_PREFIX) |
98 |
+ # it's not 100% like that, because parts of the Makefiles are inconsistent. |
99 |
+ # this is the same solution used in the upstream RPM specs |
100 |
+ # these variables are uppercase so they match what's put into Make. |
101 |
+ local INSTALLED_PREFIX=/usr |
102 |
+ local INSTALLED_LIBPREFIX=/usr/$(get_libdir) # upstream is '$(INSTALLED_PREFIX)/lib' |
103 |
+ local INSTALLED_MANPREFIX=/usr/share/man # upstream has it as used but undefined variable. |
104 |
+ # If the build is too loud, pass 'Q=@' |
105 |
+ src_compile_opts=( |
106 |
+ "Q=" |
107 |
+ "INSTALLED_PREFIX=${INSTALLED_PREFIX}" |
108 |
+ "INSTALLED_LIBPREFIX=${INSTALLED_LIBPREFIX}" |
109 |
+ "INSTALLED_MANPREFIX=${INSTALLED_MANPREFIX}" |
110 |
+ "PREFIX=${INSTALLED_PREFIX}" |
111 |
+ "LIBPREFIX=${INSTALLED_LIBPREFIX}" |
112 |
+ "MANPREFIX=${INSTALLED_MANPREFIX}" |
113 |
+ "CC=$(tc-getCC)" |
114 |
+ "ANSI_CFLAGS=${CFLAGS}" |
115 |
+ "INSTRUMENT_BENCH=true" |
116 |
+ "FORTRAN_INTERFACE=$(usex fortran likwid.mod false)" |
117 |
+ "FC=$(usex fortran "${FC}" false)" |
118 |
+ "FCFLAGS=-J ./ -fsyntax-only" # needed for building correctly |
119 |
+ ) |
120 |
+ src_install_opts=( |
121 |
+ "PREFIX=${D}${INSTALLED_PREFIX}" |
122 |
+ "LIBPREFIX=${D}${INSTALLED_LIBPREFIX}" |
123 |
+ "MANPREFIX=${D}${INSTALLED_MANPREFIX}" |
124 |
+ ) |
125 |
+} |
126 |
+ |
127 |
+src_compile() { |
128 |
+ export_emake_opts |
129 |
+ emake \ |
130 |
+ "${src_compile_opts[@]}" \ |
131 |
+ || die 'emake failed' |
132 |
+} |
133 |
+ |
134 |
+src_install () { |
135 |
+ export_emake_opts |
136 |
+ emake \ |
137 |
+ "${src_compile_opts[@]}" \ |
138 |
+ "${src_install_opts[@]}" \ |
139 |
+ DESTDIR="${D}" \ |
140 |
+ install || die 'emake install failed' |
141 |
+ |
142 |
+ use fortran && doheader likwid.mod |
143 |
+ |
144 |
+ # Fix Python filter added shortly after 4.3.3 |
145 |
+ #python_fix_shebang "${D}"/usr/share/likwid/filter/ |
146 |
+ |
147 |
+ # Do NOT use 'doman'! The upstream 'make install' target does a sed as it's |
148 |
+ # generating the final manpage to the real install dir; and the copies in |
149 |
+ # ${S} are unmodified. |
150 |
+ dodoc README.md CHANGELOG |
151 |
+ dodoc doc/*.txt |
152 |
+ dodoc doc/*.md |
153 |
+ dodoc -r doc/applications doc/archs |
154 |
+ # Fix upstream partial doc install |
155 |
+ rm -rf "${D}"/usr/share/likwid/docs || die |
156 |
+ ln -sf "/usr/share/doc/${PF}" "${D}"/usr/share/likwid/docs || die |
157 |
+} |
158 |
+ |
159 |
+pkg_preinst() { |
160 |
+ # This is now a symlink, but used to be a plain directory |
161 |
+ OLDDOCDIR=/usr/share/likwid/docs |
162 |
+ if [[ ! -L "${OLDDOCDIR}" && -d "${OLDDOCDIR}" ]]; then |
163 |
+ einfo "Cleaning up old docdir at ${OLDDOCDIR}" |
164 |
+ rm -rf "${OLDDOCDIR}" || die |
165 |
+ fi |
166 |
+} |
167 |
+ |
168 |
+pkg_postinst() { |
169 |
+ fcaps_pkg_postinst |
170 |
+ einfo "If you get 'Cannot gather values from MSR_PLATFORM_INFO', then 'modprobe msr'!" |
171 |
+ einfo |
172 |
+ ewarn "To enable users to access performance counters it is necessary to" |
173 |
+ ewarn "change the access permissions to /dev/cpu/msr[0]* devices." |
174 |
+ ewarn "It can be accomplished by adding the following line to file" |
175 |
+ ewarn "/etc/udev/rules.d/99-myrules.rules: KERNEL==\"msr[0-9]*\" MODE=\"0666\"" |
176 |
+ ewarn "Alternatively, assign the MSR files to a unique group and use mode 0660" |
177 |
+} |