1 |
commit: a9d2d1976335b7eb653fb64247b21cfbf2fc93be |
2 |
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Nov 30 21:01:10 2020 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 30 21:19:13 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a9d2d197 |
7 |
|
8 |
dev-lua/lanes: bump to version 3.13.0 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/716710 |
11 |
Closes: https://bugs.gentoo.org/727076 |
12 |
Package-Manager: Portage-3.0.9, Repoman-3.0.2 |
13 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
14 |
|
15 |
dev-lua/lanes/Manifest | 1 + |
16 |
dev-lua/lanes/files/lanes-3.13.0-makefile.patch | 93 +++++++++++++++++++++++++ |
17 |
dev-lua/lanes/lanes-3.13.0.ebuild | 59 ++++++++++++++++ |
18 |
3 files changed, 153 insertions(+) |
19 |
|
20 |
diff --git a/dev-lua/lanes/Manifest b/dev-lua/lanes/Manifest |
21 |
index 017386fd955..7ddec415417 100644 |
22 |
--- a/dev-lua/lanes/Manifest |
23 |
+++ b/dev-lua/lanes/Manifest |
24 |
@@ -1 +1,2 @@ |
25 |
DIST lanes-3.10.0.tar.gz 231359 BLAKE2B beb1972a9b37097947fc673a644330fe8b66c826bc09967526b96d8e28838939516ee3ad4640fb8e5dca7061227c2844d55270c48f26416c7a7bd3613a83e648 SHA512 4a49f560623e291a8344ffef69f4f26fd422d21d3926d73dfee9c9ae9ebd4973e5ae2d307dfd42c5a3bf101bfcc277df54f0a46d89390c83483208e36d4e5d9b |
26 |
+DIST lanes-3.13.0.tar.gz 247978 BLAKE2B e330f3648e865b8b7c1b77061b6a8210f46e1db650066736afe62040dbb20c7e31e0037b420fded8fb0931cc2ac59687e2039fb31f43c1bdf0cae8cd3c031307 SHA512 bb509181757fa2b4f07a55962015b35ca6bb867b18ec89dd655f333babe2e12f56479fa85bc98e0dacf5bec2a523265bbc3a978396dc332dc1fdda4df760b2e5 |
27 |
|
28 |
diff --git a/dev-lua/lanes/files/lanes-3.13.0-makefile.patch b/dev-lua/lanes/files/lanes-3.13.0-makefile.patch |
29 |
new file mode 100644 |
30 |
index 00000000000..257c9efca46 |
31 |
--- /dev/null |
32 |
+++ b/dev-lua/lanes/files/lanes-3.13.0-makefile.patch |
33 |
@@ -0,0 +1,93 @@ |
34 |
+--- lanes-3.13.0.old/Makefile 2018-11-30 13:28:50.000000000 +0100 |
35 |
++++ lanes-3.13.0/Makefile 2020-11-30 21:28:36.769384766 +0100 |
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/lanes/lanes-3.13.0.ebuild b/dev-lua/lanes/lanes-3.13.0.ebuild |
129 |
new file mode 100644 |
130 |
index 00000000000..e3c4a87c18c |
131 |
--- /dev/null |
132 |
+++ b/dev-lua/lanes/lanes-3.13.0.ebuild |
133 |
@@ -0,0 +1,59 @@ |
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="Lightweight, native, lazy evaluating multithreading library" |
142 |
+HOMEPAGE="https://github.com/LuaLanes/lanes" |
143 |
+SRC_URI="https://github.com/LuaLanes/lanes/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
144 |
+ |
145 |
+LICENSE="MIT" |
146 |
+SLOT="0" |
147 |
+KEYWORDS="~amd64 ~arm ~arm64 ~x86" |
148 |
+IUSE="luajit test" |
149 |
+RESTRICT="!test? ( test )" |
150 |
+ |
151 |
+RDEPEND=" |
152 |
+ luajit? ( dev-lang/luajit:2 ) |
153 |
+ !luajit? ( dev-lang/lua:0 ) |
154 |
+" |
155 |
+ |
156 |
+DEPEND="${RDEPEND}" |
157 |
+ |
158 |
+BDEPEND=" |
159 |
+ virtual/pkgconfig |
160 |
+ test? ( ${RDEPEND} ) |
161 |
+" |
162 |
+ |
163 |
+HTML_DOCS=( "docs/." ) |
164 |
+ |
165 |
+PATCHES=( "${FILESDIR}/${PN}-3.13.0-makefile.patch" ) |
166 |
+ |
167 |
+src_compile() { |
168 |
+ local myemakeargs=( |
169 |
+ "CC=$(tc-getCC)" |
170 |
+ "LUA=$(usex luajit 'luajit' 'lua')" |
171 |
+ "LUA_FLAGS=-I$($(tc-getPKG_CONFIG) --variable $(usex luajit 'includedir' 'INSTALL_INC') $(usex luajit 'luajit' 'lua'))" |
172 |
+ "LUA_LIBS=" |
173 |
+ "OPT_FLAGS=${CFLAGS}" |
174 |
+ ) |
175 |
+ |
176 |
+ emake "${myemakeargs[@]}" |
177 |
+} |
178 |
+ |
179 |
+src_test() { |
180 |
+ emake LUA=$(usex luajit 'luajit' 'lua') test |
181 |
+} |
182 |
+ |
183 |
+src_install() { |
184 |
+ local myemakeargs=( |
185 |
+ "LUA_LIBDIR=${ED}/$($(tc-getPKG_CONFIG) --variable INSTALL_CMOD $(usex luajit 'luajit' 'lua'))" |
186 |
+ "LUA_SHAREDIR=${ED}/$($(tc-getPKG_CONFIG) --variable INSTALL_LMOD $(usex luajit 'luajit' 'lua'))" |
187 |
+ ) |
188 |
+ |
189 |
+ emake "${myemakeargs[@]}" install |
190 |
+ |
191 |
+ einstalldocs |
192 |
+} |