summaryrefslogtreecommitdiff
path: root/devel/tolua++/Makefile
blob: 09724262cc80a332ec260550c0d55c2251a424d5 (plain)
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
43
44
45
46
47
48
49
# $NetBSD: Makefile,v 1.2 2012/10/31 11:19:51 asau Exp $
#

DISTNAME=	tolua++-1.0.93
CATEGORIES=	devel
MASTER_SITES=	http://www.codenix.com/~tolua/
EXTRACT_SUFX=	.tar.bz2

MAINTAINER=	imil@NetBSD.org
HOMEPAGE=	http://www.codenix.com/~tolua/
COMMENT=	Tool to integrate C/C++ code with Lua
LICENSE=	mit

USE_LANGUAGES=	c c++

BUILD_DEPENDS+=	scons-[0-9]*:../../devel/scons

INSTALLATION_DIRS+=	bin lib include share/doc/tolua++

SCONS=          ${PREFIX}/bin/scons
SCONS_ARGS=	prefix=${PREFIX} SONAME="libtolua++.so.${LUA_VERSION}"

SUBST_CLASSES+=		prefix
SUBST_STAGE.prefix=	post-patch
SUBST_FILES.prefix=	custom.py
SUBST_SED.prefix=	-e 's|@PREFIX@|${PREFIX}|'

PLIST_SUBST+=		LUA_VERSION=${LUA_VERSION}

pre-patch:
	${CP} files/custom.py ${WRKSRC}

do-build:
	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${SCONS} ${SCONS_ARGS}

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/bin/tolua++ ${DESTDIR}${PREFIX}/bin
	${INSTALL_LIB} ${WRKSRC}/lib/libtolua++.a ${DESTDIR}${PREFIX}/lib
	${INSTALL_LIB} ${WRKSRC}/lib/libtolua++.so 			\
		${DESTDIR}${PREFIX}/lib/libtolua++.so.${LUA_VERSION}
	${LN} -sf ${DESTDIR}${PREFIX}/lib/libtolua++.so.${LUA_VERSION}	\
		${DESTDIR}${PREFIX}/lib/libtolua++.so
	${INSTALL_DATA} ${WRKSRC}/include/tolua++.h ${DESTDIR}${PREFIX}/include
	${INSTALL_DATA} ${WRKSRC}/README* ${DESTDIR}${PREFIX}/share/doc/tolua++
	${INSTALL_DATA} ${WRKSRC}/doc/tolua++.html			\
		${DESTDIR}${PREFIX}/share/doc/tolua++

.include "../../lang/lua/module.mk"
.include "../../mk/bsd.pkg.mk"