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 109198 2013-08-09 22:09:15Z macsforever2000@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup active_variants 1.1 |
---|
6 | PortGroup waf 1.0 |
---|
7 | |
---|
8 | name relax3d |
---|
9 | version 1.0.5 |
---|
10 | categories science gis |
---|
11 | platforms darwin |
---|
12 | license GPL |
---|
13 | maintainers ntu.edu.sg:sbarbot openmaintainer |
---|
14 | description Semi-analytic solver for earthquake modeling. |
---|
15 | long_description Relax evaluates the displacement and stress \ |
---|
16 | in a half space with gravity due to dislocations, \ |
---|
17 | Mogi sources, and surface tractions\; and the nonlinear \ |
---|
18 | time-dependent deformation that follows due to \ |
---|
19 | power-law rheology materials in the bulk and or \ |
---|
20 | rate-strengthening friction faults. |
---|
21 | |
---|
22 | homepage http://www.geodynamics.org/cig/software/relax |
---|
23 | master_sites http://www.geodynamics.org/cig/software/relax/macports |
---|
24 | use_bzip2 yes |
---|
25 | |
---|
26 | checksums rmd160 10603dd3ecb0fa4ba743dc75db6accc566327caf \ |
---|
27 | sha256 ed9ad14472c4bf794c2023f480c32bb09f96cc23f46cf6efc2a066ae7f2cf2ce |
---|
28 | |
---|
29 | depends_lib-append port:fftw-3-single \ |
---|
30 | port:gmt4 \ |
---|
31 | port:proj \ |
---|
32 | port:python27 \ |
---|
33 | port:gv |
---|
34 | |
---|
35 | # gmt4 is not universal |
---|
36 | universal_variant no |
---|
37 | |
---|
38 | configure.ldflags-append "-L${prefix}/lib -lfftw3 -lfftw3_threads -lfftw3f -lfftw3f_threads" |
---|
39 | |
---|
40 | configure.args --use-fftw \ |
---|
41 | --fftw-dir=${prefix} \ |
---|
42 | --proj-incdir=${prefix}/include \ |
---|
43 | --proj-libdir=${prefix}/lib/proj/lib \ |
---|
44 | --gmt-dir=${prefix}/lib/gmt4 |
---|
45 | configure.cmd "./waf configure" |
---|
46 | |
---|
47 | build.env-append ${configure.env} |
---|
48 | build.cmd "./waf build" |
---|
49 | build.target "" |
---|
50 | |
---|
51 | destroot { |
---|
52 | xinstall -m 755 ${worksrcpath}/build/relax ${destroot}${prefix}/bin/relax |
---|
53 | xinstall -m 755 ${worksrcpath}/util/erpatch.sh ${destroot}${prefix}/bin/erpatch.sh |
---|
54 | xinstall -m 755 ${worksrcpath}/util/flt2vtp.sh ${destroot}${prefix}/bin/flt2vtp.sh |
---|
55 | xinstall -m 755 ${worksrcpath}/util/grdmap.sh ${destroot}${prefix}/bin/grdmap.sh |
---|
56 | xinstall -m 755 ${worksrcpath}/util/grd2vtp.sh ${destroot}${prefix}/bin/grd2vtp.sh |
---|
57 | xinstall -m 755 ${worksrcpath}/util/obsrelax.sh ${destroot}${prefix}/bin/obsrelax.sh |
---|
58 | xinstall -m 755 ${worksrcpath}/util/obsres.py ${destroot}${prefix}/bin/obsres.py |
---|
59 | xinstall -m 755 ${worksrcpath}/util/seg2flt.py ${destroot}${prefix}/bin/seg2flt.py |
---|
60 | xinstall -m 644 ${worksrcpath}/man/man1/relax.1 ${destroot}${prefix}/share/man/man1/relax.1 |
---|
61 | xinstall -d -m 755 ${destroot}${prefix}/share/relax3d/cpt |
---|
62 | xinstall -m 644 ${worksrcpath}/share/jet.cpt ${destroot}${prefix}/share/relax3d/cpt/jet.cpt |
---|
63 | xinstall -m 644 ${worksrcpath}/share/anatolia.cpt ${destroot}${prefix}/share/relax3d/cpt/anatolia.cpt |
---|
64 | } |
---|
65 | |
---|
66 | variant gcc45 conflicts gcc46 gcc47 gcc48 description {Compile with gcc 4.5} { |
---|
67 | configure.compiler macports-gcc-4.5 |
---|
68 | require_active_variants fftw-3-single gcc45 |
---|
69 | } |
---|
70 | |
---|
71 | variant gcc46 conflicts gcc45 gcc47 gcc48 description {Compile with gcc 4.6} { |
---|
72 | configure.compiler macports-gcc-4.6 |
---|
73 | require_active_variants fftw-3-single gcc46 |
---|
74 | } |
---|
75 | |
---|
76 | variant gcc47 conflicts gcc45 gcc46 gcc48 description {Compile with gcc 4.7} { |
---|
77 | configure.compiler macports-gcc-4.7 |
---|
78 | require_active_variants fftw-3-single gcc47 |
---|
79 | } |
---|
80 | |
---|
81 | variant gcc48 conflicts gcc45 gcc46 gcc47 description {Compile with gcc 4.8} { |
---|
82 | configure.compiler macports-gcc-4.8 |
---|
83 | require_active_variants fftw-3-single gcc48 |
---|
84 | } |
---|
85 | |
---|
86 | if {![variant_isset gcc45] && ![variant_isset gcc46] && ![variant_isset gcc47]} { |
---|
87 | default_variants +gcc48 |
---|
88 | } |
---|