Ticket #21618: Portfile.2

File Portfile.2, 4.3 KB (added by mf2k (Frank Schima), 15 years ago)

I made some improvements to the portfile. Here is my version.

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