logo

overlay

My (experimental) gentoo overlay
commit: a68153238637ba20fe5d7f366926cb3179836ad5
parent: b3fa8786793a8b58b65895591445b4cdcc64b3e4
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Fri,  1 Feb 2019 19:31:11 +0100

dev-lua/luarocks: New package (imported from ::gentoo and a bit of ::lua)

Diffstat:

Adev-lua/luarocks/Manifest1+
Adev-lua/luarocks/luarocks-2.2.0.ebuild74++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adev-lua/luarocks/metadata.xml11+++++++++++
3 files changed, 86 insertions(+), 0 deletions(-)

diff --git a/dev-lua/luarocks/Manifest b/dev-lua/luarocks/Manifest @@ -0,0 +1 @@ +DIST luarocks-2.2.0.tar.gz 111549 BLAKE2B 214c1c03e03f95ca1acfc1fda863895c91c508221c615fe3ccc064e9adbcaa8549d24ff788141c0093259ca52578fadccfb3f6891209f86336c57937ac5ec32d SHA512 41f32e383263485758e64df661ecfbd744369035362755c64466f2c52a8740ed941b80cab3212222d7d24e4b1a7ed9ccb84fa66c8e458526056af0b06d97224f diff --git a/dev-lua/luarocks/luarocks-2.2.0.ebuild b/dev-lua/luarocks/luarocks-2.2.0.ebuild @@ -0,0 +1,74 @@ +# 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" + +DEPEND=" + curl? ( net-misc/curl ) + !curl? ( net-misc/wget ) + openssl? ( dev-libs/openssl ) + !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 +} diff --git a/dev-lua/luarocks/metadata.xml b/dev-lua/luarocks/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>contact@hacktivis.me</email> + <name>Haelwenn (lanodan) Monnier</name> + </maintainer> + <use> + <flag name='openssl'></flag> + </use> +</pkgmetadata>