source: trunk/dports/science/miriad/Portfile

Last change on this file was 147223, checked in by ryandesign@…, 18 months ago

miriad: update to 4.3.8.20160322 (#50947; maintainer)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.9 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 147223 2016-03-31 15:33:52Z ryandesign@macports.org $
3
4PortSystem       1.0
5PortGroup        xcodeversion 1.0
6PortGroup        compilers 1.0
7
8# Miriad releases are very infrequent, so our ports will be based on
9# distributions made from CVS snapshots.  We add a sub-version number
10# based on the snapshot date to distinguish things.
11
12name             miriad
13conflicts        pgplot
14set relver       4.3.8
15set tardate      20160322
16version          ${relver}.${tardate}
17platforms        darwin
18categories       science
19maintainers      newton.cx:peter openmaintainer
20description      MIRIAD, an analysis package for radio astronomical data
21long_description MIRIAD, the Multichannel Imaging, Reconstruction, Analysis, \
22                 and Display package, is a suite of tools for analyzing radio \
23                 astronomical observations, from raw data to imaging.
24homepage         https://www.cfa.harvard.edu/~pwilliam/miriad-macport/
25
26# Based on the DISCLAIMER shipped with ATNF miriad:
27license          GPL-2+
28
29# Files
30
31master_sites     ${homepage}
32checksums        rmd160  f715f3b7afae75c8707733c23d023ce0566a51de \
33                 sha256  dadb1df981a4d636e82cdda3bb5bfe1caa7c733e7f997ea0fd5e769b93a10eb9
34
35# Telescope/buffer size selection.
36
37variant ant256 conflicts ata carma sma wsrt description {use buffer sizes appropriate for a 256-antenna array} {}
38variant ata conflicts ant256 carma sma wsrt description {use buffer sizes appropriate to ATA data} {}
39variant carma conflicts ant256 ata sma wsrt description {use buffer sizes appropriate to CARMA data} {}
40variant sma conflicts ant256 ata carma wsrt description {use buffer sizes appropriate to SMA data} {}
41variant wsrt conflicts ant256 ata carma sma description {use buffer sizes appropriate to WSRT data} {}
42
43if {[variant_isset ant256]} {
44    set thescope big1
45} elseif {[variant_isset ata]} {
46    set thescope ata
47} elseif {[variant_isset wsrt]} {
48    set thescope wsrt
49} elseif {[variant_isset sma]} {
50    set thescope sma
51} else {
52    set thescope carma
53    default_variants +carma
54}
55
56# We need Fortran support, which the Apple version of GCC doesn't offer.
57# So we force the use of a specified MacPorts-built GCC. Some users want
58# to build with better-optimizing proprietary compilers, which we allow
59# via the gcc_select mechanism.
60
61compilers.choose     fc f77
62compilers.set_variants_conflict   gcc_select
63compilers.setup
64
65variant gcc_select conflicts ${compilers.variants} description {Build with compilers chosen via gcc_select -- experts only} {
66    configure.compiler  macports-gcc
67}
68
69if {![fortran_variant_isset] && ![variant_isset gcc_select]} {
70    default_variants-append  +${compilers.gcc_default}
71}
72
73universal_variant    no
74
75depends_lib-append   port:libpng \
76                     port:readline \
77                     port:xorg-libice \
78                     port:xorg-libsm \
79                     port:xorg-libX11 \
80                     port:xorg-libXau \
81                     port:xorg-libXaw \
82                     port:xorg-libXdmcp \
83                     port:zlib
84
85# The XCode 3.0 linker has a bug that prevents successful execution of
86# Miriad tasks.
87
88minimum_xcodeversions {9 3.1}
89
90# We've hacked in the tarball date into the version number, so
91# we tell the build system what directory the files in the
92# tarball actually live in.
93
94worksrcdir      ${name}-${relver}
95
96# Patch to print out debugging information in case the mmAlloc bug persists
97
98patchfiles      patch-src-subs-mm.f2c.diff
99
100# Configure settings. Keep the binaries out of ${prefix}/bin to avoid
101# possible conflicts. The automiriad scripts will deal with this correctly.
102
103configure.args  --bindir=${prefix}/libexec/miriad \
104                --with-telescope=${thescope} \
105                --disable-docs
106
107# The telescope configuration is important, so make sure the user is
108# told which setup is being used.
109
110pre-configure {
111    ui_msg "Configuring MIRIAD with telescope parameter of \"${thescope}\"."
112    ui_msg "Consult the port variants to use a different setting. If there's"
113    ui_msg "no variant for your desired telescope, contact the port maintainer"
114    ui_msg "and one will be quickly added."
115}
116
117# Little helpful message. We could consider adding a patch to install
118# a little program named "use_miriad" or something that would do the
119# .profile munging automatically, but I don't want to worry about having
120# to get that right.
121
122notes "
123MIRIAD programs are not in your \$PATH by default. Type 'source\
124${prefix}/lib/miriad/automiriad.sh' in your shell to set it up to use\
125MIRIAD. If you use csh or tcsh, 'source ${prefix}/lib/miriad/automiriad.csh'\
126instead. The 'source' keyword is important! You can put this command in\
127your .profile or other shell initialization files to make this setup automatic.
128"
129
130# Miscellaneous variants.
131
132variant debug description {Build with debugging support -- tasks will be very slow} {
133    configure.optflags -g -O0
134    configure.args-append --enable-warnings
135}
Note: See TracBrowser for help on using the repository browser.