[vlc-commits] contribs: lua 5.3
Ludovic Fauvet
git at videolan.org
Wed Mar 16 15:38:57 CET 2016
vlc | branch: master | Ludovic Fauvet <etix at videolan.org> | Wed Mar 16 12:32:35 2016 +0100| [dc9fb25f37835829cdfef0488e96de591b79c4ff] | committer: Jean-Baptiste Kempf
contribs: lua 5.3
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dc9fb25f37835829cdfef0488e96de591b79c4ff
---
contrib/src/lua/SHA512SUMS | 2 +-
contrib/src/lua/lua-ios-support.patch | 25 -----------------------
contrib/src/lua/lua-noreadline.patch | 25 +++++++++++------------
contrib/src/lua/lua.pc.in | 20 ++++++++++++++++++
contrib/src/lua/no-dylibs.patch | 36 +++++++++++++++++----------------
contrib/src/lua/no-localeconv.patch | 20 +++++++++---------
contrib/src/lua/rules.mak | 14 +++++++------
7 files changed, 69 insertions(+), 73 deletions(-)
diff --git a/contrib/src/lua/SHA512SUMS b/contrib/src/lua/SHA512SUMS
index 8b02bb7..df0bbbe 100644
--- a/contrib/src/lua/SHA512SUMS
+++ b/contrib/src/lua/SHA512SUMS
@@ -1 +1 @@
-bc542fe8535826ac1e49b03a8f238cf049724b02c14718f8162cfeaf735a5e6c58412ff18dbe7a38e4cc4433f3d1e702554e9b24b5f021634b4280880980f40f lua-5.1.4.tar.gz
+c8c7908ca927bcafe6739fb8b0226d77c796226c1e6770a38f1b1b577a73f7fb08ead64fe40809d5fff9a13db50e932e9f7164e4524e9d4fb3678182ec3d4d28 lua-5.3.2.tar.gz
diff --git a/contrib/src/lua/lua-ios-support.patch b/contrib/src/lua/lua-ios-support.patch
deleted file mode 100644
index 014a1e3..0000000
--- a/contrib/src/lua/lua-ios-support.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff -ru lua/Makefile lua-f/Makefile
---- lua/Makefile 2008-08-12 02:40:48.000000000 +0200
-+++ lua-f/Makefile 2012-03-21 13:58:30.000000000 +0100
-@@ -38,7 +38,7 @@
- # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
-
- # Convenience platforms targets.
--PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
-+PLATS= aix ansi bsd freebsd generic linux ios macosx mingw posix solaris
-
- # What to install.
- TO_BIN= lua luac
-diff -ru lua/src/Makefile lua-f/src/Makefile
---- lua/src/Makefile 2012-03-21 13:58:59.000000000 +0100
-+++ lua-f/src/Makefile 2012-03-21 13:57:08.000000000 +0100
-@@ -98,6 +98,9 @@
- linux:
- $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl"
-
-+ios:
-+ $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX
-+
- macosx:
- $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline"
- # use this on Mac OS X 10.3-
diff --git a/contrib/src/lua/lua-noreadline.patch b/contrib/src/lua/lua-noreadline.patch
index 862d3d1..82764d6 100644
--- a/contrib/src/lua/lua-noreadline.patch
+++ b/contrib/src/lua/lua-noreadline.patch
@@ -1,24 +1,23 @@
LUA: do not use readline on Linux
-diff -ru lua-5.1/src/Makefile lua/src/Makefile
---- lua-5.1/src/Makefile 2006-02-16 17:45:09.000000000 +0200
-+++ lua/src/Makefile 2009-02-09 23:35:21.000000000 +0200
-@@ -92,7 +92,7 @@
- $(MAKE) all MYCFLAGS=
+--- lua-5.3/src/Makefile 2016-03-16 11:53:27.008785835 +0100
++++ lua/src/Makefile 2016-03-16 11:53:38.825752456 +0100
+@@ -107,7 +107,7 @@
+ generic: $(ALL)
linux:
-- $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
-+ $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl"
+- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
++ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl"
macosx:
- $(MAKE) all MYCFLAGS=-DLUA_USE_MACOSX
-diff -ru lua-5.1/src/luaconf.h lua/src/luaconf.h
---- lua-5.1/src/luaconf.h 2006-02-10 19:44:06.000000000 +0200
-+++ lua/src/luaconf.h 2009-02-09 23:33:29.000000000 +0200
-@@ -36,7 +36,6 @@
+ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline" CC=cc
+--- lua-5.3/src/luaconf.h.orig 2016-03-16 12:29:35.600387048 +0100
++++ lua/src/luaconf.h 2016-03-16 12:29:51.140780084 +0100
+@@ -61,7 +61,7 @@
#if defined(LUA_USE_LINUX)
#define LUA_USE_POSIX
#define LUA_USE_DLOPEN /* needs an extra library: -ldl */
-#define LUA_USE_READLINE /* needs some extra libraries */
++//#define LUA_USE_READLINE /* needs some extra libraries */
#endif
- #if defined(LUA_USE_MACOSX)
+
diff --git a/contrib/src/lua/lua.pc.in b/contrib/src/lua/lua.pc.in
new file mode 100644
index 0000000..4043d10
--- /dev/null
+++ b/contrib/src/lua/lua.pc.in
@@ -0,0 +1,20 @@
+V=@VERSION_MAJOR@
+R=@VERSION@
+
+prefix=/usr
+INSTALL_BIN=${prefix}/bin
+INSTALL_INC=${prefix}/include
+INSTALL_LIB=${prefix}/lib
+INSTALL_MAN=${prefix}/share/man/man1
+INSTALL_LMOD=${prefix}/share/lua/${V}
+INSTALL_CMOD=${prefix}/lib/lua/${V}
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: Lua
+Description: An Extensible Extension Language
+Version: ${R}
+Requires:
+Libs: -L${libdir} -llua -lm
+Cflags: -I${includedir}
diff --git a/contrib/src/lua/no-dylibs.patch b/contrib/src/lua/no-dylibs.patch
index e925f2d..24ce73e 100644
--- a/contrib/src/lua/no-dylibs.patch
+++ b/contrib/src/lua/no-dylibs.patch
@@ -1,25 +1,27 @@
---- lua/src/luaconf.h.orig 2013-05-09 15:29:05.797554571 +0200
-+++ lua/src/luaconf.h 2013-05-09 15:29:10.337554380 +0200
-@@ -42,7 +42,7 @@
+--- lua/src/luaconf.h.orig 2016-03-16 12:10:53.502005950 +0100
++++ lua/src/luaconf.h 2016-03-16 12:12:59.848535297 +0100
+@@ -53,21 +53,21 @@
- #if defined(LUA_USE_MACOSX)
- #define LUA_USE_POSIX
--#define LUA_DL_DYLD /* does not need extra library */
-+//#define LUA_DL_DYLD /* does not need extra library */
+
+ #if defined(LUA_USE_WINDOWS)
+-#define LUA_DL_DLL /* enable support for DLL */
++//#define LUA_DL_DLL /* enable support for DLL */
+ #define LUA_USE_C89 /* broadly, Windows is C89 */
#endif
-@@ -691,11 +691,11 @@
- ** By default, _WIN32 gets LUA_DL_DLL and MAC OS X gets LUA_DL_DYLD.
- */
- #if defined(LUA_USE_DLOPEN)
--#define LUA_DL_DLOPEN
-+//#define LUA_DL_DLOPEN
+ #if defined(LUA_USE_LINUX)
+ #define LUA_USE_POSIX
+-#define LUA_USE_DLOPEN /* needs an extra library: -ldl */
++//#define LUA_USE_DLOPEN /* needs an extra library: -ldl */
+ //#define LUA_USE_READLINE /* needs some extra libraries */
#endif
- #if defined(LUA_WIN)
--#define LUA_DL_DLL
-+//#define LUA_DL_DLL
- #endif
+ #if defined(LUA_USE_MACOSX)
+ #define LUA_USE_POSIX
+-#define LUA_USE_DLOPEN /* MacOS does not need -ldl */
++//#define LUA_USE_DLOPEN /* MacOS does not need -ldl */
+ #define LUA_USE_READLINE /* needs an extra library: -lreadline */
+ #endif
diff --git a/contrib/src/lua/no-localeconv.patch b/contrib/src/lua/no-localeconv.patch
index 02d67c0..240398d 100644
--- a/contrib/src/lua/no-localeconv.patch
+++ b/contrib/src/lua/no-localeconv.patch
@@ -1,13 +1,11 @@
---- lua/src/llex.c.orig 2011-12-25 23:39:35.254829002 -0500
-+++ lua/src/llex.c 2011-12-25 23:39:59.662829001 -0500
-@@ -176,9 +176,8 @@
-
- static void trydecpoint (LexState *ls, SemInfo *seminfo) {
- /* format error: try to update decimal point separator */
-- struct lconv *cv = localeconv();
+--- lua/src/llex.c.orig 2016-03-16 12:21:12.567664718 +0100
++++ lua/src/llex.c 2016-03-16 12:21:39.361675706 +0100
+@@ -226,7 +226,7 @@
+ */
+ static void trydecpoint (LexState *ls, TValue *o) {
char old = ls->decpoint;
-- ls->decpoint = (cv ? cv->decimal_point[0] : '.');
-+ ls->decpoint = '.';
- buffreplace(ls, old, ls->decpoint); /* try updated decimal separator */
- if (!luaO_str2d(luaZ_buffer(ls->buff), &seminfo->r)) {
+- ls->decpoint = lua_getlocaledecpoint();
++ //ls->decpoint = lua_getlocaledecpoint();
+ buffreplace(ls, old, ls->decpoint); /* try new decimal separator */
+ if (luaO_str2num(luaZ_buffer(ls->buff), o) == 0) {
/* format error with correct decimal point: no more options */
diff --git a/contrib/src/lua/rules.mak b/contrib/src/lua/rules.mak
index 8be4af2..512c3c3 100644
--- a/contrib/src/lua/rules.mak
+++ b/contrib/src/lua/rules.mak
@@ -1,6 +1,7 @@
-# Lua 5.1
+# Lua 5.3
-LUA_VERSION := 5.1.4
+LUA_VERSION := 5.3.2
+LUA_VERSION_MAJOR := 5.3
LUA_URL := http://www.lua.org/ftp/lua-$(LUA_VERSION).tar.gz
# Reverse priority order
@@ -26,6 +27,9 @@ endif
# Feel free to add autodetection if you need to...
PKGS += lua
+ifeq ($(call need_pkg,"lua5.3"),)
+PKGS_FOUND += lua
+endif
ifeq ($(call need_pkg,"lua5.2"),)
PKGS_FOUND += lua
endif
@@ -42,9 +46,7 @@ lua: lua-$(LUA_VERSION).tar.gz .sum-lua
$(UNPACK)
$(APPLY) $(SRC)/lua/lua-noreadline.patch
$(APPLY) $(SRC)/lua/no-dylibs.patch
- $(APPLY) $(SRC)/lua/luac-32bits.patch
$(APPLY) $(SRC)/lua/no-localeconv.patch
- $(APPLY) $(SRC)/lua/lua-ios-support.patch
ifdef HAVE_DARWIN_OS
(cd $(UNPACK_DIR) && \
sed -e 's%gcc%$(CC)%' \
@@ -72,10 +74,10 @@ ifdef HAVE_WIN32
cd $</src && $(HOSTVARS) $(MAKE) liblua.a
endif
cd $< && $(HOSTVARS) $(MAKE) install INSTALL_TOP="$(PREFIX)"
+ mkdir -p -- "$(PREFIX)/lib/pkgconfig"
+ sed -e 's/@VERSION_MAJOR@/$(LUA_VERSION_MAJOR)/g' -e 's/@VERSION@/$(LUA_VERSION)/g' < $(SRC)/lua/lua.pc.in > "$(PREFIX)/lib/pkgconfig/lua.pc"
ifdef HAVE_WIN32
cd $< && $(RANLIB) "$(PREFIX)/lib/liblua.a"
- mkdir -p -- "$(PREFIX)/lib/pkgconfig"
- cp $</etc/lua.pc "$(PREFIX)/lib/pkgconfig/"
endif
ifdef HAVE_CROSS_COMPILE
cd $</src && $(MAKE) clean && $(MAKE) liblua.a && ranlib liblua.a && $(MAKE) luac
More information about the vlc-commits
mailing list