1 |
commit: 08940377e37e95e56bbf73261763a26d712c9386 |
2 |
Author: Brendan Horan <brendan <AT> horan <DOT> hk> |
3 |
AuthorDate: Fri Oct 21 00:15:32 2016 +0000 |
4 |
Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 2 15:53:04 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08940377 |
7 |
|
8 |
sys-apps/likwid: version bump to 4.1.2 |
9 |
|
10 |
Repoman OK |
11 |
Patches apply OK |
12 |
Addressed feedback |
13 |
|
14 |
sys-apps/likwid/Manifest | 1 + |
15 |
sys-apps/likwid/files/likwid-4.1.2-Makefile.patch | 19 ++++ |
16 |
sys-apps/likwid/files/likwid-4.1.2-config.mk.patch | 43 +++++++++ |
17 |
.../likwid/files/likwid-4.1.2-fix-gnustack.patch | 31 +++++++ |
18 |
sys-apps/likwid/likwid-4.1.2.ebuild | 101 +++++++++++++++++++++ |
19 |
5 files changed, 195 insertions(+) |
20 |
|
21 |
diff --git a/sys-apps/likwid/Manifest b/sys-apps/likwid/Manifest |
22 |
index 0c3bd6c..bb96efa 100644 |
23 |
--- a/sys-apps/likwid/Manifest |
24 |
+++ b/sys-apps/likwid/Manifest |
25 |
@@ -1 +1,2 @@ |
26 |
DIST likwid-4.1.1.tar.gz 1395475 SHA256 805b321c0c88e02ebddf89cd7e0097e40a438846cb033650c05a57d992393d3d SHA512 2561cc8203bf795ebe661a0b2f2e15fb68a164438b2c839482bab67a82babadbcfd78aaf519c4ceab6cfc799a363216023f77fe744e3b302facf5c578d7ab407 WHIRLPOOL 5be6036e726296719effcd3fbd272168cdf5f2581ede0bca0c554098a780018063b6527cd99202a8620dcc705246f2da1ad281c573eacfee8b4310a8dccbd4d7 |
27 |
+DIST likwid-4.1.2.tar.gz 1398643 SHA256 8a62a39ee584ec6b472d3791bf6c561af1db3e0564da7347c8a6cfdce8fd6763 SHA512 efb6a85947193204e08ce32e79c5f3ef15c7babca66930145af1c2eca8eccc2aeceea54a12715467161c646acc208bda3d01d07ea365ff8bdb9eafb022f107d9 WHIRLPOOL 7e065169251c0f2f18a8634a9ff4d309984920070b842e2eb34bc478b540a9aa49f95ae7878a63d98d237f46be2273d20539e94a60f96946a0f88935e3643085 |
28 |
|
29 |
diff --git a/sys-apps/likwid/files/likwid-4.1.2-Makefile.patch b/sys-apps/likwid/files/likwid-4.1.2-Makefile.patch |
30 |
new file mode 100644 |
31 |
index 00000000..cec5d59 |
32 |
--- /dev/null |
33 |
+++ b/sys-apps/likwid/files/likwid-4.1.2-Makefile.patch |
34 |
@@ -0,0 +1,19 @@ |
35 |
+--- likwid-likwid-4.1.1/Makefile.org 2016-07-14 12:09:56.612963529 +0800 |
36 |
++++ likwid-likwid-4.1.1/Makefile 2016-07-14 12:11:24.148645584 +0800 |
37 |
+@@ -51,7 +51,6 @@ |
38 |
+ |
39 |
+ #CONFIGURE BUILD SYSTEM |
40 |
+ BUILD_DIR = ./$(COMPILER) |
41 |
+-Q ?= @ |
42 |
+ GENGROUPLOCK = .gengroup |
43 |
+ |
44 |
+ VPATH = $(SRC_DIR) |
45 |
+@@ -544,7 +543,7 @@ |
46 |
+ sed -i -e "s/<VERSION>/$(VERSION)/g" -e "s/<DATE>/$(DATE)/g" -e "s/<RELEASE>/$(RELEASE)/g" -e "s+$(PREFIX)/bin/likwid-lua+$(PWD)/ext/lua/lua+" -e "s+$(PREFIX)/share/lua/?.lua+$(PWD)/?.lua+" -e "s+$(PREFIX)/bin/likwid-pin+$(PWD)/likwid-pin+" -e "s+$(PREFIX)/bin/likwid-perfctr+$(PWD)/likwid-perfctr+" $$APP; \ |
47 |
+ chmod +x $$APP; \ |
48 |
+ done |
49 |
+- @sed -i -e "s/<VERSION>/$(VERSION)/g" -e "s/<DATE>/$(DATE)/g" -e "s/<RELEASE>/$(RELEASE)/g" -e "s+$(PREFIX)/lib+$(PWD)+g" -e "s+$(PREFIX)/share/likwid/perfgroups+$(PWD)/groups+g" likwid.lua; |
50 |
++ @sed -i -e "s/<VERSION>/$(VERSION)/g" -e "s/<DATE>/$(DATE)/g" -e "s/<RELEASE>/$(RELEASE)/g" -e "s+$(PREFIX)/+$(PWD)+g" -e "s+$(PREFIX)/share/likwid/perfgroups+$(PWD)/groups+g" likwid.lua; |
51 |
+ @sed -i -e "s+$(PREFIX)/share/likwid/mongroups+$(PWD)/monitoring/groups+g" likwid-agent |
52 |
+ @ln -sf liblikwid.so liblikwid.so.$(VERSION) |
53 |
+ @ln -sf ext/hwloc/liblikwid-hwloc.so liblikwid-hwloc.so.$(VERSION) |
54 |
|
55 |
diff --git a/sys-apps/likwid/files/likwid-4.1.2-config.mk.patch b/sys-apps/likwid/files/likwid-4.1.2-config.mk.patch |
56 |
new file mode 100644 |
57 |
index 00000000..36897e5 |
58 |
--- /dev/null |
59 |
+++ b/sys-apps/likwid/files/likwid-4.1.2-config.mk.patch |
60 |
@@ -0,0 +1,43 @@ |
61 |
+--- likwid-likwid-4.1.1/config.mk.org 2016-07-14 12:49:27.791771509 +0800 |
62 |
++++ likwid-likwid-4.1.1/config.mk 2016-07-14 12:51:27.470358158 +0800 |
63 |
+@@ -15,9 +15,9 @@ |
64 |
+ # Common users do not need to change values below this comment! # |
65 |
+ ################################################################# |
66 |
+ |
67 |
+-MANPREFIX = $(PREFIX)/man#NO SPACE |
68 |
++MANPREFIX = ${D}/usr/share/man#NO SPACE |
69 |
+ BINPREFIX = $(PREFIX)/bin#NO SPACE |
70 |
+-LIBPREFIX = $(PREFIX)/lib#NO SPACE |
71 |
++LIBPREFIX = $(PREFIX)/$(get_libdir)#NO SPACE |
72 |
+ |
73 |
+ # These paths are hardcoded into executables and libraries. Usually |
74 |
+ # they'll be the same as above, but package maintainers may want to |
75 |
+@@ -26,9 +26,9 @@ |
76 |
+ # Keep in mind that the access and setFreq daemon need enough |
77 |
+ # privileges that may be deleted when copying the files to |
78 |
+ # the INTSTALLED_PREFIX |
79 |
+-INSTALLED_PREFIX = $(PREFIX)#NO SPACE |
80 |
++INSTALLED_PREFIX=/usr#NO SPACE |
81 |
+ INSTALLED_BINPREFIX = $(INSTALLED_PREFIX)/bin#NO SPACE |
82 |
+-INSTALLED_LIBPREFIX = $(INSTALLED_PREFIX)/lib#NO SPACE |
83 |
++INSTALLED_LIBPREFIX = $(INSTALLED_PREFIX)/$(get_libdir)#NO SPACE |
84 |
+ |
85 |
+ # chown installed tools to this user/group |
86 |
+ # if you change anything here, make sure that the user/group can access |
87 |
+@@ -59,7 +59,7 @@ |
88 |
+ FORTRAN_INTERFACE = false#NO SPACE |
89 |
+ |
90 |
+ # Instrument likwid-bench for use with likwid-perfctr |
91 |
+-INSTRUMENT_BENCH = false#NO SPACE |
92 |
++INSTRUMENT_BENCH = true#NO SPACE |
93 |
+ |
94 |
+ # Use recommended Portable Hardware Locality (hwloc) instead of CPUID |
95 |
+ USE_HWLOC = true#NO SPACE |
96 |
+@@ -80,6 +80,6 @@ |
97 |
+ DATE = 19.05.2016 |
98 |
+ |
99 |
+ RPATHS = -Wl,-rpath=$(INSTALLED_LIBPREFIX) |
100 |
+-LIBLIKWIDPIN = $(abspath $(INSTALLED_PREFIX)/lib/liblikwidpin.so.$(VERSION).$(RELEASE)) |
101 |
++LIBLIKWIDPIN = $(abspath $(PREFIX)/$(get_libdir)/liblikwidpin.so) |
102 |
+ LIKWIDFILTERPATH = $(abspath $(INSTALLED_PREFIX)/share/likwid/filter) |
103 |
+ LIKWIDGROUPPATH = $(abspath $(INSTALLED_PREFIX)/share/likwid/perfgroups) |
104 |
|
105 |
diff --git a/sys-apps/likwid/files/likwid-4.1.2-fix-gnustack.patch b/sys-apps/likwid/files/likwid-4.1.2-fix-gnustack.patch |
106 |
new file mode 100644 |
107 |
index 00000000..a5a046d |
108 |
--- /dev/null |
109 |
+++ b/sys-apps/likwid/files/likwid-4.1.2-fix-gnustack.patch |
110 |
@@ -0,0 +1,31 @@ |
111 |
+--- likwid-likwid-4.1.1/bench/Makefile.org 2015-08-22 13:56:17.242177531 +0800 |
112 |
++++ likwid-likwid-4.1.1/bench/Makefile 2015-08-22 13:56:46.985086094 +0800 |
113 |
+@@ -118,6 +118,7 @@ |
114 |
+ $(BUILD_DIR)/%.o: $(BUILD_DIR)/%.pas |
115 |
+ @echo "===> ASSEMBLE $@" |
116 |
+ $(Q)$(PAS) -i $(PASFLAGS) -o $(BUILD_DIR)/$*.s $< '$(DEFINES)' |
117 |
++ @cat ../fix_gnustack.txt >> $(BUILD_DIR)/$*.s |
118 |
+ $(Q)$(AS) $(ASFLAGS) $(BUILD_DIR)/$*.s -o $@ |
119 |
+ |
120 |
+ ifeq ($(findstring $(MAKECMDGOALS),clean),) |
121 |
+ |
122 |
+diff --git a/fix_gnustack.txt b/fix_gnustack.txt |
123 |
+new file mode 100644 |
124 |
+index 0000000..965af94 |
125 |
+--- /dev/null |
126 |
++++ likwid-likwid-4.1.1/fix_gnustack.txt |
127 |
+@@ -0,0 +1,3 @@ |
128 |
++#if defined(__linux__) && defined(__ELF__) |
129 |
++.section .note.GNU-stack,"",%progbits |
130 |
++#endif |
131 |
+ |
132 |
+--- likwid-likwid-4.1.1/src/loadData.S.org 2015-08-22 14:26:28.634629884 +0800 |
133 |
++++ likwid-likwid-4.1.1/src/loadData.S 2015-08-22 14:28:42.247210117 +0800 |
134 |
+@@ -41,4 +41,6 @@ |
135 |
+ #endif |
136 |
+ .size _loadData, .-_loadData |
137 |
+ |
138 |
+- |
139 |
++#if defined(__linux__) && defined(__ELF__) |
140 |
++.section .note.GNU-stack,"",%progbits |
141 |
++#endif |
142 |
|
143 |
diff --git a/sys-apps/likwid/likwid-4.1.2.ebuild b/sys-apps/likwid/likwid-4.1.2.ebuild |
144 |
new file mode 100644 |
145 |
index 00000000..6566777 |
146 |
--- /dev/null |
147 |
+++ b/sys-apps/likwid/likwid-4.1.2.ebuild |
148 |
@@ -0,0 +1,101 @@ |
149 |
+# Copyright 1999-2016 Gentoo Foundation |
150 |
+# Distributed under the terms of the GNU General Public License v2 |
151 |
+# $Id$ |
152 |
+ |
153 |
+EAPI=6 |
154 |
+ |
155 |
+FORTRAN_NEEDED=fortran |
156 |
+ |
157 |
+inherit fcaps linux-info fortran-2 |
158 |
+ |
159 |
+DESCRIPTION="A performance-oriented tool suite for x86 multicore environments" |
160 |
+HOMEPAGE="https://github.com/rrze-likwid/likwid" |
161 |
+SRC_URI="https://ftp.fau.de/pub/likwid/${P}.tar.gz" |
162 |
+ |
163 |
+LICENSE="GPL-3+" |
164 |
+SLOT="0" |
165 |
+KEYWORDS="~amd64" |
166 |
+IUSE="fortran" |
167 |
+ |
168 |
+RDEPEND="dev-lang/perl" |
169 |
+ |
170 |
+DEPEND="${RDEPEND} |
171 |
+ fortran? ( sys-devel/gcc:*[fortran] ) |
172 |
+ dev-lang/lua:0" |
173 |
+ |
174 |
+CONFIG_CHECK="~X86_MSR" |
175 |
+ |
176 |
+FILECAPS=( |
177 |
+ -M 755 cap_sys_rawio usr/sbin/likwid-accessD -- |
178 |
+ -M 755 cap_sys_rawio usr/bin/likwid-{perfctr,bench,powermeter} |
179 |
+) |
180 |
+ |
181 |
+# See Bug 558402 |
182 |
+PATCHES=( |
183 |
+ "${FILESDIR}/${P}-Makefile.patch" |
184 |
+ "${FILESDIR}/${P}-fix-gnustack.patch" |
185 |
+ "${FILESDIR}/${P}-config.mk.patch" |
186 |
+) |
187 |
+ |
188 |
+src_prepare() { |
189 |
+ # Set PREFIX path to include sandbox path |
190 |
+ sed -e 's:^PREFIX = .*:PREFIX = '${D}'/usr:' -i config.mk || \ |
191 |
+ die "Failed to set correct prefix path" |
192 |
+ |
193 |
+ # Set the path to library directory. |
194 |
+ sed -e 's:$(get_libdir):'$(get_libdir)':' -i config.mk || \ |
195 |
+ die "Cannot set library path!" |
196 |
+ |
197 |
+ # Set correct LDFLAGS |
198 |
+ sed -e '/LIBS/aSHARED_LFLAGS += -Wl,-soname,$@' \ |
199 |
+ -i make/include_GCC.mk || die "Failed to set correct LDFLAGS" |
200 |
+ |
201 |
+ # Insert date and version info man pages |
202 |
+ sed -e 's/<DATE>/21.08.2015/g' \ |
203 |
+ -e "s/VERSION/${PV}/g" \ |
204 |
+ -i doc/*.1 || die "Failed to insert date into man pages" |
205 |
+ |
206 |
+ # Set path to the access daemon, once installed into the system |
207 |
+ sed -e "/exeprog/s|TOSTRING(ACCESSDAEMON)|\"/usr/sbin/likwid-accessD\"|" \ |
208 |
+ -i src/access_client.c || die "Failed to set access daemon path" |
209 |
+ |
210 |
+ # Ensure we build with a non executable stack |
211 |
+ sed -e "s:\$(SHARED_CFLAGS): \$(SHARED_CFLAGS) -Wa,--noexecstack:" \ |
212 |
+ -i make/config_defines.mk || die "Failed to set nonexecstack" |
213 |
+ |
214 |
+ if use fortran; then |
215 |
+ |
216 |
+ # If fortran USE is enabled, enable the fortran interfaces |
217 |
+ sed -i 's:^FORTRAN_INTERFACE = false:FORTRAN_INTERFACE = likwid.mod:' \ |
218 |
+ config.mk || die "Enabling of fortran failed" |
219 |
+ |
220 |
+ # Set the correct fortran compiler for GCC |
221 |
+ sed -i "s:^FC = ifort:FC = ${FC}:" make/include_GCC.mk \ |
222 |
+ || die "Failed to set fortran compiler" |
223 |
+ |
224 |
+ # Set the correct FCFLAGS for gcc fortran |
225 |
+ sed -i '/^FCFLAGS/c\FCFLAGS = -J ./ -fsyntax-only' make/include_GCC.mk \ |
226 |
+ || die "Failed to set GCC flags for fortran" |
227 |
+ fi |
228 |
+ |
229 |
+ default |
230 |
+ |
231 |
+} |
232 |
+ |
233 |
+src_install () { |
234 |
+ default |
235 |
+ if use fortran; then |
236 |
+ insinto /usr/include |
237 |
+ doins likwid.mod |
238 |
+ fi |
239 |
+ |
240 |
+ doman doc/*.1 |
241 |
+} |
242 |
+ |
243 |
+pkg_postinst() { |
244 |
+ fcaps_pkg_postinst |
245 |
+ ewarn "To enable users to access performance counters it is necessary to" |
246 |
+ ewarn "change the access permissions to /dev/cpu/msr[0]* devices." |
247 |
+ ewarn "It can be accomplished by adding the following line to file" |
248 |
+ ewarn "/etc/udev/rules.d/99-myrules.rules: KERNEL==\"msr[0-9]*\" MODE=\"0666\"" |
249 |
+} |