Ticket #21618: Portfile

File Portfile, 4.3 KB (added by pkgw (Peter Williams), 15 years ago)

Updated Portfile; uses xcodeversion portgroup and updates source snapshot

Line 
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
4PortSystem 1.0
5
6name             miriad
7platforms        darwin
8categories       science
9maintainers      newton.cx:peter
10description      MIRIAD, an analysis package for radio astronomical data
11long_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.
14homepage         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
21license          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
28set relver 4.1.1
29set tardate 20091018
30
31version          ${relver}.${tardate}
32revision         0
33
34# Files
35
36master_sites http://astro.berkeley.edu/~pkwill/miriad-macport/
37distfiles    ${name}-${version}.tar.gz
38checksums    ${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
43set compilerport  gcc43
44set compilerident macports-gcc-4.3
45
46depends_build     port:${compilerport}
47depends_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
53PortGroup             xcodeversion 1.0
54
55minimum_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
61worksrcdir      ${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
66set defaultscope ata
67set 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
73configure.args  --prefix=${prefix} \
74                --bindir=${prefix}/libexec/miriad \
75                --with-telescope=${defaultscope}
76configure.compiler ${compilerident}
77
78# The telescope configuration is important, so make sure the user is
79# notified of which setup is being used
80
81pre-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
93post-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
104variant 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
110variant debug description {Build with debugging support -- tasks will be very slow} {
111    configure.optflags -g -O0
112    configure.args-append --enable-warnings
113}
114
115variant 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}