source: trunk/dports/science/bob/Portfile @ 106911

Last change on this file since 106911 was 106911, checked in by jmr@…, 6 years ago

Change distribute dependencies back to setuptools and mark py*-distribute replaced_by py*-setuptools (#39237).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.1 KB
Line 
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: Portfile 106911 2013-06-11 14:40:14Z jmr@macports.org $
3
4PortSystem          1.0
5PortGroup           cmake 1.0
6PortGroup           github 1.0
7PortGroup           active_variants 1.1
8
9github.setup        idiap bob 1.1.4 v
10set soversion       1.1
11categories          science math devel
12platforms           darwin
13maintainers         idiap.ch:andre.anjos \
14                    idiap.ch:laurent.el-shafey
15
16description         Bob is a signal-processing and machine learning toolbox
17
18long_description    Bob is a signal-processing and machine learning toolbox \
19                    developed at the Idiap Research Institute, in Martigny, \
20                    Switzerland. The toolbox is written in a mix of Python \
21                    and C++ and is designed to be both efficient and to \
22                    reduce development time.
23
24license             GPL-3
25homepage            http://idiap.github.com/bob/
26
27checksums           rmd160  6ecd918b81f2969f7164836121f2151f33cea9d2 \
28                    sha256  5a3718335efdbc3854978c169106c440287236b22a5e85a3d3bf1cdedfaa183b
29
30depends_lib         port:blitz \
31    path:lib/libavcodec.dylib:ffmpeg \
32    port:matio \
33    port:jpeg \
34    port:netpbm \
35    port:libpng \
36    port:tiff \
37    port:giflib \
38    port:hdf5-18 \
39    port:boost \
40    port:fftw-3 \
41    port:vlfeat \
42    port:libsvm \
43    port:qt4-mac \
44    port:opencv
45
46configure.args      -DCMAKE_BUILD_TYPE=Release -DBOB_VERSION=${version} -DBOB_SOVERSION=${soversion}
47
48# blitz is not universal
49universal_variant   no
50
51if { ![variant_isset python26] } {
52    default_variants-append +python27
53}
54
55variant python26 conflicts python27 description "Build for python 2.6" {
56    depends_build-append  port:py26-sphinx
57   
58    depends_lib-append    port:py26-setuptools \
59      port:py26-numpy \
60      port:py26-matplotlib \
61      port:py26-sqlalchemy \
62      port:py26-argparse \
63      port:py26-scipy \
64      port:py26-nose \
65      port:py26-pillow
66}
67
68variant python27 conflicts python26 description "Build for python 2.7" {
69    depends_build-append  port:py27-sphinx
70   
71    depends_lib-append    port:py27-setuptools \
72      port:py27-numpy \
73      port:py27-matplotlib \
74      port:py27-sqlalchemy \
75      port:py27-scipy \
76      port:py27-nose \
77      port:py27-pillow
78}
79
80variant doc description "Build documentation" {
81    depends_build-append    port:dvipng \
82        port:doxygen \
83        path:bin/dot:graphviz \
84        port:texlive-latex-extra \
85        port:texlive-fonts-recommended
86    destroot.target-append  sphinx-latex install-sphinx install-doxygen
87
88    test.run yes
89    test.target sphinx-doctest
90}
91
92pre-configure {
93    if {[variant_isset python26]} {
94        configure.args-append -DWITH_PYTHON=${prefix}/bin/python2.6
95    } elseif {[variant_isset python27]} {
96        configure.args-append -DWITH_PYTHON=${prefix}/bin/python2.7
97    } 
98}
99
100post-destroot {
101    if {[variant_isset python26]} {
102        set pypath ${prefix}/lib/python2.6/site-packages
103        set pycompile ${prefix}/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages
104        xinstall -d ${destroot}/${pycompile}
105        system "${prefix}/bin/python2.6 -m compileall ${destroot}/${pypath}/bob"
106        move ${destroot}/${pypath}/bob ${destroot}/${pycompile}/bob
107        move ${destroot}/${pypath}/bob-${version}-py2.6.egg-info ${destroot}/${pycompile}/
108    } elseif {[variant_isset python27]} {
109        set pypath ${prefix}/lib/python2.7/site-packages
110        set pycompile ${prefix}/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
111        xinstall -d ${destroot}/${pycompile}
112        system "${prefix}/bin/python2.7 -m compileall ${destroot}/${pypath}/bob"
113        move ${destroot}/${pypath}/bob ${destroot}/${pycompile}/bob
114        move ${destroot}/${pypath}/bob-${version}-py2.7.egg-info ${destroot}/${pycompile}/
115    }
116}
117
118# check if boost is installed with the required python variant
119if {[variant_isset python26]} {
120    set boost_python_variant    python26
121} elseif {[variant_isset python27]} {
122    set boost_python_variant    python27
123}
124
125require_active_variants boost   ${boost_python_variant}
Note: See TracBrowser for help on using the repository browser.