summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/likwid')
-rw-r--r--sys-apps/likwid/Manifest1
-rw-r--r--sys-apps/likwid/files/likwid-4.0.1-Makefile.patch39
-rw-r--r--sys-apps/likwid/files/likwid-4.0.1-config.mk.patch46
-rw-r--r--sys-apps/likwid/files/likwid-4.0.1-fix-gnustack.patch31
-rw-r--r--sys-apps/likwid/files/likwid-4.0.1-lua-makefile.patch19
-rw-r--r--sys-apps/likwid/likwid-4.0.1.ebuild83
-rw-r--r--sys-apps/likwid/metadata.xml2
7 files changed, 220 insertions, 1 deletions
diff --git a/sys-apps/likwid/Manifest b/sys-apps/likwid/Manifest
index e8f7a4859361..448cb7b7aacf 100644
--- a/sys-apps/likwid/Manifest
+++ b/sys-apps/likwid/Manifest
@@ -1 +1,2 @@
DIST likwid-3.1.3.tar.gz 605675 SHA256 05078ec55dce3d4cf1c94832bd289ccbcaee7bdee9a1ea9f6681ccd3f59ece5b SHA512 e31b4498e702d4ddf61e3c123d43f0804ef4cef149bb3732b61e3894aa9d76feb7a2654bbb0467dd30323031122ea01cf17e4f01a33f193e750cdbdfc09741d7 WHIRLPOOL bccfcc68e792f09a66eab99affa81250fbe34d4759a81a4e0bd0af2535e5bb09229bee4bc165986559d14101183e5be9a933273ec9f1a7c5c8da3f97f07f9e8e
+DIST likwid-4.0.1.tar.gz 1429223 SHA256 c04551a2264389f4a88cb2757efdcb0a8d3c3fd9851020d0827a90b68b8c36e3 SHA512 fdc0eaf102814d53efdabb12d90f4baeec9d190f9808e3fcf5a6785136a7cf9fd0789cf64417cd52c7288a50a4284f8e44463c16410c2b0e4ef3ce3790c61b86 WHIRLPOOL 9a944b77ebb60d5283c2c42c44dabeb6dc8837d64a4e2d90d0878ab60c5b3b3d7e55cbfbbe7fcc075edcc83d4d980f689a8ed6b5f3a5051c6af824d624b1dbd6
diff --git a/sys-apps/likwid/files/likwid-4.0.1-Makefile.patch b/sys-apps/likwid/files/likwid-4.0.1-Makefile.patch
new file mode 100644
index 000000000000..460192216fd6
--- /dev/null
+++ b/sys-apps/likwid/files/likwid-4.0.1-Makefile.patch
@@ -0,0 +1,39 @@
+--- Makefile.org 2015-08-24 10:58:52.694430235 +0800
++++ Makefile 2015-08-24 10:54:27.114444154 +0800
+@@ -51,7 +51,6 @@
+
+ #CONFIGURE BUILD SYSTEM
+ BUILD_DIR = ./$(COMPILER)
+-Q ?= @
+ GENGROUPLOCK = .gengroup
+
+ VPATH = $(SRC_DIR)
+@@ -285,21 +284,6 @@
+ @cd $(LIBPREFIX) && ln -fs liblikwidpin.so.$(VERSION) liblikwidpin.so
+ @cd $(LIBPREFIX) && ln -fs $(shell basename $(TARGET_HWLOC_LIB)).$(VERSION) $(shell basename $(TARGET_HWLOC_LIB))
+ @cd $(LIBPREFIX) && ln -fs $(shell basename $(TARGET_LUA_LIB)).$(VERSION) $(shell basename $(TARGET_LUA_LIB))
+- @echo "===> INSTALL man pages to $(MANPREFIX)/man1"
+- @mkdir -p $(MANPREFIX)/man1
+- @sed -e "s/<VERSION>/$(VERSION)/g" -e "s/<DATE>/$(DATE)/g" < $(DOC_DIR)/likwid-topology.1 > $(MANPREFIX)/man1/likwid-topology.1
+- @sed -e "s/<VERSION>/$(VERSION)/g" -e "s/<DATE>/$(DATE)/g" < $(DOC_DIR)/likwid-features.1 > $(MANPREFIX)/man1/likwid-features.1
+- @sed -e "s/<VERSION>/$(VERSION)/g" -e "s/<DATE>/$(DATE)/g" -e "s+<PREFIX>+$(PREFIX)+g" < $(DOC_DIR)/likwid-perfctr.1 > $(MANPREFIX)/man1/likwid-perfctr.1
+- @sed -e "s/<VERSION>/$(VERSION)/g" -e "s/<DATE>/$(DATE)/g" < $(DOC_DIR)/likwid-powermeter.1 > $(MANPREFIX)/man1/likwid-powermeter.1
+- @sed -e "s/<VERSION>/$(VERSION)/g" -e "s/<DATE>/$(DATE)/g" < $(DOC_DIR)/likwid-pin.1 > $(MANPREFIX)/man1/likwid-pin.1
+- @sed -e "s/<VERSION>/$(VERSION)/g" -e "s/<DATE>/$(DATE)/g" < $(DOC_DIR)/feedGnuplot.1 > $(MANPREFIX)/man1/feedGnuplot.1
+- @sed -e "s/<VERSION>/$(VERSION)/g" -e "s/<DATE>/$(DATE)/g" < $(DOC_DIR)/likwid-accessD.1 > $(MANPREFIX)/man1/likwid-accessD.1
+- @sed -e "s/<VERSION>/$(VERSION)/g" -e "s/<DATE>/$(DATE)/g" < $(DOC_DIR)/likwid-genTopoCfg.1 > $(MANPREFIX)/man1/likwid-genTopoCfg.1
+- @sed -e "s/<VERSION>/$(VERSION)/g" -e "s/<DATE>/$(DATE)/g" < $(DOC_DIR)/likwid-memsweeper.1 > $(MANPREFIX)/man1/likwid-memsweeper.1
+- @sed -e "s/<VERSION>/$(VERSION)/g" -e "s/<DATE>/$(DATE)/g" < $(DOC_DIR)/likwid-mpirun.1 > $(MANPREFIX)/man1/likwid-mpirun.1
+- @sed -e "s/<VERSION>/$(VERSION)/g" -e "s/<DATE>/$(DATE)/g" < $(DOC_DIR)/likwid-perfscope.1 > $(MANPREFIX)/man1/likwid-perfscope.1
+- @sed -e "s/<VERSION>/$(VERSION)/g" -e "s/<DATE>/$(DATE)/g" < $(DOC_DIR)/likwid-setFreq.1 > $(MANPREFIX)/man1/likwid-setFreq.1
+- @chmod 644 $(MANPREFIX)/man1/likwid-*
+ @echo "===> INSTALL headers to $(PREFIX)/include"
+ @mkdir -p $(PREFIX)/include
+ @install -m 644 src/includes/likwid.h $(PREFIX)/include/
+@@ -363,6 +347,6 @@
+ 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+" $$APP; \
+ chmod +x $$APP; \
+ done
+- @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;
++ @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;
+ @sed -i -e "s+$(PREFIX)/share/likwid/mongroups+$(PWD)/monitoring/groups+g" likwid-agent
diff --git a/sys-apps/likwid/files/likwid-4.0.1-config.mk.patch b/sys-apps/likwid/files/likwid-4.0.1-config.mk.patch
new file mode 100644
index 000000000000..2ca02bc9b9fa
--- /dev/null
+++ b/sys-apps/likwid/files/likwid-4.0.1-config.mk.patch
@@ -0,0 +1,46 @@
+--- config.mk.org 2015-08-24 19:46:39.354151547 +0800
++++ config.mk 2015-08-24 19:49:31.040699137 +0800
+@@ -12,15 +12,15 @@
+ PREFIX = /usr/local#NO SPACE
+ MANPREFIX = $(PREFIX)/man#NO SPACE
+ BINPREFIX = $(PREFIX)/bin#NO SPACE
+-LIBPREFIX = $(PREFIX)/lib#NO SPACE
++LIBPREFIX = $(PREFIX)/$(get_libdir)#NO SPACE
+
+ # These paths are hardcoded into executables and libraries. Usually
+ # they'll be the same as above, but package maintainers may want to
+ # distinguish between the image directories and the final install
+ # target.
+-INSTALLED_PREFIX=$(PREFIX)
++INSTALLED_PREFIX=/usr
+ INSTALLED_BINPREFIX = $(INSTALLED_PREFIX)/bin#NO SPACE
+-INSTALLED_LIBPREFIX = $(INSTALLED_PREFIX)/lib#NO SPACE
++INSTALLED_LIBPREFIX = $(INSTALLED_PREFIX)/$(get_libdir)#NO SPACE
+
+ # chown installed tools to this user/group
+ INSTALL_CHOWN = -g root -o root
+@@ -42,14 +42,14 @@
+ ACCESSMODE = accessdaemon$#NO SPACE
+
+ # Change to true to a build shared library instead of a static one
+-SHARED_LIBRARY = true#NO SPACE
++SHARED_LIBRARY = true
+
+ # Build Fortran90 module interface for marker API. Adopt Fortran compiler
+ # in ./make/include_<COMPILER>.mk if necessary. Default: ifort .
+ FORTRAN_INTERFACE = false#NO SPACE
+
+ # Instrument likwid-bench for use with likwid-perfctr
+-INSTRUMENT_BENCH = false#NO SPACE
++INSTRUMENT_BENCH = true#NO SPACE
+
+ # Use Portable Hardware Locality (hwloc) instead of CPUID
+ USE_HWLOC = true#NO SPACE
+@@ -67,6 +67,6 @@
+ RELEASE = 0
+ DATE = 28.04.2015
+
+-LIBLIKWIDPIN = $(abspath $(PREFIX)/lib/liblikwidpin.so)
++LIBLIKWIDPIN = $(abspath $(PREFIX)/$(get_libdir)/liblikwidpin.so)
+ LIKWIDFILTERPATH = $(abspath $(PREFIX)/share/likwid/filter)
+
diff --git a/sys-apps/likwid/files/likwid-4.0.1-fix-gnustack.patch b/sys-apps/likwid/files/likwid-4.0.1-fix-gnustack.patch
new file mode 100644
index 000000000000..a0eaadf6cec1
--- /dev/null
+++ b/sys-apps/likwid/files/likwid-4.0.1-fix-gnustack.patch
@@ -0,0 +1,31 @@
+--- bench/Makefile.org 2015-08-22 13:56:17.242177531 +0800
++++ bench/Makefile 2015-08-22 13:56:46.985086094 +0800
+@@ -118,6 +118,7 @@
+ $(BUILD_DIR)/%.o: $(BUILD_DIR)/%.pas
+ @echo "===> ASSEMBLE $@"
+ $(Q)$(PAS) -i $(PASFLAGS) -o $(BUILD_DIR)/$*.s $< '$(DEFINES)'
++ @cat ../b/fix_gnustack.txt >> $(BUILD_DIR)/$*.s
+ $(Q)$(AS) $(ASFLAGS) $(BUILD_DIR)/$*.s -o $@
+
+ ifeq ($(findstring $(MAKECMDGOALS),clean),)
+
+diff --git a/fix_gnustack.txt b/fix_gnustack.txt
+new file mode 100644
+index 0000000..965af94
+--- /dev/null
++++ b/fix_gnustack.txt
+@@ -0,0 +1,3 @@
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+
+--- src/loadData.S.org 2015-08-22 14:26:28.634629884 +0800
++++ src/loadData.S 2015-08-22 14:28:42.247210117 +0800
+@@ -41,4 +41,6 @@
+ #endif
+ .size _loadData, .-_loadData
+
+-
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
diff --git a/sys-apps/likwid/files/likwid-4.0.1-lua-makefile.patch b/sys-apps/likwid/files/likwid-4.0.1-lua-makefile.patch
new file mode 100644
index 000000000000..96065100997a
--- /dev/null
+++ b/sys-apps/likwid/files/likwid-4.0.1-lua-makefile.patch
@@ -0,0 +1,19 @@
+Patch provided from upstream
+Add dependencies for Lua libraries to Makefile so that it can be build with multiple make jobs
+https://github.com/rrze-likwid/likwid/commit/bf12653e199d6d60055982bd92b284f44197bccf
+
+--- ext/lua/Makefile.org 2015-08-21 09:53:48.430859982 +0800
++++ ext/lua/Makefile 2015-08-21 09:51:50.905236819 +0800
+@@ -42,10 +42,10 @@
+ $(BUILD_DIR):
+ @mkdir $(BUILD_DIR)
+
+-$(STATIC_LIBLUA):
++$(STATIC_LIBLUA): $(OBJ)
+ $(Q)${AR} -cq $(LIBLUA) $(OBJ)
+
+-$(SHARED_LIBLUA):
++$(SHARED_LIBLUA): $(OBJ)
+ $(Q)$(CC) $(LFLAGS) -Wl,-soname,$(LIBLUA).$(VERSION) -shared -fPIC -o $(LIBLUA) $(OBJ) $(LIBS)
+
+ $(INTERPRETER): $(SHARED_LIBLUA) $(BUILD_DIR)/lua.o
diff --git a/sys-apps/likwid/likwid-4.0.1.ebuild b/sys-apps/likwid/likwid-4.0.1.ebuild
new file mode 100644
index 000000000000..8016266b78c7
--- /dev/null
+++ b/sys-apps/likwid/likwid-4.0.1.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+FORTRAN_NEEDED=fortran
+
+inherit eutils fcaps linux-info multilib fortran-2
+
+DESCRIPTION="A performance-oriented tool suite for x86 multicore environments"
+HOMEPAGE="https://github.com/rrze-likwid/likwid"
+SRC_URI="https://github.com/rrze-likwid/likwid/archive/likwid-${PV}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="fortran"
+
+RDEPEND="dev-lang/perl"
+
+DEPEND="${RDEPEND}
+ sys-apps/sed
+ fortran? ( sys-devel/gcc:*[fortran] )
+ dev-lang/lua:0"
+
+CONFIG_CHECK="~X86_MSR"
+
+FILECAPS=(
+ cap_sys_rawio usr/sbin/likwid-accessD --
+ cap_sys_rawio usr/bin/likwid-{perfctr,bench,powermeter}
+)
+
+src_prepare() {
+ # See Bug 558402
+ epatch "${FILESDIR}"/${P}-Makefile.patch \
+ "${FILESDIR}"/${P}-fix-gnustack.patch \
+ "${FILESDIR}"/${P}-lua-makefile.patch \
+ "${FILESDIR}"/${P}-config.mk.patch
+
+ # Set PREFIX path to include sandbox path
+ sed -e 's:^PREFIX = .*:PREFIX = '${D}'/usr:' -i config.mk || die
+
+ # Set correct LDFLAGS
+ sed -e '/LIBS/aSHARED_LFLAGS += -Wl,-soname,$@' \
+ -i make/include_GCC.mk || die
+
+ # Insert date and version info man pages
+ sed -e 's/<DATE>/21.08.2015/g' \
+ -e "s/VERSION/${PV}/g" \
+ -i doc/*.1 || die
+
+ # Set path to the access daemon, once installed into the system
+ sed -e "/exeprog/s|TOSTRING(ACCESSDAEMON)|\"/usr/sbin/likwid-accessD\"|" \
+ -i src/accessClient.c || die
+
+ # Ensure we build with a non executable stack
+ sed -e "s:CFLAGS += \$(SHARED_CFLAGS):CFLAGS += \$(SHARED_CFLAGS) -g -Wa,--noexecstack:" \
+ -i make/config_defines.mk || die
+
+ if use fortran; then
+
+ # If fortran USE is enabled, enable the fortran interfaces
+ sed -i 's:^FORTRAN_INTERFACE = false:FORTRAN_INTERFACE = likwid.mod:' config.mk || die
+
+ # Set the correct fortrant compiler for GCC
+ sed -i "s:^FC = ifort:FC = ${FC}:" make/include_GCC.mk || die
+
+ # Set the correct FCFLAGS for gcc fortran
+ sed -i '/^FCFLAGS/c\FCFLAGS = -J ./ -fsyntax-only' make/include_GCC.mk || die
+ fi
+
+}
+
+src_install () {
+ default
+ if use fortran; then
+ insinto /usr/include
+ doins likwid.mod
+ fi
+
+ doman doc/*.1
+}
diff --git a/sys-apps/likwid/metadata.xml b/sys-apps/likwid/metadata.xml
index acfac4d06116..fa053a36fa48 100644
--- a/sys-apps/likwid/metadata.xml
+++ b/sys-apps/likwid/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>proxy-maintainers</herd>
<maintainer>