public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Robin H. Johnson" <robbat2@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/likwid/
Date: Sun, 28 Apr 2019 21:03:50 +0000 (UTC)	[thread overview]
Message-ID: <1556485424.4b0ddd59e83ad16026b1ffce47d1b4978c2f806c.robbat2@gentoo> (raw)

commit:     4b0ddd59e83ad16026b1ffce47d1b4978c2f806c
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 28 21:01:08 2019 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Sun Apr 28 21:03:44 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b0ddd59

sys-apps/likwid: bump

Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 sys-apps/likwid/Manifest            |   1 +
 sys-apps/likwid/likwid-4.3.4.ebuild | 186 ++++++++++++++++++++++++++++++++++++
 2 files changed, 187 insertions(+)

diff --git a/sys-apps/likwid/Manifest b/sys-apps/likwid/Manifest
index cc76505f29e..22f882da943 100644
--- a/sys-apps/likwid/Manifest
+++ b/sys-apps/likwid/Manifest
@@ -1 +1,2 @@
 DIST likwid-4.3.3.tar.gz 1579433 BLAKE2B 9ec468bba009dec860b24c9c55c3d6023ffda3ab0985d835796686ba52d1d3372b2bfce926cf229388978de34e1ab0b41d8d27c88623c51c3e8ff1e9d674906b SHA512 ae4d68e238bc40e4a4ab5df628561c9bb7a0ef8727d5779dba2c32fff0be1dd333532bee7e4c197e5fe286de81d35b863ef09f4bc8b9f9145360e6e461f3d94e
+DIST likwid-4.3.4.tar.gz 1584829 BLAKE2B dcd1c3a0c5e549dc3d22bb98120339521e270da55460f5af9f2fe04849af0fe1ac4d9b881883a4efc3695ceb087d1afad5bcc55b55543199d2c33b0f5012cc68 SHA512 f1ee930a98d160728078a81a2cdc798ec62ac484545ced937131e6a6443e5ac23b8e597d31c7b1b9f67c1169e1c662c366cf1098158cb467d9f7ff12946b08a2

