1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name luabind |
---|
7 | version 0.8.1 |
---|
8 | revision 0 |
---|
9 | categories devel |
---|
10 | platforms darwin |
---|
11 | maintainers nomaintainer |
---|
12 | description A library that helps you create \ |
---|
13 | bindings between C++ and Lua |
---|
14 | |
---|
15 | long_description \ |
---|
16 | Luabind is a library that helps you create \ |
---|
17 | bindings between C++ and Lua. It has the ability \ |
---|
18 | to expose functions and classes, written in C++, \ |
---|
19 | to Lua. It will also supply the functionality to \ |
---|
20 | define classes in lua and let them derive from \ |
---|
21 | other lua classes or C++ classes. Lua classes can \ |
---|
22 | override virtual functions from their C++ baseclasses. \ |
---|
23 | It is written towards Lua 5.x, and does not work with Lua 4. |
---|
24 | |
---|
25 | homepage http://www.rasterbar.com/products/luabind.html |
---|
26 | master_sites sourceforge |
---|
27 | |
---|
28 | checksums md5 90f684825f8944e433154a03e1e368fe \ |
---|
29 | sha1 f8dbcedafedefab7a303631db3c4f79e19d1cb33 \ |
---|
30 | rmd160 0e38b718e86db79461c8f183346ec5ce1f2b2631 |
---|
31 | |
---|
32 | depends_build port:boost-build |
---|
33 | |
---|
34 | depends_lib port:lua \ |
---|
35 | port:boost |
---|
36 | |
---|
37 | use_configure no |
---|
38 | |
---|
39 | pre-build { |
---|
40 | reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/Jamroot |
---|
41 | |
---|
42 | #REMOVE ME: for luabind > 0.8.1 |
---|
43 | reinplace "s|__GNUC_MINOR__ <= 400|__GNUC_MINOR__ < 400|g" ${worksrcpath}/luabind/detail/policy.hpp |
---|
44 | } |
---|
45 | |
---|
46 | build.cmd bjam |
---|
47 | build.args --toolset=darwin -d2 |
---|
48 | |
---|
49 | variant debug description {Build debug libraries} { |
---|
50 | global build.target |
---|
51 | build.target variant=debug,release |
---|
52 | } |
---|
53 | if {![variant_isset debug]} { |
---|
54 | global build.target |
---|
55 | build.target variant=release |
---|
56 | } |
---|
57 | |
---|
58 | variant universal { |
---|
59 | build.args-append \ |
---|
60 | cflags="${configure.universal_cflags} ${configure.universal_cppflags}" \ |
---|
61 | linkflags="${configure.universal_ldflags}" |
---|
62 | } |
---|
63 | |
---|
64 | destroot.cmd ${build.cmd} |
---|
65 | destroot.destdir --prefix=${destroot}${prefix} |
---|
66 | pre-destroot { |
---|
67 | eval destroot.args ${build.target} ${build.args} |
---|
68 | } |
---|
69 | |
---|
70 | post-destroot { |
---|
71 | #check for boost_system multi-threaded version |
---|
72 | if {[file exists ${prefix}/lib/libboost_system-mt.dylib]} { |
---|
73 | set boost_system_lib boost_system-mt |
---|
74 | } else { |
---|
75 | set boost_system_lib boost_system |
---|
76 | } |
---|
77 | |
---|
78 | #Create a .pc for pkg-config |
---|
79 | set data "Name: ${name} |
---|
80 | Description: ${description} |
---|
81 | URL: ${homepage} |
---|
82 | Version: ${version} |
---|
83 | Requires: lua |
---|
84 | Libs: -L${prefix}/lib -lluabind -l${boost_system_lib} |
---|
85 | Cflags: -I${prefix}/include" |
---|
86 | set filename "${worksrcpath}/luabind.pc" |
---|
87 | set file [open $filename "w"] |
---|
88 | puts -nonewline $file $data |
---|
89 | close $file |
---|
90 | |
---|
91 | xinstall -d -m 0755 ${destroot}${prefix}/lib/pkgconfig |
---|
92 | xinstall -m 0644 ${worksrcpath}/luabind.pc ${destroot}${prefix}/lib/pkgconfig/luabind.pc |
---|
93 | } |
---|
94 | |
---|
95 | livecheck.regex <title>${name} (\\d+\\.\\d+\\.\\d+) released |
---|