1 |
commit: 4b0ddd59e83ad16026b1ffce47d1b4978c2f806c |
2 |
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Apr 28 21:01:08 2019 +0000 |
4 |
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Apr 28 21:03:44 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b0ddd59 |
7 |
|
8 |
sys-apps/likwid: bump |
9 |
|
10 |
Package-Manager: Portage-2.3.62, Repoman-2.3.12 |
11 |
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org> |
12 |
|
13 |
sys-apps/likwid/Manifest | 1 + |
14 |
sys-apps/likwid/likwid-4.3.4.ebuild | 186 ++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 187 insertions(+) |
16 |
|
17 |
diff --git a/sys-apps/likwid/Manifest b/sys-apps/likwid/Manifest |
18 |
index cc76505f29e..22f882da943 100644 |
19 |
--- a/sys-apps/likwid/Manifest |
20 |
+++ b/sys-apps/likwid/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
DIST likwid-4.3.3.tar.gz 1579433 BLAKE2B 9ec468bba009dec860b24c9c55c3d6023ffda3ab0985d835796686ba52d1d3372b2bfce926cf229388978de34e1ab0b41d8d27c88623c51c3e8ff1e9d674906b SHA512 ae4d68e238bc40e4a4ab5df628561c9bb7a0ef8727d5779dba2c32fff0be1dd333532bee7e4c197e5fe286de81d35b863ef09f4bc8b9f9145360e6e461f3d94e |
23 |
+DIST likwid-4.3.4.tar.gz 1584829 BLAKE2B dcd1c3a0c5e549dc3d22bb98120339521e270da55460f5af9f2fe04849af0fe1ac4d9b881883a4efc3695ceb087d1afad5bcc55b55543199d2c33b0f5012cc68 SHA512 f1ee930a98d160728078a81a2cdc798ec62ac484545ced937131e6a6443e5ac23b8e597d31c7b1b9f67c1169e1c662c366cf1098158cb467d9f7ff12946b08a2 |
24 |
|
25 |
diff --git a/sys-apps/likwid/likwid-4.3.4.ebuild b/sys-apps/likwid/likwid-4.3.4.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..eba012a63db |
28 |
--- /dev/null |
29 |
+++ b/sys-apps/likwid/likwid-4.3.4.ebuild |
30 |
@@ -0,0 +1,186 @@ |
31 |
+# Copyright 1999-2019 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=6 |
35 |
+ |
36 |
+FORTRAN_NEEDED=fortran |
37 |
+#PYTHON_COMPAT=( python3_{5,6,7} ) |
38 |
+ |
39 |
+# 4.3.4 will need python-single-r1 |
40 |
+inherit fcaps fortran-2 linux-info toolchain-funcs |
41 |
+ |
42 |
+DESCRIPTION="A performance-oriented tool suite for x86 multicore environments" |
43 |
+HOMEPAGE="https://github.com/rrze-likwid/likwid" |
44 |
+SRC_URI="https://ftp.fau.de/pub/likwid/${P}.tar.gz" |
45 |
+ |
46 |
+# If this ebuild is changed to use the bundled Lua-5.3, then MIT should be |
47 |
+# added to the LICENSE field. |
48 |
+LICENSE="GPL-3+ BSD" |
49 |
+ |
50 |
+SLOT="0" |
51 |
+KEYWORDS="~amd64" # upstream partial support exists for x86 arm arm64 |
52 |
+IUSE="fortran" # ${PYTHON_REQUIRED_USE} |
53 |
+ |
54 |
+# lua: |
55 |
+# likwid's primary functionality is driven by a set of lua scripts installed in |
56 |
+# /usr/bin/ |
57 |
+# likwid bundles lua-5.3.2, AND supports using a system copy of lua-5.2 or |
58 |
+# lua-5.3, which we use. This ebuild uses the system copy of Lua instead. |
59 |
+# |
60 |
+# hwloc: |
61 |
+# likwid bundles a MODIFIED copy of hwloc-2.0.0a1 with specific configuration |
62 |
+# for CPU probing & access |
63 |
+# |
64 |
+# Perl: |
65 |
+# likwid uses Perl to convert from an internal text format to ASM listings |
66 |
+# likwid also uses perl for some installed helper scripts |
67 |
+# The build system bundles some Perl modules, that are not removed at this time: |
68 |
+# Parse-RecDescent |
69 |
+# Template |
70 |
+# |
71 |
+# Python: |
72 |
+# Python3 is used for one helper script, filter/json, added after 4.3.3 |
73 |
+CDEPEND="dev-lang/perl |
74 |
+ dev-lang/lua:5.3" |
75 |
+ |
76 |
+# filter/json uses Python3 |
77 |
+RDEPEND="${CDEPEND}" |
78 |
+ #${PYTHON_DEPS}" |
79 |
+ |
80 |
+# Part of the build process depends on Data::Dumper |
81 |
+# perl-core/Data-Dumper" |
82 |
+DEPEND="${CDEPEND}" |
83 |
+ |
84 |
+CONFIG_CHECK="~X86_MSR" |
85 |
+ |
86 |
+FILECAPS=( |
87 |
+ -M 755 cap_sys_rawio+ep usr/sbin/likwid-accessD |
88 |
+ -- |
89 |
+ -M 755 cap_sys_rawio+ep usr/sbin/likwid-setFreq |
90 |
+) |
91 |
+ |
92 |
+PATCHES=( |
93 |
+ "${FILESDIR}/${PN}-4.3.1-fix-gnustack.patch" |
94 |
+ # Old patches are obsolete: |
95 |
+ #"${FILESDIR}/${PN}-4.3.1-Makefile.patch" |
96 |
+ #"${FILESDIR}/${PN}-4.3.1-config.mk.patch" |
97 |
+) |
98 |
+ |
99 |
+pkg_setup() { |
100 |
+ fortran-2_pkg_setup |
101 |
+ #python-single-r1_pkg_setup |
102 |
+} |
103 |
+ |
104 |
+src_prepare() { |
105 |
+ # Ensure we build with a non executable stack |
106 |
+ sed \ |
107 |
+ -e '/^SHARED_CFLAGS/s/$/ -Wa,--noexecstack/' \ |
108 |
+ -i make/include_{GCC*,CLANG}.mk \ |
109 |
+ || die "Failed to set nonexecstack" |
110 |
+ |
111 |
+ # Make the install targets respect Q= for being quiet or not |
112 |
+ # MUCH easier for debugging |
113 |
+ sed -r \ |
114 |
+ -e '/^install/,/^[a-z]/{/^\t@/{ s/@/$(Q)/; }}' \ |
115 |
+ -i \ |
116 |
+ Makefile || die "Failed to sed Makefile" |
117 |
+ |
118 |
+ sed -i \ |
119 |
+ -e '/^\.NOTPARALLEL:/d' \ |
120 |
+ Makefile \ |
121 |
+ bench/Makefile \ |
122 |
+ ext/hwloc/Makefile || die "Failed to re-enable parallel" |
123 |
+ |
124 |
+ default |
125 |
+} |
126 |
+ |
127 |
+export_emake_opts() { |
128 |
+ # Warning: this build system uses PREFIX in a way that differs from |
129 |
+ # autoconf! It's more like: |
130 |
+ # PREFIX=$(DESTDIR)$(INSTALLED_PREFIX) |
131 |
+ # it's not 100% like that, because parts of the Makefiles are inconsistent. |
132 |
+ # this is the same solution used in the upstream RPM specs |
133 |
+ # these variables are uppercase so they match what's put into Make. |
134 |
+ local INSTALLED_PREFIX=/usr |
135 |
+ local INSTALLED_LIBPREFIX=/usr/$(get_libdir) # upstream is '$(INSTALLED_PREFIX)/lib' |
136 |
+ local INSTALLED_MANPREFIX=/usr/share/man # upstream has it as used but undefined variable. |
137 |
+ # TODO: support LUA_SINGLE_TARGET here later for Lua 5.2 |
138 |
+ local LUASLOT='5.3' |
139 |
+ # If the build is too loud, pass 'Q=@' |
140 |
+ src_compile_opts=( |
141 |
+ "Q=" |
142 |
+ "INSTALLED_PREFIX=${INSTALLED_PREFIX}" |
143 |
+ "INSTALLED_LIBPREFIX=${INSTALLED_LIBPREFIX}" |
144 |
+ "INSTALLED_MANPREFIX=${INSTALLED_MANPREFIX}" |
145 |
+ "PREFIX=${INSTALLED_PREFIX}" |
146 |
+ "LIBPREFIX=${INSTALLED_LIBPREFIX}" |
147 |
+ "MANPREFIX=${INSTALLED_MANPREFIX}" |
148 |
+ "CC=$(tc-getCC)" |
149 |
+ "ANSI_CFLAGS=${CFLAGS}" |
150 |
+ "INSTRUMENT_BENCH=true" |
151 |
+ "LUA_INCLUDE_DIR=/usr/include/lua${LUASLOT}" |
152 |
+ "LUA_LIB_DIR=/usr/$(get_libdir)" |
153 |
+ "LUA_LIB_NAME=lua${LUASLOT}" |
154 |
+ "LUA_BIN=/usr/bin" |
155 |
+ "FORTRAN_INTERFACE=$(usex fortran likwid.mod false)" |
156 |
+ "FC=$(usex fortran "${FC}" false)" |
157 |
+ "FCFLAGS=-J ./ -fsyntax-only" # needed for building correctly |
158 |
+ ) |
159 |
+ src_install_opts=( |
160 |
+ "PREFIX=${D}${INSTALLED_PREFIX}" |
161 |
+ "LIBPREFIX=${D}${INSTALLED_LIBPREFIX}" |
162 |
+ "MANPREFIX=${D}${INSTALLED_MANPREFIX}" |
163 |
+ ) |
164 |
+} |
165 |
+ |
166 |
+src_compile() { |
167 |
+ export_emake_opts |
168 |
+ emake \ |
169 |
+ "${src_compile_opts[@]}" \ |
170 |
+ || die 'emake failed' |
171 |
+} |
172 |
+ |
173 |
+src_install () { |
174 |
+ export_emake_opts |
175 |
+ emake \ |
176 |
+ "${src_compile_opts[@]}" \ |
177 |
+ "${src_install_opts[@]}" \ |
178 |
+ DESTDIR="${D}" \ |
179 |
+ install || die 'emake install failed' |
180 |
+ |
181 |
+ use fortran && doheader likwid.mod |
182 |
+ |
183 |
+ # Fix Python filter added shortly after 4.3.3 |
184 |
+ #python_fix_shebang "${D}"/usr/share/likwid/filter/ |
185 |
+ |
186 |
+ # Do NOT use 'doman'! The upstream 'make install' target does a sed as it's |
187 |
+ # generating the final manpage to the real install dir; and the copies in |
188 |
+ # ${S} are unmodified. |
189 |
+ dodoc README.md CHANGELOG doc/logo.png |
190 |
+ dodoc doc/*.txt |
191 |
+ dodoc doc/*.md |
192 |
+ dodoc -r doc/applications doc/archs |
193 |
+ # Fix upstream partial doc install |
194 |
+ rm -rf "${D}"/usr/share/likwid/docs || die |
195 |
+ ln -sf "/usr/share/doc/${PF}" "${D}"/usr/share/likwid/docs || die |
196 |
+} |
197 |
+ |
198 |
+pkg_preinst() { |
199 |
+ # This is now a symlink, but used to be a plain directory |
200 |
+ OLDDOCDIR=/usr/share/likwid/docs |
201 |
+ if [[ ! -L "${OLDDOCDIR}" && -d "${OLDDOCDIR}" ]]; then |
202 |
+ einfo "Cleaning up old docdir at ${OLDDOCDIR}" |
203 |
+ rm -rf "${OLDDOCDIR}" || die |
204 |
+ fi |
205 |
+} |
206 |
+ |
207 |
+pkg_postinst() { |
208 |
+ fcaps_pkg_postinst |
209 |
+ einfo "If you get 'Cannot gather values from MSR_PLATFORM_INFO', then 'modprobe msr'!" |
210 |
+ einfo |
211 |
+ ewarn "To enable users to access performance counters it is necessary to" |
212 |
+ ewarn "change the access permissions to /dev/cpu/msr[0]* devices." |
213 |
+ ewarn "It can be accomplished by adding the following line to file" |
214 |
+ ewarn "/etc/udev/rules.d/99-myrules.rules: KERNEL==\"msr[0-9]*\" MODE=\"0666\"" |
215 |
+ ewarn "Alternatively, assign the MSR files to a unique group and use mode 0660" |
216 |
+} |