summaryrefslogtreecommitdiff
path: root/lang/lua
diff options
context:
space:
mode:
authoradam <adam@pkgsrc.org>2013-07-04 18:04:42 +0000
committeradam <adam@pkgsrc.org>2013-07-04 18:04:42 +0000
commit83a9dad1bf1e51bb5b487106b3d462ffacef61c2 (patch)
tree6d6d306245434886f8ebb7af8ae32fb9b6945afa /lang/lua
parent801f05218d6648ab1faaad1803517480b5ec3ae3 (diff)
downloadpkgsrc-83a9dad1bf1e51bb5b487106b3d462ffacef61c2.tar.gz
Lua 5.2 was released on 16 Dec 2011. Its main new features are yieldable pcall and metamethods, new lexical scheme for globals, ephemeron tables, new library for bitwise operations, light C functions, emergency garbage collector, goto statement, and finalizers for tables.
Diffstat (limited to 'lang/lua')
-rw-r--r--lang/lua/Makefile44
-rw-r--r--lang/lua/PLIST40
-rw-r--r--lang/lua/buildlink3.mk6
-rw-r--r--lang/lua/distinfo14
-rw-r--r--lang/lua/files/lua.pc.in21
-rw-r--r--lang/lua/patches/patch-aa38
-rw-r--r--lang/lua/patches/patch-ab78
-rw-r--r--lang/lua/patches/patch-ac33
-rw-r--r--lang/lua/version.mk4
9 files changed, 120 insertions, 158 deletions
diff --git a/lang/lua/Makefile b/lang/lua/Makefile
index 4d755763166..d604e5da21d 100644
--- a/lang/lua/Makefile
+++ b/lang/lua/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.49 2012/10/02 20:11:44 asau Exp $
+# $NetBSD: Makefile,v 1.50 2013/07/04 18:04:42 adam Exp $
DISTNAME= lua-${LUA_VERSION}
CATEGORIES= lang
@@ -22,10 +22,8 @@ MAKE_ENV+= DLLIB=${BUILDLINK_LDADD.dl:Q}
MAKE_ENV+= INSTALL_DATA=${INSTALL_DATA:Q}
CFLAGS+= -DLUA_ROOT=\"${PREFIX}/\"
-MAKE_FLAGS+= CC=cc
-
-DOCDIR= ${PREFIX}/share/doc/lua
-EGDIR= ${PREFIX}/share/examples/lua
+PKGCONFIG_OVERRIDE= ${WRKSRC}/lua.pc
+INSTALLATION_DIRS+= lib/pkgconfig share/doc/lua
.if ${OPSYS} == "FreeBSD"
BUILD_TARGET= freebsd
@@ -43,36 +41,16 @@ BUILD_TARGET= aix
BUILD_TARGET= generic
.endif
-PKGCONFIG_OVERRIDE= ${WRKSRC}/etc/lua.pc
-
-INSTALLATION_DIRS+= lib/pkgconfig
-
-SUBST_CLASSES+= pc-prefix
-SUBST_FILES.pc-prefix+= ${WRKSRC}/etc/lua.pc
-SUBST_SED.pc-prefix+= -e "s,/usr/local,${PREFIX},"
-SUBST_STAGE.pc-prefix= post-build
+pre-configure:
+ sed -e 's,@PREFIX@,${PREFIX},g' \
+ -e 's,@VER@,${PKGVERSION_NOREV:R},g' \
+ -e 's,@REV@,${PKGVERSION_NOREV},g' \
+ ${FILESDIR}/lua.pc.in > ${WRKSRC}/lua.pc
post-install:
- ${INSTALL_DATA_DIR} ${DESTDIR}${DOCDIR}
- set -e; \
- cd ${WRKSRC}; for f in README COPYRIGHT HISTORY; do \
- ${INSTALL_DATA} "$$f" ${DESTDIR}${DOCDIR}; \
- done
- set -e; \
- cd ${WRKSRC}/doc; for f in *.html *.gif; do \
- ${INSTALL_DATA} "$$f" ${DESTDIR}${DOCDIR}; \
- done
- ${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR}
- set -e; \
- cd ${WRKSRC}/test; for f in README *.lua; do \
- ${INSTALL_DATA} "$$f" ${DESTDIR}${EGDIR}; \
- done
- ${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR}/etc
- set -e; \
- cd ${WRKSRC}/etc; for f in README *.c *.ico *.lua; do \
- ${INSTALL_DATA} "$$f" ${DESTDIR}${EGDIR}/etc; \
- done
- ${INSTALL_DATA} ${WRKSRC}/etc/lua.pc ${DESTDIR}${PREFIX}/lib/pkgconfig
+ ${INSTALL_DATA} ${WRKSRC}/lua.pc ${DESTDIR}${PREFIX}/lib/pkgconfig
+ ${INSTALL_DATA} ${WRKSRC}/doc/*.??? ${DESTDIR}${PREFIX}/share/doc/lua
+ ${INSTALL_DATA} ${WRKSRC}/doc/*.???? ${DESTDIR}${PREFIX}/share/doc/lua
.include "../../devel/readline/buildlink3.mk"
.include "../../mk/dlopen.buildlink3.mk"
diff --git a/lang/lua/PLIST b/lang/lua/PLIST
index b8267b5329d..3a062702eb0 100644
--- a/lang/lua/PLIST
+++ b/lang/lua/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.13 2012/03/12 15:49:27 wiz Exp $
+@comment $NetBSD: PLIST,v 1.14 2013/07/04 18:04:42 adam Exp $
bin/lua
bin/luac
include/lauxlib.h
@@ -10,40 +10,12 @@ lib/liblua.la
lib/pkgconfig/lua.pc
man/man1/lua.1
man/man1/luac.1
-share/doc/lua/COPYRIGHT
-share/doc/lua/HISTORY
-share/doc/lua/README
share/doc/lua/contents.html
share/doc/lua/logo.gif
-share/doc/lua/lua.html
-share/doc/lua/luac.html
+share/doc/lua/lua.css
+share/doc/lua/manual.css
share/doc/lua/manual.html
+share/doc/lua/osi-certified-72x60.png
share/doc/lua/readme.html
-share/examples/lua/README
-share/examples/lua/bisect.lua
-share/examples/lua/cf.lua
-share/examples/lua/echo.lua
-share/examples/lua/env.lua
-share/examples/lua/etc/README
-share/examples/lua/etc/all.c
-share/examples/lua/etc/lua.ico
-share/examples/lua/etc/min.c
-share/examples/lua/etc/noparser.c
-share/examples/lua/etc/strict.lua
-share/examples/lua/factorial.lua
-share/examples/lua/fib.lua
-share/examples/lua/fibfor.lua
-share/examples/lua/globals.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/xd.lua
-@pkgdir share/lua/5.1
-@pkgdir lib/lua/5.1
+@pkgdir share/lua/5.2
+@pkgdir lib/lua/5.2
diff --git a/lang/lua/buildlink3.mk b/lang/lua/buildlink3.mk
index 5dfb94bd40f..231dc9d8875 100644
--- a/lang/lua/buildlink3.mk
+++ b/lang/lua/buildlink3.mk
@@ -1,12 +1,12 @@
-# $NetBSD: buildlink3.mk,v 1.14 2011/01/19 13:46:13 adam Exp $
+# $NetBSD: buildlink3.mk,v 1.15 2013/07/04 18:04:42 adam Exp $
BUILDLINK_TREE+= lua
.if !defined(LUA_BUILDLINK3_MK)
LUA_BUILDLINK3_MK:=
-BUILDLINK_API_DEPENDS.lua+= lua>=5.1.1
-BUILDLINK_ABI_DEPENDS.lua+= lua>=5.1.4nb1
+BUILDLINK_API_DEPENDS.lua+= lua>=5.2.0
+BUILDLINK_ABI_DEPENDS.lua+= lua>=5.2.0
BUILDLINK_PKGSRCDIR.lua?= ../../lang/lua
.include "../../devel/readline/buildlink3.mk"
diff --git a/lang/lua/distinfo b/lang/lua/distinfo
index d29bfc68e50..163b649a756 100644
--- a/lang/lua/distinfo
+++ b/lang/lua/distinfo
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.28 2012/03/12 15:49:27 wiz Exp $
+$NetBSD: distinfo,v 1.29 2013/07/04 18:04:42 adam Exp $
-SHA1 (lua-5.1.5.tar.gz) = b3882111ad02ecc6b972f8c1241647905cb2e3fc
-RMD160 (lua-5.1.5.tar.gz) = b0c2234675335a8bf158a125b6778cf800c754a0
-Size (lua-5.1.5.tar.gz) = 221213 bytes
-SHA1 (patch-aa) = 25bcd22d3fc319c51356b7f976d0215eb04900db
-SHA1 (patch-ab) = 6f0964957112afbbc77648c86ae2a6ddd20c3389
-SHA1 (patch-ac) = bd2348dcb273de09ddc09da906c93de6cc209c5c
+SHA1 (lua-5.2.2.tar.gz) = 0857e41e5579726a4cb96732e80d7aa47165eaf5
+RMD160 (lua-5.2.2.tar.gz) = d17967150017e9b25a26c1ad527647cd0b9e598f
+Size (lua-5.2.2.tar.gz) = 251713 bytes
+SHA1 (patch-aa) = 5fa5c7fecc7fd50dc9d88d441ad9373f59ecb841
+SHA1 (patch-ab) = 4f2f05f6a5e4cfffe8f9ef7bf4de6f054074baa4
+SHA1 (patch-ac) = b8b9c0068210795e5eb22512767ac2e98bca8cbc
diff --git a/lang/lua/files/lua.pc.in b/lang/lua/files/lua.pc.in
new file mode 100644
index 00000000000..92692eb3228
--- /dev/null
+++ b/lang/lua/files/lua.pc.in
@@ -0,0 +1,21 @@
+# $NetBSD: lua.pc.in,v 1.1 2013/07/04 18:04:42 adam Exp $
+# lua.pc is not any longer distributed, but is still required by other packages.
+
+prefix= @PREFIX@
+INSTALL_BIN= ${prefix}/bin
+INSTALL_INC= ${prefix}/include
+INSTALL_LIB= ${prefix}/lib
+INSTALL_MAN= ${prefix}/man/man1
+INSTALL_LMOD= ${prefix}/share/lua/@VER@
+INSTALL_CMOD= ${prefix}/lib/lua/@VER@
+
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: Lua
+Description: An Extensible Extension Language
+Version: @REV@
+Requires:
+Libs: -L${libdir} -llua -lm
+Cflags: -I${includedir}
diff --git a/lang/lua/patches/patch-aa b/lang/lua/patches/patch-aa
index 4adb5b24342..9d74ecab4ff 100644
--- a/lang/lua/patches/patch-aa
+++ b/lang/lua/patches/patch-aa
@@ -1,11 +1,11 @@
-$NetBSD: patch-aa,v 1.19 2009/12/17 16:42:46 jmmv Exp $
+$NetBSD: patch-aa,v 1.20 2013/07/04 18:04:42 adam Exp $
---- Makefile.orig 2008-08-12 01:40:48.000000000 +0100
-+++ Makefile 2009-12-17 16:36:32.000000000 +0000
-@@ -9,11 +9,11 @@ PLAT= none
-
- # Where to install. The installation starts in the src and doc directories,
- # so take care if INSTALL_TOP is not an absolute path.
+--- Makefile.orig 2012-05-17 14:05:54.000000000 +0000
++++ Makefile
+@@ -10,11 +10,11 @@ PLAT= none
+ # 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= ${PREFIX}
INSTALL_BIN= $(INSTALL_TOP)/bin
@@ -13,29 +13,29 @@ $NetBSD: patch-aa,v 1.19 2009/12/17 16:42:46 jmmv Exp $
INSTALL_LIB= $(INSTALL_TOP)/lib
-INSTALL_MAN= $(INSTALL_TOP)/man/man1
+INSTALL_MAN= $(INSTALL_TOP)/${PKGMANDIR}/man1
- #
- # 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).
-@@ -24,7 +24,7 @@ INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
- # may have to run ranlib on the installed liblua.a (do "make ranlib").
+ INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
+ INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
+
+@@ -22,7 +22,7 @@ INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
+ # you may have to run ranlib on the installed liblua.a.
INSTALL= install -p
INSTALL_EXEC= $(INSTALL) -m 0755
-INSTALL_DATA= $(INSTALL) -m 0644
+#INSTALL_DATA= $(INSTALL) -m 0644
#
- # 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
-@@ -43,7 +43,7 @@ PLATS= aix ansi bsd freebsd generic linu
+@@ -41,7 +41,7 @@ PLATS= aix ansi bsd freebsd generic linu
# 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_LIB= liblua.la
TO_MAN= lua.1 luac.1
# Lua version and release.
-@@ -59,11 +59,11 @@ test: dummy
- src/lua test/hello.lua
+@@ -58,11 +58,11 @@ test: dummy
+ src/lua -v
install: dummy
- cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
@@ -49,5 +49,5 @@ $NetBSD: patch-aa,v 1.19 2009/12/17 16:42:46 jmmv Exp $
+ cd src && $(LIBTOOL) --tag=CC --mode=install $(BSD_INSTALL_LIB) $(TO_LIB) $(DESTDIR)$(INSTALL_LIB)
+ cd doc && $(INSTALL_DATA) $(TO_MAN) $(DESTDIR)$(INSTALL_MAN)
- ranlib:
- cd src && cd $(INSTALL_LIB) && $(RANLIB) $(TO_LIB)
+ uninstall:
+ cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN)
diff --git a/lang/lua/patches/patch-ab b/lang/lua/patches/patch-ab
index a5b6f44be5b..0bf21d99d5c 100644
--- a/lang/lua/patches/patch-ab
+++ b/lang/lua/patches/patch-ab
@@ -1,80 +1,74 @@
-$NetBSD: patch-ab,v 1.14 2012/03/12 15:49:27 wiz Exp $
+$NetBSD: patch-ab,v 1.15 2013/07/04 18:04:42 adam Exp $
---- src/Makefile.orig 2012-02-13 20:41:22.000000000 +0000
+--- src/Makefile.orig 2012-12-27 10:51:43.000000000 +0000
+++ src/Makefile
-@@ -7,8 +7,8 @@
+@@ -6,8 +6,7 @@
# Your platform. See PLATS for possible values.
PLAT= none
-CC= gcc
--CFLAGS= -O2 -Wall $(MYCFLAGS)
-+CC?= gcc
-+CFLAGS+= -Wall $(MYCFLAGS)
- AR= ar rcu
- RANLIB= ranlib
- RM= rm -f
-@@ -18,22 +18,32 @@ MYCFLAGS=
- MYLDFLAGS=
+-CFLAGS= -O2 -Wall -DLUA_COMPAT_ALL $(SYSCFLAGS) $(MYCFLAGS)
++CFLAGS+= -Wall -DLUA_COMPAT_ALL $(SYSCFLAGS) $(MYCFLAGS)
+ LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
+ LIBS= -lm $(SYSLIBS) $(MYLIBS)
+
+@@ -24,23 +23,28 @@ MYLDFLAGS=
MYLIBS=
+ MYOBJS=
+.SUFFIXES: .lo
+.c.lo:
+ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(CFLAGS) -c $<
-+LV= 5:1
++LV= 5:2
+
- # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
+ # == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
-LUA_A= liblua.a
--CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
-+LUA_XA= liblua.a
+LUA_A= liblua.la
-+XCORE_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
--LIB_O= lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o \
-+XLIB_O= lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o \
- lstrlib.o loadlib.o linit.o
-+CORE_O= $(XCORE_O:.o=.lo)
-+LIB_O= $(XLIB_O:.o=.lo)
+ 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
+ LIB_O= lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o \
+ lmathlib.o loslib.o lstrlib.o ltablib.o loadlib.o linit.o
+-BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS)
++BASE_O= $(CORE_O:.o=.lo) $(LIB_O:.o=.lo) $(MYOBJS:.o=.lo)
LUA_T= lua
-LUA_O= lua.o
-+LUA_XO= lua.o
-+LUA_O= $(LUA_XO:.o=.lo)
++LUA_O= lua.lo
LUAC_T= luac
--LUAC_O= luac.o print.o
-+LUAC_XO= luac.o print.o
-+LUAC_O= $(LUAC_XO:.o=.lo)
+-LUAC_O= luac.o
++LUAC_O= luac.lo
- ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
+ ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
-@@ -48,14 +58,13 @@ o: $(ALL_O)
+@@ -56,14 +60,13 @@ o: $(ALL_O)
a: $(ALL_A)
- $(LUA_A): $(CORE_O) $(LIB_O)
-- $(AR) $@ $(CORE_O) $(LIB_O) # DLL needs all object files
+ $(LUA_A): $(BASE_O)
+- $(AR) $@ $(BASE_O)
- $(RANLIB) $@
-+ ${LIBTOOL} --tag=CC --mode=link ${CC} ${LDFLAGS} -o $@ ${CORE_O} ${LIB_O} -rpath ${PREFIX}/lib -version-info ${LV} ${LIBS}
++ ${LIBTOOL} --tag=CC --mode=link $(CC) $(LDFLAGS) -o $@ $(BASE_O) -rpath ${PREFIX}/lib -version-info ${LV} ${LIBS}
$(LUA_T): $(LUA_O) $(LUA_A)
-- $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
-+ ${LIBTOOL} --tag=CC --mode=link $(CC) -o $@ ${LDFLAGS} $(LUA_O) $(LUA_A) $(LIBS)
+- $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
++ ${LIBTOOL} --tag=CC --mode=link $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
$(LUAC_T): $(LUAC_O) $(LUA_A)
-- $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
-+ ${LIBTOOL} --tag=CC --mode=link $(CC) -static -o $@ ${LDFLAGS} $(LUAC_O) $(LUA_A) $(LIBS)
+- $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
++ ${LIBTOOL} --tag=CC --mode=link $(CC) -static -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
clean:
$(RM) $(ALL_T) $(ALL_O)
-@@ -87,7 +96,7 @@ ansi:
- $(MAKE) all MYCFLAGS=-DLUA_ANSI
+@@ -95,7 +98,7 @@ ansi:
+ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_ANSI"
bsd:
-- $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-Wl,-E"
-+ $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN -DLUA_USE_READLINE" MYLIBS="-Wl,-E -lreadline -lhistory"
+- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" SYSLIBS="-Wl,-E"
++ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN -DLUA_USE_READLINE" SYSLIBS="-Wl,-E -lreadline -lhistory"
freebsd:
- $(MAKE) all MYCFLAGS="-DLUA_USE_LINUX" MYLIBS="-Wl,-E -lreadline"
+ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -lreadline"
diff --git a/lang/lua/patches/patch-ac b/lang/lua/patches/patch-ac
index a453bee3095..5171a4856ed 100644
--- a/lang/lua/patches/patch-ac
+++ b/lang/lua/patches/patch-ac
@@ -1,26 +1,23 @@
-$NetBSD: patch-ac,v 1.9 2012/03/12 15:49:27 wiz Exp $
+$NetBSD: patch-ac,v 1.10 2013/07/04 18:04:42 adam Exp $
-- allow LUA_ROOT to be set by the pkgsrc makefile
-- solaris fix for PR 43350
-
---- src/luaconf.h.orig 2008-02-11 16:25:08.000000000 +0000
+--- src/luaconf.h.orig 2013-03-16 21:10:18.000000000 +0000
+++ src/luaconf.h
-@@ -94,7 +94,9 @@
- ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
+@@ -100,7 +100,9 @@
+ #else /* }{ */
- #else
+ #define LUA_VDIR LUA_VERSION_MAJOR "." LUA_VERSION_MINOR "/"
+#ifndef LUA_ROOT
#define LUA_ROOT "/usr/local/"
+#endif
- #define LUA_LDIR LUA_ROOT "share/lua/5.1/"
- #define LUA_CDIR LUA_ROOT "lib/lua/5.1/"
+ #define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR
+ #define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR
#define LUA_PATH_DEFAULT \
-@@ -183,7 +185,7 @@
- #define LUAI_DATA /* empty */
-
- #elif defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \
-- defined(__ELF__)
-+ defined(__ELF__) && !defined(__sun)
+@@ -175,7 +177,7 @@
+ ** default definition.
+ */
+ #if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \
+- defined(__ELF__) /* { */
++ defined(__ELF__) && !defined(__sun) /* { */
#define LUAI_FUNC __attribute__((visibility("hidden"))) extern
- #define LUAI_DATA LUAI_FUNC
-
+ #define LUAI_DDEC LUAI_FUNC
+ #define LUAI_DDEF /* empty */
diff --git a/lang/lua/version.mk b/lang/lua/version.mk
index d491b69c5b4..5d8b84d6538 100644
--- a/lang/lua/version.mk
+++ b/lang/lua/version.mk
@@ -1,6 +1,6 @@
-# $NetBSD: version.mk,v 1.2 2012/03/12 15:49:27 wiz Exp $
+# $NetBSD: version.mk,v 1.3 2013/07/04 18:04:42 adam Exp $
-LUA_VERSION= 5.1.5
+LUA_VERSION= 5.2.2
LUA_VERSION_MAJOR= ${LUA_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\1/}
LUA_VERSION_MINOR= ${LUA_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\2/}