1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup cmake 1.0 |
---|
6 | |
---|
7 | name bob |
---|
8 | version 1.0.6 |
---|
9 | set soversion 1.0 |
---|
10 | categories science math devel |
---|
11 | platforms darwin |
---|
12 | maintainers idiap.ch:andre.anjos \ |
---|
13 | idiap.ch:laurent.el-shafey |
---|
14 | |
---|
15 | description Bob is a signal-processing and machine learning toolbox |
---|
16 | |
---|
17 | long_description Bob is a signal-processing and machine learning toolbox \ |
---|
18 | developed at the Idiap Research Institute, in Martigny, \ |
---|
19 | Switzerland. The toolbox is written in a mix of Python \ |
---|
20 | and C++ and is designed to be both efficient and to \ |
---|
21 | reduce development time. |
---|
22 | |
---|
23 | license GPL-3 |
---|
24 | homepage http://idiap.github.com/bob/ |
---|
25 | master_sites https://github.com/idiap/bob/downloads/ |
---|
26 | use_zip yes |
---|
27 | |
---|
28 | checksums rmd160 eac3e390ed25c69d8c6038f815ea473c21118a0f \ |
---|
29 | sha256 767e22bddb2bfb59458b76eb37cab3791bf1bfbe33fc7ad11ca29038343b5dea |
---|
30 | |
---|
31 | use_parallel_build no |
---|
32 | |
---|
33 | depends_lib port:blitz \ |
---|
34 | port:ffmpeg \ |
---|
35 | port:matio \ |
---|
36 | port:imagemagick \ |
---|
37 | port:hdf5-18 \ |
---|
38 | port:boost \ |
---|
39 | port:fftw-3 \ |
---|
40 | port:vlfeat \ |
---|
41 | port:libsvm |
---|
42 | |
---|
43 | configure.args -DCMAKE_BUILD_TYPE=Release -DBOB_VERSION=${version} -DBOB_SOVERSION=${soversion} |
---|
44 | |
---|
45 | compiler.blacklist clang |
---|
46 | |
---|
47 | universal_variant no |
---|
48 | default_variants +qt4 +opencv |
---|
49 | |
---|
50 | if { ![variant_isset python26] } { |
---|
51 | default_variants-append +python27 |
---|
52 | } |
---|
53 | |
---|
54 | variant python26 conflicts python27 description "Builds for python 2.6." { |
---|
55 | depends_lib-append port:py26-numpy \ |
---|
56 | port:py26-matplotlib \ |
---|
57 | port:py26-sqlalchemy \ |
---|
58 | port:py26-argparse \ |
---|
59 | port:py26-scipy |
---|
60 | } |
---|
61 | |
---|
62 | variant python27 conflicts python26 description "Builds for python 2.7." { |
---|
63 | depends_lib-append port:py27-numpy \ |
---|
64 | port:py27-matplotlib \ |
---|
65 | port:py27-sqlalchemy \ |
---|
66 | port:py27-scipy |
---|
67 | } |
---|
68 | |
---|
69 | variant qt4 description "Compile Qt4 extensions." { |
---|
70 | depends_lib-append port:qt4-mac |
---|
71 | } |
---|
72 | |
---|
73 | variant opencv description "Compile OpenCV extensions." { |
---|
74 | depends_lib-append port:opencv |
---|
75 | } |
---|
76 | |
---|
77 | variant doc description "Builds documentation." { |
---|
78 | depends_build-append port:dvipng \ |
---|
79 | port:doxygen \ |
---|
80 | port:texlive-latex-extra \ |
---|
81 | port:texlive-fonts-recommended |
---|
82 | destroot.target-append sphinx-latex install-sphinx install-doxygen |
---|
83 | |
---|
84 | if {[variant_isset python26]} { |
---|
85 | depends_build-append port:py26-sphinx |
---|
86 | } |
---|
87 | if {[variant_isset python27]} { |
---|
88 | depends_build-append port:py27-sphinx |
---|
89 | } |
---|
90 | test.run yes |
---|
91 | test.target sphinx-doctest |
---|
92 | } |
---|
93 | |
---|
94 | pre-configure { |
---|
95 | if {[variant_isset python26]} { |
---|
96 | configure.args-append -DWITH_PYTHON=${prefix}/bin/python2.6 |
---|
97 | } elseif {[variant_isset python27]} { |
---|
98 | configure.args-append -DWITH_PYTHON=${prefix}/bin/python2.7 |
---|
99 | } |
---|
100 | } |
---|
101 | |
---|
102 | post-destroot { |
---|
103 | if {[variant_isset python26]} { |
---|
104 | set pypath ${prefix}/lib/python2.6/site-packages |
---|
105 | set pycompile ${prefix}/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages |
---|
106 | xinstall -d ${destroot}/${pycompile} |
---|
107 | system "${prefix}/bin/python2.6 -m compileall ${destroot}/${pypath}/bob" |
---|
108 | move ${destroot}/${pypath}/bob ${destroot}/${pycompile}/bob |
---|
109 | move ${destroot}/${pypath}/bob-${version}-py2.6.egg-info ${destroot}/${pycompile}/ |
---|
110 | } elseif {[variant_isset python27]} { |
---|
111 | set pypath ${prefix}/lib/python2.7/site-packages |
---|
112 | set pycompile ${prefix}/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages |
---|
113 | xinstall -d ${destroot}/${pycompile} |
---|
114 | system "${prefix}/bin/python2.7 -m compileall ${destroot}/${pypath}/bob" |
---|
115 | move ${destroot}/${pypath}/bob ${destroot}/${pycompile}/bob |
---|
116 | move ${destroot}/${pypath}/bob-${version}-py2.7.egg-info ${destroot}/${pycompile}/ |
---|
117 | } |
---|
118 | } |
---|
119 | |
---|
120 | # check if boost is installed with the required python variant |
---|
121 | if {[variant_isset python26]} { |
---|
122 | set boost_python_required 2.6 |
---|
123 | set boost_variant +python26 |
---|
124 | } elseif {[variant_isset python27]} { |
---|
125 | set boost_python_required 2.7 |
---|
126 | set boost_variant +python27 |
---|
127 | } |
---|
128 | |
---|
129 | set boost_python_lib ${prefix}/lib/libboost_python-mt.dylib |
---|
130 | set boost_python_version "0" |
---|
131 | if {[file exists ${boost_python_lib}]} { |
---|
132 | set boost_python_version [exec /usr/bin/otool -L ${boost_python_lib} | /usr/bin/grep Python | /usr/bin/sed -e "s|^.*Versions/||" -e "s|/.*||"] |
---|
133 | } |
---|
134 | if {${boost_python_version} != ${boost_python_required}} { |
---|
135 | depends_lib-delete port:boost |
---|
136 | pre-configure { |
---|
137 | ui_error "${name} requires boost installed with variant ${boost_variant}." |
---|
138 | ui_error "Please install boost as follows and try installing ${name} again:" |
---|
139 | ui_error "sudo port install boost ${boost_variant}" |
---|
140 | return -code error "incompatible boost installation" |
---|
141 | } |
---|
142 | } |
---|