From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1226514-garchives=archives.gentoo.org@lists.gentoo.org>
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 BF01C1382C5
	for <garchives@archives.gentoo.org>; Sat, 28 Nov 2020 17:45:05 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id D7B12E07F1;
	Sat, 28 Nov 2020 17:45:03 +0000 (UTC)
Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(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 C2222E07F1
	for <gentoo-commits@lists.gentoo.org>; Sat, 28 Nov 2020 17:45:03 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(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 2513F335D4F
	for <gentoo-commits@lists.gentoo.org>; Sat, 28 Nov 2020 17:45:02 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 97CF3472
	for <gentoo-commits@lists.gentoo.org>; Sat, 28 Nov 2020 17:45:00 +0000 (UTC)
From: "Conrad Kostecki" <conikost@gentoo.org>
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" <conikost@gentoo.org>
Message-ID: <1606585482.9c110dba59b51f182079f56012b1d9988b205bd3.conikost@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lua/luasystem/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-lua/luasystem/luasystem-0.2.1_p0-r101.ebuild
X-VCS-Directories: dev-lua/luasystem/
X-VCS-Committer: conikost
X-VCS-Committer-Name: Conrad Kostecki
X-VCS-Revision: 9c110dba59b51f182079f56012b1d9988b205bd3
X-VCS-Branch: master
Date: Sat, 28 Nov 2020 17:45:00 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 6694685c-c217-4a37-b1b6-fd7cb1b68222
X-Archives-Hash: c409dd740b8f381416daad03a06e9b66

commit:     9c110dba59b51f182079f56012b1d9988b205bd3
Author:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 28 17:23:35 2020 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sat Nov 28 17:44:42 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c110dba

dev-lua/luasystem: fix lua deps

Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 dev-lua/luasystem/luasystem-0.2.1_p0-r101.ebuild | 84 ++++++++++++++++++++++++
 1 file changed, 84 insertions(+)

diff --git a/dev-lua/luasystem/luasystem-0.2.1_p0-r101.ebuild b/dev-lua/luasystem/luasystem-0.2.1_p0-r101.ebuild
new file mode 100644
index 00000000000..cbc542df1f3
--- /dev/null
+++ b/dev-lua/luasystem/luasystem-0.2.1_p0-r101.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( lua5-{1..3} luajit )
+MY_PV="${PV/_p/-}"
+
+inherit lua toolchain-funcs
+
+DESCRIPTION="Platform independent system calls for Lua"
+HOMEPAGE="https://github.com/o-lim/luasystem/"
+SRC_URI="https://github.com/o-lim/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="${LUA_DEPS}"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	virtual/pkgconfig
+	test? (
+		>=dev-lua/busted-2.0.0-r100[${LUA_USEDEP}]
+		${RDEPEND}
+	)
+"
+
+PATCHES=( "${FILESDIR}"/${P}-fix-makefile.patch )
+
+lua_src_test() {
+	busted --lua=${ELUA} || die
+}
+
+src_test() {
+	lua_foreach_impl lua_src_test
+}
+
+lua_src_compile() {
+	# Clean project, to compile it for every lua slot
+	emake clean
+
+	local myemakeargs=(
+		"CC=$(tc-getCC)"
+		"LD=$(tc-getCC)"
+		"LUAINC_linux=$(lua_get_include_dir)"
+		"MYCFLAGS=${CFLAGS}"
+		"MYLDFLAGS=${LDFLAGS}"
+	)
+
+	emake "${myemakeargs[@]}" linux
+
+	# Copy module to match the choosen LUA implementation
+	cp "src/core.so" "src/core-${ELUA}.so" || die
+}
+
+src_compile() {
+	lua_foreach_impl lua_src_compile
+}
+
+lua_src_install () {
+	# Use correct module for the choosen LUA implementation
+	cp "src/core-${ELUA}.so" "src/core.so" || die
+
+	local emakeargs=(
+		"INSTALL_TOP_CDIR=${ED}/$(lua_get_cmod_dir)"
+		"INSTALL_TOP_LDIR=${ED}/$(lua_get_lmod_dir)"
+		"LUA_INC=${ED}/$(lua_get_include_dir)"
+	)
+
+	emake "${emakeargs[@]}" install
+
+	insinto $(lua_get_lmod_dir)/system
+	doins system/init.lua
+}
+
+src_install() {
+	lua_foreach_impl lua_src_install
+
+	einstalldocs
+}