1 |
commit: ca240a16a012b7d4c547024841f1f48211e96f1f |
2 |
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Nov 29 00:55:11 2020 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Nov 29 01:32:23 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca240a16 |
7 |
|
8 |
dev-lua/luacheck: migrate to lua eclass |
9 |
|
10 |
Bug: https://bugs.gentoo.org/723156 |
11 |
Bug: https://bugs.gentoo.org/729794 |
12 |
Package-Manager: Portage-3.0.9, Repoman-3.0.2 |
13 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
14 |
|
15 |
...0.23.0-disable-measuring-performance-test.patch | 13 +++++ |
16 |
dev-lua/luacheck/luacheck-0.23.0-r100.ebuild | 65 ++++++++++++++++++++++ |
17 |
profiles/package.mask | 1 + |
18 |
3 files changed, 79 insertions(+) |
19 |
|
20 |
diff --git a/dev-lua/luacheck/files/luacheck-0.23.0-disable-measuring-performance-test.patch b/dev-lua/luacheck/files/luacheck-0.23.0-disable-measuring-performance-test.patch |
21 |
new file mode 100644 |
22 |
index 00000000000..04d40ec958b |
23 |
--- /dev/null |
24 |
+++ b/dev-lua/luacheck/files/luacheck-0.23.0-disable-measuring-performance-test.patch |
25 |
@@ -0,0 +1,13 @@ |
26 |
+--- a/spec/cli_spec.lua |
27 |
++++ b/spec/cli_spec.lua |
28 |
+@@ -68,10 +68,6 @@ |
29 |
+ assert.equal(0, get_exitcode "spec/samples/good_code.lua --no-config") |
30 |
+ end) |
31 |
+ |
32 |
+- it("allows measuring performance", function() |
33 |
+- assert.equal(0, get_exitcode "spec/samples/good_code.lua --no-config --profile") |
34 |
+- end) |
35 |
+- |
36 |
+ it("removes ./ in the beginnings of file names", function() |
37 |
+ assert.equal([[ |
38 |
+ Checking spec/samples/good_code.lua OK |
39 |
|
40 |
diff --git a/dev-lua/luacheck/luacheck-0.23.0-r100.ebuild b/dev-lua/luacheck/luacheck-0.23.0-r100.ebuild |
41 |
new file mode 100644 |
42 |
index 00000000000..995faeb6e69 |
43 |
--- /dev/null |
44 |
+++ b/dev-lua/luacheck/luacheck-0.23.0-r100.ebuild |
45 |
@@ -0,0 +1,65 @@ |
46 |
+# Copyright 1999-2020 Gentoo Authors |
47 |
+# Distributed under the terms of the GNU General Public License v2 |
48 |
+ |
49 |
+EAPI=7 |
50 |
+ |
51 |
+LUA_COMPAT=( lua5-{1..3} luajit ) |
52 |
+ |
53 |
+inherit lua toolchain-funcs |
54 |
+ |
55 |
+DESCRIPTION="A tool for linting and static analysis of Lua code" |
56 |
+HOMEPAGE="https://github.com/mpeterv/luacheck" |
57 |
+SRC_URI="https://github.com/mpeterv/luacheck/archive/${PV}.tar.gz -> ${P}.tar.gz" |
58 |
+ |
59 |
+LICENSE="MIT" |
60 |
+SLOT="0" |
61 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" |
62 |
+IUSE="doc test" |
63 |
+RESTRICT="!test? ( test )" |
64 |
+ |
65 |
+RDEPEND=" |
66 |
+ >=dev-lua/lua-argparse-0.6.0-r100[${LUA_USEDEP}] |
67 |
+ >=dev-lua/lua-utf8-0.1.3-r100[${LUA_USEDEP}] |
68 |
+ >=dev-lua/luafilesystem-1.8.0-r100[${LUA_USEDEP}] |
69 |
+" |
70 |
+ |
71 |
+DEPEND="${RDEPEND}" |
72 |
+ |
73 |
+BDEPEND=" |
74 |
+ virtual/pkgconfig |
75 |
+ doc? ( dev-python/sphinx ) |
76 |
+ test? ( |
77 |
+ >=dev-lua/busted-2.0.0-r100[${LUA_USEDEP}] |
78 |
+ ${RDEPEND} |
79 |
+ ) |
80 |
+" |
81 |
+ |
82 |
+PATCHES=( "${FILESDIR}/${PN}-0.23.0-disable-measuring-performance-test.patch" ) |
83 |
+ |
84 |
+src_compile() { |
85 |
+ if use doc; then |
86 |
+ sphinx-build docsrc html || die |
87 |
+ fi |
88 |
+} |
89 |
+ |
90 |
+lua_src_test() { |
91 |
+ busted --lua=${ELUA} || die |
92 |
+} |
93 |
+ |
94 |
+src_test() { |
95 |
+ lua_foreach_impl lua_src_test |
96 |
+} |
97 |
+ |
98 |
+lua_src_install() { |
99 |
+ insinto "$(lua_get_lmod_dir)" |
100 |
+ doins -r src/luacheck |
101 |
+} |
102 |
+ |
103 |
+src_install() { |
104 |
+ lua_foreach_impl lua_src_install |
105 |
+ |
106 |
+ newbin bin/luacheck.lua luacheck |
107 |
+ |
108 |
+ use doc && local -a HTML_DOCS=( "html/." ) |
109 |
+ einstalldocs |
110 |
+} |
111 |
|
112 |
diff --git a/profiles/package.mask b/profiles/package.mask |
113 |
index 2eaf9456d62..83b1ae122dc 100644 |
114 |
--- a/profiles/package.mask |
115 |
+++ b/profiles/package.mask |
116 |
@@ -518,6 +518,7 @@ dev-lua/luacrypto |
117 |
>=dev-lua/lua-utf8-0.1.3-r100 |
118 |
>=dev-lua/lua-zlib-1.2-r100 |
119 |
>=dev-lua/LuaBitOp-1.0.2-r100 |
120 |
+>=dev-lua/luacheck-0.23.0-r100 |
121 |
>=dev-lua/luadbi-0.7.2-r100 |
122 |
>=dev-lua/luaevent-0.4.6-r100 |
123 |
=dev-lua/luaexpat-1.3.0-r100 |