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