From 65bd5965e2780ca07d85d93c89a0f0d3e31d841d Mon Sep 17 00:00:00 2001 From: perky Date: Sat, 10 May 2003 22:29:24 +0000 Subject: Upgrade to 5.0 and keep 4.0 as lang/lua4 --- lang/lua50/Makefile | 43 +++++++++++++++++++++---------------------- lang/lua50/distinfo | 2 +- lang/lua50/files/patch-aa | 19 ------------------- lang/lua50/files/patch-ab | 20 ++++++++++---------- lang/lua50/pkg-descr | 1 - lang/lua50/pkg-plist | 6 +++--- 6 files changed, 35 insertions(+), 56 deletions(-) delete mode 100644 lang/lua50/files/patch-aa (limited to 'lang/lua50') diff --git a/lang/lua50/Makefile b/lang/lua50/Makefile index 5541407..bdff0ba 100644 --- a/lang/lua50/Makefile +++ b/lang/lua50/Makefile @@ -6,10 +6,10 @@ # PORTNAME= lua -PORTVERSION= 4.0 -PORTREVISION= 1 +PORTVERSION= 5.0 CATEGORIES= lang -MASTER_SITES= ftp://ftp.tecgraf.puc-rio.br/pub/lua/ \ +MASTER_SITES= http://www.lua.org/ftp/ \ + ftp://ftp.tecgraf.puc-rio.br/pub/lua/ \ ftp://csg.uwaterloo.ca/pub/lhf/lua/ \ ftp://ftp.ntua.gr/pub/lang/lua/ \ ftp://ftp.uni-trier.de/pub/languages/lua/ \ @@ -18,27 +18,26 @@ MASTER_SITES= ftp://ftp.tecgraf.puc-rio.br/pub/lua/ \ MAINTAINER= richard@homemail.com COMMENT= Small, compilable scripting language providing easy access to C code -MAN1= luac.1 -WRKSRC= ${WRKDIR}/lua +USE_REINPLACE= yes +MAN1= lua.1 luac.1 -do-install: - @ ${MKDIR} ${PREFIX}/share/doc/lua - @ ${INSTALL_PROGRAM} ${WRKSRC}/bin/lua ${PREFIX}/bin - @ ${INSTALL_PROGRAM} ${WRKSRC}/bin/luac ${PREFIX}/bin - @ ${INSTALL_MAN} ${WRKSRC}/doc/luac.1 ${PREFIX}/man/man1/luac.1 - @ ${INSTALL_DATA} ${WRKSRC}/doc/idx.html ${PREFIX}/share/doc/lua - @ ${INSTALL_DATA} ${WRKSRC}/doc/index.html ${PREFIX}/share/doc/lua - @ ${INSTALL_DATA} ${WRKSRC}/doc/luac.html ${PREFIX}/share/doc/lua - @ ${INSTALL_DATA} ${WRKSRC}/doc/manual.html ${PREFIX}/share/doc/lua - @ ${INSTALL_DATA} ${WRKSRC}/include/lua.h ${PREFIX}/include - @ ${INSTALL_DATA} ${WRKSRC}/include/luadebug.h ${PREFIX}/include - @ ${INSTALL_DATA} ${WRKSRC}/include/lualib.h ${PREFIX}/include - @ ${INSTALL_DATA} ${WRKSRC}/include/lauxlib.h ${PREFIX}/include - @ ${INSTALL_DATA} ${WRKSRC}/lib/liblua.a ${PREFIX}/lib - @ ${INSTALL_DATA} ${WRKSRC}/lib/liblualib.a ${PREFIX}/lib +do-configure: + ${REINPLACE_CMD} \ + -e 's|^\(MYCFLAGS=\).*$$|\1 ${CFLAGS}|' \ + -e 's|^\(LOADLIB=\).*$$|\1 -DUSE_DLOPEN=1|' \ + -e 's|^\(CC=\).*$$|\1 ${CC}|' \ + -e 's|^\(STRIP=\).*$$|\1 ${STRIP_CMD}|' \ + -e 's|^\(INSTALL_ROOT=\).*$$|\1 ${PREFIX}|' \ + -e 's|^\(INSTALL_EXEC=\).*$$|\1 ${INSTALL_PROGRAM}|' \ + -e 's|^\(INSTALL_DATA=\).*$$|\1 ${INSTALL_DATA}|' \ + -e 's|^#\(USERCONF.*READLINE.*\)$$|\1|' \ + -e 's|^\(EXTRA_LIBS=\).*$$|\1 -lm -lreadline -lhistory -lncurses|' \ + ${WRKSRC}/config post-install: - @strip ${PREFIX}/bin/lua - @strip ${PREFIX}/bin/luac +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} + @cd ${WRKSRC}/doc && ${INSTALL_DATA} *.html *.gif ${DOCSDIR} +.endif .include diff --git a/lang/lua50/distinfo b/lang/lua50/distinfo index a371d27..264286b 100644 --- a/lang/lua50/distinfo +++ b/lang/lua50/distinfo @@ -1 +1 @@ -MD5 (lua-4.0.tar.gz) = be11522d46d33a931868c03694aaeeef +MD5 (lua-5.0.tar.gz) = 6f14803fad389fb1cb15d17edfeddd91 diff --git a/lang/lua50/files/patch-aa b/lang/lua50/files/patch-aa deleted file mode 100644 index 44a4a2a..0000000 --- a/lang/lua50/files/patch-aa +++ /dev/null @@ -1,19 +0,0 @@ ---- config Mon Nov 6 12:28:20 2000 -+++ config.new Tue Jan 2 15:51:57 2001 -@@ -28,7 +28,6 @@ - # ------------------------------------------------------------------ C compiler - - # You need an ANSI C compiler. gcc is a popular one. --CC= gcc - WARN= -ansi -pedantic -Wall - - # On IRIX, cc is a good ANSI compiler. -@@ -93,7 +93,7 @@ - INCS= -I$(INC) $(EXTRA_INCS) - DEFS= $(COMPAT) $(NUMBER) $(OLD_ANSI) $(EXTRA_DEFS) - --CFLAGS= -O2 $(WARN) $(INCS) $(DEFS) -+CFLAGS+= $(WARN) $(INCS) $(DEFS) - - V=4.0 - diff --git a/lang/lua50/files/patch-ab b/lang/lua50/files/patch-ab index b7fbfba..5a24cd69 100644 --- a/lang/lua50/files/patch-ab +++ b/lang/lua50/files/patch-ab @@ -1,20 +1,20 @@ ---- src/lib/lmathlib.c.orig Mon Apr 30 00:05:45 2001 -+++ src/lib/lmathlib.c Mon Apr 30 00:06:05 2001 -@@ -168,7 +168,7 @@ +--- src/lib/lmathlib.c.orig Tue Mar 11 21:30:37 2003 ++++ src/lib/lmathlib.c Fri May 9 02:32:59 2003 +@@ -170,7 +170,7 @@ static int math_random (lua_State *L) { - /* the '%' avoids the (rare) case of r==1, and is needed also because on - some systems (SunOS!) "rand()" may return a value larger than RAND_MAX */ -- double r = (double)(rand()%RAND_MAX) / (double)RAND_MAX; -+ double r = (double)(random()%RAND_MAX) / (double)RAND_MAX; + /* the `%' avoids the (rare) case of r==1, and is needed also because on + some systems (SunOS!) `rand()' may return a value larger than RAND_MAX */ +- lua_Number r = (lua_Number)(rand()%RAND_MAX) / (lua_Number)RAND_MAX; ++ lua_Number r = (lua_Number)(random()%RAND_MAX) / (lua_Number)RAND_MAX; switch (lua_gettop(L)) { /* check number of arguments */ case 0: { /* no arguments */ lua_pushnumber(L, r); /* Number between 0 and 1 */ -@@ -194,7 +194,7 @@ +@@ -196,7 +196,7 @@ static int math_randomseed (lua_State *L) { -- srand(luaL_check_int(L, 1)); -+ srandom(luaL_check_int(L, 1)); +- srand(luaL_checkint(L, 1)); ++ srandom(luaL_checkint(L, 1)); return 0; } diff --git a/lang/lua50/pkg-descr b/lang/lua50/pkg-descr index 8083b02..d0ed8af 100644 --- a/lang/lua50/pkg-descr +++ b/lang/lua50/pkg-descr @@ -19,4 +19,3 @@ compiles unmodified in all known platforms. The implementation goals are simplicity, efficiency, portability, and low embedding cost. WWW: http://www.lua.org/ -WWW: http://www.tecgraf.puc-rio.br/lua/ diff --git a/lang/lua50/pkg-plist b/lang/lua50/pkg-plist index eeb818a..dbf0310 100644 --- a/lang/lua50/pkg-plist +++ b/lang/lua50/pkg-plist @@ -2,12 +2,12 @@ bin/lua bin/luac include/lauxlib.h include/lua.h -include/luadebug.h include/lualib.h lib/liblua.a lib/liblualib.a -share/doc/lua/idx.html -share/doc/lua/index.html +share/doc/lua/logo.gif +share/doc/lua/lua.html share/doc/lua/luac.html share/doc/lua/manual.html +share/doc/lua/readme.html @dirrm share/doc/lua -- cgit v1.1