1 |
commit: de890203c4ffbac72bd789fe67cac6746eb28a2b |
2 |
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Nov 30 22:44:42 2020 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Dec 1 10:15:00 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de890203 |
7 |
|
8 |
dev-lua/lua-cjson: bump to version 2.1.0.8 |
9 |
|
10 |
Package-Manager: Portage-3.0.9, Repoman-3.0.2 |
11 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
12 |
|
13 |
dev-lua/lua-cjson/Manifest | 1 + |
14 |
.../lua-cjson/files/lanes-3.13.0-makefile.patch | 93 ++++++++++++++++++++++ |
15 |
dev-lua/lua-cjson/lua-cjson-2.1.0.8.ebuild | 70 ++++++++++++++++ |
16 |
dev-lua/lua-cjson/metadata.xml | 6 +- |
17 |
4 files changed, 169 insertions(+), 1 deletion(-) |
18 |
|
19 |
diff --git a/dev-lua/lua-cjson/Manifest b/dev-lua/lua-cjson/Manifest |
20 |
index 5543b65fbe3..71e8c4e7823 100644 |
21 |
--- a/dev-lua/lua-cjson/Manifest |
22 |
+++ b/dev-lua/lua-cjson/Manifest |
23 |
@@ -1,2 +1,3 @@ |
24 |
DIST lua-cjson-2.1.0.6.tar.gz 76820 BLAKE2B 1056fefc8d9c802e068e1e7801cc1eb3a0279371ab72e4e8517e22ad68224dd4892f4e4cbfe0a407af71f1008affded41d7bcc05d89c4ddb0c437d93d67708a7 SHA512 71d25f4ec82641d56e33e13c0ecd8c60186b3c4faf3d30de81706d1305d4e61691a1e84210462942674e50ca2ff19e126cb04025d9645d5d26ef3b3b0e46f64b |
25 |
DIST lua-cjson-2.1.0.7.tar.gz 76949 BLAKE2B 9189890f24885191001e79cf0f48aaee74026572eda3e767b0e5e63d44634156fd2b972287cb23e243b3fd0f44f8e87a1fcb0c0b8e26197c63e5e0ff30cb3a94 SHA512 c66fbb608dcd1b7daef8c70ad9a60ab442bf8b851b8d8c5e3b11854ab476dff115e2eef31f171a40ce364778682ce351114caf36c995521ec589bd9dd94415c5 |
26 |
+DIST lua-cjson-2.1.0.8.tar.gz 77211 BLAKE2B 227171576318939ab48abe26e87fa905cf9a15e6ff44065c0713b6a6fedac571f1dbbb88526b957836a4368e71c4d19a748b2a3250221572f580f1d32ccf50a0 SHA512 577278ccb58a23ea56ea9ad34c5fb0a07c13c6691a3b666f58fa6427bca269aaec26271d7400dcd253c922d1bb0b3b322915a2ce139880c1ed4c1d2c15437580 |
27 |
|
28 |
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 |
29 |
new file mode 100644 |
30 |
index 00000000000..178a3c5c5ec |
31 |
--- /dev/null |
32 |
+++ b/dev-lua/lua-cjson/files/lanes-3.13.0-makefile.patch |
33 |
@@ -0,0 +1,93 @@ |
34 |
+--- a/Makefile |
35 |
++++ b/Makefile |
36 |
+@@ -33,7 +33,7 @@ |
37 |
+ |
38 |
+ # Autodetect LUA |
39 |
+ # |
40 |
+-LUA=$(word 1,$(shell which lua5.1$(_LUAEXT)) $(shell which lua51$(_LUAEXT)) lua$(_LUAEXT)) |
41 |
++LUA ?= $(word 1,$(shell which lua5.1$(_LUAEXT)) $(shell which lua51$(_LUAEXT)) lua$(_LUAEXT)) |
42 |
+ |
43 |
+ _TARGET_SO=$(_TARGET_DIR)/core.$(_SO) |
44 |
+ |
45 |
+--- lanes-3.13.0.old/src/Makefile 2018-11-30 13:28:50.000000000 +0100 |
46 |
++++ lanes-3.13.0/src/Makefile 2020-11-30 21:40:06.399382894 +0100 |
47 |
+@@ -15,7 +15,7 @@ |
48 |
+ # |
49 |
+ LIBFLAG=-shared |
50 |
+ |
51 |
+-OPT_FLAGS=-O2 |
52 |
++OPT_FLAGS ?= |
53 |
+ # -O0 -g |
54 |
+ |
55 |
+ _SO=so |
56 |
+@@ -38,50 +38,8 @@ |
57 |
+ LUA_LIBS:="$(LUA_DEV)/lua5.1.dll" -lgcc |
58 |
+ LIBFLAG=-shared -Wl,-Map,lanes.map |
59 |
+ else |
60 |
+- # Autodetect LUA_FLAGS and/or LUA_LIBS |
61 |
+- # |
62 |
+- ifneq "$(shell which pkg-config)" "" |
63 |
+- ifeq "$(shell pkg-config --exists luajit && echo 1)" "1" |
64 |
+- LUA_FLAGS:=$(shell pkg-config --cflags luajit) |
65 |
+- LUA_LIBS:=$(shell pkg-config --libs luajit) |
66 |
+- # |
67 |
+- # Debian: -I/usr/include/luajit-2.0 |
68 |
+- # -lluajit-5.1 |
69 |
+- else |
70 |
+- ifeq "$(shell pkg-config --exists lua5.1 && echo 1)" "1" |
71 |
+- LUA_FLAGS:=$(shell pkg-config --cflags lua5.1) |
72 |
+- LUA_LIBS:=$(shell pkg-config --libs lua5.1) |
73 |
+- # |
74 |
+- # Ubuntu: -I/usr/include/lua5.1 |
75 |
+- # -llua5.1 |
76 |
+- else |
77 |
+- ifeq "$(shell pkg-config --exists lua && echo 1)" "1" |
78 |
+- LUA_FLAGS:=$(shell pkg-config --cflags lua) |
79 |
+- LUA_LIBS:=$(shell pkg-config --libs lua) |
80 |
+- # |
81 |
+- # OS X fink with pkg-config: |
82 |
+- # -I/sw/include |
83 |
+- # -L/sw/lib -llua -lm |
84 |
+- else |
85 |
+- $(warning *** 'pkg-config' existed but did not know of 'lua[5.1]' - Good luck!) |
86 |
+- LUA_FLAGS:= |
87 |
+- LUA_LIBS:=-llua |
88 |
+- endif |
89 |
+- endif |
90 |
+- endif |
91 |
+- else |
92 |
+- # No 'pkg-config'; try defaults |
93 |
+- # |
94 |
+- ifeq "$(shell uname -s)" "Darwin" |
95 |
+- $(warning *** Assuming 'fink' at default path) |
96 |
+- LUA_FLAGS:=-I/sw/include |
97 |
+- LUA_LIBS:=-L/sw/lib -llua |
98 |
+- else |
99 |
+- $(warning *** Assuming an arbitrary Lua installation; try installing 'pkg-config') |
100 |
+- LUA_FLAGS:= |
101 |
+- LUA_LIBS:=-llua |
102 |
+- endif |
103 |
+- endif |
104 |
++ LUA_FLAGS ?= $(shell pkg-config --cflags lua) |
105 |
++ LUA_LIBS ?= $(shell pkg-config --libs lua) |
106 |
+ endif |
107 |
+ |
108 |
+ ifeq "$(shell uname -s)" "Darwin" |
109 |
+@@ -92,7 +50,7 @@ |
110 |
+ LIBFLAG = -bundle -undefined dynamic_lookup |
111 |
+ endif |
112 |
+ |
113 |
+- CFLAGS=-Wall -Werror $(OPT_FLAGS) $(LUA_FLAGS) |
114 |
++ CFLAGS=-Wall $(OPT_FLAGS) $(LUA_FLAGS) |
115 |
+ LIBS=$(LUA_LIBS) |
116 |
+ endif |
117 |
+ |
118 |
+@@ -125,7 +83,7 @@ |
119 |
+ # |
120 |
+ $(MODULE_DIR)/core.$(_SO): $(OBJ) |
121 |
+ mkdir -p $(MODULE_DIR) |
122 |
+- $(CC) $(LIBFLAG) $^ $(LIBS) $(LUA_LIBS) -o $@ |
123 |
++ $(CC) $(LDFLAGS) $(LIBFLAG) $^ $(LIBS) $(LUA_LIBS) -o $@ |
124 |
+ |
125 |
+ clean: |
126 |
+ -rm -rf $(MODULE)/core.$(_SO) *.o *.map |
127 |
|
128 |
diff --git a/dev-lua/lua-cjson/lua-cjson-2.1.0.8.ebuild b/dev-lua/lua-cjson/lua-cjson-2.1.0.8.ebuild |
129 |
new file mode 100644 |
130 |
index 00000000000..2b119941749 |
131 |
--- /dev/null |
132 |
+++ b/dev-lua/lua-cjson/lua-cjson-2.1.0.8.ebuild |
133 |
@@ -0,0 +1,70 @@ |
134 |
+# Copyright 1999-2020 Gentoo Authors |
135 |
+# Distributed under the terms of the GNU General Public License v2 |
136 |
+ |
137 |
+EAPI=7 |
138 |
+ |
139 |
+inherit toolchain-funcs |
140 |
+ |
141 |
+DESCRIPTION="A fast JSON encoding/parsing module for Lua" |
142 |
+HOMEPAGE="https://www.kyne.com.au/~mark/software/lua-cjson.php https://github.com/openresty/lua-cjson" |
143 |
+SRC_URI="https://github.com/openresty/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
144 |
+ |
145 |
+LICENSE="MIT" |
146 |
+SLOT="0" |
147 |
+KEYWORDS="~amd64 ~arm ~arm64 ~x86" |
148 |
+IUSE="+internal-fpconv luajit test +threads" |
149 |
+RESTRICT="!test? ( test )" |
150 |
+REQUIRED_USE="threads? ( internal-fpconv )" |
151 |
+ |
152 |
+RDEPEND=" |
153 |
+ luajit? ( dev-lang/luajit:2 ) |
154 |
+ !luajit? ( dev-lang/lua:0 ) |
155 |
+" |
156 |
+ |
157 |
+DEPEND="${RDEPEND}" |
158 |
+BDEPEND="test? ( dev-lang/perl )" |
159 |
+ |
160 |
+DOCS=( "manual.txt" "NEWS" "performance.txt" "README.md" "THANKS" ) |
161 |
+ |
162 |
+PATCHES=( "${FILESDIR}/${PN}-2.1.0.8-sparse_array_test_fix.patch" ) |
163 |
+ |
164 |
+src_prepare() { |
165 |
+ default |
166 |
+ |
167 |
+ # Don't install tests |
168 |
+ sed -e '/cd tests/d' -i Makefile || die |
169 |
+} |
170 |
+ |
171 |
+src_compile() { |
172 |
+ local myemakeargs=( |
173 |
+ "CC=$(tc-getCC)" |
174 |
+ "CFLAGS=${CFLAGS}" |
175 |
+ "LDFLAGS=${LDFLAGS}" |
176 |
+ "LUA_INCLUDE_DIR=$($(tc-getPKG_CONFIG) --variable $(usex luajit 'includedir' 'INSTALL_INC') $(usex luajit 'luajit' 'lua'))" |
177 |
+ ) |
178 |
+ |
179 |
+ emake "${myemakeargs[@]}" |
180 |
+} |
181 |
+ |
182 |
+src_test() { |
183 |
+ cd tests || die |
184 |
+ |
185 |
+ ln -s "${S}"/cjson.so ./ || die |
186 |
+ ln -s "${S}"/lua/cjson ./ || die |
187 |
+ |
188 |
+ ./genutf8.pl || die |
189 |
+ ./test.lua || die |
190 |
+} |
191 |
+ |
192 |
+src_install() { |
193 |
+ local myemakeargs=( |
194 |
+ "DESTDIR=${D}" |
195 |
+ "LUA_CMODULE_DIR=$($(tc-getPKG_CONFIG) --variable INSTALL_CMOD $(usex luajit 'luajit' 'lua'))" |
196 |
+ "LUA_MODULE_DIR=$($(tc-getPKG_CONFIG) --variable INSTALL_LMOD $(usex luajit 'luajit' 'lua'))" |
197 |
+ "PREFIX=${EPREFIX}/usr" |
198 |
+ ) |
199 |
+ |
200 |
+ emake "${myemakeargs[@]}" install install-extra |
201 |
+ |
202 |
+ einstalldocs |
203 |
+} |
204 |
|
205 |
diff --git a/dev-lua/lua-cjson/metadata.xml b/dev-lua/lua-cjson/metadata.xml |
206 |
index 5b6408370be..a4d07bda238 100644 |
207 |
--- a/dev-lua/lua-cjson/metadata.xml |
208 |
+++ b/dev-lua/lua-cjson/metadata.xml |
209 |
@@ -5,7 +5,11 @@ |
210 |
<email>gyakovlev@g.o</email> |
211 |
<name>Georgy Yakovlev</name> |
212 |
</maintainer> |
213 |
- <longdescription lang="en"> |
214 |
+ <maintainer type="person"> |
215 |
+ <email>conikost@g.o</email> |
216 |
+ <name>Conrad Kostecki</name> |
217 |
+ </maintainer> |
218 |
+ <longdescription> |
219 |
OpenResty fork of mpx/lua-cjson, includes a few bugfixes and improvements, |
220 |
especially to facilitate the encoding of empty tables as JSON Arrays. |
221 |
</longdescription> |