mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-23 23:27:12 -08:00
Merge updates from master
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
DIST likwid-5.2.1.tar.gz 2308041 BLAKE2B 1913212fb5157365a439757018ab58b4555e2b4401575ee05c784d038e13296644a7d0a89769599eef0444b13ed10f0357ad09b9cbae712f7d1fb9cca65fb1e3 SHA512 f096dcc071e976284c874aeb254dcb83c66ae808876a8c6be7b05e359d06800f1da25c01c072950c3493eb9ca10f6f9d81624feef61cc7a01f40fc0d003f98a7
|
||||
DIST likwid-5.2.2.tar.gz 2312420 BLAKE2B ceb5ee35fc266e6669f5a304bc222ae5fa598b76b0b2af9b37a214279033e8189f6c7726bdb41ad111f331a2fea52f6ff49cf190d7150b813ea651dbdc06d53f SHA512 5949933341092a1ccb81add47771c8e5613c9faef8650d70ed8e7f81cee4e6d87bc6838686873bd6270f4cfef3fd57d8a69b067f943134e4ac08c14664105d0d
|
||||
DIST likwid-5.5.1.tar.gz 2983328 BLAKE2B 1bbd95a3f88bb66b2f3e4f21f2bdac08b25d361327df6a9fa36985d56b2bfa681f5fb549e92fc29d720bbe6cc941a2681c6ae59709c7475c645f9a3b45dfec22 SHA512 835deb868dfe6cd6eeecf6be861ca73e5fba53525037bc3424ddaf4a96aa2b1ddbcd323094d9db634220b8bab935c51cc322a0995cf9b407e4fe2757817784aa
|
||||
DIST likwid-5.5.2.tar.gz 2986555 BLAKE2B 3d0f507b885dacffdcc5d7d80aeb5491d66db9d5f668b09fef862953bc5fe05e492d7daee0c5c2418a74688c248257bbdd6c7dbd99e1109b919fe307533be683 SHA512 bdbb6f3b327258b066a82cf78dd8aaecd5ccbf4723dd86051a5a0c09750b336de499ed3da16f701a903e6d00945103e0d2076822e44404d5b74172703d3fcea8
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
FORTRAN_NEEDED=fortran
|
||||
|
||||
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"
|
||||
|
||||
LICENSE="GPL-3+ BSD MIT"
|
||||
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64" # upstream partial support exists for x86 arm arm64
|
||||
IUSE="fortran"
|
||||
|
||||
CDEPEND="dev-lang/perl"
|
||||
|
||||
RDEPEND="${CDEPEND}"
|
||||
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=(
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
fortran-2_pkg_setup
|
||||
linux-info_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.
|
||||
# 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"
|
||||
"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
|
||||
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"
|
||||
}
|
||||
Reference in New Issue
Block a user