diff --git a/.travis.yml b/.travis.yml index b7fd0f0b..57493ebb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,27 +2,40 @@ # LuaDist Travis-CI Hook # -# Since CMake is not directly supported we use erlang VMs -language: erlang +# We assume C build environments +language: C -# We need CMake and LuaDist +# Try using multiple Lua Implementations +env: + - TOOL="gcc" # Use native compiler (GCC usually) + - TOOL="clang" # Use clang + - TOOL="i686-w64-mingw32" # 32bit MinGW + - TOOL="x86_64-w64-mingw32" # 64bit MinGW + - TOOL="arm-linux-gnueabihf" # ARM hard-float (hf), linux + +# Crosscompile builds may fail +matrix: + allow_failures: + - env: TOOL="i686-w64-mingw32" + - env: TOOL="x86_64-w64-mingw32" + - env: TOOL="arm-linux-gnueabihf" + +# Install dependencies install: - - export MODULE=`basename $PWD` - - sudo apt-get install cmake >/dev/null 2>&1 - - git clone git://github.com/LuaDist/bootstrap.git _luadist >/dev/null 2>&1 - - cd _luadist - - git submodule update --init >/dev/null 2>&1 - - ./bootstrap >/dev/null 2>&1 - - export LUADIST=$PWD/_install/bin/luadist - - cd $HOME - -# Use LuaDist to deploy the module + - git clone git://github.com/LuaDist/Tools.git ~/_tools + - ~/_tools/travis/travis install + +# Bootstap +before_script: + - ~/_tools/travis/travis bootstrap + +# Build the module script: - - $LUADIST _test install $LUA $MODULE-scm -verbose=true -test=true + - ~/_tools/travis/travis build # Execute additional tests or commands after_script: - - ./_test/bin/lua -e "print (_VERSION)" + - ~/_tools/travis/travis test # Only watch the master branch branches: @@ -35,4 +48,4 @@ notifications: - luadist-dev@googlegroups.com email: on_success: change - on_failure: always \ No newline at end of file + on_failure: always diff --git a/CMakeLists.txt b/CMakeLists.txt index e445082b..cc303f5e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2012 LuaDist. +# Copyright (C) 2007-2013 LuaDist. # Created by Peter Drahoš, Peter Kapec # Redistribution and use of this file is allowed according to the terms of the MIT license. # For details see the COPYRIGHT file distributed with LuaDist. @@ -39,24 +39,31 @@ set ( LUA_CPATH_DEFAULT "./?${LUA_MODULE_SUFFIX};${LUA_DIR}${LUA_CDIR}/?${LUA_MO if ( WIN32 AND NOT CYGWIN ) # Windows systems option ( LUA_WIN "Windows specific build." ON ) - option ( LUA_BUILD_AS_DLL "Build Lua library as Dll." ON ) - # Paths (Double escapes needed) - set ( LUA_DIRSEP "\\\\" ) string ( REPLACE " /" ${LUA_DIRSEP} LUA_DIR "${LUA_DIR}" ) + option ( LUA_BUILD_WLUA "Build wLua interpretter without console output." ON ) + option ( LUA_BUILD_AS_DLL "Build Lua library as Dll." ${BUILD_SHARED_LIBS} ) + + # Paths (Double escapes ne option needed) + set ( LUA_DIRSEP "\\\\" ) + string ( REPLACE " /" ${LUA_DIRSEP} LUA_DIR "${LUA_DIR}" ) string ( REPLACE "/" ${LUA_DIRSEP} LUA_LDIR "${LUA_LDIR}" ) string ( REPLACE "/" ${LUA_DIRSEP} LUA_CDIR "${LUA_CDIR}" ) string ( REPLACE "/" ${LUA_DIRSEP} LUA_PATH_DEFAULT "${LUA_PATH_DEFAULT}" ) string ( REPLACE "/" ${LUA_DIRSEP} LUA_CPATH_DEFAULT "${LUA_CPATH_DEFAULT}" ) else ( ) # Posix systems (incl. Cygwin) - option ( LUA_USE_POSIX "Use POSIX functionality." ON ) + option ( LUA_USE_POSIX "Use POSIX features." ON ) option ( LUA_USE_DLOPEN "Use dynamic linker to load modules." ON ) option ( LUA_USE_MKSTEMP "Use mkstep." ON ) option ( LUA_USE_ISATTY "Use tty." ON ) option ( LUA_USE_POPEN "Use popen." ON ) option ( LUA_USE_ULONGJMP "Use ulongjmp" ON ) - option ( LUA_USE_STRTODHEX "assume 'strtod' handles hexa formats" ON ) - option ( LUA_USE_AFORMAT "assume 'printf' handles 'aA' specifiers" ON ) - option ( LUA_USE_LONGLONG "assume support for long long" ON ) + option ( LUA_USE_GMTIME_R "Use GTIME_R" ON ) + # Apple and Linux specific + if ( LINUX OR APPLE ) + option ( LUA_USE_STRTODHEX "Assume 'strtod' handles hexa formats" ON ) + option ( LUA_USE_AFORMAT "Assume 'printf' handles 'aA' specifiers" ON ) + option ( LUA_USE_LONGLONG "Assume support for long long" ON ) + endif ( ) endif ( ) ## SETUP @@ -79,7 +86,10 @@ endif ( ) if ( LUA_USE_DLOPEN ) # Link to dynamic linker library "dl" - list ( APPEND LIBS dl ) + find_library ( DL_LIBRARY NAMES dl ) + if ( DL_LIBRARY ) + list ( APPEND LIBS ${DL_LIBRARY} ) + endif ( ) endif ( ) if ( LUA_USE_READLINE ) @@ -117,9 +127,12 @@ endif ( ) ## BUILD # Create lua library -add_library ( liblua SHARED ${SRC_CORE} ${SRC_LIB} ${LUA_DLL_RC} ${LUA_DEF} ) +add_library ( liblua ${SRC_CORE} ${SRC_LIB} ${LUA_DLL_RC} ${LUA_DEF} ) target_link_libraries ( liblua ${LIBS} ) set_target_properties ( liblua PROPERTIES OUTPUT_NAME lua CLEAN_DIRECT_OUTPUT 1 ) +if ( LUA_BUILD_AS_DLL ) + set_target_properties ( liblua PROPERTIES COMPILE_DEFINITIONS LUA_BUILD_AS_DLL ) +endif () add_executable ( lua ${SRC_LUA} src/lua.rc ) target_link_libraries ( lua liblua ) @@ -127,11 +140,18 @@ target_link_libraries ( lua liblua ) add_executable ( luac ${SRC_CORE} ${SRC_LIB} ${SRC_LUAC} src/luac.rc ) target_link_libraries ( luac ${LIBS} ) +# On windows a variant of the lua interpreter without console output needs to be built +if ( LUA_BUILD_WLUA ) + add_executable ( wlua WIN32 src/wmain.c ${SRC_LUA} src/lua.rc ) + target_link_libraries ( wlua liblua ) + install_executable ( wlua ) +endif ( ) + install_executable ( lua luac ) install_library ( liblua ) install_data ( README.md ) #install_lua_module ( strict etc/strict.lua ) -install_header ( src/lua.h src/lualib.h src/lauxlib.h ${CMAKE_CURRENT_BINARY_DIR}/luaconf.h ) +install_header ( src/lua.h src/lualib.h src/lauxlib.h src/lua.hpp ${CMAKE_CURRENT_BINARY_DIR}/luaconf.h ) install_doc ( doc/ ) install_foo ( etc/ ) #install_test ( test/ ) diff --git a/Makefile b/Makefile index bd9515fd..b2a62cfd 100644 --- a/Makefile +++ b/Makefile @@ -46,7 +46,7 @@ TO_MAN= lua.1 luac.1 # Lua version and release. V= 5.2 -R= $V.1 +R= $V.4 # Targets start here. all: $(PLAT) diff --git a/README.md b/README.md index e07e097e..710e3ee1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ -This is Lua 5.2.1, released on 08 Jun 2012. -================ +This is Lua 5.2.4, released on 25 Feb 2015. For installation instructions, license details, and further information about Lua, see doc/readme.html. diff --git a/dist.info b/dist.info index c239db34..50f91867 100644 --- a/dist.info +++ b/dist.info @@ -1,10 +1,15 @@ --- This file is part of LuaDist project name = "lua" -version = "5.2.1" +version = "5.2.4" desc = "Lua is a powerful, fast, light-weight, embeddable scripting language." author = "Roberto Ierusalimschy, Waldemar Celes, Luiz Henrique de Figueiredo" license = "MIT/X11" url = "http://www.lua.org" maintainer = "Peter Drahoš" + +-- Offers functionality of the following packages +provides = { + "bit32-5.2.0" +} diff --git a/doc/contents.html b/doc/contents.html index 9f506051..9d5202fa 100644 --- a/doc/contents.html +++ b/doc/contents.html @@ -7,7 +7,6 @@ @@ -23,7 +22,7 @@
The reference manual is the official definition of the Lua language. For a complete introduction to Lua programming, see the book -Programming in Lua. +Programming in Lua.
start @@ -33,7 +32,7 @@
assert
collectgarbage
dofile
error
getmetatable
ipairs
-loadfile
load
+loadfile
next
pairs
pcall
@@ -168,6 +167,7 @@
+bit32
bit32.arshift
bit32.band
bit32.bnot
@@ -182,6 +182,7 @@
+coroutine
coroutine.create
coroutine.resume
coroutine.running
@@ -190,6 +191,7 @@
+debug
debug.debug
debug.getuservalue
debug.gethook
@@ -208,15 +210,7 @@
-file:close
-file:flush
-file:lines
-file:read
-file:seek
-file:setvbuf
-file:write
-
-
+io
io.close
io.flush
io.input
@@ -231,11 +225,19 @@
+math
math.abs
math.acos
math.asin
@@ -267,6 +269,7 @@
+os
os.clock
os.date
os.difftime
@@ -280,6 +283,7 @@
+package
package.config
package.cpath
package.loaded
@@ -290,6 +294,7 @@
+string
string.byte
string.char
string.dump
@@ -306,6 +311,7 @@
+table
table.concat
table.insert
table.pack
@@ -313,6 +319,14 @@
+luaopen_base
+luaopen_bit32
+luaopen_coroutine
+luaopen_debug
+luaopen_io
+luaopen_math
+luaopen_os
+luaopen_package
+luaopen_string
+luaopen_table
+
+