summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Bauman <bman@gentoo.org>2021-03-09 13:54:29 -0500
committerAaron Bauman <bman@gentoo.org>2021-03-09 13:55:19 -0500
commit845521d116e91e6ed9c0f048ef2744486e626b0a (patch)
tree228482934e276ecada06826201f467f6fc38509d /dev-lua/LuaBitOp
parentapp-doc/gnucash-docs: Cleanup (diff)
downloadgentoo-845521d116e91e6ed9c0f048ef2744486e626b0a.tar.gz
gentoo-845521d116e91e6ed9c0f048ef2744486e626b0a.tar.bz2
gentoo-845521d116e91e6ed9c0f048ef2744486e626b0a.zip
dev-lua/LuaBitOp: fix build on Darwin; keyword ~x64-macos
Signed-off-by: Aaron Bauman <bman@gentoo.org>
Diffstat (limited to 'dev-lua/LuaBitOp')
-rw-r--r--dev-lua/LuaBitOp/LuaBitOp-1.0.2-r102.ebuild15
1 files changed, 13 insertions, 2 deletions
diff --git a/dev-lua/LuaBitOp/LuaBitOp-1.0.2-r102.ebuild b/dev-lua/LuaBitOp/LuaBitOp-1.0.2-r102.ebuild
index 617860f3937a..7aff8d1d405a 100644
--- a/dev-lua/LuaBitOp/LuaBitOp-1.0.2-r102.ebuild
+++ b/dev-lua/LuaBitOp/LuaBitOp-1.0.2-r102.ebuild
@@ -5,7 +5,7 @@ EAPI=7
LUA_COMPAT=( lua5-{1..2} luajit )
-inherit lua toolchain-funcs
+inherit flag-o-matic lua toolchain-funcs
DESCRIPTION="Bit Operations Library for the Lua Programming Language"
HOMEPAGE="http://bitop.luajit.org"
@@ -13,7 +13,7 @@ SRC_URI="http://bitop.luajit.org/download/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
-KEYWORDS="amd64 arm ~arm64 ~hppa ~mips ppc ppc64 sparc x86"
+KEYWORDS="amd64 arm ~arm64 ~hppa ~mips ppc ppc64 sparc x86 ~x64-macos"
IUSE="test"
REQUIRED_USE="${LUA_REQUIRED_USE}"
RESTRICT="!test? ( test )"
@@ -45,6 +45,9 @@ lua_src_compile() {
}
src_compile() {
+ if [[ $CHOST == *-darwin* ]] ; then
+ append-ldflags "-undefined dynamic_lookup"
+ fi
lua_foreach_impl lua_src_compile
}
@@ -77,6 +80,14 @@ lua_src_install() {
doexe bit.so
popd
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ local luav=$(lua_get_version)
+ # we only want the major version (e.g. 5.1)
+ local luamv=${luav:0:3}
+ local file="lua/${luamv}/bit.so"
+ install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${file}" "${ED}/usr/$(get_libdir)/${file}" || die "Failed to adjust install_name"
+ fi
}
src_install() {