From owner-svn-ports-head@FreeBSD.ORG Sat Jan 5 23:24:53 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D1817993; Sat, 5 Jan 2013 23:24:53 +0000 (UTC) (envelope-from mandree@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BAC62A16; Sat, 5 Jan 2013 23:24:53 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r05NOr63004887; Sat, 5 Jan 2013 23:24:53 GMT (envelope-from mandree@svn.freebsd.org) Received: (from mandree@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r05NOqhE004879; Sat, 5 Jan 2013 23:24:52 GMT (envelope-from mandree@svn.freebsd.org) Message-Id: <201301052324.r05NOqhE004879@svn.freebsd.org> From: Matthias Andree Date: Sat, 5 Jan 2013 23:24:52 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r309973 - in head/lang: . lua52 lua52/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2013 23:24:53 -0000 Author: mandree Date: Sat Jan 5 23:24:51 2013 New Revision: 309973 URL: http://svnweb.freebsd.org/changeset/ports/309973 Log: Add new port lang/lua52. Lua is a programming language originally designed for extending applications, but also frequently used as a general-purpose, stand-alone language. Lua combines simple procedural syntax (similar to Pascal) with powerful data description constructs based on associative arrays and extensible semantics. Lua is dynamically typed, interpreted from bytecodes, and has automatic memory management with garbage collection, making it ideal for configuration, scripting, and rapid prototyping. A fundamental concept in the design of Lua is to provide meta-mechanisms for implementing features, instead of providing a host of features directly in the language. For example, although Lua is not a pure object-oriented language, it does provide meta-mechanisms for implementing classes and inheritance. Lua's meta-mechanisms bring an economy of concepts and keep the language small, while allowing the semantics to be extended in unconventional ways. Extensible semantics is a distinguishing feature of Lua. Lua is implemented as a small library of C functions, written in ANSI C, and compiles unmodified in all known platforms. The implementation goals are simplicity, efficiency, portability, and low embedding cost. WWW: http://www.lua.org/ PR: ports/174437 Submitted by: Green Dog Added: head/lang/lua52/ head/lang/lua52/Makefile (contents, props changed) head/lang/lua52/distinfo (contents, props changed) head/lang/lua52/files/ head/lang/lua52/files/patch-Makefile (contents, props changed) head/lang/lua52/files/patch-src__Makefile (contents, props changed) head/lang/lua52/files/patch-src__liolib.c (contents, props changed) head/lang/lua52/pkg-descr (contents, props changed) head/lang/lua52/pkg-plist (contents, props changed) Modified: head/lang/Makefile Modified: head/lang/Makefile ============================================================================== --- head/lang/Makefile Sat Jan 5 22:57:40 2013 (r309972) +++ head/lang/Makefile Sat Jan 5 23:24:51 2013 (r309973) @@ -152,6 +152,7 @@ SUBDIR += lua-mode.el SUBDIR += lua4 SUBDIR += lua50 + SUBDIR += lua52 SUBDIR += luajit SUBDIR += lush SUBDIR += malbolge Added: head/lang/lua52/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/lua52/Makefile Sat Jan 5 23:24:51 2013 (r309973) @@ -0,0 +1,74 @@ +# Created by: GreenDog +# $FreeBSD$ + +PORTNAME= lua +PORTVERSION= 5.2.1 +CATEGORIES= lang +MASTER_SITES= http://www.lua.org/ftp/ + +MAINTAINER= fisiologus@gmail.com +COMMENT= Small, compilable scripting language providing easy access to C code + +LICENSE= MIT + +#USE_LUA= 5.2 +LUA_VER= 5.2 +LUA_VER_SH= 1 +LUA_VER_STR= 52 +LUA_SUBDIR= lua${LUA_VER_STR} +LUA_PREFIX= ${PREFIX} +LUA_BINDIR= ${LUA_PREFIX}/bin/${LUA_SUBDIR} +LUA_INCDIR= ${LUA_PREFIX}/include/${LUA_SUBDIR} +LUA_LIBDIR= ${LUA_PREFIX}/lib/${LUA_SUBDIR} +LUA_MODLIBDIR= ${LUA_PREFIX}/lib/lua/${LUA_VER} +LUA_MODSHAREDIR= ${LUA_PREFIX}/share/lua/${LUA_VER} + +ALL_TARGET= freebsd +USE_LDCONFIG= yes +MAKE_JOBS_SAFE= yes +MAKE_ENV= LUA_SONAME="liblua-${LUA_VER}.so.${LUA_VER_SH}" \ + MYCFLAGS="${CFLAGS}" MYLDFLAGS="${LDFLAGS}" +# liblua.so requires libm, so make sure it has an explicit dependency +# so that applications need not second-guess lua's dependencies. +LDFLAGS+= -lm + +MAN1= lua-${LUA_VER}.1 luac-${LUA_VER}.1 +DOCSDIR= ${PREFIX}/share/doc/${LUA_SUBDIR} +LATEST_LINK= ${LUA_SUBDIR} + +.include + +.if ${ARCH} == "amd64" || ${ARCH} == "powerpc" +CFLAGS+= -fPIC +.endif + +post-patch: + @${REINPLACE_CMD} -Ee \ + "s|%%LUA_PREFIX%%|${LUA_PREFIX}| ; \ + s|%%LUA_BINDIR%%|${LUA_BINDIR}| ; \ + s|%%LUA_INCDIR%%|${LUA_INCDIR}| ; \ + s|%%LUA_LIBDIR%%|${LUA_LIBDIR}| ; \ + s|%%LUA_MODSHAREDIR%%|${LUA_MODSHAREDIR}| ; \ + s|%%LUA_MODLIBDIR%%|${LUA_MODLIBDIR}| ; \ + s|%%LUA_VER_SH%%|${LUA_VER_SH}|" \ + ${WRKSRC}/Makefile + @${REINPLACE_CMD} -e 's,rand *(,random(,g' \ + ${WRKSRC}/src/lmathlib.c + @${REINPLACE_CMD} -e "/LUA_ROOT/s|/usr/local|${LUA_PREFIX}|" \ + ${WRKSRC}/src/luaconf.h + +post-install: +.for f in lua luac + ${LN} -sf ${LUA_BINDIR}/${f} ${PREFIX}/bin/${f}-${LUA_VER} +.endfor + ${LN} -sf ${LUA_LIBDIR}/liblua-${LUA_VER}.so.${LUA_VER_SH} ${LUA_LIBDIR}/liblua.so + ${LN} -sf ${LUA_SUBDIR}/liblua-${LUA_VER}.so.${LUA_VER_SH} ${PREFIX}/lib + ${LN} -sf liblua-${LUA_VER}.so.${LUA_VER_SH} ${PREFIX}/lib/liblua-${LUA_VER}.so + +# Documentation. +.if ${PORT_OPTIONS:MDOCS} + ${MKDIR} ${DOCSDIR} + cd ${WRKSRC}/doc && ${INSTALL_DATA} *.html *.gif *.css *.png ${DOCSDIR} +.endif + +.include Added: head/lang/lua52/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/lua52/distinfo Sat Jan 5 23:24:51 2013 (r309973) @@ -0,0 +1,2 @@ +SHA256 (lua-5.2.1.tar.gz) = 64304da87976133196f9e4c15250b70f444467b6ed80d7cfd7b3b982b5177be5 +SIZE (lua-5.2.1.tar.gz) = 249882 Added: head/lang/lua52/files/patch-Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/lua52/files/patch-Makefile Sat Jan 5 23:24:51 2013 (r309973) @@ -0,0 +1,44 @@ +--- Makefile.orig 2012-12-14 18:29:11.000000000 +0400 ++++ Makefile 2012-12-14 18:45:06.000000000 +0400 +@@ -10,13 +10,13 @@ + # 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_BIN= $(INSTALL_TOP)/bin +-INSTALL_INC= $(INSTALL_TOP)/include +-INSTALL_LIB= $(INSTALL_TOP)/lib ++INSTALL_TOP= %%LUA_PREFIX%% ++INSTALL_BIN= %%LUA_BINDIR%% ++INSTALL_INC= %%LUA_INCDIR%% ++INSTALL_LIB= %%LUA_LIBDIR%% + INSTALL_MAN= $(INSTALL_TOP)/man/man1 +-INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V +-INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V ++INSTALL_LMOD= %%LUA_MODSHAREDIR%% ++INSTALL_CMOD= %%LUA_MODLIBDIR%% + + # How to install. If your install program does not support "-p", then + # you may have to run ranlib on the installed liblua.a. +@@ -41,8 +41,8 @@ + # What to install. + TO_BIN= lua luac + TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp +-TO_LIB= liblua.a +-TO_MAN= lua.1 luac.1 ++TO_LIB= liblua.a liblua-5.2.so.1 ++TO_MAN= lua-5.2.1 luac-5.2.1 + + # Lua version and release. + V= 5.2 +@@ -61,8 +61,8 @@ + cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD) + cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN) + cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) +- cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) +- cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) ++ cd src && mv liblua.so liblua-$V.so.%%LUA_VER_SH%% && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) ++ cd doc && mv lua.1 lua-$V.1 && mv luac.1 luac-$V.1 && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) + + uninstall: + cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN) Added: head/lang/lua52/files/patch-src__Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/lua52/files/patch-src__Makefile Sat Jan 5 23:24:51 2013 (r309973) @@ -0,0 +1,58 @@ +--- src/Makefile.orig 2012-03-09 20:32:16.000000000 +0400 ++++ src/Makefile 2012-12-14 16:39:47.000000000 +0400 +@@ -6,12 +6,13 @@ + # Your platform. See PLATS for possible values. + PLAT= none + +-CC= gcc +-CFLAGS= -O2 -Wall -DLUA_COMPAT_ALL $(SYSCFLAGS) $(MYCFLAGS) ++CC?= gcc ++CFLAGS= -Wall -DLUA_COMPAT_ALL $(SYSCFLAGS) $(MYCFLAGS) + LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS) + LIBS= -lm $(SYSLIBS) $(MYLIBS) + +-AR= ar rcu ++AR= ar ++ARFLAGS= rcu + RANLIB= ranlib + RM= rm -f + +@@ -19,8 +20,8 @@ + SYSLDFLAGS= + SYSLIBS= + +-MYCFLAGS= +-MYLDFLAGS= ++MYCFLAGS?= ++MYLDFLAGS?= + MYLIBS= + MYOBJS= + +@@ -38,12 +39,13 @@ + + LUA_T= lua + LUA_O= lua.o ++LUA_SO= liblua.so + + LUAC_T= luac + LUAC_O= luac.o + + ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O) +-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) ++ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO) + ALL_A= $(LUA_A) + + # Targets start here. +@@ -55,8 +57,11 @@ + + a: $(ALL_A) + ++$(LUA_SO): $(CORE_O) $(LIB_O) ++ $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(MYLDFLAGS) -shared -Wl,-soname=$(LUA_SONAME) $? ++ + $(LUA_A): $(BASE_O) +- $(AR) $@ $(BASE_O) ++ $(AR) $(ARFLAGS) $@ $(BASE_O) + $(RANLIB) $@ + + $(LUA_T): $(LUA_O) $(LUA_A) Added: head/lang/lua52/files/patch-src__liolib.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/lua52/files/patch-src__liolib.c Sat Jan 5 23:24:51 2013 (r309973) @@ -0,0 +1,10 @@ +--- ./src/liolib.c.orig 2013-01-05 22:46:54.000000000 +0100 ++++ ./src/liolib.c 2013-01-05 22:47:32.000000000 +0100 +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + + #define liolib_c + #define LUA_LIB Added: head/lang/lua52/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/lua52/pkg-descr Sat Jan 5 23:24:51 2013 (r309973) @@ -0,0 +1,21 @@ +Lua is a programming language originally designed for extending applications, +but also frequently used as a general-purpose, stand-alone language. Lua +combines simple procedural syntax (similar to Pascal) with powerful data +description constructs based on associative arrays and extensible semantics. +Lua is dynamically typed, interpreted from bytecodes, and has automatic memory +management with garbage collection, making it ideal for configuration, +scripting, and rapid prototyping. + +A fundamental concept in the design of Lua is to provide meta-mechanisms for +implementing features, instead of providing a host of features directly in +the language. For example, although Lua is not a pure object-oriented +language, it does provide meta-mechanisms for implementing classes and +inheritance. Lua's meta-mechanisms bring an economy of concepts and keep the +language small, while allowing the semantics to be extended in unconventional +ways. Extensible semantics is a distinguishing feature of Lua. + +Lua is implemented as a small library of C functions, written in ANSI C, and +compiles unmodified in all known platforms. The implementation goals are +simplicity, efficiency, portability, and low embedding cost. + +WWW: http://www.lua.org/ Added: head/lang/lua52/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/lua52/pkg-plist Sat Jan 5 23:24:51 2013 (r309973) @@ -0,0 +1,29 @@ +bin/lua-5.2 +bin/lua52/lua +bin/lua52/luac +bin/luac-5.2 +include/lua52/lauxlib.h +include/lua52/lua.h +include/lua52/lua.hpp +include/lua52/luaconf.h +include/lua52/lualib.h +lib/liblua-5.2.so +lib/liblua-5.2.so.1 +lib/lua52/liblua-5.2.so.1 +lib/lua52/liblua.a +lib/lua52/liblua.so +%%PORTDOCS%%%%DOCSDIR%%/contents.html +%%PORTDOCS%%%%DOCSDIR%%/logo.gif +%%PORTDOCS%%%%DOCSDIR%%/lua.css +%%PORTDOCS%%%%DOCSDIR%%/manual.css +%%PORTDOCS%%%%DOCSDIR%%/manual.html +%%PORTDOCS%%%%DOCSDIR%%/osi-certified-72x60.png +%%PORTDOCS%%%%DOCSDIR%%/readme.html +%%PORTDOCS%%@dirrm %%DOCSDIR%% +@dirrm bin/lua52 +@dirrm include/lua52 +@dirrm lib/lua52 +@dirrmtry lib/lua/5.2 +@dirrmtry lib/lua +@dirrmtry share/lua/5.2 +@dirrmtry share/lua