mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 03:30:05 +02:00
lua: bump version.
This commit is contained in:
113
dev-lang/lua/patches/lua-5.3.2.patchset
Normal file
113
dev-lang/lua/patches/lua-5.3.2.patchset
Normal file
@@ -0,0 +1,113 @@
|
||||
From cb6d6fae1c5deb2efa132697cdd9cf00d727d129 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Mon, 5 May 2014 15:59:15 +0000
|
||||
Subject: import patch from 5.2.1
|
||||
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 5ee5601..551b8c5 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -36,12 +36,12 @@ RM= rm -f
|
||||
# == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
|
||||
|
||||
# Convenience platforms targets.
|
||||
-PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris
|
||||
+PLATS= aix bsd c89 freebsd generic haiku linux macosx mingw posix solaris
|
||||
|
||||
# What to install.
|
||||
TO_BIN= lua luac
|
||||
TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
|
||||
-TO_LIB= liblua.a
|
||||
+TO_LIB= liblua.a liblua.so
|
||||
TO_MAN= lua.1 luac.1
|
||||
|
||||
# Lua version and release.
|
||||
@@ -52,7 +52,7 @@ R= $V.1
|
||||
all: $(PLAT)
|
||||
|
||||
$(PLATS) clean:
|
||||
- cd src && $(MAKE) $@
|
||||
+ cd src && $(MAKE) V=$(V) $@
|
||||
|
||||
test: dummy
|
||||
src/lua -v
|
||||
diff --git a/src/Makefile b/src/Makefile
|
||||
index d71c75c..d9b39fb 100644
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -26,9 +26,10 @@ MYOBJS=
|
||||
|
||||
# == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
|
||||
|
||||
-PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris
|
||||
+PLATS= aix bsd c89 freebsd generic haiku linux macosx mingw posix solaris
|
||||
|
||||
LUA_A= liblua.a
|
||||
+LUA_SO= liblua.so
|
||||
CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \
|
||||
lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o \
|
||||
ltm.o lundump.o lvm.o lzio.o
|
||||
@@ -43,7 +44,7 @@ LUAC_T= luac
|
||||
LUAC_O= luac.o
|
||||
|
||||
ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
|
||||
-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
|
||||
+ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO)
|
||||
ALL_A= $(LUA_A)
|
||||
|
||||
# Targets start here.
|
||||
@@ -65,6 +66,9 @@ $(LUA_T): $(LUA_O) $(LUA_A)
|
||||
$(LUAC_T): $(LUAC_O) $(LUA_A)
|
||||
$(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
|
||||
|
||||
+$(LUA_SO): $(CORE_O) $(LIB_O)
|
||||
+ $(CC) -o $@ -shared -fPIC -Wl,-soname=liblua.so.$(V) $(LDFLAGS) $? $(LIBS)
|
||||
+
|
||||
clean:
|
||||
$(RM) $(ALL_T) $(ALL_O)
|
||||
|
||||
@@ -106,6 +110,9 @@ freebsd:
|
||||
|
||||
generic: $(ALL)
|
||||
|
||||
+haiku:
|
||||
+ $(MAKE) all SYSCFLAGS="-DLUA_USE_HAIKU" LIBS=
|
||||
+
|
||||
linux:
|
||||
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
|
||||
|
||||
diff --git a/src/luaconf.h b/src/luaconf.h
|
||||
index 7cfa4fa..e947453 100644
|
||||
--- a/src/luaconf.h
|
||||
+++ b/src/luaconf.h
|
||||
@@ -81,7 +81,12 @@
|
||||
#define LUA_C89_NUMBERS
|
||||
#endif
|
||||
|
||||
-
|
||||
+#if defined(LUA_USE_HAIKU)
|
||||
+#define LUA_USE_MKSTEMP
|
||||
+#define LUA_USE_ISATTY
|
||||
+#define LUA_USE_POPEN
|
||||
+#define LUA_USE_DLOPEN
|
||||
+#endif
|
||||
|
||||
/*
|
||||
@@ LUAI_BITSINT defines the (minimum) number of bits in an 'int'.
|
||||
@@ -188,8 +193,12 @@
|
||||
|
||||
#else /* }{ */
|
||||
|
||||
+#ifndef LUA_ROOT
|
||||
#define LUA_ROOT "/usr/local/"
|
||||
+#endif
|
||||
+#ifndef LUA_LDIR
|
||||
#define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR "/"
|
||||
+#endif
|
||||
#define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR "/"
|
||||
#define LUA_PATH_DEFAULT \
|
||||
LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \
|
||||
--
|
||||
2.2.2
|
||||
|
||||
Reference in New Issue
Block a user