summaryrefslogtreecommitdiff
path: root/dev-lua/LuaBitOp/LuaBitOp-1.0.2-r102.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-03-12 21:55:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-03-12 21:55:15 +0000
commit7218e1b46bceac05841e90472501742d905fb3fc (patch)
tree56fae051db521b8fce8014cbc8b11484885b14b3 /dev-lua/LuaBitOp/LuaBitOp-1.0.2-r102.ebuild
parent6d691ad5b6239929063441bbd14c489e92e7396e (diff)
gentoo resync : 12.03.2021
Diffstat (limited to 'dev-lua/LuaBitOp/LuaBitOp-1.0.2-r102.ebuild')
-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() {