Ticket #38282: Portfile.diff

File Portfile.diff, 3.8 KB (added by howarth@…, 12 years ago)

Portfile.diff for apbs-1.4.0 package update

  • Portfile

    old new  
    22# $Id: Portfile 97763 2012-09-14 18:56:08Z jeremyhu@macports.org $
    33
    44PortSystem          1.0
    5 PortGroup           python26 1.0
     5PortGroup           cmake 1.0
    66
    77name                apbs
    8 version             1.3.0
    9 revision            1
     8version             1.4.0
    109set branch          [join [lrange [split ${version} .] 0 1] .]
    1110categories          science
    1211maintainers         bromo.med.uc.edu:howarth
     
    1918
    2019homepage            http://apbs.sourceforge.net
    2120platforms           darwin
    22 master_sites        sourceforge
    23 distname            apbs-${branch}-source
     21master_sites        sourceforge
     22master_sites.mirror_subdir apbs
    2423
    25 checksums           md5     f99a505365f07f6853979cfe2ef23365 \
    26                     sha1    1494f36e35f2e4b1a18d4b22516fad4948c6391f
     24distname            APBS-${branch}-source
     25worksrcdir          ${name}
    2726
    28 depends_lib         port:gcc45 \
    29                     port:readline \
    30                     port:py26-zsi
    31 patchfiles          apbs.diff
    32 
    33 use_parallel_build  no
    34 
    35 use_configure       yes
    36 
    37 build.cmd           make
    38 build.target        all
    39 configure.env       py_path=${python.bin} F77=gfortran-mp-4.5
    40 configure.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"
    41 
    42 post-patch {
    43     reinplace  "s|@PYTHON_PKGD@|${python.pkgd}|g" ${worksrcpath}/configure
    44     reinplace  "s|/usr/bin/python|${python.bin}|g" ${worksrcpath}/bin/ApbsClient.py.in
    45     reinplace  "s|/usr/local/apbs-${version}|${prefix}|g" ${worksrcpath}/bin/ApbsClient.py.in
    46     reinplace  "s|python2.5|python2.6|g" ${worksrcpath}/bin/ApbsClient.py.in
    47 }
    48 
    49 destroot {
    50       reinplace "s|always_built_SUBDIRS =  maloc |always_built_SUBDIRS =  |g" ${worksrcpath}/contrib/Makefile
    51       reinplace "s|pmgZ aqua opal|pmgZ aqua|g" ${worksrcpath}/contrib/Makefile
    52       file mkdir ${destroot}${python.pkgd}/apbs
    53      
    54       system "cd ${worksrcpath}; make install DESTDIR=${destroot} INSTALL='install -p' CPPROG='cp -p'"
    55 
    56       eval xinstall [glob ${worksrcpath}/contrib/opal/opal-py-1.9.3/wsdl/*.py] \
    57                    ${destroot}${python.pkgd}/apbs
    58       eval xinstall -m 644 [glob ${worksrcpath}/src/aaa_inc/apbs/*.h] ${destroot}${prefix}/include/apbs
     27checksums           md5     e0281bd44ffecb651e40687cdaa26361 \
     28                    sha1    4f10e300ab5c98607d65de5a82e4b66ced8b78bb
    5929
    60       foreach {bin} {psize.py coulomb born} {
    61          xinstall -m 755 ${worksrcpath}/tools/manip/${bin} ${destroot}${prefix}/bin/apbs-${bin}
    62       }
    63       foreach {bin} {mgmesh dxmath mergedx2 mergedx value uhbd_asc2bin smooth dx2mol dx2uhbd similarity \
    64                       multivalue benchmark analysis} {
    65          xinstall -m 755 ${worksrcpath}/tools/mesh/${bin} ${destroot}${prefix}/bin/apbs-${bin}
    66       }
     30depends_lib         port:maloc \
     31                    port:readline
    6732
    68      xinstall -m 755 ${worksrcpath}/bin/ApbsClient.py ${destroot}${prefix}/bin
     33use_parallel_build  yes
    6934
    70 }
     35configure.args-append -DENABLE_OPENMP:BOOL=OFF -DENABLE_MPI:BOOL=OFF -DCMAKE_C_FLAGS="-Ii${prefix}/include -O3 -ffast-math -g"
    7136
    7237post-destroot {
    73     system "${python.bin} -O ${python.libdir}/compileall.py -d ${python.pkgd}/apbs ${destroot}${python.pkgd}/apbs"
     38      move ${destroot}${prefix}/share/${name}/tools/manip/psize.py ${destroot}${prefix}/bin/apbs-psize.py
     39      foreach {bin} {analysis benchmark born coulomb del2dx dx2mol dx2uhbd dxmath mergedx mergedx2 mgmesh \
     40                multivalue similarity smooth tensor2dx uhbd_asc2bin value} {
     41         move ${destroot}${prefix}/share/${name}/tools/bin/${bin} ${destroot}${prefix}/bin/apbs-${bin}
     42      }
    7443}