summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Kostecki <conikost@gentoo.org>2020-11-28 17:10:42 +0100
committerConrad Kostecki <conikost@gentoo.org>2020-11-28 17:16:41 +0100
commit3d54c00c3a0d372f6dcd590b6a4b2ac3badce718 (patch)
treed81f9b9fd782fc9936d7c1c60f8147abfd365304 /dev-lua/dkjson
parentdev-lua/lua-term: migrate to lua eclass (diff)
downloadgentoo-3d54c00c3a0d372f6dcd590b6a4b2ac3badce718.tar.gz
gentoo-3d54c00c3a0d372f6dcd590b6a4b2ac3badce718.tar.bz2
gentoo-3d54c00c3a0d372f6dcd590b6a4b2ac3badce718.zip
dev-lua/dkjson: migrate to lua eclass
Also adding tests. Bug: https://bugs.gentoo.org/628758 Closes: https://bugs.gentoo.org/752603 Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'dev-lua/dkjson')
-rw-r--r--dev-lua/dkjson/dkjson-2.5-r100.ebuild48
-rw-r--r--dev-lua/dkjson/metadata.xml6
2 files changed, 53 insertions, 1 deletions
diff --git a/dev-lua/dkjson/dkjson-2.5-r100.ebuild b/dev-lua/dkjson/dkjson-2.5-r100.ebuild
new file mode 100644
index 000000000000..6c81b1358241
--- /dev/null
+++ b/dev-lua/dkjson/dkjson-2.5-r100.ebuild
@@ -0,0 +1,48 @@
+# 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="David Kolf's JSON module for Lua"
+HOMEPAGE="http://dkolf.de/src/dkjson-lua.fsl/"
+SRC_URI="http://dkolf.de/src/dkjson-lua.fsl/tarball/${P}.tar.gz?uuid=release_2_5 -> ${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="${LUA_DEPS}"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ virtual/pkgconfig
+ test? ( ${RDEPEND} )
+"
+
+DOCS=( "readme.txt" )
+
+lua_src_test() {
+ ${ELUA} jsontest.lua || die
+ ${ELUA} speedtest.lua ${PN} || die
+}
+
+src_test() {
+ lua_foreach_impl lua_src_test
+}
+
+lua_src_install() {
+ insinto $(lua_get_lmod_dir)
+ doins dkjson.lua
+}
+
+src_install() {
+ lua_foreach_impl lua_src_install
+
+ einstalldocs
+}
diff --git a/dev-lua/dkjson/metadata.xml b/dev-lua/dkjson/metadata.xml
index dda2ed524394..a5b517b10d3a 100644
--- a/dev-lua/dkjson/metadata.xml
+++ b/dev-lua/dkjson/metadata.xml
@@ -5,7 +5,11 @@
<email>williamh@gentoo.org</email>
<name>William Hubbs</name>
</maintainer>
- <longdescription lang="en">
+ <maintainer type="person">
+ <email>conikost@gentoo.org</email>
+ <name>Conrad Kostecki</name>
+ </maintainer>
+ <longdescription>
dkjson is a module for encoding and decoding JSON data. It supports
UTF-8.