From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1342401-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 91D69158088
	for <garchives@archives.gentoo.org>; Mon, 22 Nov 2021 21:24:42 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id B02CEE0839;
	Mon, 22 Nov 2021 21:24:41 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 80207E0839
	for <gentoo-commits@lists.gentoo.org>; Mon, 22 Nov 2021 21:24:41 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 97A7E3432D4
	for <gentoo-commits@lists.gentoo.org>; Mon, 22 Nov 2021 21:24:40 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 86D6C1DD
	for <gentoo-commits@lists.gentoo.org>; Mon, 22 Nov 2021 21:24:37 +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: <1637615926.efe84b856780a440dc58cf0cff4acb5b5c5ef54c.conikost@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lua/luarocks/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-lua/luarocks/Manifest dev-lua/luarocks/luarocks-3.8.0.ebuild
X-VCS-Directories: dev-lua/luarocks/
X-VCS-Committer: conikost
X-VCS-Committer-Name: Conrad Kostecki
X-VCS-Revision: efe84b856780a440dc58cf0cff4acb5b5c5ef54c
X-VCS-Branch: master
Date: Mon, 22 Nov 2021 21:24:37 +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: 52575939-7c3e-4721-a41a-19fb3b36f906
X-Archives-Hash: 21922574f1e4a104db6194bef3088a36

commit:     efe84b856780a440dc58cf0cff4acb5b5c5ef54c
Author:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 22 21:18:46 2021 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Mon Nov 22 21:18:46 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=efe84b85

dev-lua/luarocks: add 3.8.0

Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 dev-lua/luarocks/Manifest              |  1 +
 dev-lua/luarocks/luarocks-3.8.0.ebuild | 86 ++++++++++++++++++++++++++++++++++
 2 files changed, 87 insertions(+)

diff --git a/dev-lua/luarocks/Manifest b/dev-lua/luarocks/Manifest
index 4683f7a36437..78ef2f858ee5 100644
--- a/dev-lua/luarocks/Manifest
+++ b/dev-lua/luarocks/Manifest
@@ -1 +1,2 @@
 DIST luarocks-3.7.0.tar.gz 247576 BLAKE2B b1e119ec897bc8122441445dc215e628d2415dacba9b23c2b075f82a01e21e6e9a8eeab5a3345355d85c566ff9f85ab29194580674521d4d92725b01377ee940 SHA512 cc3c555c488da9f95a118eedb74cb9e2a38b572e172958843dabebce125524e58a13ac65e89a349deb8fef13b6de751074fc3adbb430ab55d4e4109288119153
+DIST luarocks-3.8.0.tar.gz 249787 BLAKE2B 2bfff5af400abfdf17a0eacd1f29838dd77751f2ba085d6c6fc18dfc971ea796523781ff2488566d42c01d005bd5037171bf1aabbfdd664746c55674e3ca32c7 SHA512 6c30884c60da57706228a9870f510a1bce435b2d5d67c63c5f2958b152c7a2b334bd74a016995871e3b05b98374f4c4e008993ede81f9fc564980e183bdf06b2

diff --git a/dev-lua/luarocks/luarocks-3.8.0.ebuild b/dev-lua/luarocks/luarocks-3.8.0.ebuild
new file mode 100644
index 000000000000..c3c1e40609f5
--- /dev/null
+++ b/dev-lua/luarocks/luarocks-3.8.0.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{1..4} luajit )
+
+inherit lua-single
+
+DESCRIPTION="A package manager for the Lua programming language"
+HOMEPAGE="https://luarocks.org"
+SRC_URI="https://luarocks.org/releases/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="test"
+REQUIRED_USE="${LUA_REQUIRED_USE}"
+RESTRICT="test"
+
+RDEPEND="${LUA_DEPS}"
+
+DEPEND="
+	net-misc/curl
+	dev-libs/openssl:0
+	${RDEPEND}
+"
+
+BDEPEND="
+	virtual/pkgconfig
+	test? (
+		$(lua_gen_cond_dep 'dev-lua/busted[${LUA_USEDEP}]')
+		$(lua_gen_cond_dep 'dev-lua/busted-htest[${LUA_USEDEP}]')
+		${RDEPEND}
+	)
+"
+
+src_prepare() {
+	default
+
+	# If 'dev-lang/lua' is a new, fresh installation, no 'LUA_LIBDIR' exists,
+	# as no compiled modules are installed on a new, fresh installation,
+	# so this check must be disabled, otherwise 'configure' will fail.
+	sed -e '/LUA_LIBDIR is not a valid directory/d' -i configure || die
+}
+
+src_configure() {
+	local myeconfargs=(
+		"--prefix=${EPREFIX}/usr"
+		"--rocks-tree=$(lua_get_lmod_dir)"
+		"--with-lua-include=$(lua_get_include_dir)"
+		"--with-lua-interpreter=${ELUA}"
+		"--with-lua-lib=$(lua_get_cmod_dir)"
+	)
+
+	# Since the configure script is handcrafted,
+	# and yells at unknown options, do not use 'econf'.
+	./configure "${myeconfargs[@]}" || die
+}
+
+src_test() {
+	busted --lua=${ELUA} || die
+}
+
+src_install() {
+	default
+
+	{ find "${D}" -type f -exec sed -i -e "s:${D}::g" {} \;; } || die
+}
+
+pkg_postinst() {
+	local lua_abi_ver
+	if use lua_single_target_luajit; then
+		lua_abi_ver="5.1"
+	else
+		lua_abi_ver=${ELUA#lua}
+	fi
+	elog
+	elog "To manage rocks for a Lua version other than the current ${CATEGORY}/${PN} default (${lua_abi_ver})"
+	elog "you can use the command-line option --lua-version, e.g."
+	elog
+	elog "    luarocks --lua-version 5.3 install luasocket"
+	elog
+	elog "(use 5.1 for luajit). Note that the relevant Lua version must already be present in the system."
+	elog
+}