Ticket #21468: Portfile.2

File Portfile.2, 3.2 KB (added by mf2k (Frank Schima), 15 years ago)

Revised portfile

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           python26 1.0
6
7name                apbs
8version             1.1.0
9categories          science
10maintainers         bromo.med.uc.edu:howarth
11
12description         APBS
13long_description    APBS is a software package for the numerical solution \
14                    of the Poisson-Boltzmann equation, a popular continuum \
15                    model for describing electrostatic interactions between \
16                    molecular solutes over a wide range of length scales.
17
18homepage            http://apbs.sourceforge.net/
19platforms           darwin
20master_sites        http://voxel.dl.sourceforge.net/project/apbs/apbs/apbs-${version}/
21distname            apbs-${version}-source
22
23checksums           md5 ca31ba09714e4fc9acce91e7961569cd \
24                    sha1 7274a3a896da551f2bb689bb32ea5c852cbd32bb \
25                    rmd160 f03c5617067cc33cb43e425acc74a5df3374744f
26
27depends_lib         port:gcc44 \
28                    port:readline
29
30patchfiles          apbs.diff
31
32use_parallel_build  no
33
34build.cmd           make
35build.target        all
36configure.env       py_path=${python.bin} F77=gfortran-mp-4.4
37configure.args      --enable-python --with-python=${python.bin} --with-blas="-L/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A -lblas -Wl,-framework -Wl,vecLib -Wl,-undefined -Wl,dynamic_lookup" FFLAGS="-O3"
38
39destroot {
40      reinplace "s|always_built_SUBDIRS =  maloc |always_built_SUBDIRS =  |g" ${worksrcpath}/contrib/Makefile
41      system "cd ${worksrcpath}; make install DESTDIR=${destroot} INSTALL='install -p' CPPROG='cp -p'"
42
43      file mkdir ${destroot}${python.pkgd}/apbs
44      eval xinstall [glob ${worksrcpath}/contrib/opal/opal-py-1.9.3/wsdl/*.py] \
45                   ${destroot}${python.pkgd}/apbs
46      eval xinstall -m 644 [glob ${worksrcpath}/src/aaa_inc/apbs/*.h] ${destroot}${prefix}/include/apbs
47
48      foreach {bin} {psize.py coulomb born} {
49         xinstall -m 755 ${worksrcpath}/tools/manip/${bin} ${destroot}${prefix}/bin/apbs-${bin}
50      }
51      foreach {bin} {mgmesh dxmath mergedx2 mergedx value uhbd_asc2bin smooth dx2mol dx2uhbd similarity \
52                      multivalue benchmark analysis} {
53         xinstall -m 755 ${worksrcpath}/tools/mesh/${bin} ${destroot}${prefix}/bin/apbs-${bin}
54      }
55
56     xinstall -m 755 ${worksrcpath}/bin/ApbsClient.py ${destroot}${prefix}/bin
57
58     system "echo '#!${python.bin}' >| ${destroot}${prefix}/bin/wsdl2py"
59     system "echo 'from ZSI.generate.commands import wsdl2py' >> ${destroot}${prefix}/bin/wsdl2py"
60     system "echo 'wsdl2py()' >> ${destroot}${prefix}/bin/wsdl2py"
61     system "chmod a+x ${destroot}${prefix}/bin/wsdl2py"
62
63     file mkdir ${destroot}${python.pkgd}/ZSI
64     system "cd ${worksrcpath}; cp -r contrib/opal/ZSI/ZSI/*  ${destroot}${python.pkgd}/ZSI"
65}
66
67post-destroot {
68    system "${python.bin} -O ${python.libdir}/compileall.py -d ${python.pkgd}/ZSI ${destroot}${python.pkgd}/ZSI"
69    system "${python.bin} -O ${python.libdir}/compileall.py -d ${python.pkgd}/apbs ${destroot}${python.pkgd}/apbs"
70}