aboutsummaryrefslogtreecommitdiffstats
path: root/lang/tolua50/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'lang/tolua50/Makefile')
-rw-r--r--lang/tolua50/Makefile24
1 files changed, 17 insertions, 7 deletions
diff --git a/lang/tolua50/Makefile b/lang/tolua50/Makefile
index 02c083a00bda..6e07b3331eff 100644
--- a/lang/tolua50/Makefile
+++ b/lang/tolua50/Makefile
@@ -15,15 +15,25 @@ MASTER_SITES= ftp://ftp.tecgraf.puc-rio.br/pub/users/celes/tolua/ \
MAINTAINER= edwin@mavetju.org
COMMENT= toLua: accessing C/C++ code from Lua
-LIB_DEPENDS= lua:${PORTSDIR}/lang/lua50
-
-WRKSRC= ${WRKDIR}/${PORTNAME}-5.0
USE_GMAKE= yes
-CONFLICTS= tolua4-.*
+USE_LUA= 5.0
+WRKSRC= ${WRKDIR}/${PORTNAME}-5.0
+
+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 ${PREFIX}/bin
- ${INSTALL_DATA} ${WRKSRC}/include/tolua.h ${PREFIX}/include
- ${INSTALL_DATA} ${WRKSRC}/lib/libtolua.a ${PREFIX}/lib
+ ${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>