--- a/components/lua/Makefile Mon Sep 24 13:38:18 2012 -0700
+++ b/components/lua/Makefile Wed Sep 26 16:17:36 2012 +0000
@@ -23,18 +23,28 @@
include ../../make-rules/shared-macros.mk
COMPONENT_NAME= lua
-COMPONENT_VERSION= 5.1.4
+COMPONENT_VERSION= 5.2.1
COMPONENT_PROJECT_URL= http://www.lua.org/
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
COMPONENT_ARCHIVE_HASH= \
- sha256:b038e225eaf2a5b57c9bcc35cd13aa8c6c8288ef493d52970c9545074098af3a
+ sha256:64304da87976133196f9e4c15250b70f444467b6ed80d7cfd7b3b982b5177be5
COMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)ftp/$(COMPONENT_ARCHIVE)
+
+LUA_TESTS= lua-5.2.1-tests
+COMPONENT_ARCHIVE_1= $(LUA_TESTS).tar.gz
+COMPONENT_ARCHIVE_HASH_1= \
+ sha256:2346d635ee392c8d8024b07beaa10b7b66a3f861c41d575753d03155751cf114
+COMPONENT_ARCHIVE_URL_1= $(COMPONENT_PROJECT_URL)/tests/5.2/$(COMPONENT_ARCHIVE_1)
+
+
include ../../make-rules/prep.mk
include ../../make-rules/justmake.mk
include ../../make-rules/ips.mk
+PATCH_LEVEL= 0
+
# This is because lua uses $(CC) to build it's shared libraries.
CC += $(CC_BITS)
@@ -52,8 +62,13 @@
install: $(INSTALL_32_and_64)
-test: $(TEST_32_and_64)
-
+test: install
+ (gzip -dc $(LUA_TESTS).tar.gz | tar xopf -; \
+ cd $(LUA_TESTS); $(ENV) LD_LIBRARY_PATH=$(PROTOUSRLIBDIR) \
+ $(PROTOUSRBINDIR)/$(COMPONENT_NAME) -e"_U=true" all.lua; \
+ $(ENV) LD_LIBRARY_PATH=$(PROTOUSRLIBDIR64) \
+ $(PROTOUSRBINDIR64)/$(COMPONENT_NAME) -e"_U=true" all.lua)
+
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
include ../../make-rules/depend.mk
--- a/components/lua/lua.license Mon Sep 24 13:38:18 2012 -0700
+++ b/components/lua/lua.license Wed Sep 26 16:17:36 2012 +0000
@@ -1,5 +1,5 @@
-------------
-- lua 5.1.4 -
+- lua 5.2.1 -
-------------
Oracle Internal Tracking Number 5814
--- a/components/lua/lua.p5m Mon Sep 24 13:38:18 2012 -0700
+++ b/components/lua/lua.p5m Wed Sep 26 16:17:36 2012 +0000
@@ -18,7 +18,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2012 Oracle and/or its affiliates. All rights reserved.
#
<transform file path=usr.*/man/.+ -> default mangler.man.stability uncommitted>
@@ -31,63 +31,40 @@
value="org.opensolaris.category.2008:Development/Other Languages"
set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
-set name=org.opensolaris.arc-caseid \
- value=LSARC/2009/013
+set name=org.opensolaris.arc-caseid value=PSARC/2009/013
set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
dir path=usr
-dir path=usr
dir path=usr/bin
-dir path=usr/demo
-dir path=usr/demo/lua
-dir path=usr/demo/lua/test
+dir path=usr/bin/$(MACH64)
dir path=usr/include
dir path=usr/lib
dir path=usr/lib/$(MACH64)
+dir path=usr/lib/$(MACH64)/pkgconfig
dir path=usr/lib/pkgconfig
dir path=usr/share
dir path=usr/share/doc
dir path=usr/share/doc/lua
dir path=usr/share/man
dir path=usr/share/man/man1
+file path=usr/bin/$(MACH64)/lua
+file path=usr/bin/$(MACH64)/luac
file path=usr/bin/lua
file path=usr/bin/luac
-file path=usr/demo/lua/test/bisect.lua
-file path=usr/demo/lua/test/cf.lua
-file path=usr/demo/lua/test/echo.lua
-file path=usr/demo/lua/test/env.lua
-file path=usr/demo/lua/test/factorial.lua
-file path=usr/demo/lua/test/fib.lua
-file path=usr/demo/lua/test/fibfor.lua
-file path=usr/demo/lua/test/globals.lua
-file path=usr/demo/lua/test/hello.lua
-file path=usr/demo/lua/test/life.lua
-file path=usr/demo/lua/test/luac.lua
-file path=usr/demo/lua/test/printf.lua
-file path=usr/demo/lua/test/readonly.lua
-file path=usr/demo/lua/test/sieve.lua
-file path=usr/demo/lua/test/sort.lua
-file path=usr/demo/lua/test/table.lua
-file path=usr/demo/lua/test/trace-calls.lua
-file path=usr/demo/lua/test/trace-globals.lua
-file path=usr/demo/lua/test/xd.lua
file path=usr/include/lauxlib.h
file path=usr/include/lua.h
file path=usr/include/luaconf.h
file path=usr/include/lualib.h
file path=usr/lib/$(MACH64)/liblua.so
+file $(MACH64)/lua.pc path=usr/lib/$(MACH64)/pkgconfig/lua.pc
file path=usr/lib/liblua.so
-file $(MACH32)/etc/lua.pc path=usr/lib/pkgconfig/lua.pc
-file path=usr/share/doc/lua/amazon.gif
+file $(MACH32)/lua.pc path=usr/lib/pkgconfig/lua.pc
file path=usr/share/doc/lua/contents.html
-file path=usr/share/doc/lua/cover.png
file path=usr/share/doc/lua/logo.gif
file path=usr/share/doc/lua/lua.css
-file path=usr/share/doc/lua/lua.html
-file path=usr/share/doc/lua/luac.html
file path=usr/share/doc/lua/manual.css
file path=usr/share/doc/lua/manual.html
+file path=usr/share/doc/lua/osi-certified-72x60.png
file path=usr/share/doc/lua/readme.html
file path=usr/share/man/man1/lua.1
file path=usr/share/man/man1/luac.1
-
license lua.license license=MIT
--- a/components/lua/patches/1.Makefile.patch Mon Sep 24 13:38:18 2012 -0700
+++ b/components/lua/patches/1.Makefile.patch Wed Sep 26 16:17:36 2012 +0000
@@ -1,6 +1,6 @@
---- lua-5.1.4/Makefile.orig Mon Aug 11 17:40:48 2008
-+++ lua-5.1.4/Makefile Fri Feb 18 13:00:25 2011
-@@ -5,15 +5,17 @@
+--- Makefile.~1~ 2012-05-17 07:05:54.000000000 -0700
++++ Makefile 2012-09-06 17:26:51.006475447 -0700
+@@ -4,25 +4,26 @@
# == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
# Your platform. See PLATS for possible values.
@@ -8,7 +8,9 @@
+PLAT= solaris
# Where to install. The installation starts in the src and doc directories,
- # so take care if INSTALL_TOP is not an absolute path.
+ # 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_TOP= $(ROOT)/usr
INSTALL_BIN= $(INSTALL_TOP)/bin
@@ -16,15 +18,12 @@
INSTALL_LIB= $(INSTALL_TOP)/lib
-INSTALL_MAN= $(INSTALL_TOP)/man/man1
+INSTALL_MAN= $(INSTALL_TOP)/share/man/man1
+ INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
+ INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
+INSTALL_DOC= $(INSTALL_TOP)/share/doc/lua
-+INSTALL_TEST= $(INSTALL_TOP)/demo/lua/test
- #
- # You probably want to make INSTALL_LMOD and INSTALL_CMOD consistent with
- # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h (and also with etc/lua.pc).
-@@ -22,9 +24,9 @@
- # How to install. If your install program does not support "-p", then you
- # may have to run ranlib on the installed liblua.a (do "make ranlib").
+ # How to install. If your install program does not support "-p", then
+ # you may have to run ranlib on the installed liblua.a.
-INSTALL= install -p
-INSTALL_EXEC= $(INSTALL) -m 0755
-INSTALL_DATA= $(INSTALL) -m 0644
@@ -32,10 +31,10 @@
+INSTALL_EXEC= $(INSTALL) -m 0555
+INSTALL_DATA= $(INSTALL) -m 0444
#
- # If you don't have install you can use cp instead.
+ # If you don't have "install" you can use "cp" instead.
# INSTALL= cp -p
-@@ -38,13 +40,15 @@
- # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
+@@ -36,13 +37,14 @@
+ # == 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
@@ -43,23 +42,17 @@
# What to install.
TO_BIN= lua luac
--TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
+-TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
-TO_LIB= liblua.a
+TO_INC= lua.h luaconf.h lualib.h lauxlib.h
+TO_LIB= liblua.so
TO_MAN= lua.1 luac.1
-+TO_DOC= amazon.gif contents.html cover.png logo.gif lua.css lua.html luac.html manual.css manual.html readme.html
-+TO_TEST= bisect.lua cf.lua echo.lua env.lua factorial.lua fib.lua fibfor.lua globals.lua hello.lua life.lua luac.lua printf.lua readonly.lua sieve.lua sort.lua table.lua trace-calls.lua trace-globals.lua xd.lua
++TO_DOC= contents.html osi-certified-72x60.png logo.gif lua.css manual.css manual.html readme.html
# Lua version and release.
- V= 5.1
-@@ -55,16 +59,18 @@
- $(PLATS) clean:
- cd src && $(MAKE) $@
-
-+check: test
- test: dummy
- src/lua test/hello.lua
+ V= 5.2
+@@ -58,11 +60,13 @@
+ src/lua -v
install: dummy
- cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
@@ -69,131 +62,8 @@
- cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
+ cd src && $(INSTALL_EXEC) $(TO_LIB) $(INSTALL_LIB)
cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
--
+ cd doc && $(INSTALL_DATA) $(TO_DOC) $(INSTALL_DOC)
-+ cd test && $(INSTALL_DATA) $(TO_TEST) $(INSTALL_TEST)
- ranlib:
- cd src && cd $(INSTALL_LIB) && $(RANLIB) $(TO_LIB)
-
---- lua-5.1.4/src/Makefile.orig Sat Jan 19 11:37:58 2008
-+++ lua-5.1.4/src/Makefile Wed Feb 16 15:43:24 2011
-@@ -4,25 +4,24 @@
-
- # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
-
--# Your platform. See PLATS for possible values.
--PLAT= none
--
--CC= gcc
--CFLAGS= -O2 -Wall $(MYCFLAGS)
-+CC=$(CC)
-+CFLAGS= -xO3 -Xc -Kpic $(MYCFLAGS)
-+FLAG_SPARC:sh= if [ ${MACH64} = "sparcv9" ]; then echo -xcode=pic13; fi
-+CFLAGS= $(FLAG_SPARC)
- AR= ar rcu
- RANLIB= ranlib
- RM= rm -f
--LIBS= -lm $(MYLIBS)
-+LIBS= -lm -lc $(MYLIBS)
-
- MYCFLAGS=
--MYLDFLAGS=
-+MYLDFLAGS= -zdefs -ztext
- 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= solaris
-
--LUA_A= liblua.a
-+LUA_SO= liblua.so
- CORE_O= lapi.o lcode.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
-@@ -36,10 +35,10 @@
- LUAC_O= luac.o print.o
-
- ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
--ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
--ALL_A= $(LUA_A)
-+ALL_T= $(LUA_SO) $(LUA_T) $(LUAC_T)
-+ALL_A= $(LUA_SO)
-
--default: $(PLAT)
-+default: solaris
-
- all: $(ALL_T)
-
-@@ -47,15 +46,15 @@
-
- a: $(ALL_A)
++
--$(LUA_A): $(CORE_O) $(LIB_O)
-- $(AR) $@ $?
-- $(RANLIB) $@
-+$(LUA_SO): $(CORE_O) $(LIB_O)
-+ $(CC) -o $(LUA_SO) -G -h $(LUA_SO) $(CFLAGS) $(MYLDFLAGS) $(CORE_O) \
-+ $(LIB_O) $(LIBS)
-
--$(LUA_T): $(LUA_O) $(LUA_A)
-- $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
-+$(LUA_T): $(LUA_O) $(LUA_SO)
-+ $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_SO) $(LIBS)
-
--$(LUAC_T): $(LUAC_O) $(LUA_A)
-- $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
-+$(LUAC_T): $(LUAC_O) $(LUA_SO)
-+ $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_SO) $(LIBS)
-
- clean:
- $(RM) $(ALL_T) $(ALL_O)
-@@ -74,46 +73,8 @@
- @echo "MYLDFLAGS = $(MYLDFLAGS)"
- @echo "MYLIBS = $(MYLIBS)"
-
--# convenience targets for popular platforms
--
--none:
-- @echo "Please choose a platform:"
-- @echo " $(PLATS)"
--
--aix:
-- $(MAKE) all CC="xlc" CFLAGS="-O2 -DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-ldl" MYLDFLAGS="-brtl -bexpall"
--
--ansi:
-- $(MAKE) all MYCFLAGS=-DLUA_ANSI
--
--bsd:
-- $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-Wl,-E"
--
--freebsd:
-- $(MAKE) all MYCFLAGS="-DLUA_USE_LINUX" MYLIBS="-Wl,-E -lreadline"
--
--generic:
-- $(MAKE) all MYCFLAGS=
--
--linux:
-- $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
--
--macosx:
-- $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline"
--# use this on Mac OS X 10.3-
--# $(MAKE) all MYCFLAGS=-DLUA_USE_MACOSX
--
--mingw:
-- $(MAKE) "LUA_A=lua51.dll" "LUA_T=lua.exe" \
-- "AR=$(CC) -shared -o" "RANLIB=strip --strip-unneeded" \
-- "MYCFLAGS=-DLUA_BUILD_AS_DLL" "MYLIBS=" "MYLDFLAGS=-s" lua.exe
-- $(MAKE) "LUAC_T=luac.exe" luac.exe
--
--posix:
-- $(MAKE) all MYCFLAGS=-DLUA_USE_POSIX
--
- solaris:
-- $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-ldl"
-+ $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN -D__EXTENSIONS__" MYLIBS="-ldl"
-
- # list targets that do not create files (but not all makes understand .PHONY)
- .PHONY: all $(PLATS) default o a clean depend echo none
-
+ uninstall:
+ cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN)
--- a/components/lua/patches/2.lua.pc.patch Mon Sep 24 13:38:18 2012 -0700
+++ b/components/lua/patches/2.lua.pc.patch Wed Sep 26 16:17:36 2012 +0000
@@ -1,35 +1,18 @@
---- lua-5.1.4/etc/lua.pc.orig Fri Aug 8 05:46:11 2008
-+++ lua-5.1.4/etc/lua.pc Tue Feb 15 18:30:23 2011
-@@ -1,22 +1,6 @@
- # lua.pc -- pkg-config data for Lua
-
--# vars from install Makefile
--
--# grep '^V=' ../Makefile
--V= 5.1
--# grep '^R=' ../Makefile
--R= 5.1.4
--
--# grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/'
--prefix= /usr/local
--INSTALL_BIN= ${prefix}/bin
--INSTALL_INC= ${prefix}/include
--INSTALL_LIB= ${prefix}/lib
--INSTALL_MAN= ${prefix}/man/man1
--INSTALL_LMOD= ${prefix}/share/lua/${V}
--INSTALL_CMOD= ${prefix}/lib/lua/${V}
--
--# canonical vars
+--- lua.pc.orig 1970-01-01 00:00:00.000000000 +0000
++++ lua.pc 2012-09-19 14:02:00.393620513 +0000
+@@ -0,0 +1,15 @@
++# lua.pc -- pkg-config data for Lua
++
+prefix=/usr
- exec_prefix=${prefix}
- libdir=${exec_prefix}/lib
- includedir=${prefix}/include
-@@ -23,7 +7,7 @@
-
- Name: Lua
- Description: An Extensible Extension Language
--Version: ${R}
-+Version: 5.1.4
- Requires:
- Libs: -L${libdir} -llua -lm
- Cflags: -I${includedir}
++exec_prefix=${prefix}
++libdir=${exec_prefix}/lib
++includedir=${prefix}/include
++
++Name: Lua
++Description: An Extensible Extension Language
++Version: 5.2.1
++Requires:
++Libs: -L${libdir} -llua -lm
++Cflags: -I${includedir}
++
++# (end of lua.pc)
--- a/components/lua/patches/3.headers.patch Mon Sep 24 13:38:18 2012 -0700
+++ b/components/lua/patches/3.headers.patch Wed Sep 26 16:17:36 2012 +0000
@@ -1,5 +1,5 @@
---- lua-5.1.4/src/lua.h.orig 2009-01-06 02:15:11.179130113 -0800
-+++ lua-5.1.4/src/lua.h 2009-01-06 02:15:56.570695998 -0800
+--- src/lua.h.orig 2009-01-06 02:15:11.179130113 -0800
++++ src/lua.h 2009-01-06 02:15:56.570695998 -0800
@@ -9,6 +9,10 @@
#ifndef lua_h
#define lua_h
@@ -20,8 +20,8 @@
+#endif
#endif
---- lua-5.1.4/src/lualib.h.orig 2009-01-06 02:15:19.193417835 -0800
-+++ lua-5.1.4/src/lualib.h 2009-01-06 02:16:20.502288036 -0800
+--- src/lualib.h.orig 2009-01-06 02:15:19.193417835 -0800
++++ src/lualib.h 2009-01-06 02:16:20.502288036 -0800
@@ -8,6 +8,10 @@
#ifndef lualib_h
#define lualib_h
@@ -42,8 +42,8 @@
+#endif
#endif
---- lua-5.1.4/src/lauxlib.h.orig 2009-01-06 02:15:37.967244620 -0800
-+++ lua-5.1.4/src/lauxlib.h 2009-01-06 02:16:26.398180986 -0800
+--- src/lauxlib.h.orig 2009-01-06 02:15:37.967244620 -0800
++++ src/lauxlib.h 2009-01-06 02:16:26.398180986 -0800
@@ -8,6 +8,9 @@
#ifndef lauxlib_h
#define lauxlib_h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/lua/patches/4.src.Makefile.patch Wed Sep 26 16:17:36 2012 +0000
@@ -0,0 +1,86 @@
+--- src/Makefile.~1~ 2012-03-09 08:32:16.000000000 -0800
++++ src/Makefile 2012-09-12 13:46:16.774180863 -0700
+@@ -4,12 +4,12 @@
+ # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
+
+ # Your platform. See PLATS for possible values.
+-PLAT= none
+
+-CC= gcc
+-CFLAGS= -O2 -Wall -DLUA_COMPAT_ALL $(SYSCFLAGS) $(MYCFLAGS)
++
++CFLAGS= $(MYCFLAGS)
++studio_XBITS.sparc.64 += -xcode=pic13
+ LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
+-LIBS= -lm $(SYSLIBS) $(MYLIBS)
++LIBS= -lm -lc $(MYLIBS)
+
+ AR= ar rcu
+ RANLIB= ranlib
+@@ -20,15 +20,16 @@
+ SYSLIBS=
+
+ MYCFLAGS=
+-MYLDFLAGS=
++LD_Z_TEXT += -z text
++MYLDFLAGS= $(LD_OPTIONS_SO) $(LD_OPTIONS)
+ MYLIBS=
+ MYOBJS=
+
+ # == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
+
+-PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
++PLATS= 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,11 +44,11 @@
+ LUAC_O= luac.o
+
+ ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
+-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
+-ALL_A= $(LUA_A)
++ALL_T= $(LUA_SO) $(LUA_T) $(LUAC_T)
++ALL_A= $(LUA_SO)
+
+ # Targets start here.
+-default: $(PLAT)
++default: solaris
+
+ all: $(ALL_T)
+
+@@ -55,15 +56,15 @@
+
+ a: $(ALL_A)
+
+-$(LUA_A): $(BASE_O)
+- $(AR) $@ $(BASE_O)
+- $(RANLIB) $@
++$(LUA_SO): $(CORE_O) $(LIB_O)
++ $(CC) -o $(LUA_SO) -G -h $(LUA_SO) $(CFLAGS) $(MYLDFLAGS) $(CORE_O) \
++ $(LIB_O) $(LIBS)
+
+-$(LUA_T): $(LUA_O) $(LUA_A)
+- $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
++$(LUA_T): $(LUA_O) $(LUA_SO)
++ $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_SO) $(LIBS)
+
+-$(LUAC_T): $(LUAC_O) $(LUA_A)
+- $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
++$(LUAC_T): $(LUAC_O) $(LUA_SO)
++ $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_SO) $(LIBS)
+
+ clean:
+ $(RM) $(ALL_T) $(ALL_O)
+@@ -118,7 +119,7 @@
+ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX"
+
+ solaris:
+- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" SYSLIBS="-ldl"
++ $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN -D__EXTENSIONS__" MYLIBS="-ldl"
+
+ # list targets that do not create files (but not all makes understand .PHONY)
+ .PHONY: all $(PLATS) default o a clean depend echo none
--- a/components/lua/patches/4.src.patch Mon Sep 24 13:38:18 2012 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,164 +0,0 @@
---- lua-5.1.4/src/lcode.c 2007/12/28 15:32:23 2.25.1.3
-+++ lua-5.1.4/src/lcode.c 2011/01/31 14:53:16 2.25.1.5
-@@ -1,5 +1,5 @@
- /*
--** $Id: lcode.c,v 2.25.1.3 2007/12/28 15:32:23 roberto Exp $
-+** $Id: lcode.c,v 2.25.1.5 2011/01/31 14:53:16 roberto Exp $
- ** Code generator for Lua
- ** See Copyright Notice in lua.h
- */
-@@ -544,10 +544,6 @@
- pc = NO_JUMP; /* always true; do nothing */
- break;
- }
-- case VFALSE: {
-- pc = luaK_jump(fs); /* always jump */
-- break;
-- }
- case VJMP: {
- invertjump(fs, e);
- pc = e->u.s.info;
-@@ -572,10 +568,6 @@
- pc = NO_JUMP; /* always false; do nothing */
- break;
- }
-- case VTRUE: {
-- pc = luaK_jump(fs); /* always jump */
-- break;
-- }
- case VJMP: {
- pc = e->u.s.info;
- break;
---- lua-5.1.4/src/ldblib.c 2008/01/21 13:11:21 1.104.1.3
-+++ lua-5.1.4/src/ldblib.c 2009/08/04 18:50:18 1.104.1.4
-@@ -1,5 +1,5 @@
- /*
--** $Id: ldblib.c,v 1.104.1.3 2008/01/21 13:11:21 roberto Exp $
-+** $Id: ldblib.c,v 1.104.1.4 2009/08/04 18:50:18 roberto Exp $
- ** Interface from Lua to its debug API
- ** See Copyright Notice in lua.h
- */
-@@ -45,6 +45,7 @@
-
-
- static int db_getfenv (lua_State *L) {
-+ luaL_checkany(L, 1);
- lua_getfenv(L, 1);
- return 1;
- }
---- lua-5.1.4/src/liolib.c 2008/01/18 17:47:43 2.73.1.3
-+++ lua-5.1.4/src/liolib.c 2010/05/14 15:33:51 2.73.1.4
-@@ -1,5 +1,5 @@
- /*
--** $Id: liolib.c,v 2.73.1.3 2008/01/18 17:47:43 roberto Exp $
-+** $Id: liolib.c,v 2.73.1.4 2010/05/14 15:33:51 roberto Exp $
- ** Standard I/O (and system) library
- ** See Copyright Notice in lua.h
- */
-@@ -276,7 +276,10 @@
- lua_pushnumber(L, d);
- return 1;
- }
-- else return 0; /* read fails */
-+ else {
-+ lua_pushnil(L); /* "result" to be removed */
-+ return 0; /* read fails */
-+ }
- }
-
-
---- lua-5.1.4/src/llex.c 2007/12/27 13:02:25 2.20.1.1
-+++ lua-5.1.4/src/llex.c 2009/11/23 14:58:22 2.20.1.2
-@@ -1,5 +1,5 @@
- /*
--** $Id: llex.c,v 2.20.1.1 2007/12/27 13:02:25 roberto Exp $
-+** $Id: llex.c,v 2.20.1.2 2009/11/23 14:58:22 roberto Exp $
- ** Lexical Analyzer
- ** See Copyright Notice in lua.h
- */
-@@ -118,8 +118,10 @@
- lua_State *L = ls->L;
- TString *ts = luaS_newlstr(L, str, l);
- TValue *o = luaH_setstr(L, ls->fs->h, ts); /* entry for `str' */
-- if (ttisnil(o))
-+ if (ttisnil(o)) {
- setbvalue(o, 1); /* make sure `str' will not be collected */
-+ luaC_checkGC(L);
-+ }
- return ts;
- }
-
---- lua-5.1.4/src/loadlib.c 2008/08/06 13:29:28 1.52.1.3
-+++ lua-5.1.4/src/loadlib.c 2009/09/09 13:17:16 1.52.1.4
-@@ -1,5 +1,5 @@
- /*
--** $Id: loadlib.c,v 1.52.1.3 2008/08/06 13:29:28 roberto Exp $
-+** $Id: loadlib.c,v 1.52.1.4 2009/09/09 13:17:16 roberto Exp $
- ** Dynamic library loader for Lua
- ** See Copyright Notice in lua.h
- **
-@@ -639,7 +639,7 @@
- lua_pushvalue(L, -1);
- lua_replace(L, LUA_ENVIRONINDEX);
- /* create `loaders' table */
-- lua_createtable(L, 0, sizeof(loaders)/sizeof(loaders[0]) - 1);
-+ lua_createtable(L, sizeof(loaders)/sizeof(loaders[0]) - 1, 0);
- /* fill it with pre-defined loaders */
- for (i=0; loaders[i] != NULL; i++) {
- lua_pushcfunction(L, loaders[i]);
---- lua-5.1.4/src/lstrlib.c 2008/07/11 17:27:21 1.132.1.4
-+++ lua-5.1.4/src/lstrlib.c 2010/05/14 15:34:19 1.132.1.5
-@@ -1,5 +1,5 @@
- /*
--** $Id: lstrlib.c,v 1.132.1.4 2008/07/11 17:27:21 roberto Exp $
-+** $Id: lstrlib.c,v 1.132.1.5 2010/05/14 15:34:19 roberto Exp $
- ** Standard library for string operations and pattern-matching
- ** See Copyright Notice in lua.h
- */
-@@ -754,6 +754,7 @@
-
-
- static int str_format (lua_State *L) {
-+ int top = lua_gettop(L);
- int arg = 1;
- size_t sfl;
- const char *strfrmt = luaL_checklstring(L, arg, &sfl);
-@@ -768,7 +769,8 @@
- else { /* format item */
- char form[MAX_FORMAT]; /* to store the format (`%...') */
- char buff[MAX_ITEM]; /* to store the formatted item */
-- arg++;
-+ if (++arg > top)
-+ luaL_argerror(L, arg, "no value");
- strfrmt = scanformat(L, strfrmt, form);
- switch (*strfrmt++) {
- case 'c': {
---- lua-5.1.4/src/lvm.c 2007/12/28 15:32:23 2.63.1.3
-+++ lua-5.1.4/src/lvm.c 2009/07/01 21:10:33 2.63.1.4
-@@ -1,5 +1,5 @@
- /*
--** $Id: lvm.c,v 2.63.1.3 2007/12/28 15:32:23 roberto Exp $
-+** $Id: lvm.c,v 2.63.1.4 2009/07/01 21:10:33 roberto Exp $
- ** Lua virtual machine
- ** See Copyright Notice in lua.h
- */
-@@ -133,6 +133,7 @@
-
- void luaV_settable (lua_State *L, const TValue *t, TValue *key, StkId val) {
- int loop;
-+ TValue temp;
- for (loop = 0; loop < MAXTAGLOOP; loop++) {
- const TValue *tm;
- if (ttistable(t)) { /* `t' is a table? */
-@@ -152,7 +153,9 @@
- callTM(L, tm, t, key, val);
- return;
- }
-- t = tm; /* else repeat with `tm' */
-+ /* else repeat with `tm' */
-+ setobj(L, &temp, tm); /* avoid pointing inside table (may rehash) */
-+ t = &temp;
- }
- luaG_runerror(L, "loop in settable");
- }
-
--- a/make-rules/shared-macros.mk Mon Sep 24 13:38:18 2012 -0700
+++ b/make-rules/shared-macros.mk Wed Sep 26 16:17:36 2012 +0000
@@ -103,6 +103,7 @@
SBINDIR = /sbin
LIBDIR = /lib
USRBINDIR = $(USRDIR)/bin
+USRBINDIR64 = $(USRDIR)/bin/$(MACH64)
USRSBINDIR = $(USRDIR)/sbin
USRLIBDIR = $(USRDIR)/lib
USRSHAREDIR = $(USRDIR)/share
@@ -123,6 +124,7 @@
PROTOUSRDIR = $(PROTO_DIR)/$(USRDIR)
PROTOLIBDIR = $(PROTO_DIR)/$(LIBDIR)
PROTOUSRBINDIR = $(PROTO_DIR)/$(USRBINDIR)
+PROTOUSRBINDIR64 = $(PROTO_DIR)/$(USRBINDIR64)
PROTOUSRSBINDIR = $(PROTO_DIR)/$(USRSBINDIR)
PROTOUSRLIBDIR = $(PROTO_DIR)/$(USRLIBDIR)
PROTOUSRLIBDIR64 = $(PROTO_DIR)/$(USRLIBDIR64)