summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2020-12-07 13:20:22 +0100
committerMarek Szuba <marecki@gentoo.org>2020-12-07 13:22:09 +0100
commitc44e033f4d003ae9d8cabadcb1a0ce142910cdbe (patch)
tree4a14356a6320979d42983c44a7943d0668488728 /sys-apps/likwid
parentpackage.mask: move the app-admin/lsyncd line (diff)
downloadgentoo-c44e033f4d003ae9d8cabadcb1a0ce142910cdbe.tar.gz
gentoo-c44e033f4d003ae9d8cabadcb1a0ce142910cdbe.tar.bz2
gentoo-c44e033f4d003ae9d8cabadcb1a0ce142910cdbe.zip
sys-apps/likwid-4.3.4: migrate to lua-single.eclass
Supports lua5-2 and lua5-3 as per notes in the original ebuild, builds fine against either. Nb. on my system, even before the migration this ebuild only succeeds if I force MAKEOPTS='-j1' - otherwise while linking likwid executables the linker cannot find the package's own liblikwid.so. Adding a separate package.mask line for migrated ebuilds because there is still one ebuild in the tree which requires the package-wide mask. Closes: https://bugs.gentoo.org/752858 Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'sys-apps/likwid')
-rw-r--r--sys-apps/likwid/likwid-4.3.4.ebuild26
1 files changed, 14 insertions, 12 deletions
diff --git a/sys-apps/likwid/likwid-4.3.4.ebuild b/sys-apps/likwid/likwid-4.3.4.ebuild
index 02a836a19c6d..914ca442fe63 100644
--- a/sys-apps/likwid/likwid-4.3.4.ebuild
+++ b/sys-apps/likwid/likwid-4.3.4.ebuild
@@ -1,31 +1,32 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
FORTRAN_NEEDED=fortran
+LUA_COMPAT=( lua5-{2..3} )
#PYTHON_COMPAT=( python3_{6,7} )
# 4.3.4 will need python-single-r1
-inherit fcaps fortran-2 linux-info toolchain-funcs
+inherit fcaps fortran-2 linux-info lua-single 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}
+IUSE="fortran"
+
+REQUIRED_USE="${LUA_REQUIRED_USE}" # ${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.
+# lua-5.3.
#
# hwloc:
# likwid bundles a MODIFIED copy of hwloc-2.0.0a1 with specific configuration
@@ -41,7 +42,7 @@ IUSE="fortran" # ${PYTHON_REQUIRED_USE}
# Python:
# Python3 is used for one helper script, filter/json, added after 4.3.3
CDEPEND="dev-lang/perl
- dev-lang/lua:5.3"
+ ${LUA_DEPS}"
# filter/json uses Python3
RDEPEND="${CDEPEND}"
@@ -68,6 +69,7 @@ PATCHES=(
pkg_setup() {
fortran-2_pkg_setup
+ lua-single_pkg_setup
#python-single-r1_pkg_setup
}
@@ -104,8 +106,8 @@ export_emake_opts() {
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'
+ # WARNING: setting LUA_LIB_NAME=${ELUA} does *not* work with LuaJIT, keep this on mind
+ # should likwid upstream ever begin to support it.
# If the build is too loud, pass 'Q=@'
src_compile_opts=(
"Q="
@@ -118,9 +120,9 @@ export_emake_opts() {
"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_INCLUDE_DIR=$(lua_get_include_dir)"
+ "LUA_LIB_DIR=$(dirname "$(lua_get_shared_lib)")"
+ "LUA_LIB_NAME=${ELUA}"
"LUA_BIN=/usr/bin"
"FORTRAN_INTERFACE=$(usex fortran likwid.mod false)"
"FC=$(usex fortran "${FC}" false)"