diff --git a/sys-apps/likwid/likwid-4.3.4.ebuild b/sys-apps/likwid/likwid-4.3.4.ebuild
new file mode 100644
index 00000000000..eba012a63db
--- /dev/null
+++ b/sys-apps/likwid/likwid-4.3.4.ebuild
@@ -0,0 +1,186 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+FORTRAN_NEEDED=fortran
+#PYTHON_COMPAT=( python3_{5,6,7} )
+
+# 4.3.4 will need python-single-r1
+inherit fcaps fortran-2 linux-info toolchain-funcs
+
+DESCRIPTION="A performance-oriented tool suite for x86 multicore environments"
+HOMEPAGE="https://github.com/rrze-likwid/likwid"
+SRC_URI="https://ftp.fau.de/pub/likwid/${P}.tar.gz"
+
+# If this ebuild is changed to use the bundled Lua-5.3, then MIT should be
+# added to the LICENSE field.
+LICENSE="GPL-3+ BSD"
+
+SLOT="0"
+KEYWORDS="~amd64" # upstream partial support exists for x86 arm arm64
+IUSE="fortran" # ${PYTHON_REQUIRED_USE}
+
+# lua:
+# likwid's primary functionality is driven by a set of lua scripts installed in
+# /usr/bin/
+# likwid bundles lua-5.3.2, AND supports using a system copy of lua-5.2 or
+# lua-5.3, which we use. This ebuild uses the system copy of Lua instead.
+#
+# hwloc:
+# likwid bundles a MODIFIED copy of hwloc-2.0.0a1 with specific configuration
+# for CPU probing & access
+#
+# Perl:
+# likwid uses Perl to convert from an internal text format to ASM listings
+# likwid also uses perl for some installed helper scripts
+# The build system bundles some Perl modules, that are not removed at this time:
+# Parse-RecDescent
+# Template
+#
+# Python:
+# Python3 is used for one helper script, filter/json, added after 4.3.3
+CDEPEND="dev-lang/perl
+	dev-lang/lua:5.3"
+
+# filter/json uses Python3
+RDEPEND="${CDEPEND}"
+	#${PYTHON_DEPS}"
+
+# Part of the build process depends on Data::Dumper
+#	perl-core/Data-Dumper"
+DEPEND="${CDEPEND}"
+
+CONFIG_CHECK="~X86_MSR"
+
+FILECAPS=(
+	-M 755 cap_sys_rawio+ep usr/sbin/likwid-accessD
+	--
+	-M 755 cap_sys_rawio+ep usr/sbin/likwid-setFreq
+)
+
+PATCHES=(
+	"${FILESDIR}/${PN}-4.3.1-fix-gnustack.patch"
+	# Old patches are obsolete:
+	#"${FILESDIR}/${PN}-4.3.1-Makefile.patch"
+	#"${FILESDIR}/${PN}-4.3.1-config.mk.patch"
+)
+
+pkg_setup() {
+	fortran-2_pkg_setup
+	#python-single-r1_pkg_setup
+}
+
+src_prepare() {
+	# Ensure we build with a non executable stack
+	sed \
+		-e '/^SHARED_CFLAGS/s/$/ -Wa,--noexecstack/' \
+		-i make/include_{GCC*,CLANG}.mk \
+		|| die "Failed to set nonexecstack"
+
+	# Make the install targets respect Q= for being quiet or not
+	# MUCH easier for debugging
+	sed -r \
+		-e '/^install/,/^[a-z]/{/^\t@/{ s/@/$(Q)/; }}' \
+		-i \
+		Makefile || die "Failed to sed Makefile"
+
+	sed -i \
+		-e '/^\.NOTPARALLEL:/d' \
+		Makefile \
+		bench/Makefile \
+		ext/hwloc/Makefile || die "Failed to re-enable parallel"
+
+	default
+}
+
+export_emake_opts() {
+	# Warning: this build system uses PREFIX in a way that differs from
+	# autoconf! It's more like:
+	# PREFIX=$(DESTDIR)$(INSTALLED_PREFIX)
+	# it's not 100% like that, because parts of the Makefiles are inconsistent.
+	# this is the same solution used in the upstream RPM specs
+	# these variables are uppercase so they match what's put into Make.
+	local INSTALLED_PREFIX=/usr
+	local INSTALLED_LIBPREFIX=/usr/$(get_libdir) # upstream is '$(INSTALLED_PREFIX)/lib'
+	local INSTALLED_MANPREFIX=/usr/share/man # upstream has it as used but undefined variable.
+	# TODO: support LUA_SINGLE_TARGET here later for Lua 5.2
+	local LUASLOT='5.3'
+	# If the build is too loud, pass 'Q=@'
+	src_compile_opts=(
+		"Q="
+		"INSTALLED_PREFIX=${INSTALLED_PREFIX}"
+		"INSTALLED_LIBPREFIX=${INSTALLED_LIBPREFIX}"
+		"INSTALLED_MANPREFIX=${INSTALLED_MANPREFIX}"
+		"PREFIX=${INSTALLED_PREFIX}"
+		"LIBPREFIX=${INSTALLED_LIBPREFIX}"
+		"MANPREFIX=${INSTALLED_MANPREFIX}"
+		"CC=$(tc-getCC)"
+		"ANSI_CFLAGS=${CFLAGS}"
+		"INSTRUMENT_BENCH=true"
+		"LUA_INCLUDE_DIR=/usr/include/lua${LUASLOT}"
+		"LUA_LIB_DIR=/usr/$(get_libdir)"
+		"LUA_LIB_NAME=lua${LUASLOT}"
+		"LUA_BIN=/usr/bin"
+		"FORTRAN_INTERFACE=$(usex fortran likwid.mod false)"
+		"FC=$(usex fortran "${FC}" false)"
+		"FCFLAGS=-J ./ -fsyntax-only" # needed for building correctly
+	)
+	src_install_opts=(
+		"PREFIX=${D}${INSTALLED_PREFIX}"
+		"LIBPREFIX=${D}${INSTALLED_LIBPREFIX}"
+		"MANPREFIX=${D}${INSTALLED_MANPREFIX}"
+	)
+}
+
+src_compile() {
+	export_emake_opts
+	emake \
+		"${src_compile_opts[@]}" \
+		|| die 'emake failed'
+}
+
+src_install () {
+	export_emake_opts
+	emake \
+		"${src_compile_opts[@]}" \
+		"${src_install_opts[@]}" \
+		DESTDIR="${D}" \
+		install || die 'emake install failed'
+
+	use fortran && doheader likwid.mod
+
+	# Fix Python filter added shortly after 4.3.3
+	#python_fix_shebang "${D}"/usr/share/likwid/filter/
+
+	# Do NOT use 'doman'! The upstream 'make install' target does a sed as it's
+	# generating the final manpage to the real install dir; and the copies in
+	# ${S} are unmodified.
+	dodoc README.md CHANGELOG doc/logo.png
+	dodoc doc/*.txt
+	dodoc doc/*.md
+	dodoc -r doc/applications doc/archs
+	# Fix upstream partial doc install
+	rm -rf "${D}"/usr/share/likwid/docs || die
+	ln -sf "/usr/share/doc/${PF}" "${D}"/usr/share/likwid/docs || die
+}
+
+pkg_preinst() {
+	# This is now a symlink, but used to be a plain directory
+	OLDDOCDIR=/usr/share/likwid/docs
+	if [[ ! -L "${OLDDOCDIR}" && -d "${OLDDOCDIR}" ]]; then
+		einfo "Cleaning up old docdir at ${OLDDOCDIR}"
+		rm -rf "${OLDDOCDIR}" || die
+	fi
+}
+
+pkg_postinst() {
+	fcaps_pkg_postinst
+	einfo "If you get 'Cannot gather values from MSR_PLATFORM_INFO', then 'modprobe msr'!"
+	einfo
+	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\""
+	ewarn "Alternatively, assign the MSR files to a unique group and use mode 0660"
+}


             reply	other threads:[~2019-04-28 21:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-28 21:03 Robin H. Johnson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-07-02  5:20 [gentoo-commits] repo/gentoo:master commit in: sys-apps/likwid/ Matthias Maier
2022-06-03  4:29 Matthias Maier
2018-04-15 18:48 Patrice Clement
2016-11-02 16:19 Göktürk Yüksek
2016-07-19 16:54 Amy Winston
2016-05-12  1:14 Sam Jorna
2016-04-20  9:14 Ian Delaney
2015-09-08  1:37 Ian Delaney
2015-09-01 20:06 Tobias Klausmann
2015-08-26  3:19 Matt Thode

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1556485424.4b0ddd59e83ad16026b1ffce47d1b4978c2f806c.robbat2@gentoo \
    --to=robbat2@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox