From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0FCA3158091 for ; Fri, 3 Jun 2022 04:30:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 33E4FE0824; Fri, 3 Jun 2022 04:30:02 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 00BE1E0824 for ; Fri, 3 Jun 2022 04:30:01 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D83C634254A for ; Fri, 3 Jun 2022 04:30:00 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9E185326 for ; Fri, 3 Jun 2022 04:29:58 +0000 (UTC) From: "Matthias Maier" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matthias Maier" Message-ID: <1654230591.1efac637754de80ed8bb6f397c16d44cfcc334c4.tamiko@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/likwid/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/likwid/Manifest sys-apps/likwid/likwid-5.2.1.ebuild X-VCS-Directories: sys-apps/likwid/ X-VCS-Committer: tamiko X-VCS-Committer-Name: Matthias Maier X-VCS-Revision: 1efac637754de80ed8bb6f397c16d44cfcc334c4 X-VCS-Branch: master Date: Fri, 3 Jun 2022 04:29:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: dea89e0b-e1e8-486b-a322-0f2b0ae71690 X-Archives-Hash: 0c30f7b729776b808bfbb8dd534fa384 commit: 1efac637754de80ed8bb6f397c16d44cfcc334c4 Author: Matthias Maier gentoo org> AuthorDate: Fri Jun 3 04:26:53 2022 +0000 Commit: Matthias Maier gentoo org> CommitDate: Fri Jun 3 04:29:51 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1efac637 sys-apps/likwid: add 5.2.1 Closes: https://bugs.gentoo.org/800106 Closes: https://bugs.gentoo.org/808225 Closes: https://bugs.gentoo.org/822141 Closes: https://bugs.gentoo.org/828825 Signed-off-by: Matthias Maier gentoo.org> sys-apps/likwid/Manifest | 1 + sys-apps/likwid/likwid-5.2.1.ebuild | 147 ++++++++++++++++++++++++++++++++++++ 2 files changed, 148 insertions(+) diff --git a/sys-apps/likwid/Manifest b/sys-apps/likwid/Manifest index 16c593487b67..0ad4fd9fba92 100644 --- a/sys-apps/likwid/Manifest +++ b/sys-apps/likwid/Manifest @@ -1 +1,2 @@ DIST likwid-4.3.4.tar.gz 1584829 BLAKE2B dcd1c3a0c5e549dc3d22bb98120339521e270da55460f5af9f2fe04849af0fe1ac4d9b881883a4efc3695ceb087d1afad5bcc55b55543199d2c33b0f5012cc68 SHA512 f1ee930a98d160728078a81a2cdc798ec62ac484545ced937131e6a6443e5ac23b8e597d31c7b1b9f67c1169e1c662c366cf1098158cb467d9f7ff12946b08a2 +DIST likwid-5.2.1.tar.gz 2308041 BLAKE2B 1913212fb5157365a439757018ab58b4555e2b4401575ee05c784d038e13296644a7d0a89769599eef0444b13ed10f0357ad09b9cbae712f7d1fb9cca65fb1e3 SHA512 f096dcc071e976284c874aeb254dcb83c66ae808876a8c6be7b05e359d06800f1da25c01c072950c3493eb9ca10f6f9d81624feef61cc7a01f40fc0d003f98a7 diff --git a/sys-apps/likwid/likwid-5.2.1.ebuild b/sys-apps/likwid/likwid-5.2.1.ebuild new file mode 100644 index 000000000000..ed2192fcf1bc --- /dev/null +++ b/sys-apps/likwid/likwid-5.2.1.ebuild @@ -0,0 +1,147 @@ +# Copyright 1999-2022 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=( + "${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 + 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" +}