source: trunk/dports/science/alps/Portfile

Last change on this file was 147494, checked in by mmoll@…, 16 months ago

hdf5: update to version 1.10.0, bump revision of ports that depend on hdf5 and need to be rebuilt. closes #51062

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.3 KB
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: Portfile 147494 2016-04-05 20:52:07Z ryandesign@macports.org $
3
4PortSystem              1.0
5PortGroup               cmake 1.0
6PortGroup               conflicts_build 1.0
7PortGroup               mpi 1.0
8
9name                    alps
10version                 2.1.1
11revision                10
12categories              science
13platforms               darwin
14license                 Restrictive
15# http://alps.comp-phys.org/static/software/ALPS/LICENSE.txt/
16maintainers             gmail.com:gamperl openmaintainer
17
18description             Algorithms and Libraries for Physics Simulations
19
20long_description        The ALPS project (Algorithms and Libraries for Physics Simulations) is an \
21                        open-source effort aiming at providing high-end simulation codes for strongly \
22                        correlated quantum mechanical systems as well as C++ libraries for simplifying \
23                        the development of such code. ALPS strives to increase software reuse in the \
24                        physics community.
25
26homepage                http://alps.comp-phys.org/
27master_sites            ${homepage}static/software/releases
28distname                ${name}-${version}-r6176-src-with-boost
29
30checksums               rmd160 f2ab3938a364a026be8557406427521901091a51                             \
31                        sha256 554841986ad5a9d5d5a89941e5665c249fe1b8eba537078001bb6c5c21a1f335
32
33depends_lib             port:hdf5
34
35mpi.enforce_variant     hdf5
36
37# alps has its own internal boost it wants to use, and fails if MacPorts' newer boost is active.
38conflicts_build         boost
39
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
48patchfiles              patch-CMakeLists.txt.diff \
49                        patch-config-FindLapack.cmake.diff
50
51configure.args-delete   -DCMAKE_SYSTEM_PREFIX_PATH=\"${prefix}\;/usr\"
52configure.args-append   -DCMAKE_SYSTEM_PREFIX_PATH=\"/usr\;${prefix}\"                              \
53                        -DBoost_ROOT_DIR:PATH=${worksrcpath}/boost                                  \
54                        -DALPS_BUILD_TESTS=OFF                                                      \
55                        -DALPS_INCLUDE_TUTORIALS=OFF                                                \
56                        -DALPS_BOOST_LIBRARY_NAME=alps-boost                                        \
57                        -DALPS_BUILD_APPLICATIONS=OFF                                               \
58                        -DALPS_ENABLE_MPI=OFF                                                       \
59                        -DHDF5_dl_LIBRARY_DEBUG=NO                                                  \
60                        -DHDF5_hdf5_LIBRARY_DEBUG=NO                                                \
61                        -DHDF5_hdf5_hl_LIBRARY_DEBUG=NO                                             \
62                        -DHDF5_m_LIBRARY_DEBUG=NO                                                   \
63                        -DHDF5_z_LIBRARY_DEBUG=NO
64
65# make sure this comes after further options that the cmake portgroup adds, to specify directory correctly,
66# overwrite the default setting to worksrcpath.
67configure.post_args    ./alps
68
69use_parallel_build      yes
70
71variant applications    description {compile ALPS with applications} {
72    # alps/applications/dmrg/dmrg/dmrg.h:610:49: error: expected expression
73    #     std::string name = simplify_name(it->get<1>());
74    #                                                 ^
75    configure.args-delete -DALPS_BUILD_APPLICATIONS=OFF
76}
77
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    }
83}
84
85set pythons_suffixes {26 27}
86set pythons_ports {}
87foreach s ${pythons_suffixes} {
88    lappend pythons_ports python${s}
89}
90foreach s ${pythons_suffixes} {
91    set p python${s}
92    set v [string index ${s} 0].[string index ${s} 1]
93    set i [lsearch -exact ${pythons_ports} ${p}]
94    set c [lreplace ${pythons_ports} ${i} ${i}]
95    eval [subst {
96        variant ${p} description "Build ALPS for Python ${v}" conflicts ${c} {
97            depends_lib-append port:${p}                                                            \
98                               port:py${s}-numpy                                                    \
99                               port:py${s}-matplotlib                                               \
100                               port:py${s}-scipy
101           
102            patchfiles-append   patch-config-FindPython.cmake.diff
103           
104            post-patch {
105                reinplace "s|@PYTHON@|python[regsub {(.)(.+)} ${s} {\1.\2}]|g" ${worksrcpath}/alps/config/FindPython.cmake
106            }
107        }
108    }]
109}
110
111set selected_version python27
112foreach s ${pythons_suffixes} {
113    if {[variant_isset python${s}]} {
114        set selected_version python${s}
115    }
116}
117
118default_variants        +${selected_version} +applications
119
120# py-scipy and openmpi are not universal
121universal_variant       no
122
123livecheck.type          regex
124livecheck.url           [lindex ${master_sites} 0]
125livecheck.regex         ${name}-(\[0-9.\]+)-r
Note: See TracBrowser for help on using the repository browser.