aboutsummaryrefslogtreecommitdiffstats
path: root/devel/luabind/Makefile
blob: d19b1f648c2af310151446435022b6ea57604e11 (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
43
44
45
46
47
48
49
50
51
# Created by: Dmitry Marakasov <amdmi3@amdmi3.ru>
# $FreeBSD$

PORTNAME=   luabind
PORTVERSION=    0.9.1
PORTREVISION=   3
CATEGORIES= devel
MASTER_SITES=   SF

MAINTAINER= ports@FreeBSD.org
COMMENT=    Library that helps you create bindings between C++ and Lua

LICENSE=    MIT
LICENSE_FILE=   ${WRKSRC}/LICENSE

LIB_DEPENDS=    libboost_python.so:devel/boost-python-libs

USES=       lua:51
USE_LDCONFIG=   yes

CPPFLAGS+=  -I.. -I${LUA_INCDIR} -I${LOCALBASE}/include
LDFLAGS+=   -L${LUA_LIBDIR}
CXXFLAGS+=  -fPIC

PORTDOCS=   *

OPTIONS_DEFINE= DOCS

post-patch:
    @${FIND} ${WRKSRC} -name "*.orig" -delete

# If you manage to make boost_build build luabind with correct
# includes/libraries/compiler/flags, please send a patch;
# until then, custom build is used
do-build:
    @cd ${WRKSRC}/src && ${ECHO_CMD} *.cpp | \
        ${XARGS} -n1 -t ${_MAKE_JOBS:C/j/P/} \
        ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c
    cd ${WRKSRC}/src && ${CXX} -shared ${LDFLAGS} -llua-${LUA_VER} -o libluabind.so *.o
    cd ${WRKSRC}/src && ${AR} -rcs libluabind.a *.o

do-install:
    ${INSTALL_DATA} ${WRKSRC}/src/libluabind.a ${STAGEDIR}${PREFIX}/lib
    ${INSTALL_LIB} ${WRKSRC}/src/libluabind.so ${STAGEDIR}${PREFIX}/lib
    @cd ${WRKSRC} && ${COPYTREE_SHARE} luabind ${STAGEDIR}${PREFIX}/include

do-install-DOCS-on:
    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>