source: trunk/dports/science/ds9/Portfile @ 128902

Last change on this file since 128902 was 128902, checked in by aronnax@…, 5 years ago

ds9: build against non-bundled versions of more libraries

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.0 KB
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: Portfile 128902 2014-11-29 19:43:13Z aronnax@macports.org $
3
4PortSystem              1.0
5
6name                    ds9
7version                 7.3.2
8revision                3
9categories              science
10platforms               darwin
11maintainers             aronnax
12license                 GPL-3+
13description             SAOImage DS9 astronomical imaging and visualization application
14long_description \
15    SAOImage DS9 is an astronomical imaging and data visualization \
16    application. DS9 supports FITS images and binary tables, multiple frame \
17    buffers, region manipulation, and many scale algorithms and colormaps. It \
18    provides for easy communication with external analysis tasks and is highly \
19    configurable and extensible via XPA and SAMP.
20
21homepage                http://hea-www.harvard.edu/RD/ds9
22master_sites            http://hea-www.harvard.edu/RD/ds9/download/source
23distname                ${name}.${version}
24checksums               sha1    0348b733923871ef1d36da653dd3fd90d33a4c20 \
25                        rmd160  e75938b87863b305983527d9ce1b70f4520a7a2f
26
27depends_lib             port:xorg-libX11 \
28                        port:xorg-libXext \
29                        port:xorg-libXt \
30                        port:Xft2 \
31                        port:xrender \
32                        port:xorg-libXScrnSaver \
33                        port:fontconfig \
34                        port:freetype \
35                        port:libxml2 \
36                        port:libiconv \
37                        port:jbigkit \
38                        port:zlib \
39                        port:libzip
40
41# FIXME: all of these libraries are statically linked
42depends_build-append    port:ast \
43                        port:funtools \
44                        port:xpa
45
46universal_variant       no
47
48worksrcdir              saods9
49
50# Inside pre-fetch so that 'port sync' does not fail (#46041)
51pre-fetch {
52    platform darwin {
53        if {${os.major} <= 10} {
54            ui_error "$name requires Mac OS X Lion or later."
55            error "unsupported platform"
56        }
57    }
58}
59platform darwin {
60    if {${os.major} <= 10} {
61        depends_lib
62        depends_run
63    } elseif {${os.major} == 11} {
64        set ds9platform lion
65    } elseif {${os.major} == 12} {
66        set ds9platform mountainlion
67    } elseif {${os.major} >= 13} {
68        # The upstream tarball contains Makefiles for each Mac OS version.
69        # Currently, the newest Makefile is for Mavericks. Check this when
70        # a new upstream version is available.
71        set ds9platform mavericks
72    }
73}
74
75patchfiles              patch-Makefile.unix.diff \
76                        patch-ds9_Makefile.unix.diff \
77                        patch-ds9_ds9.unix.diff \
78                        patch-src_ds9.tcl.diff
79
80post-patch {
81    # FIXME: We have to statically link libast because libast needs to call
82    # functions that are defined in the static libsaotk. Probably best to
83    # eventually make libsaotk a dynamic library.
84    reinplace "s|@prefix@|${prefix}|g" \
85        ${worksrcpath}/ds9/Makefile.unix \
86        ${worksrcpath}/ds9/ds9.unix \
87        ${worksrcpath}/src/ds9.tcl
88}
89
90# The 'configure' stage for ds9 consists of copying or symbolically linking a
91# platform-specific file to 'make.include'.
92configure {
93    file copy ${worksrcpath}/make.darwin${ds9platform} ${worksrcpath}/make.include
94}
95
96use_parallel_build      no
97build.args-append       JOBS=${build.jobs} \
98                        CC=${configure.cc} \
99                        CXX=${configure.cxx} \
100                        X11INCLUDE=${prefix}/include \
101                        X11LIB=${prefix}/lib \
102                        XFT_LIBS="-lXft -lfontconfig" \
103                        CODESIGN=/usr/bin/true
104
105destroot {
106    xinstall ${worksrcpath}/bin/ds9 ${destroot}${prefix}/bin
107    copy ${worksrcpath}/ds9/zipdir/zvfsmntpt ${destroot}${prefix}/share/ds9
108}
109
110livecheck.url           ${homepage}/site/Download.html
111livecheck.regex         {DS9 Version (\d+(\.\d+)+)}
Note: See TracBrowser for help on using the repository browser.