Ticket #36919: Portfile

File Portfile, 3.0 KB (added by lpsinger (Leo Singer), 12 years ago)
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                    ds9
7version                 7.1
8categories              science
9platforms               darwin
10maintainers             aronnax
11description             SAOImage DS9 astronomical imaging and visualization application
12long_description \
13    SAOImage DS9 is an astronomical imaging and data visualization \
14    application. DS9 supports FITS images and binary tables, multiple frame \
15    buffers, region manipulation, and many scale algorithms and colormaps. It \
16    provides for easy communication with external analysis tasks and is highly \
17    configurable and extensible via XPA and SAMP.
18
19homepage                http://hea-www.harvard.edu/RD/ds9
20master_sites            http://hea-www.harvard.edu/saord/download/ds9/source/
21distname                ${name}.${version}
22checksums               sha1    417543d6fd67d4507f4bbe098e22456e11c9373f \
23                        rmd160  6b65af16dfb6320c4d3629b83acda1f2a79dca49
24
25depends_build-append    port:gcc45
26depends_lib-append      port:xorg-libX11
27
28universal_variant       no
29
30worksrcdir              saods9
31
32platform darwin 8 {
33    set ds9platform tiger
34}
35platform darwin 9 {
36    set ds9platform leopard
37}
38platform darwin 10 {
39    set ds9platform snowleopard
40}
41platform darwin 11 {
42    set ds9platofrm lion
43}
44platform darwin 12 {
45    set ds9platform mountainlion
46}
47
48if {${configure.build_arch} == "ppc"} {
49    set ds9arch ppc
50}
51if {${configure.build_arch} == "ppc64"} {
52    set ds9arch ppc
53}
54if {${configure.build_arch} == "i386"} {
55    set ds9arch x86
56}
57if {${configure.build_arch} == "x86_64"} {
58    set ds9arch 64x86
59}
60
61# FIXME: The second and third patches have been contributed upstream and can be
62# removed in a future release of ds9.
63patchfiles              patch-Makefile.diff \
64                        patch-grid25dbase.C.diff \
65                        patch-grid3dbase.C.diff
66
67# The 'ast' component apparently checks for a working Fortran compiler,
68# even though there appears to be no Fortran code. Is it possible to remove this
69# dependency?
70configure.fc            ${prefix}/bin/gfortran-mp-4.5
71
72# The 'configure' stage for ds9 consists of copying or symbolically linking a
73# platform-specific file to 'make.include'.
74configure {
75    file copy ${worksrcpath}/make.darwin${ds9arch}${ds9platform} ${worksrcpath}/make.include
76}
77
78# Disable parallel build.
79build.jobs              1
80
81build.args-append       JOBS=${build.jobs} \
82                        CC=${configure.cc} \
83                        CXX=${configure.cxx} \
84                        FC=${configure.fc} \
85                        X11INCLUDE=${prefix}/include \
86                        X11LIB=${prefix}/lib \
87                        CODESIGN=/usr/bin/true
88
89destroot {
90    xinstall ${worksrcpath}/bin/ds9 ${destroot}${prefix}/bin
91    xinstall -m 644 ${worksrcpath}/bin/ds9.zip ${destroot}${prefix}/bin
92}