summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-lua/luacheck/Manifest1
-rw-r--r--dev-lua/luacheck/luacheck-0.21.1.ebuild48
-rw-r--r--dev-lua/luacheck/metadata.xml12
3 files changed, 61 insertions, 0 deletions
diff --git a/dev-lua/luacheck/Manifest b/dev-lua/luacheck/Manifest
new file mode 100644
index 0000000..77f3950
--- /dev/null
+++ b/dev-lua/luacheck/Manifest
@@ -0,0 +1 @@
+DIST luacheck-0.21.1.tar.gz 136483 SHA256 88e0c1c9106a4f8c2995b1ee6e83ce8b02ec2796557e8603235dd160b2fb5eb4 SHA512 c34d72374ecf3a3c994588d34a325099a7f2f28c7f0e921952eaabaf13372db2c456e92ac174b8f3724b412da6025d83a41836594480d21d3f6973668eca5f0c WHIRLPOOL 8f2fa6768d207962ef17eba303813ac8b18cc6876f181c65d09a6a3e73114c480703886f123c451d7a87d88e64f4928bf32b1958aa7a5d242e285a9e5af06a7c
diff --git a/dev-lua/luacheck/luacheck-0.21.1.ebuild b/dev-lua/luacheck/luacheck-0.21.1.ebuild
new file mode 100644
index 0000000..b45c1fc
--- /dev/null
+++ b/dev-lua/luacheck/luacheck-0.21.1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit toolchain-funcs
+
+DESCRIPTION="A tool for linting and static analysis of Lua code"
+HOMEPAGE="https://github.com/mpeterv/luacheck"
+SRC_URI="https://github.com/mpeterv/luacheck/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc luajit test"
+
+RDEPEND="
+ dev-lua/luafilesystem[luajit=]
+ !luajit? ( >=dev-lang/lua-5.1:= )
+ luajit? ( dev-lang/luajit:2 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( dev-python/sphinx )
+ test? ( dev-lua/busted )"
+
+DOCS=( CHANGELOG.md README.md )
+
+src_compile() {
+ if use doc; then
+ sphinx-build docsrc html || die
+ fi
+}
+
+src_test() {
+ busted -o gtest || die
+}
+
+src_install() {
+ local instdir
+ instdir="$($(tc-getPKG_CONFIG) --variable INSTALL_LMOD $(usex luajit 'luajit' 'lua'))"
+ insinto "${instdir#${EPREFIX}}"
+ doins -r src/luacheck
+
+ newbin bin/luacheck.lua luacheck
+
+ use doc && HTML_DOCS+=( html/. )
+
+ einstalldocs
+}
diff --git a/dev-lua/luacheck/metadata.xml b/dev-lua/luacheck/metadata.xml
new file mode 100644
index 0000000..f28e479
--- /dev/null
+++ b/dev-lua/luacheck/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>lua.overlay@mva.name</email>
+ <name>Vadim Misbakh-Soloviov</name>
+ </maintainer>
+ <use>
+ <flag name="luajit">Use <pkg>dev-lang/luajit</pkg> instead of
+ <pkg>dev-lang/lua</pkg></flag>
+ </use>
+</pkgmetadata>