diff options
author | jtb <jtb@pkgsrc.org> | 2003-04-29 23:33:56 +0000 |
---|---|---|
committer | jtb <jtb@pkgsrc.org> | 2003-04-29 23:33:56 +0000 |
commit | 73eeabad228faf7a6584e3aa9b3dcaccf43fe2c5 (patch) | |
tree | 009f4a6b4f4c09b5fcb3b2932bbe99608188a520 /lang | |
parent | 80c1292a4138eef54a629a0c7702a7cb8c0bb9e9 (diff) | |
download | pkgsrc-73eeabad228faf7a6584e3aa9b3dcaccf43fe2c5.tar.gz |
Update to version 5.0.
* Changes from version 4.0 to 5.0
-------------------------------
Language:
+ lexical scoping.
+ Lua coroutines.
+ standard libraries now packaged in tables.
+ tags replaced by metatables and tag methods replaced by metamethods,
stored in metatables.
+ proper tail calls.
+ each function can have its own global table, which can be shared.
+ new __newindex metamethod, called when we insert a new key into a table.
+ new block comments: --[[ ... ]].
+ new generic for.
+ new weak tables.
+ new boolean type.
+ new syntax "local function".
+ (f()) returns the first value returned by f.
+ {f()} fills a table with all values returned by f.
+ \n ignored in [[\n .
+ fixed and-or priorities.
+ more general syntax for function definition (e.g. function a.x.y:f()...end).
+ more general syntax for function calls (e.g. (print or write)(9)).
+ new functions (time/date, tmpfile, unpack, require, load*, etc.).
API:
+ chunks are loaded by using lua_load; new luaL_loadfile and luaL_loadbuffer.
+ introduced lightweight userdata, a simple "void*" without a metatable.
+ new error handling protocol: the core no longer prints error messages;
all errors are reported to the caller on the stack.
+ new lua_atpanic for host cleanup.
+ new, signal-safe, hook scheme.
Implementation:
+ new license: MIT.
+ new, faster, register-based virtual machine.
+ support for external multithreading and coroutines.
+ new and consistent error message format.
+ the core no longer needs "stdio.h" for anything (except for a single
use of sprintf to convert numbers to strings).
+ lua.c now runs the environment variable LUA_INIT, if present. It can
be "@filename", to run a file, or the chunk itself.
+ support for user extensions in lua.c.
sample implementation given for command line editing.
+ new dynamic loading library, active by default on several platforms.
+ safe garbage-collector metamethods.
+ precompiled bytecodes checked for integrity (secure binary dostring).
+ strings are fully aligned.
+ position capture in string.find.
+ read('*l') can read lines with embedded zeros.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/lua/Makefile | 18 | ||||
-rw-r--r-- | lang/lua/PLIST | 66 | ||||
-rw-r--r-- | lang/lua/buildlink2.mk | 5 | ||||
-rw-r--r-- | lang/lua/distinfo | 16 | ||||
-rw-r--r-- | lang/lua/patches/patch-aa | 4 | ||||
-rw-r--r-- | lang/lua/patches/patch-ab | 14 | ||||
-rw-r--r-- | lang/lua/patches/patch-ac | 12 | ||||
-rw-r--r-- | lang/lua/patches/patch-ad | 10 | ||||
-rw-r--r-- | lang/lua/patches/patch-ae | 16 |
9 files changed, 79 insertions, 82 deletions
diff --git a/lang/lua/Makefile b/lang/lua/Makefile index 0f0df1674f8..5ac12d6943c 100644 --- a/lang/lua/Makefile +++ b/lang/lua/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.4 2003/04/04 17:35:20 abs Exp $ +# $NetBSD: Makefile,v 1.5 2003/04/29 23:33:56 jtb Exp $ -DISTNAME= lua-4.0.1 +DISTNAME= lua-5.0 CATEGORIES= lang MASTER_SITES= ftp://ftp.tecgraf.puc-rio.br/pub/lua/ \ ftp://ftp.ntua.gr/pub/lang/lua/ \ @@ -19,7 +19,9 @@ MAINTAINER= packages@netbsd.org HOMEPAGE= http://www.lua.org COMMENT= Powerful light-weight language for extending applications -BUILD_DIRS= ${WRKSRC}/build +USE_BUILDLINK2= yes + +BUILD_DIRS= ${WRKSRC}/objdir post-extract: ${MKDIR} ${BUILD_DIRS} @@ -36,11 +38,11 @@ post-install: cd ${WRKSRC}/doc; ${INSTALL_DATA} *.html *.gif \ ${PREFIX}/share/doc/html/lua ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/lua - ${RM} -f ${WRKSRC}/test/lua* - cd ${WRKSRC}/test && ${PAX} -rw . ${PREFIX}/share/examples/lua - ${RM} -f ${WRKSRC}/etc/Makefile - ${RM} -f ${WRKSRC}/etc/lua.ico + cd ${WRKSRC}/test && ${INSTALL_DATA} README *.lua \ + ${PREFIX}/share/examples/lua ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/lua/etc - cd ${WRKSRC}/etc && ${PAX} -rw . ${PREFIX}/share/examples/lua/etc + cd ${WRKSRC}/etc && ${INSTALL_DATA} README *.c *.h \ + *.lua lua.magic lua.xpm \ + ${PREFIX}/share/examples/lua/etc .include "../../mk/bsd.pkg.mk" diff --git a/lang/lua/PLIST b/lang/lua/PLIST index ef89c24cc48..52999bb79c3 100644 --- a/lang/lua/PLIST +++ b/lang/lua/PLIST @@ -1,26 +1,25 @@ -@comment $NetBSD: PLIST,v 1.2 2003/02/22 00:51:58 jtb Exp $ +@comment $NetBSD: PLIST,v 1.3 2003/04/29 23:33:56 jtb Exp $ bin/lua bin/luac include/lauxlib.h include/lua.h -include/luadebug.h include/lualib.h lib/liblua.a lib/liblua.so -lib/liblua.so.0 -lib/liblua.so.0.0 +lib/liblua.so.1 +lib/liblua.so.1.0 lib/liblua_p.a lib/liblua_pic.a lib/liblualib.a lib/liblualib.so -lib/liblualib.so.0 -lib/liblualib.so.0.0 +lib/liblualib.so.1 +lib/liblualib.so.1.0 lib/liblualib_p.a lib/liblualib_pic.a +man/cat1/lua.0 +man/cat1/luac.0 man/man1/lua.1 man/man1/luac.1 -share/doc/html/lua/idx.html -share/doc/html/lua/index.html share/doc/html/lua/logo.gif share/doc/html/lua/lua.html share/doc/html/lua/luac.html @@ -29,43 +28,40 @@ share/doc/html/lua/readme.html share/doc/lua/COPYRIGHT share/doc/lua/HISTORY share/doc/lua/README +share/examples/lua/README +share/examples/lua/bisect.lua +share/examples/lua/cf.lua +share/examples/lua/compat.lua +share/examples/lua/echo.lua +share/examples/lua/env.lua share/examples/lua/etc/README share/examples/lua/etc/bin2c.c -share/examples/lua/etc/def.lua +share/examples/lua/etc/compat.lua +share/examples/lua/etc/doall.lua share/examples/lua/etc/lua.magic share/examples/lua/etc/lua.xpm +share/examples/lua/etc/luser_number.h +share/examples/lua/etc/luser_tests.h share/examples/lua/etc/min.c -share/examples/lua/etc/setfallback.lua -share/examples/lua/etc/stdcall.lua +share/examples/lua/etc/noparser.c +share/examples/lua/etc/saconfig.c share/examples/lua/etc/trace.c -share/examples/lua/examples/ps/ps.lua -share/examples/lua/examples/ps/hilbert.lua -share/examples/lua/examples/www/db.lua -share/examples/lua/examples/www/README -share/examples/lua/examples/www/template.html -share/examples/lua/examples/www/staff.lua -share/examples/lua/life.lua -share/examples/lua/fib.lua -share/examples/lua/cf-for.lua share/examples/lua/factorial.lua -share/examples/lua/save.lua -share/examples/lua/sort.lua -share/examples/lua/hello.lua -share/examples/lua/README -share/examples/lua/bisect.lua -share/examples/lua/cf.lua +share/examples/lua/fib.lua +share/examples/lua/fibfor.lua share/examples/lua/globals.lua -share/examples/lua/webform.lua -share/examples/lua/qp.lua -share/examples/lua/lisp.lua +share/examples/lua/hello.lua +share/examples/lua/life.lua +share/examples/lua/luac.lua +share/examples/lua/printf.lua +share/examples/lua/readonly.lua +share/examples/lua/sieve.lua +share/examples/lua/sort.lua +share/examples/lua/table.lua +share/examples/lua/trace-calls.lua share/examples/lua/trace-globals.lua share/examples/lua/undefined.lua -share/examples/lua/trace-calls.lua -share/examples/lua/old.lua -share/examples/lua/table.lua -@dirrm share/examples/lua/examples/www -@dirrm share/examples/lua/examples/ps -@dirrm share/examples/lua/examples +share/examples/lua/xd.lua @dirrm share/examples/lua/etc @dirrm share/examples/lua @dirrm share/doc/lua diff --git a/lang/lua/buildlink2.mk b/lang/lua/buildlink2.mk index 5e5ff4e48f0..adbbac3a61f 100644 --- a/lang/lua/buildlink2.mk +++ b/lang/lua/buildlink2.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink2.mk,v 1.2 2003/02/22 00:51:58 jtb Exp $ +# $NetBSD: buildlink2.mk,v 1.3 2003/04/29 23:33:56 jtb Exp $ # # This Makefile fragment is included by packages that use lua. # @@ -7,14 +7,13 @@ LUA_BUILDLINK2_MK= # defined BUILDLINK_PACKAGES+= lua -BUILDLINK_DEPENDS.lua?= lua>=4.0.1 +BUILDLINK_DEPENDS.lua?= lua>=5.0 BUILDLINK_PKGSRCDIR.lua?= ../../lang/lua EVAL_PREFIX+= BUILDLINK_PREFIX.lua=lua BUILDLINK_PREFIX.lua_DEFAULT= ${LOCALBASE} BUILDLINK_FILES.lua+= include/lauxlib.h BUILDLINK_FILES.lua+= include/lua.h -BUILDLINK_FILES.lua+= include/luadebug.h BUILDLINK_FILES.lua+= include/lualib.h BUILDLINK_FILES.lua+= lib/liblua.* BUILDLINK_FILES.lua+= lib/liblualib.* diff --git a/lang/lua/distinfo b/lang/lua/distinfo index b7a7418f995..9613e4769cd 100644 --- a/lang/lua/distinfo +++ b/lang/lua/distinfo @@ -1,9 +1,9 @@ -$NetBSD: distinfo,v 1.2 2003/02/22 00:51:58 jtb Exp $ +$NetBSD: distinfo,v 1.3 2003/04/29 23:33:56 jtb Exp $ -SHA1 (lua-4.0.1.tar.gz) = 12f1864a7ecd4b8011862a07fa3f177b2e80e7d3 -Size (lua-4.0.1.tar.gz) = 158426 bytes -SHA1 (patch-aa) = 144eedfb2105724b7d5f67bb1ac5d2e467b51107 -SHA1 (patch-ab) = 37ac2623dcc1bcd1a8e3e80b94e153106e876dcf -SHA1 (patch-ac) = ee37ba37bcc408700fac203dcaef44fe044d6675 -SHA1 (patch-ad) = 0f3fbb185cc64a976e90fdd5385ce24ef956d5fd -SHA1 (patch-ae) = d6d1f9133a35bf505da1fdd790545139d858f9fe +SHA1 (lua-5.0.tar.gz) = 88b1bc057857c0db5ace491c4af2c917a2b803bf +Size (lua-5.0.tar.gz) = 187287 bytes +SHA1 (patch-aa) = 65c491cde99ea172561d4a8e5bf739a01541e16d +SHA1 (patch-ab) = 8579e7d691cb9811af599390b657300a644cad51 +SHA1 (patch-ac) = d84dc51de00f31fc0741d3b275cdea5aad20f697 +SHA1 (patch-ad) = c7a1ea9d1e5276a904e44fa407f9bda9badf590d +SHA1 (patch-ae) = 54987ad95ef87b46a9c8a427022eceb2762606bb diff --git a/lang/lua/patches/patch-aa b/lang/lua/patches/patch-aa index c006693252b..4f15bcfb785 100644 --- a/lang/lua/patches/patch-aa +++ b/lang/lua/patches/patch-aa @@ -1,7 +1,7 @@ -$NetBSD: patch-aa,v 1.2 2003/02/22 00:51:58 jtb Exp $ +$NetBSD: patch-aa,v 1.3 2003/04/29 23:33:57 jtb Exp $ --- /dev/null Fri Feb 21 23:40:02 2003 -+++ build/Makefile ++++ objdir/Makefile @@ -0,0 +1,3 @@ +SUBDIR+= liblua liblualib lua luac + diff --git a/lang/lua/patches/patch-ab b/lang/lua/patches/patch-ab index df039e8728a..00e87a1ce2a 100644 --- a/lang/lua/patches/patch-ab +++ b/lang/lua/patches/patch-ab @@ -1,11 +1,11 @@ -$NetBSD: patch-ab,v 1.2 2003/02/22 00:51:59 jtb Exp $ +$NetBSD: patch-ab,v 1.3 2003/04/29 23:33:57 jtb Exp $ ---- /dev/null Fri Feb 21 23:53:36 2003 -+++ build/liblua/Makefile +--- /dev/null ++++ objdir/liblua/Makefile @@ -0,0 +1,28 @@ +LIB= lua + -+SHLIB_MAJOR= 0 ++SHLIB_MAJOR= 1 +SHLIB_MINOR= 0 + +LIBDIR= ${PREFIX}/lib @@ -19,10 +19,10 @@ $NetBSD: patch-ab,v 1.2 2003/02/22 00:51:59 jtb Exp $ + +.PATH: ${.CURDIR}/../../src + -+INCLUDES= lua.h luadebug.h lauxlib.h ++INCLUDES= lua.h lauxlib.h + -+SRCS= lapi.c lcode.c ldebug.c ldo.c lfunc.c lgc.c llex.c lmem.c \ -+ lobject.c lparser.c lstate.c lstring.c ltable.c ltests.c \ ++SRCS= lapi.c lcode.c ldebug.c ldo.c ldump.c lfunc.c lgc.c llex.c lmem.c \ ++ lobject.c lopcodes.c lparser.c lstate.c lstring.c ltable.c ltests.c \ + ltm.c lundump.c lvm.c lzio.c + +afterinstall: diff --git a/lang/lua/patches/patch-ac b/lang/lua/patches/patch-ac index cbf24064f9f..2e60417301f 100644 --- a/lang/lua/patches/patch-ac +++ b/lang/lua/patches/patch-ac @@ -1,18 +1,18 @@ -$NetBSD: patch-ac,v 1.1 2003/02/22 00:51:59 jtb Exp $ +$NetBSD: patch-ac,v 1.2 2003/04/29 23:33:57 jtb Exp $ ---- /dev/null Fri Feb 21 23:53:43 2003 -+++ build/liblualib/Makefile +--- /dev/null ++++ objdir/liblualib/Makefile @@ -0,0 +1,27 @@ +LIB= lualib + -+SHLIB_MAJOR= 0 ++SHLIB_MAJOR= 1 +SHLIB_MINOR= 0 + +LIBDIR= ${PREFIX}/lib +INCDIR= ${PREFIX}/include + +CPPFLAGS+= -I${.CURDIR}/../../include -+CPPFLAGS+= -DPOPEN ++CPPFLAGS+= -DUSE_DLOPEN=1 + +LDADD+= -R${LIBDIR} -L${.CURDIR}/../liblua -llua -lm + @@ -22,7 +22,7 @@ $NetBSD: patch-ac,v 1.1 2003/02/22 00:51:59 jtb Exp $ + +INCLUDES= lualib.h + -+SRCS= lauxlib.c lbaselib.c ldblib.c liolib.c lmathlib.c lstrlib.c ++SRCS= lauxlib.c lbaselib.c ldblib.c liolib.c lmathlib.c ltablib.c lstrlib.c loadlib.c + +afterinstall: + for i in ${INCLUDES}; do \ diff --git a/lang/lua/patches/patch-ad b/lang/lua/patches/patch-ad index 77262644e3d..18d9632aa2f 100644 --- a/lang/lua/patches/patch-ad +++ b/lang/lua/patches/patch-ad @@ -1,7 +1,7 @@ -$NetBSD: patch-ad,v 1.1 2003/02/22 00:51:59 jtb Exp $ +$NetBSD: patch-ad,v 1.2 2003/04/29 23:33:57 jtb Exp $ ---- /dev/null Sat Feb 22 00:18:00 2003 -+++ build/lua/Makefile +--- /dev/null ++++ objdir/lua/Makefile @@ -0,0 +1,16 @@ +PROG= lua + @@ -10,9 +10,9 @@ $NetBSD: patch-ad,v 1.1 2003/02/22 00:51:59 jtb Exp $ +BINDIR= ${PREFIX}/bin +MANDIR= ${PREFIX}/man + -+CPPFLAGS+= -D_POSIX_SOURCE -I${.CURDIR}/../../include ++CPPFLAGS+= -I${.CURDIR}/../../include + -+LDFLAGS+= -R${PREFIX}/lib -L${.CURDIR}/../liblua -L${.CURDIR}/../liblualib ++LDFLAGS+= -Wl,--export-dynamic -R${PREFIX}/lib -L${.CURDIR}/../liblua -L${.CURDIR}/../liblualib + +LDADD+= -llua -llualib -lm + diff --git a/lang/lua/patches/patch-ae b/lang/lua/patches/patch-ae index bc6d6319051..5feea4287ca 100644 --- a/lang/lua/patches/patch-ae +++ b/lang/lua/patches/patch-ae @@ -1,21 +1,21 @@ -$NetBSD: patch-ae,v 1.1 2003/02/22 00:51:59 jtb Exp $ +$NetBSD: patch-ae,v 1.2 2003/04/29 23:33:57 jtb Exp $ ---- /dev/null Sat Feb 22 00:18:04 2003 -+++ build/luac/Makefile +--- /dev/null ++++ objdir/luac/Makefile @@ -0,0 +1,16 @@ +PROG= luac + -+SRCS= dump.c luac.c opt.c print.c stubs.c ++SRCS= luac.c print.c lopcodes.c + +BINDIR= ${PREFIX}/bin +MANDIR= ${PREFIX}/man + -+CPPFLAGS+= -D_POSIX_SOURCE -I${.CURDIR}/../../include -I${.CURDIR}/../../src ++CPPFLAGS+= -DLUA_OPNAMES -I${.CURDIR}/../../include -I${.CURDIR}/../../src + -+LDFLAGS+= -R${PREFIX}/lib -L${.CURDIR}/../liblua ++LDFLAGS+= -Wl,--export-dynamic -R${PREFIX}/lib -L${.CURDIR}/../liblualib -L${.CURDIR}/../liblua + -+LDADD+= -llua ++LDADD+= -llualib -llua + -+.PATH: ${.CURDIR}/../../src/luac ++.PATH: ${.CURDIR}/../../src/luac ${.CURDIR}/../../src + +.include <bsd.prog.mk> |