head	1.2;
access;
symbols;
locks; strict;
comment	@# @;


1.2
date	2013.01.06.19.25.40;	author svnexp;	state Exp;
branches;
next	1.1;

1.1
date	2013.01.05.23.50.23;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/310003
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r310003 | mandree | 2013-01-06 17:42:35 +0000 (Sun, 06 Jan 2013) | 2 lines
## SVN ##
## SVN ## Fix typo in MAINTAINER address (was also in the submitted .shar).
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@# Created by: GreenDog <fiziologus@@gmail.com>
# $FreeBSD: head/lang/lua52/Makefile 310003 2013-01-06 17:42:35Z mandree $

PORTNAME=	lua
PORTVERSION=	5.2.1
CATEGORIES=	lang
MASTER_SITES=	http://www.lua.org/ftp/

MAINTAINER=	fiziologus@@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 <bsd.port.pre.mk>

.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 <bsd.port.post.mk>
@


1.1
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/309973
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r309973 | mandree | 2013-01-05 23:24:51 +0000 (Sat, 05 Jan 2013) | 27 lines
## SVN ##
## SVN ## Add new port lang/lua52.
## SVN ##
## SVN ## Lua is a programming language originally designed for extending applications,
## SVN ## but also frequently used as a general-purpose, stand-alone language. Lua
## SVN ## combines simple procedural syntax (similar to Pascal) with powerful data
## SVN ## description constructs based on associative arrays and extensible semantics.
## SVN ## Lua is dynamically typed, interpreted from bytecodes, and has automatic memory
## SVN ## management with garbage collection, making it ideal for configuration,
## SVN ## scripting, and rapid prototyping.
## SVN ##
## SVN ## A fundamental concept in the design of Lua is to provide meta-mechanisms for
## SVN ## implementing features, instead of providing a host of features directly in
## SVN ## the language. For example, although Lua is not a pure object-oriented
## SVN ## language, it does provide meta-mechanisms for implementing classes and
## SVN ## inheritance. Lua's meta-mechanisms bring an economy of concepts and keep the
## SVN ## language small, while allowing the semantics to be extended in unconventional
## SVN ## ways. Extensible semantics is a distinguishing feature of Lua.
## SVN ##
## SVN ## Lua is implemented as a small library of C functions, written in ANSI C, and
## SVN ## compiles unmodified in all known platforms. The implementation goals are
## SVN ## simplicity, efficiency, portability, and low embedding cost.
## SVN ##
## SVN ## WWW: http://www.lua.org/
## SVN ##
## SVN ## PR:		ports/174437
## SVN ## Submitted by:	Green Dog <fiziologus@@gmail.com>
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d2 1
a2 1
# $FreeBSD: head/lang/lua52/Makefile 309973 2013-01-05 23:24:51Z mandree $
d9 1
a9 1
MAINTAINER=	fisiologus@@gmail.com
@

