Ticket #49058: Portfile.diff

File Portfile.diff, 2.8 KB (added by howarth.at.macports@…, 9 years ago)

Portfile to build apbs against gcc5's fortran

  • Portfile

    old new  
    3232checksums               rmd160  5c4d583e12deb3fbc2b5a8031882311cbfd22c7e \
    3333                        sha256  f98ce6a51d8f813e1b4fa626c054ddbf7a985403ca30f890733cb1abf2bd6e05
    3434
    35 depends_lib             port:maloc \
     35depends_lib             port:gcc5 \
     36                        port:maloc \
    3637                        port:readline
    3738
    38 # BEM needs 'gfortran', hard-coded, and configure fails without it if BEM is enabled, with a syntax error
    39 #CMake Error at CMakeLists.txt:217 (get_filename_component):
    40 #  get_filename_component called with incorrect number of arguments
     39use_parallel_build       no
     40
     41worksrcdir              apbs-pdb2pqr-d4e78c62e6a07f92c26924318d83a159fa6af063/apbs
     42
    4143configure.args-append   -DENABLE_OPENMP:BOOL=OFF \
    42                         -DENABLE_BEM=OFF
     44                        -DCMAKE_CXX_COMPILER_ARG1:STRING="-I${prefix}/include -I${worksrcpath}/include" \
     45                        -DCMAKE_C_COMPILER_ARG1:STRING="-I${prefix}/include -I${worksrcpath}/include"
    4346
    44 # make sure this comes after further options that the cmake portgroup adds, to specify directory correctly
    45 configure.post_args     ./apbs
     47configure.env-append    FC=gfortran-mp-5
     48
     49post-patch {
     50   reinplace "s|get_filename_component(LIBGFORTRANPATH|# get_filename_component(LIBGFORTRANPATH|g" ${worksrcpath}/CMakeLists.txt
     51   reinplace "s|find_path(LIBGFORTRAN_PATH|# find_path(LIBGFORTRAN_PATH|g" ${worksrcpath}/CMakeLists.txt
     52   reinplace "s|-L\${LIBGFORTRAN_PATH}|-L${prefix}/lib/gcc5|g" ${worksrcpath}/CMakeLists.txt
     53}
    4654
    4755test.run  yes
    4856test {
    49     ln ${worksrcpath}/apbs/tools/manip/inputgen.py ${worksrcpath}/apbs/tests/
    50     ln ${worksrcpath}/apbs/tools/manip/psize.py    ${worksrcpath}/apbs/tests/
    51     system -W ${worksrcpath}/apbs/tests "python apbs_tester.py"
    52     system -W ${worksrcpath}/apbs/tests "cat test.log"
    53     system -W ${worksrcpath}/apbs/tests "if grep FAILED test.log; then echo \"FAIL\"; exit 1; fi"
     57    ln ${worksrcpath}/tools/manip/inputgen.py ${worksrcpath}/tests/
     58    ln ${worksrcpath}/tools/manip/psize.py    ${worksrcpath}/tests/
     59    system -W ${worksrcpath}/tests "python apbs_tester.py"
     60    system -W ${worksrcpath}/tests "cat test.log"
     61    system -W ${worksrcpath}/tests "if grep FAILED test.log; then echo \"FAIL\"; exit 1; fi"
    5462}
    5563
    5664set bins {analysis benchmark born coulomb del2dx dx2mol dx2uhbd dxmath
     
    6169    apbs {
    6270        compilers.setup
    6371
    64         revision                0
     72        revision                1
    6573
    6674        configure.args-append   -DENABLE_MPI:BOOL=OFF
    6775
     
    8290    apbs-mpi {
    8391        mpi.setup               require
    8492
    85         revision                0
     93        revision                1
    8694
    8795        description             ${description} (MPI version)
    8896