Ticket #49720: Portfile-alps.diff

File Portfile-alps.diff, 2.1 KB (added by dstrubbe (David Strubbe), 9 years ago)
  • Portfile

     
    44PortSystem              1.0
    55PortGroup               cmake 1.0
    66PortGroup               conflicts_build 1.0
     7PortGroup               mpi 1.0
    78
    89name                    alps
    910version                 2.1.1
     
    1213platforms               darwin
    1314license                 Restrictive
    1415# http://alps.comp-phys.org/static/software/ALPS/LICENSE.txt/
    15 maintainers             gmail.com:gamperl
     16maintainers             gmail.com:gamperl openmaintainer
    1617
    1718description             Algorithms and Libraries for Physics Simulations
    1819
     
    3132
    3233depends_lib             port:hdf5
    3334
     35mpi.enforce_variant     hdf5
     36
    3437# alps has its own internal boost it wants to use, and fails if MacPorts' newer boost is active.
    3538conflicts_build         boost
    3639
     40compilers.choose        cc cxx
     41# clang doesn't work for +applications or with MPI
     42mpi.setup               -clang
     43# replace ancient llvm we would otherwise be using by default
     44if {![c_variant_isset]} {
     45    default_variants-append +${compilers.gcc_default}
     46}
     47
    3748patchfiles              patch-CMakeLists.txt.diff \
    3849                        patch-config-FindLapack.cmake.diff
    3950
     
    6172    # alps/applications/dmrg/dmrg/dmrg.h:610:49: error: expected expression
    6273    #     std::string name = simplify_name(it->get<1>());
    6374    #                                                 ^
    64     compiler.blacklist  *clang*
    65    
    6675    configure.args-delete -DALPS_BUILD_APPLICATIONS=OFF
    6776}
    6877
    69 # why not mpich also as a variant?
    70 variant openmpi         description {Build with MPI support} {
    71     depends_lib-append  port:openmpi
    72    
    73     configure.args-delete -DALPS_ENABLE_MPI=OFF   
    74 #-- Could NOT find MPI_C (missing:  MPI_C_LIBRARIES MPI_C_INCLUDE_PATH)
    75 #-- Could NOT find MPI_CXX (missing:  MPI_CXX_LIBRARIES MPI_CXX_INCLUDE_PATH)
     78pre-configure {
     79    if {[mpi_variant_isset]} {
     80        configure.args-delete -DALPS_ENABLE_MPI=OFF   
     81        configure.args-append -DMPI_C=${mpi.cc} -DMPI_CXX=${mpi.cxx}
     82    }
    7683}
    7784
    7885set pythons_suffixes {26 27}