summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Kostecki <conikost@gentoo.org>2022-12-15 21:57:12 +0100
committerConrad Kostecki <conikost@gentoo.org>2022-12-15 21:57:12 +0100
commit1ab9d7259395157be0ceaa17708d7e40abac33bc (patch)
treeb7460480d1d0ad48e966326d096e8fd90b36879e /dev-lua
parentxfce-base/xfdesktop: Stabilize 4.16.1 arm64, #886133 (diff)
downloadgentoo-1ab9d7259395157be0ceaa17708d7e40abac33bc.tar.gz
gentoo-1ab9d7259395157be0ceaa17708d7e40abac33bc.tar.bz2
gentoo-1ab9d7259395157be0ceaa17708d7e40abac33bc.zip
dev-lua/lua-cjson: add 2.1.0.10
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'dev-lua')
-rw-r--r--dev-lua/lua-cjson/Manifest1
-rw-r--r--dev-lua/lua-cjson/lua-cjson-2.1.0.10.ebuild94
2 files changed, 95 insertions, 0 deletions
diff --git a/dev-lua/lua-cjson/Manifest b/dev-lua/lua-cjson/Manifest
index d81f4631b59f..03695f44513d 100644
--- a/dev-lua/lua-cjson/Manifest
+++ b/dev-lua/lua-cjson/Manifest
@@ -1 +1,2 @@
+DIST lua-cjson-2.1.0.10.tar.gz 78651 BLAKE2B c215f0a78ba306831a9aa147df9edcb693164a82a0b0505265425124adb40c918da826d128c2dcd048e2c3040d191e177c78b143abb28608b38b3c2b21760539 SHA512 889761b6381b2d10b7aa2e5687e5059705352c0f7fbbca9bc5f7c9d89aed8b1e283c18e217183042cc6f1ec4f19d1c4cf720e3efc6f5a06e81aa1bec8a6b93c4
DIST lua-cjson-2.1.0.8.tar.gz 77211 BLAKE2B 227171576318939ab48abe26e87fa905cf9a15e6ff44065c0713b6a6fedac571f1dbbb88526b957836a4368e71c4d19a748b2a3250221572f580f1d32ccf50a0 SHA512 577278ccb58a23ea56ea9ad34c5fb0a07c13c6691a3b666f58fa6427bca269aaec26271d7400dcd253c922d1bb0b3b322915a2ce139880c1ed4c1d2c15437580
diff --git a/dev-lua/lua-cjson/lua-cjson-2.1.0.10.ebuild b/dev-lua/lua-cjson/lua-cjson-2.1.0.10.ebuild
new file mode 100644
index 000000000000..22b79720590f
--- /dev/null
+++ b/dev-lua/lua-cjson/lua-cjson-2.1.0.10.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{1..4} luajit )
+
+inherit lua toolchain-funcs
+
+DESCRIPTION="A fast JSON encoding/parsing module for Lua"
+HOMEPAGE="https://www.kyne.com.au/~mark/software/lua-cjson.php https://github.com/openresty/lua-cjson"
+SRC_URI="https://github.com/openresty/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="+internal-fpconv test +threads"
+REQUIRED_USE="
+ threads? ( internal-fpconv )
+ ${LUA_REQUIRED_USE}
+"
+RESTRICT="!test? ( test )"
+
+RDEPEND="${LUA_DEPS}"
+DEPEND="${RDEPEND}"
+BDEPEND="test? ( dev-lang/perl )"
+
+DOCS=( "manual.txt" "NEWS" "performance.txt" "README.md" "THANKS" )
+
+src_prepare() {
+ default
+
+ # Don't install tests
+ sed -e '/cd tests/d' -i Makefile || die
+
+ lua_copy_sources
+}
+
+lua_src_compile() {
+ pushd "${BUILD_DIR}" || die
+
+ local myemakeargs=(
+ "CC=$(tc-getCC)"
+ "CFLAGS=${CFLAGS}"
+ "LDFLAGS=${LDFLAGS}"
+ "LUA_INCLUDE_DIR=$(lua_get_include_dir)"
+ )
+
+ emake "${myemakeargs[@]}"
+
+ popd
+}
+
+src_compile() {
+ lua_foreach_impl lua_src_compile
+}
+
+lua_src_test() {
+ pushd "${BUILD_DIR}" || die
+ cd tests || die
+
+ ln -s "${BUILD_DIR}"/cjson.so ./ || die
+ ln -s "${S}"/lua/cjson ./ || die
+
+ ./genutf8.pl || die
+ ./test.lua || die
+
+ popd
+}
+
+src_test() {
+ lua_foreach_impl lua_src_test
+}
+
+lua_src_install() {
+ pushd "${BUILD_DIR}" || die
+
+ local myemakeargs=(
+ "DESTDIR=${D}"
+ "LUA_CMODULE_DIR=$(lua_get_lmod_dir)"
+ "LUA_MODULE_DIR=$(lua_get_lmod_dir)"
+ "PREFIX=${EPREFIX}/usr"
+ )
+
+ emake "${myemakeargs[@]}" install install-extra
+
+ popd
+}
+
+src_install() {
+ lua_foreach_impl lua_src_install
+
+ einstalldocs
+}