-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lua: Make building more generic (build for any arch)
Default version changed from 5.3.5 to 5.3.6. Added port build options: - PORTS_LUA_VERSION - version to download (must be supported by respective patches); - PORTS_LUA_STACK_SIZE - size of Lua's internal stack; - PORTS_LUA_CSTACK_SIZE - size of stack (when using linked lua binary); - PORTS_LUA_COMPAT_5_2 - backward compatibility with Lua 5.2; - PORTS_LUA_DEBUG - enable debug features, e.g. API checks; - PORTS_LUA_INSTALL_TESTS - download and install external Lua test scripts; - PORTS_LUA_RESTRAIN - disable Lua features which may be used to crash the interpreter or perform side-effects in the operating system. JIRA: NIL-595
- Loading branch information
Showing
9 changed files
with
258 additions
and
216 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
fc5fd69bb8736323f026672b1b7235da613d7177e72558893a0bdcd320466d60 *lua-5.3.6.tar.gz | ||
63ed5f5bcfd15dfd2f72e04c2f8c10585bb8de9e558df62b335cb9e5c1a4ef34 *lua-5.4.6-tests.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
diff --git a/Makefile b/Makefile | ||
index a2820e0..52a1c51 100644 | ||
--- a/Makefile | ||
+++ b/Makefile | ||
@@ -4,19 +4,16 @@ | ||
# == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT ======================= | ||
|
||
# Your platform. See PLATS for possible values. | ||
-PLAT= none | ||
+PLAT= posix | ||
|
||
# Where to install. The installation starts in the src and doc directories, | ||
# so take care if INSTALL_TOP is not an absolute path. See the local target. | ||
# You may want to make INSTALL_LMOD and INSTALL_CMOD consistent with | ||
# LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h. | ||
INSTALL_TOP= /usr/local | ||
-INSTALL_BIN= $(INSTALL_TOP)/bin | ||
+INSTALL_BIN= $(INSTALL_TOP)/prog | ||
INSTALL_INC= $(INSTALL_TOP)/include | ||
INSTALL_LIB= $(INSTALL_TOP)/lib | ||
-INSTALL_MAN= $(INSTALL_TOP)/man/man1 | ||
-INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V | ||
-INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V | ||
|
||
# How to install. If your install program does not support "-p", then | ||
# you may have to run ranlib on the installed liblua.a. | ||
@@ -42,7 +39,6 @@ PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris | ||
TO_BIN= lua luac | ||
TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp | ||
TO_LIB= liblua.a | ||
-TO_MAN= lua.1 luac.1 | ||
|
||
# Lua version and release. | ||
V= 5.3 | ||
@@ -58,17 +54,15 @@ test: dummy | ||
src/lua -v | ||
|
||
install: dummy | ||
- cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD) | ||
+ cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) | ||
cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN) | ||
cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) | ||
cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) | ||
- cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) | ||
|
||
uninstall: | ||
cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN) | ||
cd src && cd $(INSTALL_INC) && $(RM) $(TO_INC) | ||
cd src && cd $(INSTALL_LIB) && $(RM) $(TO_LIB) | ||
- cd doc && cd $(INSTALL_MAN) && $(RM) $(TO_MAN) | ||
|
||
local: | ||
$(MAKE) install INSTALL_TOP=../install | ||
@@ -90,14 +84,10 @@ echo: | ||
@echo "TO_BIN= $(TO_BIN)" | ||
@echo "TO_INC= $(TO_INC)" | ||
@echo "TO_LIB= $(TO_LIB)" | ||
- @echo "TO_MAN= $(TO_MAN)" | ||
@echo "INSTALL_TOP= $(INSTALL_TOP)" | ||
@echo "INSTALL_BIN= $(INSTALL_BIN)" | ||
@echo "INSTALL_INC= $(INSTALL_INC)" | ||
@echo "INSTALL_LIB= $(INSTALL_LIB)" | ||
- @echo "INSTALL_MAN= $(INSTALL_MAN)" | ||
- @echo "INSTALL_LMOD= $(INSTALL_LMOD)" | ||
- @echo "INSTALL_CMOD= $(INSTALL_CMOD)" | ||
@echo "INSTALL_EXEC= $(INSTALL_EXEC)" | ||
@echo "INSTALL_DATA= $(INSTALL_DATA)" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
diff --git a/src/Makefile b/src/Makefile | ||
index a13afb9..8e178c7 100644 | ||
--- a/src/Makefile | ||
+++ b/src/Makefile | ||
@@ -4,26 +4,24 @@ | ||
# == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT ======================= | ||
|
||
# Your platform. See PLATS for possible values. | ||
-PLAT= none | ||
+PLAT= posix | ||
|
||
-CC= gcc -std=gnu99 | ||
-CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS) | ||
-LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS) | ||
+CC= $(CROSS)gcc | ||
+# MYCFLAGS and MYLDFLAGS are provided by the caller | ||
+MYLIBS := | ||
+ | ||
+CFLAGS= -std=gnu99 -O2 -Wall -Wextra $(SYSCFLAGS) $(MYCFLAGS) | ||
+LDFLAGS= $(SYSLDFLAGS) $(MYCFLAGS) $(MYLDFLAGS) | ||
LIBS= -lm $(SYSLIBS) $(MYLIBS) | ||
|
||
-AR= ar rcu | ||
-RANLIB= ranlib | ||
+AR= $(CROSS)ar rcs | ||
+RANLIB= $(CROSS)ranlib | ||
RM= rm -f | ||
|
||
SYSCFLAGS= | ||
SYSLDFLAGS= | ||
SYSLIBS= | ||
|
||
-MYCFLAGS= | ||
-MYLDFLAGS= | ||
-MYLIBS= | ||
-MYOBJS= | ||
- | ||
# == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE ======= | ||
|
||
PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris | ||
@@ -57,7 +55,6 @@ a: $(ALL_A) | ||
|
||
$(LUA_A): $(BASE_O) | ||
$(AR) $@ $(BASE_O) | ||
- $(RANLIB) $@ | ||
|
||
$(LUA_T): $(LUA_O) $(LUA_A) | ||
$(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) |
Oops, something went wrong.