# -*- 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 # $Id: Portfile 128902 2014-11-29 19:43:13Z aronnax@macports.org $ PortSystem 1.0 name ds9 version 7.3.2 revision 3 categories science platforms darwin maintainers aronnax license GPL-3+ description SAOImage DS9 astronomical imaging and visualization application long_description \ SAOImage DS9 is an astronomical imaging and data visualization \ application. DS9 supports FITS images and binary tables, multiple frame \ buffers, region manipulation, and many scale algorithms and colormaps. It \ provides for easy communication with external analysis tasks and is highly \ configurable and extensible via XPA and SAMP. homepage http://hea-www.harvard.edu/RD/ds9 master_sites http://hea-www.harvard.edu/RD/ds9/download/source distname ${name}.${version} checksums sha1 0348b733923871ef1d36da653dd3fd90d33a4c20 \ rmd160 e75938b87863b305983527d9ce1b70f4520a7a2f depends_lib port:xorg-libX11 \ port:xorg-libXext \ port:xorg-libXt \ port:Xft2 \ port:xrender \ port:xorg-libXScrnSaver \ port:fontconfig \ port:freetype \ port:libxml2 \ port:libiconv \ port:jbigkit \ port:zlib \ port:libzip # FIXME: all of these libraries are statically linked depends_build-append port:ast \ port:funtools \ port:xpa universal_variant no worksrcdir saods9 # Inside pre-fetch so that 'port sync' does not fail (#46041) pre-fetch { platform darwin { if {${os.major} <= 10} { ui_error "$name requires Mac OS X Lion or later." error "unsupported platform" } } } platform darwin { if {${os.major} <= 10} { depends_lib depends_run } elseif {${os.major} == 11} { set ds9platform lion } elseif {${os.major} == 12} { set ds9platform mountainlion } elseif {${os.major} >= 13} { # The upstream tarball contains Makefiles for each Mac OS version. # Currently, the newest Makefile is for Mavericks. Check this when # a new upstream version is available. set ds9platform mavericks } } patchfiles patch-Makefile.unix.diff \ patch-ds9_Makefile.unix.diff \ patch-ds9_ds9.unix.diff \ patch-src_ds9.tcl.diff post-patch { # FIXME: We have to statically link libast because libast needs to call # functions that are defined in the static libsaotk. Probably best to # eventually make libsaotk a dynamic library. reinplace "s|@prefix@|${prefix}|g" \ ${worksrcpath}/ds9/Makefile.unix \ ${worksrcpath}/ds9/ds9.unix \ ${worksrcpath}/src/ds9.tcl } # The 'configure' stage for ds9 consists of copying or symbolically linking a # platform-specific file to 'make.include'. configure { file copy ${worksrcpath}/make.darwin${ds9platform} ${worksrcpath}/make.include } use_parallel_build no build.args-append JOBS=${build.jobs} \ CC=${configure.cc} \ CXX=${configure.cxx} \ X11INCLUDE=${prefix}/include \ X11LIB=${prefix}/lib \ XFT_LIBS="-lXft -lfontconfig" \ CODESIGN=/usr/bin/true destroot { xinstall ${worksrcpath}/bin/ds9 ${destroot}${prefix}/bin copy ${worksrcpath}/ds9/zipdir/zvfsmntpt ${destroot}${prefix}/share/ds9 } livecheck.url ${homepage}/site/Download.html livecheck.regex {DS9 Version (\d+(\.\d+)+)}