aboutsummaryrefslogtreecommitdiffstats
path: root/lang/tolua50/Makefile
blob: 2dd36102d2d2a526ca364629e023e737ec0fb18f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#
# New ports collection makefile for:    tolua
# Date created:             21 November 2004
# Whom:                 Edwin Groothuis <edwin@mavetju.org>
#
# $FreeBSD$
#

PORTNAME=   tolua
PORTVERSION=    5.0.1
PORTREVISION=   1
CATEGORIES= lang
MASTER_SITES=   ftp://ftp.tecgraf.puc-rio.br/pub/users/celes/tolua/ \
        http://www.tecgraf.puc-rio.br/~celes/tolua/

MAINTAINER= edwin@mavetju.org
COMMENT=    toLua: accessing C/C++ code from Lua

USE_GMAKE=  yes
USE_LUA=    5.0
WRKSRC=     ${WRKDIR}/${PORTNAME}-5.0

NO_LATEST_LINK= yes

post-patch:
    @${REINPLACE_CMD} -e 's|make|$${MAKE}|' ${WRKSRC}/${MAKEFILE}
    @${REINPLACE_CMD} -Ee \
        's|^(CC=).*|\1 ${CC}|; \
         s|^(CCPP=).*|\1 ${CXX}|; \
         s|^(LUA=).*|\1 ${LOCALBASE}|; \
         s|^(LUA(INC\|LIB)=).*|\1 $${LUA_\2DIR}|; \
         s|^(CPPFLAGS)(=.*)|\1+\2 -lstdc++|; \
         s|^(CFLAGS)(=.*)|\1+\2|;' \
        ${WRKSRC}/config

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/bin/tolua ${LUA_BINDIR}
    ${LN} -sf ${LUA_SUBDIR}/tolua ${PREFIX}/bin/tolua-${LUA_VER}
    ${INSTALL_DATA} ${WRKSRC}/include/tolua.h ${LUA_INCDIR}
    ${INSTALL_DATA} ${WRKSRC}/lib/libtolua.a ${LUA_LIBDIR}

.include <bsd.port.mk>