Skip to content

Commit

Permalink
dev-lua/luarocks: bump to version 3.6.0
Browse files Browse the repository at this point in the history
Package-Manager: Portage-3.0.17, Repoman-3.0.2
Signed-off-by: Conrad Kostecki <[email protected]>
  • Loading branch information
ConiKost committed Apr 1, 2021
1 parent 57a5948 commit 643883e
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 0 deletions.
1 change: 1 addition & 0 deletions dev-lua/luarocks/Manifest
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DIST luarocks-3.5.0.tar.gz 244798 BLAKE2B 24ceead8953ad6d9eefbf471fd49e0bd82256cc00c201395770919a680873544db67f062a4af93ddd390985b0b74db55e37a95516287dfc1e077a25b67c9f264 SHA512 fda01b7149839adf7c0e1c05d0f1793e79575c5d378d96ee1e197828e9b9b6e89a635f8a26a5b71db5b48465ef74b219fac18ecdbd59962cbf9da613b05dd42a
DIST luarocks-3.6.0.tar.gz 246728 BLAKE2B 9e48a3aae391d344e514a9cda1e18db39a95d96a5e9d37a3fc6cdee72815531369c51ea24304bb86d56e46cfdf559314339575a38d9f47898118f1cf172c825e SHA512 f6c66e2bc76899e5153a352274109f3e5d90f9cd2d22ca257b91fb96f53761cc52852aa063e1326416cbe5eb4328207cbbd9310dcb4699dac9a650fb50263135
87 changes: 87 additions & 0 deletions dev-lua/luarocks/luarocks-3.6.0.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

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 ~ppc ~ppc64 ~x86"
IUSE="libressl test"
REQUIRED_USE="${LUA_REQUIRED_USE}"
RESTRICT="test"

RDEPEND="${LUA_DEPS}"

DEPEND="
net-misc/curl
libressl? ( dev-libs/libressl:0 )
!libressl? ( 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
}

0 comments on commit 643883e

Please sign in to comment.