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