Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions buildenv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# bump: lua-version /LUA_VERSION="(.*)"/ https://www.lua.org/ftp/|re:/lua-([\d.]+).tar.gz/$1/|semver:*
LUA_VERSION="5.1.5"
LUA_VERSION="5.4.7"

export ZOPEN_BUILD_LINE="STABLE"
# 5.1.5 is needed for Neovim
Expand All @@ -26,7 +26,7 @@ zopen_check_results()
pfx="$2"
chk="$1/$2_check.log"

grep -q "Hello world, from Lua 5.1!" $chk
grep -q "Lua 5.4.7" $chk
failures=$?
echo "actualFailures:$failures"
echo "totalTests:1"
Expand Down
42 changes: 5 additions & 37 deletions patches/Makefile.patch
Original file line number Diff line number Diff line change
@@ -1,45 +1,13 @@
diff --git a/Makefile b/Makefile
index 209a132..567bca9 100644
index 72ca8ff..1f801e2 100644
--- a/Makefile
+++ b/Makefile
@@ -38,7 +38,7 @@ RANLIB= ranlib
# == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
@@ -36,7 +36,7 @@ RM= rm -f
# == 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 macosx mingw posix solaris zos
-PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris
+PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris zos

# What to install.
TO_BIN= lua luac
diff --git a/src/Makefile b/src/Makefile
index e0d4c9f..6f5761c 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -10,7 +10,7 @@ PLAT= none
CC= gcc
CFLAGS= -O2 -Wall $(MYCFLAGS)
AR= ar rcu
-RANLIB= ranlib
+RANLIB= echo
RM= rm -f
LIBS= -lm $(MYLIBS)

@@ -20,7 +20,7 @@ MYLIBS=

# == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========

-PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
+PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris zos

LUA_A= liblua.a
CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
@@ -95,6 +95,9 @@ freebsd:
generic:
$(MAKE) all MYCFLAGS=

+zos:
+ $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN"
+
linux:
$(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"

32 changes: 32 additions & 0 deletions patches/src/Makefile.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
diff --git a/src/Makefile b/src/Makefile
index b771196..2f41a5a 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -12,7 +12,7 @@ LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
LIBS= -lm $(SYSLIBS) $(MYLIBS)

AR= ar rcu
-RANLIB= ranlib
+RANLIB= echo
RM= rm -f
UNAME= uname

@@ -30,7 +30,7 @@ CMCFLAGS=

# == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======

-PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris
+PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris zos

LUA_A= liblua.a
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
@@ -143,6 +143,9 @@ posix:
SunOS solaris:
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN -D_REENTRANT" SYSLIBS="-ldl"

+zos:
+ $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN"
+
# Targets that do not create files (not all makes understand .PHONY).
.PHONY: all $(PLATS) help test clean default o a depend echo