commit:     d089d1b7118de53261993cec0cac16dc75b4053d
Author:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 28 16:15:50 2020 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sat Nov 28 16:16:42 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d089d1b7

dev-lua/busted: migrate to lua eclass

Also adding tests.

Bug: https://bugs.gentoo.org/628758
Closes: https://bugs.gentoo.org/584694
Closes: https://bugs.gentoo.org/752921
Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 dev-lua/busted/busted-2.0.0-r100.ebuild | 63 +++++++++++++++++++++++++++++++++
 dev-lua/busted/metadata.xml             |  6 +++-
 profiles/package.mask                   |  1 +
 3 files changed, 69 insertions(+), 1 deletion(-)

diff --git a/dev-lua/busted/busted-2.0.0-r100.ebuild 
b/dev-lua/busted/busted-2.0.0-r100.ebuild
new file mode 100644
index 00000000000..7653e068ddc
--- /dev/null
+++ b/dev-lua/busted/busted-2.0.0-r100.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( lua5-{1..3} luajit )
+
+inherit lua toolchain-funcs
+
+DESCRIPTION="Elegant Lua unit testing"
+HOMEPAGE="http://olivinelabs.com/busted/";
+SRC_URI="https://github.com/Olivine-Labs/${PN}/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
+IUSE="test"
+REQUIRED_USE="${LUA_REQUIRED_USE}"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       >=dev-lua/lua_cliargs-3.0_p2-r100
+       >=dev-lua/luafilesystem-1.8.0-r100
+       >=dev-lua/luasystem-0.2.1_p0-r100
+       >=dev-lua/dkjson-2.5-r100
+       >=dev-lua/say-1.3_p1-r100
+       >=dev-lua/luassert-1.8.0-r100
+       >=dev-lua/lua-term-0.7-r100
+       >=dev-lua/penlight-1.7.0-r100
+       >=dev-lua/mediator_lua-1.1.2_p0-r100
+       ${LUA_DEPS}
+"
+
+DEPEND="${RDEPEND}"
+
+BDEPEND="
+       virtual/pkgconfig
+       test? (
+               >=dev-lua/busted-2.0.0-r100
+               ${RDEPEND}
+       )
+"
+
+lua_src_test() {
+       busted --lua=${ELUA} || die
+}
+
+src_test() {
+       lua_foreach_impl lua_src_test
+}
+
+lua_src_install() {
+       insinto $(lua_get_lmod_dir)
+       doins -r busted
+}
+
+src_install() {
+       dobin bin/busted
+
+       lua_foreach_impl lua_src_install
+
+       einstalldocs
+}

diff --git a/dev-lua/busted/metadata.xml b/dev-lua/busted/metadata.xml
index e8e32b1eb33..3c09cac5695 100644
--- a/dev-lua/busted/metadata.xml
+++ b/dev-lua/busted/metadata.xml
@@ -5,7 +5,11 @@
                <email>[email protected]</email>
                <name>William Hubbs</name>
        </maintainer>
-       <longdescription lang="en">
+       <maintainer type="person">
+               <email>[email protected]</email>
+               <name>Conrad Kostecki</name>
+       </maintainer>
+       <longdescription>
                An elegant, extensible, testing framework.
                Ships with a large amount of useful asserts,
                plus the ability to write your own. Output

diff --git a/profiles/package.mask b/profiles/package.mask
index 7c7fd5501d5..606a81ba86b 100644
--- a/profiles/package.mask
+++ b/profiles/package.mask
@@ -501,6 +501,7 @@ dev-lua/luacrypto
 >=app-misc/worker-3.8.3-r100
 =dev-games/openscenegraph-openmw-3.4_p20200425-r100
 =dev-libs/efl-1.25.1-r10
+>=dev-lua/busted-2.0.0-r100
 >=dev-lua/dkjson-2.5-r100
 >=dev-lua/lua-bit32-5.3.5-r100
 >=dev-lua/lua-zlib-1.2-r100

Reply via email to