Ticket #48360: Portfile

File Portfile, 4.3 KB (added by tczorro (Derrick), 9 years ago)
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$
3
4PortSystem          1.0
5PortGroup           python 1.0
6PortGroup           github 1.0
7PortGroup           active_variants 1.1
8
9github.setup        theochem horton 2.0.0
10name                py-horton
11version             2.0.0
12platforms           darwin
13license             GPL-3+
14categories-append   chemistry
15maintainers         mcmaster.ca:yangx59
16
17description         HORTON is a quantum chemistry program written primarily in Python language.
18long_description    ${description} It can serve as a stand-alone program for electronic structure calculation (HF, DFT,\Geminals, PT)
19
20extract.suffix      .tar.gz
21
22homepage            http://theochem.github.io/horton/
23distname            ${name}-${version}
24distfiles           ${distname}${extract.suffix}
25checksums           rmd160  bb2536bb1af8f5335e523580b44bd1b5d95c0763 \
26                    sha256  7217637ebb36412a27fc09f08aba6e5859358fc670f440b8c3f959d45920c243
27
28python.versions     27
29
30if {${name} ne ${subport}} {
31    depends_lib          port:atlas \
32                         port:libint \
33                         port:py${python.version}-numpy \
34                         port:py${python.version}-h5py \
35                         port:py${python.version}-scipy \
36                         port:py${python.version}-cython \
37                         port:py${python.version}-nose \
38                         port:py${python.version}-sympy \
39                         port:py${python.version}-sphinx \
40                         port:py${python.version}-matplotlib \
41                         port:libxc
42    pre-build {
43        system -W ${worksrcpath}/data/refatoms "make all"
44        file copy ${worksrcpath}/data/setup_cfgs/setup.Darwin-macport-x86_64.cfg ${worksrcpath}/setup.cfg
45        reinplace "s|/opt/local|${prefix}|g" ${worksrcpath}/data/setup_cfgs/setup.Darwin-10.10.3-x86_64.cfg
46    }
47   
48    post-destroot {
49        ln -s ${python.prefix}/bin/horton-atomdb.py    ${destroot}${prefix}/bin/
50        ln -s ${python.prefix}/bin/horton-convert.py   ${destroot}${prefix}/bin/
51        ln -s ${python.prefix}/bin/horton-cpart.py     ${destroot}${prefix}/bin/
52        ln -s ${python.prefix}/bin/horton-cubehead.py  ${destroot}${prefix}/bin/
53        ln -s ${python.prefix}/bin/horton-esp-cost.py  ${destroot}${prefix}/bin/
54        ln -s ${python.prefix}/bin/horton-esp-fit.py   ${destroot}${prefix}/bin/
55        ln -s ${python.prefix}/bin/horton-esp-gen.py   ${destroot}${prefix}/bin/
56        ln -s ${python.prefix}/bin/horton-esp-test.py  ${destroot}${prefix}/bin/
57        ln -s ${python.prefix}/bin/horton-hdf2csv.py   ${destroot}${prefix}/bin/
58        ln -s ${python.prefix}/bin/horton-wpart.py     ${destroot}${prefix}/bin/
59        ln -s ${python.prefix}/bin/horton-entanglement.py   ${destroot}${prefix}/bin/
60
61        file delete ${destroot}${prefix}/bin/horton-atomdb.py-${python.branch}
62        file delete ${destroot}${prefix}/bin/horton-convert.py-${python.branch}
63        file delete ${destroot}${prefix}/bin/horton-cpart.py-${python.branch}
64        file delete ${destroot}${prefix}/bin/horton-cubehead.py-${python.branch}
65        file delete ${destroot}${prefix}/bin/horton-esp-cost.py-${python.branch}
66        file delete ${destroot}${prefix}/bin/horton-esp-fit.py-${python.branch}
67        file delete ${destroot}${prefix}/bin/horton-esp-gen.py-${python.branch}
68        file delete ${destroot}${prefix}/bin/horton-esp-test.py-${python.branch}
69        file delete ${destroot}${prefix}/bin/horton-hdf2csv.py-${python.branch}
70        file delete ${destroot}${prefix}/bin/horton-wpart.py-${python.branch}
71        file delete ${destroot}${prefix}/bin/horton-entanglement.py-${python.branch}
72       
73        reinplace "s|${destroot}${prefix}|${prefix}|" ${destroot}${python.pkgd}/horton/data_dir.txt
74    }
75
76    post-activate {
77        if {[active_variants py27-numpy atlas]} {
78        } else {
79            ui_warn "\n *************************** \n py27-horton has been installed successfully. \n However, in order to have CHOLESKY work properly,\n please install numpy +atlas manually with the following command: \n sudo port install py27-numpy +atlas \n ***************************"
80        }
81    }
82    livecheck.type  none
83} else {
84        livecheck.type  regex
85        livecheck.regex {horton-([0-9\.]+)}
86}