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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9A1EC13835A for ; Mon, 16 Nov 2020 17:31:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 819C0E0A10; Mon, 16 Nov 2020 17:31:47 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 62128E0A10 for ; Mon, 16 Nov 2020 17:31:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D6B9D341343 for ; Mon, 16 Nov 2020 17:31:45 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 22F833A9 for ; Mon, 16 Nov 2020 17:31:44 +0000 (UTC) From: "Conrad Kostecki" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Conrad Kostecki" Message-ID: <1605547772.4b5eadf238bca4d1aa983578457d7d15317f1a7b.conikost@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lua/lua-bit32/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lua/lua-bit32/lua-bit32-5.3.5-r101.ebuild X-VCS-Directories: dev-lua/lua-bit32/ X-VCS-Committer: conikost X-VCS-Committer-Name: Conrad Kostecki X-VCS-Revision: 4b5eadf238bca4d1aa983578457d7d15317f1a7b X-VCS-Branch: master Date: Mon, 16 Nov 2020 17:31:44 +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: 7a3a6453-94b5-41ac-b00b-f9e0855a8ab5 X-Archives-Hash: 91f5e885644b77311b8eb481b5265690 commit: 4b5eadf238bca4d1aa983578457d7d15317f1a7b Author: Conrad Kostecki gentoo org> AuthorDate: Mon Nov 16 17:27:59 2020 +0000 Commit: Conrad Kostecki gentoo org> CommitDate: Mon Nov 16 17:29:32 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b5eadf2 dev-lua/lua-bit32: use correct lua version The previous revision used wrongly the system enabled lua instead of the LUA_TARGETS. The change now uses always the correct LUA. Also updated LUA_CPATH to use for each LUA version the correct *.so file. Closes: https://bugs.gentoo.org/752615 Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Conrad Kostecki gentoo.org> dev-lua/lua-bit32/lua-bit32-5.3.5-r101.ebuild | 75 +++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/dev-lua/lua-bit32/lua-bit32-5.3.5-r101.ebuild b/dev-lua/lua-bit32/lua-bit32-5.3.5-r101.ebuild new file mode 100644 index 00000000000..6bb9594da9c --- /dev/null +++ b/dev-lua/lua-bit32/lua-bit32-5.3.5-r101.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2020 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 ~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 +}