Gentoo Archives: gentoo-commits

From: Conrad Kostecki <conikost@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lua/luarocks/
Date: Thu, 01 Apr 2021 16:22:41
Message-Id: 1617293886.643883e762be24080ed367fae7e2ece022cc8bd4.conikost@gentoo
1 commit: 643883e762be24080ed367fae7e2ece022cc8bd4
2 Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
3 AuthorDate: Thu Apr 1 16:16:02 2021 +0000
4 Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 1 16:18:06 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=643883e7
7
8 dev-lua/luarocks: bump to version 3.6.0
9
10 Package-Manager: Portage-3.0.17, Repoman-3.0.2
11 Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
12
13 dev-lua/luarocks/Manifest | 1 +
14 dev-lua/luarocks/luarocks-3.6.0.ebuild | 87 ++++++++++++++++++++++++++++++++++
15 2 files changed, 88 insertions(+)
16
17 diff --git a/dev-lua/luarocks/Manifest b/dev-lua/luarocks/Manifest
18 index f4c5e032317..869329f0e56 100644
19 --- a/dev-lua/luarocks/Manifest
20 +++ b/dev-lua/luarocks/Manifest
21 @@ -1 +1,2 @@
22 DIST luarocks-3.5.0.tar.gz 244798 BLAKE2B 24ceead8953ad6d9eefbf471fd49e0bd82256cc00c201395770919a680873544db67f062a4af93ddd390985b0b74db55e37a95516287dfc1e077a25b67c9f264 SHA512 fda01b7149839adf7c0e1c05d0f1793e79575c5d378d96ee1e197828e9b9b6e89a635f8a26a5b71db5b48465ef74b219fac18ecdbd59962cbf9da613b05dd42a
23 +DIST luarocks-3.6.0.tar.gz 246728 BLAKE2B 9e48a3aae391d344e514a9cda1e18db39a95d96a5e9d37a3fc6cdee72815531369c51ea24304bb86d56e46cfdf559314339575a38d9f47898118f1cf172c825e SHA512 f6c66e2bc76899e5153a352274109f3e5d90f9cd2d22ca257b91fb96f53761cc52852aa063e1326416cbe5eb4328207cbbd9310dcb4699dac9a650fb50263135
24
25 diff --git a/dev-lua/luarocks/luarocks-3.6.0.ebuild b/dev-lua/luarocks/luarocks-3.6.0.ebuild
26 new file mode 100644
27 index 00000000000..1745da96355
28 --- /dev/null
29 +++ b/dev-lua/luarocks/luarocks-3.6.0.ebuild
30 @@ -0,0 +1,87 @@
31 +# Copyright 1999-2021 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=7
35 +
36 +LUA_COMPAT=( lua5-{1..4} luajit )
37 +
38 +inherit lua-single
39 +
40 +DESCRIPTION="A package manager for the Lua programming language"
41 +HOMEPAGE="https://luarocks.org"
42 +SRC_URI="https://luarocks.org/releases/${P}.tar.gz"
43 +
44 +LICENSE="MIT"
45 +SLOT="0"
46 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
47 +IUSE="libressl test"
48 +REQUIRED_USE="${LUA_REQUIRED_USE}"
49 +RESTRICT="test"
50 +
51 +RDEPEND="${LUA_DEPS}"
52 +
53 +DEPEND="
54 + net-misc/curl
55 + libressl? ( dev-libs/libressl:0 )
56 + !libressl? ( dev-libs/openssl:0 )
57 + ${RDEPEND}
58 +"
59 +
60 +BDEPEND="
61 + virtual/pkgconfig
62 + test? (
63 + $(lua_gen_cond_dep 'dev-lua/busted[${LUA_USEDEP}]')
64 + $(lua_gen_cond_dep 'dev-lua/busted-htest[${LUA_USEDEP}]')
65 + ${RDEPEND}
66 + )
67 +"
68 +
69 +src_prepare() {
70 + default
71 +
72 + # If 'dev-lang/lua' is a new, fresh installation, no 'LUA_LIBDIR' exists,
73 + # as no compiled modules are installed on a new, fresh installation,
74 + # so this check must be disabled, otherwise 'configure' will fail.
75 + sed -e '/LUA_LIBDIR is not a valid directory/d' -i configure || die
76 +}
77 +
78 +src_configure() {
79 + local myeconfargs=(
80 + "--prefix=${EPREFIX}/usr"
81 + "--rocks-tree=$(lua_get_lmod_dir)"
82 + "--with-lua-include=$(lua_get_include_dir)"
83 + "--with-lua-interpreter=${ELUA}"
84 + "--with-lua-lib=$(lua_get_cmod_dir)"
85 + )
86 +
87 + # Since the configure script is handcrafted,
88 + # and yells at unknown options, do not use 'econf'.
89 + ./configure "${myeconfargs[@]}" || die
90 +}
91 +
92 +src_test() {
93 + busted --lua=${ELUA} || die
94 +}
95 +
96 +src_install() {
97 + default
98 +
99 + { find "${D}" -type f -exec sed -i -e "s:${D}::g" {} \;; } || die
100 +}
101 +
102 +pkg_postinst() {
103 + local lua_abi_ver
104 + if use lua_single_target_luajit; then
105 + lua_abi_ver="5.1"
106 + else
107 + lua_abi_ver=${ELUA#lua}
108 + fi
109 + elog
110 + elog "To manage rocks for a Lua version other than the current ${CATEGORY}/${PN} default (${lua_abi_ver})"
111 + elog "you can use the command-line option --lua-version, e.g."
112 + elog
113 + elog " luarocks --lua-version 5.3 install luasocket"
114 + elog
115 + elog "(use 5.1 for luajit). Note that the relevant Lua version must already be present in the system."
116 + elog
117 +}