Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Dec 2012 16:30:43 GMT
From:      Green Dog <fiziologus@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/174437: [new port] lang/lua52
Message-ID:  <201212141630.qBEGUhNA065017@red.freebsd.org>
Resent-Message-ID: <201212141640.qBEGe0QS061655@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         174437
>Category:       ports
>Synopsis:       [new port] lang/lua52
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 14 16:40:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Green Dog
>Release:        FreeBSD-9.0
>Organization:
>Environment:
>Description:
[new port] lang/lua52 = lua-5.2.1
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	lua52
#	lua52/Makefile
#	lua52/distinfo
#	lua52/pkg-descr
#	lua52/pkg-plist
#	lua52/files
#	lua52/files/patch-src-Makefile
#	lua52/files/patch-Makefile
#
echo c - lua52
mkdir -p lua52 > /dev/null 2>&1
echo x - lua52/Makefile
sed 's/^X//' >lua52/Makefile << '4f921d0f7f59238cba49dcde1ec54789'
X# New ports collection makefile for: 	lua52
X# Date created:				14 Dec 2012
X# Whom:					GreenDog <fiziologus@gmail.com>
X#
X# $FreeBSD$
X
XPORTNAME=	lua
XPORTVERSION=	5.2.1
XCATEGORIES=	lang
XMASTER_SITES=	http://www.lua.org/ftp/
X
XMAINTAINER=	fisiologus@gmail.com
XCOMMENT=	Small, compilable scripting language providing easy access to C code
X
XLICENSE=	MIT
X
X#USE_LUA=	5.2
XLUA_VER=	5.2
XLUA_VER_SH=	1
XLUA_VER_STR=	52
XLUA_SUBDIR=	lua${LUA_VER_STR}
XLUA_PREFIX=	${PREFIX}
XLUA_BINDIR=	${LUA_PREFIX}/bin/${LUA_SUBDIR}
XLUA_INCDIR=	${LUA_PREFIX}/include/${LUA_SUBDIR}
XLUA_LIBDIR=	${LUA_PREFIX}/lib/${LUA_SUBDIR}
XLUA_MODLIBDIR=	${LUA_PREFIX}/lib/lua/${LUA_VER}
XLUA_MODSHAREDIR=	${LUA_PREFIX}/share/lua/${LUA_VER}
X
XALL_TARGET=	freebsd
XUSE_LDCONFIG=	yes
XMAKE_JOBS_SAFE=	yes
XMAKE_ENV=	LUA_SONAME="liblua-${LUA_VER}.so.${LUA_VER_SH}" \
X		MYCFLAGS="${CFLAGS}" MYLDFLAGS="${LDFLAGS}"
X
XMAN1=		lua-${LUA_VER}.1 luac-${LUA_VER}.1
XDOCSDIR=	${PREFIX}/share/doc/${LUA_SUBDIR}
XLATEST_LINK=	${LUA_SUBDIR}
X
X.include <bsd.port.pre.mk>
X
X.if ${ARCH} == "amd64" || ${ARCH} == "powerpc"
XCFLAGS+=	-fPIC
X.endif
X
Xpost-patch:
X	@${REINPLACE_CMD} -Ee \
X		"s|%%LUA_PREFIX%%|${LUA_PREFIX}| ; \
X		s|%%LUA_BINDIR%%|${LUA_BINDIR}| ; \
X		s|%%LUA_INCDIR%%|${LUA_INCDIR}| ; \
X		s|%%LUA_LIBDIR%%|${LUA_LIBDIR}| ; \
X		s|%%LUA_MODSHAREDIR%%|${LUA_MODSHAREDIR}| ; \
X		s|%%LUA_MODLIBDIR%%|${LUA_MODLIBDIR}| ; \
X		s|%%LUA_VER_SH%%|${LUA_VER_SH}|" \
X		${WRKSRC}/Makefile
X	@${REINPLACE_CMD} -e 's,rand *(,random(,g' \
X		${WRKSRC}/src/lmathlib.c
X	@${REINPLACE_CMD} -e "/LUA_ROOT/s|/usr/local|${LUA_PREFIX}|" \
X		${WRKSRC}/src/luaconf.h
X
Xpost-install:
X.for f in lua luac
X	${LN} -sf ${LUA_BINDIR}/${f} ${PREFIX}/bin/${f}-${LUA_VER}
X.endfor
X	${LN} -sf ${LUA_LIBDIR}/liblua-${LUA_VER}.so.${LUA_VER_SH} ${LUA_LIBDIR}/liblua.so
X	${LN} -sf ${LUA_SUBDIR}/liblua-${LUA_VER}.so.${LUA_VER_SH} ${PREFIX}/lib
X	${LN} -sf liblua-${LUA_VER}.so.${LUA_VER_SH} ${PREFIX}/lib/liblua-${LUA_VER}.so
X
X# Documentation.
X.if ${PORT_OPTIONS:MDOCS}
X	${MKDIR} ${DOCSDIR}
X	cd ${WRKSRC}/doc && ${INSTALL_DATA} *.html *.gif *.css *.png ${DOCSDIR}
X.endif
X
X.include <bsd.port.post.mk>
4f921d0f7f59238cba49dcde1ec54789
echo x - lua52/distinfo
sed 's/^X//' >lua52/distinfo << '18895f514ac1ed78566e5082c06478e5'
XSHA256 (lua-5.2.1.tar.gz) = 64304da87976133196f9e4c15250b70f444467b6ed80d7cfd7b3b982b5177be5
XSIZE (lua-5.2.1.tar.gz) = 249882
18895f514ac1ed78566e5082c06478e5
echo x - lua52/pkg-descr
sed 's/^X//' >lua52/pkg-descr << 'a8d920f363dba7cc2a6983b2c3c02e85'
XLua is a programming language originally designed for extending applications,
Xbut also frequently used as a general-purpose, stand-alone language. Lua
Xcombines simple procedural syntax (similar to Pascal) with powerful data
Xdescription constructs based on associative arrays and extensible semantics.
XLua is dynamically typed, interpreted from bytecodes, and has automatic memory
Xmanagement with garbage collection, making it ideal for configuration,
Xscripting, and rapid prototyping. 
X
XA fundamental concept in the design of Lua is to provide meta-mechanisms for
Ximplementing features, instead of providing a host of features directly in
Xthe language. For example, although Lua is not a pure object-oriented
Xlanguage, it does provide meta-mechanisms for implementing classes and
Xinheritance. Lua's meta-mechanisms bring an economy of concepts and keep the
Xlanguage small, while allowing the semantics to be extended in unconventional
Xways. Extensible semantics is a distinguishing feature of Lua. 
X
XLua is implemented as a small library of C functions, written in ANSI C, and
Xcompiles unmodified in all known platforms. The implementation goals are
Xsimplicity, efficiency, portability, and low embedding cost. 
X
XWWW: http://www.lua.org/
a8d920f363dba7cc2a6983b2c3c02e85
echo x - lua52/pkg-plist
sed 's/^X//' >lua52/pkg-plist << 'b0a630f050a8409aebfa436c2cd9d29e'
Xbin/lua-5.2
Xbin/lua52/lua
Xbin/lua52/luac
Xbin/luac-5.2
Xinclude/lua52/lauxlib.h
Xinclude/lua52/lua.h
Xinclude/lua52/lua.hpp
Xinclude/lua52/luaconf.h
Xinclude/lua52/lualib.h
Xlib/liblua-5.2.so
Xlib/liblua-5.2.so.1
Xlib/lua52/liblua-5.2.so.1
Xlib/lua52/liblua.a
Xlib/lua52/liblua.so
X%%PORTDOCS%%%%DOCSDIR%%/contents.html
X%%PORTDOCS%%%%DOCSDIR%%/logo.gif
X%%PORTDOCS%%%%DOCSDIR%%/lua.css
X%%PORTDOCS%%%%DOCSDIR%%/manual.css
X%%PORTDOCS%%%%DOCSDIR%%/manual.html
X%%PORTDOCS%%%%DOCSDIR%%/osi-certified-72x60.png
X%%PORTDOCS%%%%DOCSDIR%%/readme.html
X%%PORTDOCS%%@dirrm %%DOCSDIR%%
X@dirrm bin/lua52
X@dirrm include/lua52
X@dirrm lib/lua52
X@dirrmtry lib/lua/5.2
X@dirrmtry lib/lua
X@dirrmtry share/lua/5.2
X@dirrmtry share/lua
b0a630f050a8409aebfa436c2cd9d29e
echo c - lua52/files
mkdir -p lua52/files > /dev/null 2>&1
echo x - lua52/files/patch-src-Makefile
sed 's/^X//' >lua52/files/patch-src-Makefile << '6e55ab79dfa44c195b119020797269c1'
X--- src/Makefile.orig	2012-03-09 20:32:16.000000000 +0400
X+++ src/Makefile	2012-12-14 16:39:47.000000000 +0400
X@@ -6,12 +6,13 @@
X # Your platform. See PLATS for possible values.
X PLAT= none
X 
X-CC= gcc
X-CFLAGS= -O2 -Wall -DLUA_COMPAT_ALL $(SYSCFLAGS) $(MYCFLAGS)
X+CC?= gcc
X+CFLAGS= -Wall -DLUA_COMPAT_ALL $(SYSCFLAGS) $(MYCFLAGS)
X LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
X LIBS= -lm $(SYSLIBS) $(MYLIBS)
X 
X-AR= ar rcu
X+AR= ar
X+ARFLAGS= rcu
X RANLIB= ranlib
X RM= rm -f
X 
X@@ -19,8 +20,8 @@
X SYSLDFLAGS=
X SYSLIBS=
X 
X-MYCFLAGS=
X-MYLDFLAGS=
X+MYCFLAGS?=
X+MYLDFLAGS?=
X MYLIBS=
X MYOBJS=
X 
X@@ -38,12 +39,13 @@
X 
X LUA_T=	lua
X LUA_O=	lua.o
X+LUA_SO=	liblua.so
X 
X LUAC_T=	luac
X LUAC_O=	luac.o
X 
X ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
X-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
X+ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO)
X ALL_A= $(LUA_A)
X 
X # Targets start here.
X@@ -55,8 +57,11 @@
X 
X a:	$(ALL_A)
X 
X+$(LUA_SO):	$(CORE_O) $(LIB_O)
X+	$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(MYLDFLAGS) -shared -Wl,-soname=$(LUA_SONAME) $?
X+
X $(LUA_A): $(BASE_O)
X-	$(AR) $@ $(BASE_O)
X+	$(AR) $(ARFLAGS) $@ $(BASE_O)
X 	$(RANLIB) $@
X 
X $(LUA_T): $(LUA_O) $(LUA_A)
6e55ab79dfa44c195b119020797269c1
echo x - lua52/files/patch-Makefile
sed 's/^X//' >lua52/files/patch-Makefile << '0b19d2f9aa5c13d2e9fa405adc56016c'
X--- Makefile.orig	2012-12-14 18:29:11.000000000 +0400
X+++ Makefile	2012-12-14 18:45:06.000000000 +0400
X@@ -10,13 +10,13 @@
X # so take care if INSTALL_TOP is not an absolute path. See the local target.
X # You may want to make INSTALL_LMOD and INSTALL_CMOD consistent with
X # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h.
X-INSTALL_TOP= /usr/local
X-INSTALL_BIN= $(INSTALL_TOP)/bin
X-INSTALL_INC= $(INSTALL_TOP)/include
X-INSTALL_LIB= $(INSTALL_TOP)/lib
X+INSTALL_TOP= %%LUA_PREFIX%%
X+INSTALL_BIN= %%LUA_BINDIR%%
X+INSTALL_INC= %%LUA_INCDIR%%
X+INSTALL_LIB= %%LUA_LIBDIR%%
X INSTALL_MAN= $(INSTALL_TOP)/man/man1
X-INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
X-INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
X+INSTALL_LMOD= %%LUA_MODSHAREDIR%%
X+INSTALL_CMOD= %%LUA_MODLIBDIR%%
X 
X # How to install. If your install program does not support "-p", then
X # you may have to run ranlib on the installed liblua.a.
X@@ -41,8 +41,8 @@
X # What to install.
X TO_BIN= lua luac
X TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
X-TO_LIB= liblua.a
X-TO_MAN= lua.1 luac.1
X+TO_LIB= liblua.a liblua-5.2.so.1
X+TO_MAN= lua-5.2.1 luac-5.2.1
X 
X # Lua version and release.
X V= 5.2
X@@ -61,8 +61,8 @@
X 	cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
X 	cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
X 	cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
X-	cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
X-	cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
X+	cd src && mv liblua.so liblua-$V.so.%%LUA_VER_SH%% && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
X+	cd doc && mv lua.1 lua-$V.1 && mv luac.1 luac-$V.1 && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
X 
X uninstall:
X 	cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN)
0b19d2f9aa5c13d2e9fa405adc56016c
exit



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212141630.qBEGUhNA065017>