summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Delaney <idella4@gentoo.org>2015-11-17 15:14:00 +0800
committerIan Delaney <idella4@gentoo.org>2015-11-17 15:14:48 +0800
commitfbcefa3e84142dec0d95f60095ca09f9f64034e7 (patch)
treeabe96183a4a96fcee0b32289fef1394e993da8b2 /sys-apps/likwid/likwid-4.0.1-r1.ebuild
parentapp-editors/emacs-vcs: Remove old. (diff)
downloadgentoo-fbcefa3e84142dec0d95f60095ca09f9f64034e7.tar.gz
gentoo-fbcefa3e84142dec0d95f60095ca09f9f64034e7.tar.bz2
gentoo-fbcefa3e84142dec0d95f60095ca09f9f64034e7.zip
sys-apps/likwid: revbump to vn. 4.0.1-r1, sourced from gentoo bug
Patches, ack to user Libor Bukata, final patches by proxy maintainer sourced from the gentoo bug used for initial version bump to likwid-4.0.1 likwid-4.0.1-access-daemon.patch added to reset perms and set libdir correctly at install phase, rm broken 4.0.1 ebuild Gentoo bug: # 558402 Package-Manager: portage-2.2.24
Diffstat (limited to 'sys-apps/likwid/likwid-4.0.1-r1.ebuild')
-rw-r--r--sys-apps/likwid/likwid-4.0.1-r1.ebuild100
1 files changed, 100 insertions, 0 deletions
diff --git a/sys-apps/likwid/likwid-4.0.1-r1.ebuild b/sys-apps/likwid/likwid-4.0.1-r1.ebuild
new file mode 100644
index 000000000000..11e04c2b90a2
--- /dev/null
+++ b/sys-apps/likwid/likwid-4.0.1-r1.ebuild
@@ -0,0 +1,100 @@
+# 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"
+# Upstream have made a habit of making changes to the tagged realesed tarball
+SRC_URI="https://dev.gentoo.org/~idella4/tarballs/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"
+
+RESTRICT="mirror"
+
+CONFIG_CHECK="~X86_MSR"
+
+FILECAPS=(
+ cap_sys_rawio usr/sbin/likwid-accessD --
+ cap_sys_rawio usr/bin/likwid-{perfctr,bench,powermeter}
+)
+
+S=${WORKDIR}/likwid-likwid-${PV}
+
+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 \
+ "${FILESDIR}"/${P}-access-daemon.patch
+
+ # Set PREFIX path to include sandbox path
+ sed -e 's:^PREFIX = .*:PREFIX = '${D}'/usr:' -i config.mk || die
+
+ # Set the path to library directory.
+ sed -e 's:$(get_libdir):'$(get_libdir)':' -i config.mk || die "Cannot set library path!"
+
+ # 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
+}
+
+pkg_postinst() {
+ fcaps_pkg_postinst
+ ewarn "To enable users to access performance counters it is necessary to"
+ ewarn "change the access permissions to /dev/cpu/msr[0]* devices."
+ ewarn "It can be accomplished by adding the following line to file"
+ ewarn "/etc/udev/rules.d/99-myrules.rules: KERNEL==\"msr[0-9]*\" MODE=\"0666\""
+}