1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name miriad |
---|
7 | platforms darwin |
---|
8 | categories science |
---|
9 | maintainers newton.cx:peter |
---|
10 | description MIRIAD, an analysis package for radio astronomical data |
---|
11 | long_description MIRIAD, the Multichannel Imaging, Reconstruction, Analysis, \ |
---|
12 | and Display package, is a suite of tools for analyzing radio \ |
---|
13 | astronomical observations, from raw data to imaging. |
---|
14 | homepage http://astro.berkeley.edu/~pkwill/miriad-macport/ |
---|
15 | |
---|
16 | # The license to MIRIAD is somewhat indeterminate, since it has had |
---|
17 | # many contributors working at many academic institutions with various |
---|
18 | # copyright assignment and licensing policies. It's pretty important |
---|
19 | # to straighten this out at some point. |
---|
20 | |
---|
21 | license unknown |
---|
22 | |
---|
23 | # Versioning information. Miriad releases are very infrequent, so |
---|
24 | # our ports will be based on distributions made from CVS snapshots. |
---|
25 | # We add a sub-version number based on the snapshot date to |
---|
26 | # distinguish things. |
---|
27 | |
---|
28 | set relver 4.1.1 |
---|
29 | set tardate 20091018 |
---|
30 | |
---|
31 | version ${relver}.${tardate} |
---|
32 | revision 0 |
---|
33 | |
---|
34 | # Files |
---|
35 | |
---|
36 | master_sites http://astro.berkeley.edu/~pkwill/miriad-macport/ |
---|
37 | distfiles ${name}-${version}.tar.gz |
---|
38 | checksums ${name}-${version}.tar.gz sha1 345422e25fef4f8343d7b7f2b42d5e2c33b3bd88 |
---|
39 | |
---|
40 | # We need Fortran support, which the Apple version of GCC doesn't offer. |
---|
41 | # So we force the use of a specified MacPorts-built GCC. |
---|
42 | |
---|
43 | set compilerport gcc43 |
---|
44 | set compilerident macports-gcc-4.3 |
---|
45 | |
---|
46 | depends_build port:${compilerport} |
---|
47 | depends_lib lib:libXaw:xorg-libXaw |
---|
48 | |
---|
49 | # The XCode 3.0 linker has a bug that prevents successful execution of |
---|
50 | # Miriad tasks. Older versions work, but hopefully not many people have |
---|
51 | # them installed anymore so we can just use the portgroup. |
---|
52 | |
---|
53 | PortGroup xcodeversion 1.0 |
---|
54 | |
---|
55 | minimum_xcodeversions {7 3.1} |
---|
56 | |
---|
57 | # We've hacked in the tarball date into the version number, so |
---|
58 | # we to tell the build system what directory to the files in the |
---|
59 | # tarball actually live in. |
---|
60 | |
---|
61 | worksrcdir ${name}-${relver} |
---|
62 | |
---|
63 | # I'm writing the Portfile and I use the ATA, so the default telescope |
---|
64 | # is the ATA too. Privileges of maintainership. |
---|
65 | |
---|
66 | set defaultscope ata |
---|
67 | set thescope ${defaultscope} |
---|
68 | |
---|
69 | # Configure settings. Keep the binaries out of ${prefix}/bin to avoid |
---|
70 | # possible conflicts. The automiriad scripts will deal with this correctly |
---|
71 | # anyway. |
---|
72 | |
---|
73 | configure.args --prefix=${prefix} \ |
---|
74 | --bindir=${prefix}/libexec/miriad \ |
---|
75 | --with-telescope=${defaultscope} |
---|
76 | configure.compiler ${compilerident} |
---|
77 | |
---|
78 | # The telescope configuration is important, so make sure the user is |
---|
79 | # notified of which setup is being used |
---|
80 | |
---|
81 | pre-configure { |
---|
82 | ui_msg "Configuring MIRIAD with telescope parameter of \"${thescope}\"." |
---|
83 | ui_msg "Consult the port variants to use a different setting. The default" |
---|
84 | ui_msg "is \"${defaultscope}\". If there's no variant for you desired" |
---|
85 | ui_msg "telescope, contact the port maintainer and one will be quickly added." |
---|
86 | } |
---|
87 | |
---|
88 | # Little helpful message. We could consider adding a patch to install |
---|
89 | # a little program named "use_miriad" or something that would do the |
---|
90 | # .profile munging automatically, but I don't want to worry about having |
---|
91 | # to get that right. |
---|
92 | |
---|
93 | post-activate { |
---|
94 | ui_msg "MIRIAD programs are not in your \$PATH by default." |
---|
95 | ui_msg "You need to run 'source ${prefix}/lib/miriad/automiriad.sh' to set up" |
---|
96 | ui_msg "your shell environment to use MIRIAD. (Source ${prefix}/lib/miriad/automiriad.csh" |
---|
97 | ui_msg "if you use csh or tcsh.) You can put this command in your .profile" |
---|
98 | ui_msg "or other shell initialization files to have your shells automatically" |
---|
99 | ui_msg "set up to use MIRIAD." |
---|
100 | } |
---|
101 | |
---|
102 | # Variants. We can easily add more telescope variants as requested. |
---|
103 | |
---|
104 | variant carma description {Use buffer sizes appropriate to CARMA data} { |
---|
105 | set thescope carma |
---|
106 | configure.args-delete --with-telescope=${defaultscope} |
---|
107 | configure.args-append --with-telescope=${thescope} |
---|
108 | } |
---|
109 | |
---|
110 | variant debug description {Build with debugging support -- tasks will be very slow} { |
---|
111 | configure.optflags -g -O0 |
---|
112 | configure.args-append --enable-warnings |
---|
113 | } |
---|
114 | |
---|
115 | variant docs description {Build documentation PDFs -- depends on many ports} { |
---|
116 | depends_build-append port:texlive port:latex2html port:transfig port:gnuplot |
---|
117 | configure.args-append --enable-docs |
---|
118 | } |
---|