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 136416 2015-05-16 16:52:31Z mmoll@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup python 1.0 |
---|
6 | PortGroup mpi 1.0 |
---|
7 | |
---|
8 | set realname tables |
---|
9 | name py-${realname} |
---|
10 | version 3.2.1 |
---|
11 | revision 0 |
---|
12 | categories-append science |
---|
13 | platforms darwin |
---|
14 | license BSD |
---|
15 | |
---|
16 | python.versions 27 34 |
---|
17 | |
---|
18 | maintainers mmoll openmaintainer |
---|
19 | |
---|
20 | description Package for managing hierarchical datasets |
---|
21 | long_description PyTables is a package for managing hierarchical datasets \ |
---|
22 | and designed to efficiently and easily cope with \ |
---|
23 | extremely large amounts of data |
---|
24 | |
---|
25 | homepage https://pytables.github.io/ |
---|
26 | master_sites https://pypi.python.org/packages/source/t/tables/ \ |
---|
27 | http://sourceforge.net/projects/pytables/files/pytables/${version} |
---|
28 | |
---|
29 | checksums rmd160 b5938223a5ff8f008c41bfe39a4be45b928ef540 \ |
---|
30 | sha256 212d4f32899a9a0a6b3f865262c20c6ff864fb60e1b8be70f0bbc80137456e31 |
---|
31 | |
---|
32 | distname ${realname}-${version} |
---|
33 | |
---|
34 | mpi.setup |
---|
35 | |
---|
36 | if {${name} ne ${subport}} { |
---|
37 | build.target build_ext |
---|
38 | build.args --inplace \ |
---|
39 | --hdf5=${prefix} \ |
---|
40 | --bzip2=${prefix} \ |
---|
41 | --lzo=${prefix} \ |
---|
42 | --blosc=${prefix} |
---|
43 | |
---|
44 | destroot.args --hdf5=${prefix} \ |
---|
45 | --bzip2=${prefix} \ |
---|
46 | --lzo=${prefix} \ |
---|
47 | --blosc=${prefix} |
---|
48 | |
---|
49 | pre-destroot { |
---|
50 | # need to wrap this in a pre-destroot phase so that ${mpi.cc} expands to the right value |
---|
51 | if {[mpi_variant_isset]} { |
---|
52 | destroot.cmd env CC=${mpi.cc} ${destroot.cmd} |
---|
53 | } |
---|
54 | } |
---|
55 | depends_build-append \ |
---|
56 | port:py${python.version}-cython |
---|
57 | |
---|
58 | depends_lib-append port:hdf5 \ |
---|
59 | port:py${python.version}-numpy \ |
---|
60 | port:py${python.version}-numexpr \ |
---|
61 | port:zlib \ |
---|
62 | port:bzip2 \ |
---|
63 | port:lzo2 \ |
---|
64 | port:blosc |
---|
65 | |
---|
66 | if {${subport} eq "py26-${realname}" || ${subport} eq "py27-${realname}"} { |
---|
67 | depends_lib-append port:py${python.version}-scientific |
---|
68 | } |
---|
69 | |
---|
70 | post-extract { |
---|
71 | # Fix permissions |
---|
72 | fs-traverse item ${worksrcpath} { |
---|
73 | if {[file isdirectory ${item}]} { |
---|
74 | file attributes ${item} -permissions a+rx |
---|
75 | } elseif {[file isfile ${item}]} { |
---|
76 | file attributes ${item} -permissions a+r |
---|
77 | } |
---|
78 | } |
---|
79 | |
---|
80 | file rename ${worksrcpath}/src/utils.h ${worksrcpath}/src/xxx_utils.h |
---|
81 | } |
---|
82 | |
---|
83 | patchfiles-append patch-c-blosc_hdf5_blosc_filter.c.diff |
---|
84 | |
---|
85 | post-patch { |
---|
86 | eval reinplace "s:utils.h:xxx_utils.h:" [glob ${worksrcpath}/{src,tables}/*.c] |
---|
87 | } |
---|
88 | |
---|
89 | post-destroot { |
---|
90 | xinstall -m 755 -d ${destroot}${prefix}/share/doc/${subport} |
---|
91 | xinstall -m 644 -W ${worksrcpath} ANNOUNCE.txt LICENSE.txt README.rst \ |
---|
92 | RELEASE_NOTES.txt THANKS VERSION \ |
---|
93 | ${destroot}${prefix}/share/doc/${subport} |
---|
94 | } |
---|
95 | } |
---|
96 | |
---|
97 | if {${name} eq ${subport}} { |
---|
98 | livecheck.type regex |
---|
99 | livecheck.url https://pypi.python.org/pypi/tables/json |
---|
100 | livecheck.regex {tables-(\d+(?:\.\d+)*)\.[tz]} |
---|
101 | } else { |
---|
102 | livecheck.type none |
---|
103 | } |
---|