diff options
author | 2020-05-18 02:59:08 -0500 | |
---|---|---|
committer | 2020-05-18 02:59:08 -0500 | |
commit | 868b24b931bc41725ca9bae03ba4ce3f6b33eab0 (patch) | |
tree | 89c741c1af8ee7968cc106d97ee3ad960c0afec8 | |
parent | remove package (diff) | |
download | tamiko-868b24b931bc41725ca9bae03ba4ce3f6b33eab0.tar.gz tamiko-868b24b931bc41725ca9bae03ba4ce3f6b33eab0.tar.bz2 tamiko-868b24b931bc41725ca9bae03ba4ce3f6b33eab0.zip |
sys-apps/likwid: version bump to 5.0.1
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Matthias Maier <tamiko@gentoo.org>
-rw-r--r-- | sys-apps/likwid/Manifest | 1 | ||||
-rw-r--r-- | sys-apps/likwid/likwid-5.0.1-r50.ebuild | 151 |
2 files changed, 152 insertions, 0 deletions
diff --git a/sys-apps/likwid/Manifest b/sys-apps/likwid/Manifest index 4b7da33..1083c92 100644 --- a/sys-apps/likwid/Manifest +++ b/sys-apps/likwid/Manifest @@ -1 +1,2 @@ DIST likwid-4.3.4.tar.gz 1584829 SHA256 5c0d1c66b25dac8292a02232f06454067f031a238f010c62f40ef913c6609a83 SHA512 f1ee930a98d160728078a81a2cdc798ec62ac484545ced937131e6a6443e5ac23b8e597d31c7b1b9f67c1169e1c662c366cf1098158cb467d9f7ff12946b08a2 WHIRLPOOL 956070af7bd2893bfe8bbd994d44ba783795916f3f70e0253501e798b2cc4880a77a541c4089749decd4fd4ba14e7170c3404096b334377ac6caa322d1ed8aaa +DIST likwid-5.0.1.tar.gz 2123648 SHA256 3757b0cb66e8af0116f9288c7f90543acbd8e2af8f72f77aef447ca2b3e76453 SHA512 e4982f3ac83e6413434e05daecf821c1c5f57c4cb19d99e61523c6f0009a2d2cef9c080ac711c72960552170b4d329dd08f73f55de5fb96288e92caaacf8b00b WHIRLPOOL a09a2bea3413ca262042a900cd72ab5142eb84919eca1a1908ea0f47db264c1070c70516c335d4eb3c2479ad1e5c5302b64bbe8e8499a3aa518e910269437fe4 diff --git a/sys-apps/likwid/likwid-5.0.1-r50.ebuild b/sys-apps/likwid/likwid-5.0.1-r50.ebuild new file mode 100644 index 0000000..d8ed294 --- /dev/null +++ b/sys-apps/likwid/likwid-5.0.1-r50.ebuild @@ -0,0 +1,151 @@ +# Copyright 1999-2020 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" + +LICENSE="GPL-3+ BSD MIT" + +SLOT="0" +KEYWORDS="~amd64" # upstream partial support exists for x86 arm arm64 +IUSE="fortran" # ${PYTHON_REQUIRED_USE} + +CDEPEND="dev-lang/perl" + +# filter/json uses Python3 +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=( + "${FILESDIR}/${PN}-4.3.1-fix-gnustack.patch" +) + +pkg_setup() { + fortran-2_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 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" +} |