summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/lua
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2021-09-08 20:01:03 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-11 18:41:37 +0100
commit6500c74e6276bb7baa4c94057c6e0d1651607e30 (patch)
tree1283e88180bdeb0c613e9955c7e8bcd3517d9812 /meta/recipes-devtools/lua
parent5196cfbbf8795e16b5bc606a9e348fcc6bf3cc83 (diff)
downloadpoky-6500c74e6276bb7baa4c94057c6e0d1651607e30.tar.gz
lua: update 5.3.6 -> 5.4.3
Drop three backports and 0001-Allow-building-lua-without-readline-on-Linux.patch (feature added upstream, adjust the recipe accordingly). Adjust ar/ranlib flags for reproducibility on liblua.a. License-Update: lines moved around, formatting (From OE-Core rev: c2cad5ecfbbcee99b3cbe71efeeac9a875b6e5ff) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/lua')
-rw-r--r--meta/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch59
-rw-r--r--meta/recipes-devtools/lua/lua/0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch90
-rw-r--r--meta/recipes-devtools/lua/lua/CVE-2020-15888.patch45
-rw-r--r--meta/recipes-devtools/lua/lua/CVE-2020-15945.patch167
-rw-r--r--meta/recipes-devtools/lua/lua_5.4.3.bb (renamed from meta/recipes-devtools/lua/lua_5.3.6.bb)31
5 files changed, 13 insertions, 379 deletions
diff --git a/meta/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch b/meta/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch
deleted file mode 100644
index e767900864..0000000000
--- a/meta/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch
+++ /dev/null
@@ -1,59 +0,0 @@
1From 601ef636fc4dfb2af3e7fda88d8ea1c1d92affe4 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 2 Oct 2019 17:54:15 +0200
4Subject: [PATCH] Allow building lua without readline on Linux
5
6Upstream-Status: Pending
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8---
9 Makefile | 2 +-
10 src/Makefile | 3 +++
11 src/luaconf.h | 5 +++++
12 3 files changed, 9 insertions(+), 1 deletion(-)
13
14diff --git a/Makefile b/Makefile
15index 119110d..9f6df45 100644
16--- a/Makefile
17+++ b/Makefile
18@@ -36,7 +36,7 @@ RM= rm -f
19 # == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
20
21 # Convenience platforms targets.
22-PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris
23+PLATS= aix bsd c89 freebsd generic linux linux-no-readline macosx mingw posix solaris
24
25 # What to install.
26 TO_BIN= lua luac
27diff --git a/src/Makefile b/src/Makefile
28index 64c78f7..5c0428a 100644
29--- a/src/Makefile
30+++ b/src/Makefile
31@@ -109,6 +109,9 @@ generic: $(ALL)
32 linux:
33 $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
34
35+linux-no-readline:
36+ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX_NO_READLINE" SYSLIBS="-Wl,-E -ldl"
37+
38 macosx:
39 $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline"
40
41diff --git a/src/luaconf.h b/src/luaconf.h
42index 9eeeea6..d71ca25 100644
43--- a/src/luaconf.h
44+++ b/src/luaconf.h
45@@ -64,6 +64,11 @@
46 #define LUA_USE_READLINE /* needs some extra libraries */
47 #endif
48
49+#if defined(LUA_USE_LINUX_NO_READLINE)
50+#define LUA_USE_POSIX
51+#define LUA_USE_DLOPEN /* needs an extra library: -ldl */
52+#endif
53+
54
55 #if defined(LUA_USE_MACOSX)
56 #define LUA_USE_POSIX
57--
582.17.1
59
diff --git a/meta/recipes-devtools/lua/lua/0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch b/meta/recipes-devtools/lua/lua/0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch
deleted file mode 100644
index a302874d76..0000000000
--- a/meta/recipes-devtools/lua/lua/0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch
+++ /dev/null
@@ -1,90 +0,0 @@
1From 1e6df25ac28dcd89f0324177bb55019422404b44 Mon Sep 17 00:00:00 2001
2From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
3Date: Thu, 3 Sep 2020 15:32:17 +0800
4Subject: [PATCH] Fixed bug: barriers cannot be active during sweep
5
6Barriers cannot be active during sweep, even in generational mode.
7(Although gen. mode is not incremental, it can hit a barrier when
8deleting a thread and closing its upvalues.) The colors of objects are
9being changed during sweep and, therefore, cannot be trusted.
10
11Upstream-Status: Backport [https://github.com/lua/lua/commit/a6da1472c0c5e05ff249325f979531ad51533110]
12CVE: CVE-2020-24371
13
14[Adjust code KGC_INC -> KGC_NORMAL, refer 69371c4b84becac09c445aae01d005b49658ef82]
15Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
16---
17 src/lgc.c | 33 ++++++++++++++++++++++++---------
18 1 file changed, 24 insertions(+), 9 deletions(-)
19
20diff --git a/src/lgc.c b/src/lgc.c
21index 973c269..7af23d5 100644
22--- a/src/lgc.c
23+++ b/src/lgc.c
24@@ -142,10 +142,17 @@ static int iscleared (global_State *g, const TValue *o) {
25
26
27 /*
28-** barrier that moves collector forward, that is, mark the white object
29-** being pointed by a black object. (If in sweep phase, clear the black
30-** object to white [sweep it] to avoid other barrier calls for this
31-** same object.)
32+** Barrier that moves collector forward, that is, marks the white object
33+** 'v' being pointed by the black object 'o'. In the generational
34+** mode, 'v' must also become old, if 'o' is old; however, it cannot
35+** be changed directly to OLD, because it may still point to non-old
36+** objects. So, it is marked as OLD0. In the next cycle it will become
37+** OLD1, and in the next it will finally become OLD (regular old). By
38+** then, any object it points to will also be old. If called in the
39+** incremental sweep phase, it clears the black object to white (sweep
40+** it) to avoid other barrier calls for this same object. (That cannot
41+** be done is generational mode, as its sweep does not distinguish
42+** whites from deads.)
43 */
44 void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v) {
45 global_State *g = G(L);
46@@ -154,7 +161,8 @@ void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v) {
47 reallymarkobject(g, v); /* restore invariant */
48 else { /* sweep phase */
49 lua_assert(issweepphase(g));
50- makewhite(g, o); /* mark main obj. as white to avoid other barriers */
51+ if (g->gckind == KGC_NORMAL) /* incremental mode? */
52+ makewhite(g, o); /* mark 'o' as white to avoid other barriers */
53 }
54 }
55
56@@ -299,10 +307,15 @@ static void markbeingfnz (global_State *g) {
57
58
59 /*
60-** Mark all values stored in marked open upvalues from non-marked threads.
61-** (Values from marked threads were already marked when traversing the
62-** thread.) Remove from the list threads that no longer have upvalues and
63-** not-marked threads.
64+** For each non-marked thread, simulates a barrier between each open
65+** upvalue and its value. (If the thread is collected, the value will be
66+** assigned to the upvalue, but then it can be too late for the barrier
67+** to act. The "barrier" does not need to check colors: A non-marked
68+** thread must be young; upvalues cannot be older than their threads; so
69+** any visited upvalue must be young too.) Also removes the thread from
70+** the list, as it was already visited. Removes also threads with no
71+** upvalues, as they have nothing to be checked. (If the thread gets an
72+** upvalue later, it will be linked in the list again.)
73 */
74 static void remarkupvals (global_State *g) {
75 lua_State *thread;
76@@ -313,9 +326,11 @@ static void remarkupvals (global_State *g) {
77 p = &thread->twups; /* keep marked thread with upvalues in the list */
78 else { /* thread is not marked or without upvalues */
79 UpVal *uv;
80+ lua_assert(!isold(thread) || thread->openupval == NULL);
81 *p = thread->twups; /* remove thread from the list */
82 thread->twups = thread; /* mark that it is out of list */
83 for (uv = thread->openupval; uv != NULL; uv = uv->u.open.next) {
84+ lua_assert(getage(uv) <= getage(thread));
85 if (uv->u.open.touched) {
86 markvalue(g, uv->v); /* remark upvalue's value */
87 uv->u.open.touched = 0;
88--
891.9.1
90
diff --git a/meta/recipes-devtools/lua/lua/CVE-2020-15888.patch b/meta/recipes-devtools/lua/lua/CVE-2020-15888.patch
deleted file mode 100644
index 60a4125971..0000000000
--- a/meta/recipes-devtools/lua/lua/CVE-2020-15888.patch
+++ /dev/null
@@ -1,45 +0,0 @@
1From 6298903e35217ab69c279056f925fb72900ce0b7 Mon Sep 17 00:00:00 2001
2From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
3Date: Mon, 6 Jul 2020 12:11:54 -0300
4Subject: [PATCH] Keep minimum size when shrinking a stack
5
6When shrinking a stack (during GC), do not make it smaller than the
7initial stack size.
8---
9 ldo.c | 5 ++---
10 1 file changed, 2 insertions(+), 3 deletions(-)
11==== end of original header ====
12
13CVE: CVE-2020-15888
14
15Upstream-Status: backport [https://github.com/lua/lua.git]
16
17Signed-off-by: Joe Slater <joe.slater@windriver.com>
18
19====
20diff --git a/ldo.c b/ldo.c
21index c563b1d9..a89ac010 100644
22--- a/src/ldo.c
23+++ b/src/ldo.c
24@@ -220,7 +220,7 @@ static int stackinuse (lua_State *L) {
25
26 void luaD_shrinkstack (lua_State *L) {
27 int inuse = stackinuse(L);
28- int goodsize = inuse + (inuse / 8) + 2*EXTRA_STACK;
29+ int goodsize = inuse + BASIC_STACK_SIZE;
30 if (goodsize > LUAI_MAXSTACK)
31 goodsize = LUAI_MAXSTACK; /* respect stack limit */
32 if (L->stacksize > LUAI_MAXSTACK) /* had been handling stack overflow? */
33@@ -229,8 +229,7 @@ void luaD_shrinkstack (lua_State *L) {
34 luaE_shrinkCI(L); /* shrink list */
35 /* if thread is currently not handling a stack overflow and its
36 good size is smaller than current size, shrink its stack */
37- if (inuse <= (LUAI_MAXSTACK - EXTRA_STACK) &&
38- goodsize < L->stacksize)
39+ if (inuse <= (LUAI_MAXSTACK - EXTRA_STACK) && goodsize < L->stacksize)
40 luaD_reallocstack(L, goodsize);
41 else /* don't change stack */
42 condmovestack(L,{},{}); /* (change only for debugging) */
43--
442.17.1
45
diff --git a/meta/recipes-devtools/lua/lua/CVE-2020-15945.patch b/meta/recipes-devtools/lua/lua/CVE-2020-15945.patch
deleted file mode 100644
index 89ce491487..0000000000
--- a/meta/recipes-devtools/lua/lua/CVE-2020-15945.patch
+++ /dev/null
@@ -1,167 +0,0 @@
1From d8d344365945a534f700c82c5dd26f704f89fef3 Mon Sep 17 00:00:00 2001
2From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
3Date: Wed, 5 Aug 2020 16:59:58 +0800
4Subject: [PATCH] Fixed bug: invalid 'oldpc' when returning to a function
5
6The field 'L->oldpc' is not always updated when control returns to a
7function; an invalid value can seg. fault when computing 'changedline'.
8(One example is an error in a finalizer; control can return to
9'luaV_execute' without executing 'luaD_poscall'.) Instead of trying to
10fix all possible corner cases, it seems safer to be resilient to invalid
11values for 'oldpc'. Valid but wrong values at most cause an extra call
12to a line hook.
13
14CVE: CVE-2020-15945
15
16[Adjust the code to be applicable to the tree]
17
18Upstream-Status: Backport [https://github.com/lua/lua/commit/a2195644d89812e5b157ce7bac35543e06db05e3]
19
20Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
21Signed-off-by: Joe Slater <joe.slater@@windriver.com>
22
23---
24 src/ldebug.c | 30 +++++++++++++++---------------
25 src/ldebug.h | 4 ++++
26 src/ldo.c | 2 +-
27 src/lstate.c | 1 +
28 src/lstate.h | 2 +-
29 5 files changed, 22 insertions(+), 17 deletions(-)
30
31diff --git a/src/ldebug.c b/src/ldebug.c
32index 239affb..832b16c 100644
33--- a/src/ldebug.c
34+++ b/src/ldebug.c
35@@ -34,9 +34,8 @@
36 #define noLuaClosure(f) ((f) == NULL || (f)->c.tt == LUA_TCCL)
37
38
39-/* Active Lua function (given call info) */
40-#define ci_func(ci) (clLvalue((ci)->func))
41-
42+/* inverse of 'pcRel' */
43+#define invpcRel(pc, p) ((p)->code + (pc) + 1)
44
45 static const char *funcnamefromcode (lua_State *L, CallInfo *ci,
46 const char **name);
47@@ -71,20 +70,18 @@ static void swapextra (lua_State *L) {
48
49 /*
50 ** This function can be called asynchronously (e.g. during a signal).
51-** Fields 'oldpc', 'basehookcount', and 'hookcount' (set by
52-** 'resethookcount') are for debug only, and it is no problem if they
53-** get arbitrary values (causes at most one wrong hook call). 'hookmask'
54-** is an atomic value. We assume that pointers are atomic too (e.g., gcc
55-** ensures that for all platforms where it runs). Moreover, 'hook' is
56-** always checked before being called (see 'luaD_hook').
57+** Fields 'basehookcount' and 'hookcount' (set by 'resethookcount')
58+** are for debug only, and it is no problem if they get arbitrary
59+** values (causes at most one wrong hook call). 'hookmask' is an atomic
60+** value. We assume that pointers are atomic too (e.g., gcc ensures that
61+** for all platforms where it runs). Moreover, 'hook' is always checked
62+** before being called (see 'luaD_hook').
63 */
64 LUA_API void lua_sethook (lua_State *L, lua_Hook func, int mask, int count) {
65 if (func == NULL || mask == 0) { /* turn off hooks? */
66 mask = 0;
67 func = NULL;
68 }
69- if (isLua(L->ci))
70- L->oldpc = L->ci->u.l.savedpc;
71 L->hook = func;
72 L->basehookcount = count;
73 resethookcount(L);
74@@ -665,7 +662,10 @@ l_noret luaG_runerror (lua_State *L, const char *fmt, ...) {
75 void luaG_traceexec (lua_State *L) {
76 CallInfo *ci = L->ci;
77 lu_byte mask = L->hookmask;
78+ const Proto *p = ci_func(ci)->p;
79 int counthook = (--L->hookcount == 0 && (mask & LUA_MASKCOUNT));
80+ /* 'L->oldpc' may be invalid; reset it in this case */
81+ int oldpc = (L->oldpc < p->sizecode) ? L->oldpc : 0;
82 if (counthook)
83 resethookcount(L); /* reset count */
84 else if (!(mask & LUA_MASKLINE))
85@@ -677,15 +677,15 @@ void luaG_traceexec (lua_State *L) {
86 if (counthook)
87 luaD_hook(L, LUA_HOOKCOUNT, -1); /* call count hook */
88 if (mask & LUA_MASKLINE) {
89- Proto *p = ci_func(ci)->p;
90 int npc = pcRel(ci->u.l.savedpc, p);
91 int newline = getfuncline(p, npc);
92 if (npc == 0 || /* call linehook when enter a new function, */
93- ci->u.l.savedpc <= L->oldpc || /* when jump back (loop), or when */
94- newline != getfuncline(p, pcRel(L->oldpc, p))) /* enter a new line */
95+ ci->u.l.savedpc <= invpcRel(oldpc, p) || /* when jump back (loop), or when */
96+ newline != getfuncline(p, oldpc)) /* enter a new line */
97 luaD_hook(L, LUA_HOOKLINE, newline); /* call line hook */
98+
99+ L->oldpc = npc; /* 'pc' of last call to line hook */
100 }
101- L->oldpc = ci->u.l.savedpc;
102 if (L->status == LUA_YIELD) { /* did hook yield? */
103 if (counthook)
104 L->hookcount = 1; /* undo decrement to zero */
105diff --git a/src/ldebug.h b/src/ldebug.h
106index 0e31546..c224cc4 100644
107--- a/src/ldebug.h
108+++ b/src/ldebug.h
109@@ -13,6 +13,10 @@
110
111 #define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1)
112
113+/* Active Lua function (given call info) */
114+#define ci_func(ci) (clLvalue((ci)->func))
115+
116+
117 #define getfuncline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : -1)
118
119 #define resethookcount(L) (L->hookcount = L->basehookcount)
120diff --git a/src/ldo.c b/src/ldo.c
121index 90b695f..f66ac1a 100644
122--- a/src/ldo.c
123+++ b/src/ldo.c
124@@ -382,7 +382,7 @@ int luaD_poscall (lua_State *L, CallInfo *ci, StkId firstResult, int nres) {
125 luaD_hook(L, LUA_HOOKRET, -1);
126 firstResult = restorestack(L, fr);
127 }
128- L->oldpc = ci->previous->u.l.savedpc; /* 'oldpc' for caller function */
129+ L->oldpc = pcRel(ci->u.l.savedpc, ci_func(ci)->p); /* 'oldpc' for caller function */
130 }
131 res = ci->func; /* res == final position of 1st result */
132 L->ci = ci->previous; /* back to caller */
133diff --git a/src/lstate.c b/src/lstate.c
134index 9194ac3..3573e36 100644
135--- a/src/lstate.c
136+++ b/src/lstate.c
137@@ -236,6 +236,7 @@ static void preinit_thread (lua_State *L, global_State *g) {
138 L->nny = 1;
139 L->status = LUA_OK;
140 L->errfunc = 0;
141+ L->oldpc = 0;
142 }
143
144
145diff --git a/src/lstate.h b/src/lstate.h
146index a469466..d75eadf 100644
147--- a/src/lstate.h
148+++ b/src/lstate.h
149@@ -164,7 +164,6 @@ struct lua_State {
150 StkId top; /* first free slot in the stack */
151 global_State *l_G;
152 CallInfo *ci; /* call info for current function */
153- const Instruction *oldpc; /* last pc traced */
154 StkId stack_last; /* last free slot in the stack */
155 StkId stack; /* stack base */
156 UpVal *openupval; /* list of open upvalues in this stack */
157@@ -174,6 +173,7 @@ struct lua_State {
158 CallInfo base_ci; /* CallInfo for first level (C calling Lua) */
159 volatile lua_Hook hook;
160 ptrdiff_t errfunc; /* current error handling function (stack index) */
161+ int oldpc; /* last pc traced */
162 int stacksize;
163 int basehookcount;
164 int hookcount;
165--
1662.13.3
167
diff --git a/meta/recipes-devtools/lua/lua_5.3.6.bb b/meta/recipes-devtools/lua/lua_5.4.3.bb
index f830e09259..0224744fe7 100644
--- a/meta/recipes-devtools/lua/lua_5.3.6.bb
+++ b/meta/recipes-devtools/lua/lua_5.4.3.bb
@@ -1,29 +1,24 @@
1DESCRIPTION = "Lua is a powerful light-weight programming language designed \ 1DESCRIPTION = "Lua is a powerful light-weight programming language designed \
2for extending applications." 2for extending applications."
3LICENSE = "MIT" 3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://doc/readme.html;beginline=318;endline=352;md5=f43d8ee6bc4df18ef8b276439cc4a153" 4LIC_FILES_CHKSUM = "file://doc/readme.html;beginline=307;endline=330;md5=79c3f6b19ad05efe24c1681f025026bb"
5HOMEPAGE = "http://www.lua.org/" 5HOMEPAGE = "http://www.lua.org/"
6 6
7SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz;name=tarballsrc \ 7SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz;name=tarballsrc \
8 file://lua.pc.in \ 8 file://lua.pc.in \
9 file://0001-Allow-building-lua-without-readline-on-Linux.patch \ 9 ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'http://www.lua.org/tests/lua-${PV_testsuites}-tests.tar.gz;name=tarballtest file://run-ptest ', '', d)} \
10 file://CVE-2020-15888.patch \
11 file://CVE-2020-15945.patch \
12 file://0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch \
13 " 10 "
14 11
15# if no test suite matches PV release of Lua exactly, download the suite for the closest Lua release. 12# if no test suite matches PV release of Lua exactly, download the suite for the closest Lua release.
16PV_testsuites = "5.3.4" 13PV_testsuites = "5.4.3"
17 14
18SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', \ 15SRC_URI[tarballsrc.sha256sum] = "f8612276169e3bfcbcfb8f226195bfc6e466fe13042f1076cbde92b7ec96bbfb"
19 'http://www.lua.org/tests/lua-${PV_testsuites}-tests.tar.gz;name=tarballtest \ 16SRC_URI[tarballtest.sha256sum] = "5d29c3022897a8290f280ebe1c6853248dfa35a668e1fc02ba9c8cde4e7bf110"
20 file://run-ptest \
21 ', '', d)}"
22 17
23SRC_URI[tarballsrc.md5sum] = "83f23dbd5230140a3770d5f54076948d" 18# remove at next version upgrade or when output changes
24SRC_URI[tarballsrc.sha256sum] = "fc5fd69bb8736323f026672b1b7235da613d7177e72558893a0bdcd320466d60" 19# was added after intermittent repro failures poisoned the cache
25SRC_URI[tarballtest.md5sum] = "b14fe3748c1cb2d74e3acd1943629ba3" 20PR = "r1"
26SRC_URI[tarballtest.sha256sum] = "b80771238271c72565e5a1183292ef31bd7166414cd0d43a8eb79845fa7f599f" 21HASHEQUIV_HASH_VERSION .= ".2"
27 22
28inherit pkgconfig binconfig ptest 23inherit pkgconfig binconfig ptest
29 24
@@ -31,7 +26,7 @@ PACKAGECONFIG ??= "readline"
31PACKAGECONFIG[readline] = ",,readline" 26PACKAGECONFIG[readline] = ",,readline"
32 27
33TARGET_CC_ARCH += " -fPIC ${LDFLAGS}" 28TARGET_CC_ARCH += " -fPIC ${LDFLAGS}"
34EXTRA_OEMAKE = "'CC=${CC} -fPIC' 'MYCFLAGS=${CFLAGS} -fPIC' MYLDFLAGS='${LDFLAGS}'" 29EXTRA_OEMAKE = "'CC=${CC} -fPIC' 'MYCFLAGS=${CFLAGS} -fPIC' MYLDFLAGS='${LDFLAGS}' 'AR=ar rcD' 'RANLIB=ranlib -D'"
35 30
36do_configure:prepend() { 31do_configure:prepend() {
37 sed -i -e s:/usr/local:${prefix}:g src/luaconf.h 32 sed -i -e s:/usr/local:${prefix}:g src/luaconf.h
@@ -39,7 +34,7 @@ do_configure:prepend() {
39} 34}
40 35
41do_compile () { 36do_compile () {
42 oe_runmake ${@bb.utils.contains('PACKAGECONFIG', 'readline', 'linux', 'linux-no-readline', d)} 37 oe_runmake ${@bb.utils.contains('PACKAGECONFIG', 'readline', 'linux-readline', 'linux', d)}
43} 38}
44 39
45do_install () { 40do_install () {
@@ -50,13 +45,13 @@ do_install () {
50 'INSTALL_MAN=${D}${mandir}/man1' \ 45 'INSTALL_MAN=${D}${mandir}/man1' \
51 'INSTALL_SHARE=${D}${datadir}/lua' \ 46 'INSTALL_SHARE=${D}${datadir}/lua' \
52 'INSTALL_LIB=${D}${libdir}' \ 47 'INSTALL_LIB=${D}${libdir}' \
53 'INSTALL_CMOD=${D}${libdir}/lua/5.3' \ 48 'INSTALL_CMOD=${D}${libdir}/lua/5.4' \
54 install 49 install
55 install -d ${D}${libdir}/pkgconfig 50 install -d ${D}${libdir}/pkgconfig
56 51
57 sed -e s/@VERSION@/${PV}/ ${WORKDIR}/lua.pc.in > ${WORKDIR}/lua.pc 52 sed -e s/@VERSION@/${PV}/ ${WORKDIR}/lua.pc.in > ${WORKDIR}/lua.pc
58 install -m 0644 ${WORKDIR}/lua.pc ${D}${libdir}/pkgconfig/ 53 install -m 0644 ${WORKDIR}/lua.pc ${D}${libdir}/pkgconfig/
59 rmdir ${D}${datadir}/lua/5.3 54 rmdir ${D}${datadir}/lua/5.4
60 rmdir ${D}${datadir}/lua 55 rmdir ${D}${datadir}/lua
61} 56}
62 57