[90985] trunk/dports/science
aronnax at macports.org
aronnax at macports.org
Tue Mar 20 12:08:01 PDT 2012
Revision: 90985
https://trac.macports.org/changeset/90985
Author: aronnax at macports.org
Date: 2012-03-20 12:08:01 -0700 (Tue, 20 Mar 2012)
Log Message:
-----------
New port: healpix
Added Paths:
-----------
trunk/dports/science/healpix/
trunk/dports/science/healpix/Portfile
trunk/dports/science/healpix/files/
trunk/dports/science/healpix/files/patch-src-cxx-cxxsupport-arr.h.diff
Added: trunk/dports/science/healpix/Portfile
===================================================================
--- trunk/dports/science/healpix/Portfile (rev 0)
+++ trunk/dports/science/healpix/Portfile 2012-03-20 19:08:01 UTC (rev 90985)
@@ -0,0 +1,75 @@
+# -*- 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
+# $Id$
+
+PortSystem 1.0
+
+name healpix
+version 2.20a
+categories science
+maintainers aronnax
+description Hierarchical Equal Area isoLatitude Pixelization of a sphere
+long_description Software for pixelization, hierarchical indexation, synthesis, \
+ analysis, and visualization of data on the sphere.
+homepage http://healpix.jpl.nasa.gov/
+platforms darwin
+master_sites sourceforge
+master_sites.mirror_subdir ${name}/Healpix_${version}
+worksrcdir Healpix_${version}
+distname Healpix_${version}_2011Feb09
+
+checksums md5 e4d534505cd91cfea60719f620584b2f \
+ sha1 f7a0fdab8e9fcfdf81e3e5e9a7d18912203d3803 \
+ rmd160 e15b14262591a679764665d4d1774c38786a7a00
+
+depends_lib port:cfitsio
+
+patchfiles patch-src-cxx-cxxsupport-arr.h.diff
+use_configure no
+
+# Find a compiler that supports OpenMP. Courtesy of Adam Mercer.
+if {${configure.compiler} == "clang"} {
+ configure.compiler llvm-gcc-4.2
+}
+
+if {${configure.compiler} == "gcc-4.0"} {
+ configure.compiler gcc-4.2
+ if {![file executable ${configure.cc}]} {
+ depends_build-append port:apple-gcc42
+ configure.compiler apple-gcc-4.2
+ # base (as of 2.0.3) doesn't set cxx for apple-gcc-4.2
+ configure.cxx ${prefix}/bin/g++-apple-4.2
+ }
+}
+
+build.post_args-append \
+ HEALPIX_TARGET=osx \
+ BINDIR=${worksrcpath}/bin \
+ LIBDIR=${worksrcpath}/lib \
+ INCDIR=${worksrcpath}/include \
+ EXTERNAL_CFITSIO=yes \
+ CFITSIO_INCDIR=${prefix}/include \
+ CFITSIO_LIBDIR=${prefix}/lib \
+ CFITSIO_EXT_LIB=${prefix}/lib/libcfitsio.a \
+ CFITSIO_EXT_INC=${prefix}/include \
+ CC=${configure.cc} CL=${configure.cc} \
+ CXX=${configure.cxx} CXXL=${configure.cxx}
+
+build {
+ system "${build.cmd} -C ${worksrcpath}/src/cxx ${build.post_args}"
+ system "${build.cmd} -C ${worksrcpath}/src/C/subs static install AR=\"ar -rsv\" ${build.post_args}"
+}
+
+pre-destroot {
+ # This file is just a copy of ${worksrcpath}/lib/libhpxgif.a
+ # and conflicts with port:giflib.
+ file delete ${worksrcpath}/lib/libgif.a
+}
+
+destroot {
+ xinstall -d ${destroot}${prefix}/include
+ xinstall -d ${destroot}${prefix}/lib
+ xinstall -d ${destroot}${prefix}/bin
+ eval xinstall [glob ${worksrcpath}/include/*] ${destroot}${prefix}/include
+ eval xinstall [glob ${worksrcpath}/lib/*] ${destroot}${prefix}/lib
+ eval xinstall [glob ${worksrcpath}/bin/*] ${destroot}${prefix}/bin
+}
Added: trunk/dports/science/healpix/files/patch-src-cxx-cxxsupport-arr.h.diff
===================================================================
--- trunk/dports/science/healpix/files/patch-src-cxx-cxxsupport-arr.h.diff (rev 0)
+++ trunk/dports/science/healpix/files/patch-src-cxx-cxxsupport-arr.h.diff 2012-03-20 19:08:01 UTC (rev 90985)
@@ -0,0 +1,11 @@
+--- src/cxx/cxxsupport/arr.h.orig 2010-11-24 04:14:42.000000000 -0800
++++ src/cxx/cxxsupport/arr.h 2011-03-06 00:36:49.000000000 -0800
+@@ -54,7 +54,7 @@
+ using namespace std;
+ if (sz==0) return 0;
+ void *res;
+- planck_assert(posix_memalign(&res,align,sz*sizeof(T))==0,
++ planck_assert((res = valloc(sz*sizeof(T))),
+ "error in posix_memalign()");
+ return static_cast<T *>(res);
+ }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120320/38688aa0/attachment.html>
More information about the macports-changes
mailing list