diff options
author | Conrad Kostecki <conikost@gentoo.org> | 2020-12-01 17:51:25 +0100 |
---|---|---|
committer | Conrad Kostecki <conikost@gentoo.org> | 2020-12-01 17:51:35 +0100 |
commit | cc00f3b7bf26f9e01cd30180139bea6bbc6f2444 (patch) | |
tree | df0d86ceb70b982ba9f0737b43f8a67f99390705 /dev-lua | |
parent | www-servers/apache: Fixed tarball manifest (diff) | |
download | gentoo-cc00f3b7bf26f9e01cd30180139bea6bbc6f2444.tar.gz gentoo-cc00f3b7bf26f9e01cd30180139bea6bbc6f2444.tar.bz2 gentoo-cc00f3b7bf26f9e01cd30180139bea6bbc6f2444.zip |
dev-lua/lua-cjson: add missing patch
Closes: https://bugs.gentoo.org/757888
Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'dev-lua')
-rw-r--r-- | dev-lua/lua-cjson/files/lanes-3.13.0-makefile.patch | 93 | ||||
-rw-r--r-- | dev-lua/lua-cjson/files/lua-cjson-2.1.0.8-sparse_array_test_fix.patch | 31 |
2 files changed, 31 insertions, 93 deletions
diff --git a/dev-lua/lua-cjson/files/lanes-3.13.0-makefile.patch b/dev-lua/lua-cjson/files/lanes-3.13.0-makefile.patch deleted file mode 100644 index 178a3c5c5ecf..000000000000 --- a/dev-lua/lua-cjson/files/lanes-3.13.0-makefile.patch +++ /dev/null @@ -1,93 +0,0 @@ ---- 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 diff --git a/dev-lua/lua-cjson/files/lua-cjson-2.1.0.8-sparse_array_test_fix.patch b/dev-lua/lua-cjson/files/lua-cjson-2.1.0.8-sparse_array_test_fix.patch new file mode 100644 index 000000000000..e031672dae33 --- /dev/null +++ b/dev-lua/lua-cjson/files/lua-cjson-2.1.0.8-sparse_array_test_fix.patch @@ -0,0 +1,31 @@ +--- a/tests/test.lua ++++ b/tests/test.lua +@@ -10,6 +10,17 @@ + local json_safe = require "cjson.safe" + local util = require "cjson.util" + ++local function json_encode_output_type(value) ++ local text = json.encode(value) ++ if string.match(text, "{.*}") then ++ return "object" ++ elseif string.match(text, "%[.*%]") then ++ return "array" ++ else ++ return "scalar" ++ end ++end ++ + local function gen_raw_octets() + local chars = {} + for i = 0, 255 do chars[i + 1] = string.char(i) end +@@ -292,8 +303,8 @@ + json.encode, { { [1] = "one", [4] = "sparse test" } }, + true, { '["one",null,null,"sparse test"]' } }, + { "Encode sparse array as object", +- json.encode, { { [1] = "one", [5] = "sparse test" } }, +- true, { '{"5":"sparse test","1":"one"}' } }, ++ json_encode_output_type, { { [1] = "one", [5] = "sparse test" } }, ++ true, { 'object' } }, + { "Encode table with numeric string key as object", + json.encode, { { ["2"] = "numeric string key test" } }, + true, { '{"2":"numeric string key test"}' } }, |