commit: 47e96dd268327eb676fc83901c10debd34d9e944
parent: 62667d1e6b7545de16142a895e8465cf9fb7fe99
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Wed, 20 Mar 2019 23:55:55 +0100
dev-lua/luarocks: Bump to 2.4.4 (latest of 2.x.y)
Diffstat:
2 files changed, 78 insertions(+), 0 deletions(-)
diff --git a/dev-lua/luarocks/Manifest b/dev-lua/luarocks/Manifest
@@ -1 +1,2 @@
DIST luarocks-2.2.0.tar.gz 111549 BLAKE2B 214c1c03e03f95ca1acfc1fda863895c91c508221c615fe3ccc064e9adbcaa8549d24ff788141c0093259ca52578fadccfb3f6891209f86336c57937ac5ec32d SHA512 41f32e383263485758e64df661ecfbd744369035362755c64466f2c52a8740ed941b80cab3212222d7d24e4b1a7ed9ccb84fa66c8e458526056af0b06d97224f
+DIST luarocks-2.4.4.tar.gz 140452 BLAKE2B 34564294942d2127b96825d9d788cbfa116fda4560da48970036c911bcda3f431f62a4615adf06a82ce3419a774adfe33b6cbac05fd6b5463b5c4d914fd4d952 SHA512 cbc6a54aa5077e656dcb4fed915fe8b66cad4ad04f28700e2f67805232a6dc366d4ac03e3a85e27a45b178c362ae8aa905ceab5553252735e049730a28450e19
diff --git a/dev-lua/luarocks/luarocks-2.4.4.ebuild b/dev-lua/luarocks/luarocks-2.4.4.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Copyright 2019 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit lua
+
+DESCRIPTION="A deployment and management system for Lua modules"
+HOMEPAGE="http://www.luarocks.org"
+SRC_URI="http://luarocks.org/releases/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc x86"
+IUSE="curl openssl libressl"
+
+DEPEND="
+ curl? ( net-misc/curl )
+ !curl? ( net-misc/wget )
+ openssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )
+ )
+ !openssl? ( sys-apps/coreutils )
+"
+RDEPEND="
+ ${DEPEND}
+ app-arch/unzip
+"
+
+all_lua_prepare() {
+ # Don't die on gentoo's econf calls!
+ sed -r \
+ -e "/die.*Unknown flag:/d" \
+ -i configure
+ lua_default
+}
+
+each_lua_configure() {
+ local md5 downloader lua incdir
+ md5="md5sum"
+ downloader="wget"
+ lua="$(lua_get_lua)"
+ incdir=$(lua_get_pkgvar includedir)
+
+ use curl && downloader="curl"
+ use openssl && md5="openssl"
+
+ myeconfargs=()
+ myeconfargs+=(
+ --prefix=/usr
+ --with-lua=/usr
+ --with-lua-lib="/usr/$(get_libdir)"
+ --rocks-tree=/usr
+ --with-downloader="${downloader}"
+ --with-md5-checker="${md5}"
+ --lua-suffix="${lua//lua}"
+ --lua-version="$(lua_get_abi)"
+ --with-lua-include="${incdir}"
+ --sysconfdir=/etc/${PN}
+ )
+ lua_default
+}
+
+each_lua_compile() {
+ lua_default build
+}
+
+pkg_preinst() {
+ local abi="$(lua_get_abi)"
+ find "${D}" -type f | xargs sed -e "s:${D}::g" -i || die "sed failed"
+ for l in luarocks{,-admin}; do
+ rm "${D}/usr/bin/${l}"
+ dosym "${l}-${abi}" "/usr/bin/${l}"
+ done
+}