mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-05 05:17:04 -08:00
dev-lua/lua-cjson: bump to version 2.1.0.8
Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
DIST lua-cjson-2.1.0.6.tar.gz 76820 BLAKE2B 1056fefc8d9c802e068e1e7801cc1eb3a0279371ab72e4e8517e22ad68224dd4892f4e4cbfe0a407af71f1008affded41d7bcc05d89c4ddb0c437d93d67708a7 SHA512 71d25f4ec82641d56e33e13c0ecd8c60186b3c4faf3d30de81706d1305d4e61691a1e84210462942674e50ca2ff19e126cb04025d9645d5d26ef3b3b0e46f64b
|
||||
DIST lua-cjson-2.1.0.7.tar.gz 76949 BLAKE2B 9189890f24885191001e79cf0f48aaee74026572eda3e767b0e5e63d44634156fd2b972287cb23e243b3fd0f44f8e87a1fcb0c0b8e26197c63e5e0ff30cb3a94 SHA512 c66fbb608dcd1b7daef8c70ad9a60ab442bf8b851b8d8c5e3b11854ab476dff115e2eef31f171a40ce364778682ce351114caf36c995521ec589bd9dd94415c5
|
||||
DIST lua-cjson-2.1.0.8.tar.gz 77211 BLAKE2B 227171576318939ab48abe26e87fa905cf9a15e6ff44065c0713b6a6fedac571f1dbbb88526b957836a4368e71c4d19a748b2a3250221572f580f1d32ccf50a0 SHA512 577278ccb58a23ea56ea9ad34c5fb0a07c13c6691a3b666f58fa6427bca269aaec26271d7400dcd253c922d1bb0b3b322915a2ce139880c1ed4c1d2c15437580
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
# Autodetect LUA
|
||||
#
|
||||
-LUA=$(word 1,$(shell which lua5.1$(_LUAEXT)) $(shell which lua51$(_LUAEXT)) lua$(_LUAEXT))
|
||||
+LUA ?= $(word 1,$(shell which lua5.1$(_LUAEXT)) $(shell which lua51$(_LUAEXT)) lua$(_LUAEXT))
|
||||
|
||||
_TARGET_SO=$(_TARGET_DIR)/core.$(_SO)
|
||||
|
||||
--- lanes-3.13.0.old/src/Makefile 2018-11-30 13:28:50.000000000 +0100
|
||||
+++ lanes-3.13.0/src/Makefile 2020-11-30 21:40:06.399382894 +0100
|
||||
@@ -15,7 +15,7 @@
|
||||
#
|
||||
LIBFLAG=-shared
|
||||
|
||||
-OPT_FLAGS=-O2
|
||||
+OPT_FLAGS ?=
|
||||
# -O0 -g
|
||||
|
||||
_SO=so
|
||||
@@ -38,50 +38,8 @@
|
||||
LUA_LIBS:="$(LUA_DEV)/lua5.1.dll" -lgcc
|
||||
LIBFLAG=-shared -Wl,-Map,lanes.map
|
||||
else
|
||||
- # Autodetect LUA_FLAGS and/or LUA_LIBS
|
||||
- #
|
||||
- ifneq "$(shell which pkg-config)" ""
|
||||
- ifeq "$(shell pkg-config --exists luajit && echo 1)" "1"
|
||||
- LUA_FLAGS:=$(shell pkg-config --cflags luajit)
|
||||
- LUA_LIBS:=$(shell pkg-config --libs luajit)
|
||||
- #
|
||||
- # Debian: -I/usr/include/luajit-2.0
|
||||
- # -lluajit-5.1
|
||||
- else
|
||||
- ifeq "$(shell pkg-config --exists lua5.1 && echo 1)" "1"
|
||||
- LUA_FLAGS:=$(shell pkg-config --cflags lua5.1)
|
||||
- LUA_LIBS:=$(shell pkg-config --libs lua5.1)
|
||||
- #
|
||||
- # Ubuntu: -I/usr/include/lua5.1
|
||||
- # -llua5.1
|
||||
- else
|
||||
- ifeq "$(shell pkg-config --exists lua && echo 1)" "1"
|
||||
- LUA_FLAGS:=$(shell pkg-config --cflags lua)
|
||||
- LUA_LIBS:=$(shell pkg-config --libs lua)
|
||||
- #
|
||||
- # OS X fink with pkg-config:
|
||||
- # -I/sw/include
|
||||
- # -L/sw/lib -llua -lm
|
||||
- else
|
||||
- $(warning *** 'pkg-config' existed but did not know of 'lua[5.1]' - Good luck!)
|
||||
- LUA_FLAGS:=
|
||||
- LUA_LIBS:=-llua
|
||||
- endif
|
||||
- endif
|
||||
- endif
|
||||
- else
|
||||
- # No 'pkg-config'; try defaults
|
||||
- #
|
||||
- ifeq "$(shell uname -s)" "Darwin"
|
||||
- $(warning *** Assuming 'fink' at default path)
|
||||
- LUA_FLAGS:=-I/sw/include
|
||||
- LUA_LIBS:=-L/sw/lib -llua
|
||||
- else
|
||||
- $(warning *** Assuming an arbitrary Lua installation; try installing 'pkg-config')
|
||||
- LUA_FLAGS:=
|
||||
- LUA_LIBS:=-llua
|
||||
- endif
|
||||
- endif
|
||||
+ LUA_FLAGS ?= $(shell pkg-config --cflags lua)
|
||||
+ LUA_LIBS ?= $(shell pkg-config --libs lua)
|
||||
endif
|
||||
|
||||
ifeq "$(shell uname -s)" "Darwin"
|
||||
@@ -92,7 +50,7 @@
|
||||
LIBFLAG = -bundle -undefined dynamic_lookup
|
||||
endif
|
||||
|
||||
- CFLAGS=-Wall -Werror $(OPT_FLAGS) $(LUA_FLAGS)
|
||||
+ CFLAGS=-Wall $(OPT_FLAGS) $(LUA_FLAGS)
|
||||
LIBS=$(LUA_LIBS)
|
||||
endif
|
||||
|
||||
@@ -125,7 +83,7 @@
|
||||
#
|
||||
$(MODULE_DIR)/core.$(_SO): $(OBJ)
|
||||
mkdir -p $(MODULE_DIR)
|
||||
- $(CC) $(LIBFLAG) $^ $(LIBS) $(LUA_LIBS) -o $@
|
||||
+ $(CC) $(LDFLAGS) $(LIBFLAG) $^ $(LIBS) $(LUA_LIBS) -o $@
|
||||
|
||||
clean:
|
||||
-rm -rf $(MODULE)/core.$(_SO) *.o *.map
|
||||
@@ -0,0 +1,70 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit 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 ~x86"
|
||||
IUSE="+internal-fpconv luajit test +threads"
|
||||
RESTRICT="!test? ( test )"
|
||||
REQUIRED_USE="threads? ( internal-fpconv )"
|
||||
|
||||
RDEPEND="
|
||||
luajit? ( dev-lang/luajit:2 )
|
||||
!luajit? ( dev-lang/lua:0 )
|
||||
"
|
||||
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="test? ( dev-lang/perl )"
|
||||
|
||||
DOCS=( "manual.txt" "NEWS" "performance.txt" "README.md" "THANKS" )
|
||||
|
||||
PATCHES=( "${FILESDIR}/${PN}-2.1.0.8-sparse_array_test_fix.patch" )
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Don't install tests
|
||||
sed -e '/cd tests/d' -i Makefile || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local myemakeargs=(
|
||||
"CC=$(tc-getCC)"
|
||||
"CFLAGS=${CFLAGS}"
|
||||
"LDFLAGS=${LDFLAGS}"
|
||||
"LUA_INCLUDE_DIR=$($(tc-getPKG_CONFIG) --variable $(usex luajit 'includedir' 'INSTALL_INC') $(usex luajit 'luajit' 'lua'))"
|
||||
)
|
||||
|
||||
emake "${myemakeargs[@]}"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
cd tests || die
|
||||
|
||||
ln -s "${S}"/cjson.so ./ || die
|
||||
ln -s "${S}"/lua/cjson ./ || die
|
||||
|
||||
./genutf8.pl || die
|
||||
./test.lua || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local myemakeargs=(
|
||||
"DESTDIR=${D}"
|
||||
"LUA_CMODULE_DIR=$($(tc-getPKG_CONFIG) --variable INSTALL_CMOD $(usex luajit 'luajit' 'lua'))"
|
||||
"LUA_MODULE_DIR=$($(tc-getPKG_CONFIG) --variable INSTALL_LMOD $(usex luajit 'luajit' 'lua'))"
|
||||
"PREFIX=${EPREFIX}/usr"
|
||||
)
|
||||
|
||||
emake "${myemakeargs[@]}" install install-extra
|
||||
|
||||
einstalldocs
|
||||
}
|
||||
@@ -5,7 +5,11 @@
|
||||
<email>gyakovlev@gentoo.org</email>
|
||||
<name>Georgy Yakovlev</name>
|
||||
</maintainer>
|
||||
<longdescription lang="en">
|
||||
<maintainer type="person">
|
||||
<email>conikost@gentoo.org</email>
|
||||
<name>Conrad Kostecki</name>
|
||||
</maintainer>
|
||||
<longdescription>
|
||||
OpenResty fork of mpx/lua-cjson, includes a few bugfixes and improvements,
|
||||
especially to facilitate the encoding of empty tables as JSON Arrays.
|
||||
</longdescription>
|
||||
|
||||
Reference in New Issue
Block a user