diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-03-20 14:27:17 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-03-20 14:27:17 +0000 |
commit | 5bb9ff1ee56d2b5e75e01a7f066d8b0cec84ec02 (patch) | |
tree | 66e860a5099bcad013f1cf667255dc372a7c11b3 /dev-lua/lua-bit32/lua-bit32-5.3.5.1.ebuild | |
parent | 7218e1b46bceac05841e90472501742d905fb3fc (diff) |
gentoo resync : 20.03.2021
Diffstat (limited to 'dev-lua/lua-bit32/lua-bit32-5.3.5.1.ebuild')
-rw-r--r-- | dev-lua/lua-bit32/lua-bit32-5.3.5.1.ebuild | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/dev-lua/lua-bit32/lua-bit32-5.3.5.1.ebuild b/dev-lua/lua-bit32/lua-bit32-5.3.5.1.ebuild new file mode 100644 index 000000000000..6ea0b9148ee4 --- /dev/null +++ b/dev-lua/lua-bit32/lua-bit32-5.3.5.1.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +LUA_COMPAT=( lua5-1 luajit ) + +MY_PN="lua-compat-5.3" +MY_PV="0.10" + +inherit lua toolchain-funcs + +DESCRIPTION="Backported Lua bit manipulation library" +HOMEPAGE="https://github.com/keplerproject/lua-compat-5.3" +SRC_URI="https://github.com/keplerproject/${MY_PN}/archive/v${MY_PV}.tar.gz -> lua-compat53-${MY_PV}.tar.gz" +S="${WORKDIR}/${MY_PN}-${MY_PV}" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="amd64 arm arm64 ~sparc x86 ~amd64-linux ~x86-linux" +IUSE="test" +REQUIRED_USE="${LUA_REQUIRED_USE}" +RESTRICT="!test? ( test )" + +DEPEND="${LUA_DEPS}" +RDEPEND="${DEPEND}" + +lua_src_compile() { + local compiler=( + "$(tc-getCC)" + "${CFLAGS}" + "-fPIC" + "${LDFLAGS}" + "-DLUA_COMPAT_BITLIB" + "-Ic-api" + "$(lua_get_CFLAGS)" + "-c lbitlib.c" + "-o lbitlib-${ELUA}.o" + ) + einfo "${compiler[@]}" + ${compiler[@]} || die + + local linker=( + "$(tc-getCC)" + "-shared" + "${LDFLAGS}" + "-o bit32-${ELUA}.so" + "lbitlib-${ELUA}.o" + ) + einfo "${linker[@]}" + ${linker[@]} || die +} + +src_compile() { + lua_foreach_impl lua_src_compile +} + +lua_src_test() { + LUA_CPATH="./bit32-${ELUA}.so" "${ELUA}" "tests/test-bit32.lua" || die +} + +src_test() { + lua_foreach_impl lua_src_test +} + +lua_src_install() { + exeinto "$(lua_get_cmod_dir)" + newexe "bit32-${ELUA}.so" "bit32.so" +} + +src_install() { + default + + lua_foreach_impl lua_src_install +} |