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