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