source: trunk/dports/science/healpix/Portfile @ 90985

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

New port: healpix

File size: 2.8 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id$
3
4PortSystem          1.0
5
6name                healpix
7version             2.20a
8categories          science
9maintainers         aronnax
10description         Hierarchical Equal Area isoLatitude Pixelization of a sphere
11long_description    Software for pixelization, hierarchical indexation, synthesis, \
12                    analysis, and visualization of data on the sphere.
13homepage            http://healpix.jpl.nasa.gov/
14platforms           darwin
15master_sites        sourceforge
16master_sites.mirror_subdir ${name}/Healpix_${version}
17worksrcdir          Healpix_${version}
18distname            Healpix_${version}_2011Feb09
19
20checksums           md5     e4d534505cd91cfea60719f620584b2f \
21                    sha1    f7a0fdab8e9fcfdf81e3e5e9a7d18912203d3803 \
22                    rmd160  e15b14262591a679764665d4d1774c38786a7a00
23
24depends_lib         port:cfitsio
25
26patchfiles          patch-src-cxx-cxxsupport-arr.h.diff
27use_configure       no
28
29# Find a compiler that supports OpenMP.  Courtesy of Adam Mercer.
30if {${configure.compiler} == "clang"} {
31   configure.compiler llvm-gcc-4.2
32}
33
34if {${configure.compiler} == "gcc-4.0"} {
35   configure.compiler gcc-4.2
36   if {![file executable ${configure.cc}]} {
37       depends_build-append port:apple-gcc42
38       configure.compiler apple-gcc-4.2
39       # base (as of 2.0.3) doesn't set cxx for apple-gcc-4.2
40       configure.cxx ${prefix}/bin/g++-apple-4.2
41   }
42}
43
44build.post_args-append \
45                    HEALPIX_TARGET=osx \
46                    BINDIR=${worksrcpath}/bin \
47                    LIBDIR=${worksrcpath}/lib \
48                    INCDIR=${worksrcpath}/include \
49                    EXTERNAL_CFITSIO=yes \
50                    CFITSIO_INCDIR=${prefix}/include \
51                    CFITSIO_LIBDIR=${prefix}/lib \
52                    CFITSIO_EXT_LIB=${prefix}/lib/libcfitsio.a \
53                    CFITSIO_EXT_INC=${prefix}/include \
54                    CC=${configure.cc} CL=${configure.cc} \
55                    CXX=${configure.cxx} CXXL=${configure.cxx}
56
57build {
58    system "${build.cmd} -C ${worksrcpath}/src/cxx ${build.post_args}"
59    system "${build.cmd} -C ${worksrcpath}/src/C/subs static install AR=\"ar -rsv\" ${build.post_args}"
60}
61
62pre-destroot {
63    # This file is just a copy of ${worksrcpath}/lib/libhpxgif.a
64    # and conflicts with port:giflib.
65    file delete ${worksrcpath}/lib/libgif.a
66}
67
68destroot {
69    xinstall -d ${destroot}${prefix}/include
70    xinstall -d ${destroot}${prefix}/lib
71    xinstall -d ${destroot}${prefix}/bin
72    eval xinstall [glob ${worksrcpath}/include/*] ${destroot}${prefix}/include
73    eval xinstall [glob ${worksrcpath}/lib/*] ${destroot}${prefix}/lib
74    eval xinstall [glob ${worksrcpath}/bin/*] ${destroot}${prefix}/bin
75}
Note: See TracBrowser for help on using the repository browser.