[61963] trunk/dports/science

takeshi at macports.org takeshi at macports.org
Sat Dec 26 00:56:40 PST 2009


Revision: 61963
          http://trac.macports.org/changeset/61963
Author:   takeshi at macports.org
Date:     2009-12-26 00:56:38 -0800 (Sat, 26 Dec 2009)
Log Message:
-----------
emos: adding emos. used in magicspp and grib_api

Added Paths:
-----------
    trunk/dports/science/emos/
    trunk/dports/science/emos/Portfile

Added: trunk/dports/science/emos/Portfile
===================================================================
--- trunk/dports/science/emos/Portfile	                        (rev 0)
+++ trunk/dports/science/emos/Portfile	2009-12-26 08:56:38 UTC (rev 61963)
@@ -0,0 +1,109 @@
+# -*- 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: Portfile 60628 2009-11-18 03:47:54Z takeshi at macports.org $
+
+PortSystem          1.0
+
+name                emos
+version             000371
+platforms           darwin
+maintainers         takeshi
+license             LGPL
+categories          science
+description         Interpolation library
+homepage            http://www.ecmwf.int/products/data/software/interpolation.html
+master_sites        http://www.ecmwf.int/products/data/software/download/software_files/
+distname            ${name}_${version}
+checksums           md5     b09e27923b256e73ac90467a333a508c \
+                    sha1    75debc150de3f010aec7eace6a65aad9986321da \
+                    rmd160  4853e460ca6d0257a6e0e9c1b0f845bf95b0b846
+long_description \
+    The Interpolation library (EMOSLIB) includes Interpolation software \
+    and GRIB, BUFR, CREX encoding/decoding routines.
+
+post-patch {
+    reinplace "s:^void \\*memcpy://void *memcpy:" ${worksrcpath}/gribex/gdecode.h
+    reinplace "s: | O_LARGEFILE::" ${worksrcpath}/interpolation/sharedlib.c
+    reinplace "s:`cat .list/bufrtables`:bufrtables/*.TXT:" ${worksrcpath}/install
+}
+
+if {${os.endian}=="little"} {
+    set fendian -DLITTLE_ENDIAN
+} else {
+    set fendian ""
+}
+configure {
+    set f [open ${worksrcpath}/config/config.site w]
+    puts $f "#
+AR      = ar
+ARFLAGS = rv
+CC      = ${configure.cc}
+CFLAGS  = ${configure.cflags} ${fendian} ${configure.cc_archflags}
+FCASTFLAGS = \$(CFLAGS)
+FC      = ${configure.fc}
+FFLAGS  = ${configure.fflags} ${fendian}
+VECTFFLAGS =\$(FFLAGS)
+RANLIB  = /usr/bin/ranlib"
+    close $f
+    file copy -force ${worksrcpath}/Makefile.in ${worksrcpath}/Makefile
+    reinplace "s:reals:R64:" ${worksrcpath}/Makefile
+    foreach d {gribex pbio bufrdc bufrtables crexdc interpolation fft} {
+        file copy -force ${worksrcpath}/${d}/Makefile.in ${worksrcpath}/${d}/Makefile
+        reinplace "s:reals:R64:" ${worksrcpath}/${d}/Makefile
+        reinplace "s:arch:linux:" ${worksrcpath}/${d}/Makefile
+        reinplace "s:depl:emos:" ${worksrcpath}/${d}/Makefile
+        reinplace "s:\$(ARCH)\$(CNAME)\$(R64)\$(A64):site:" ${worksrcpath}/${d}/Makefile
+    }
+    reinplace "s:`cat -s .r64`:R64:" ${worksrcpath}/install
+    reinplace "s:`cat -s .emos`:${destroot}${prefix}/lib/${name}; \
+mkdir -p ${destroot}${prefix}/lib/${name}:" ${worksrcpath}/install
+}
+
+post-build {
+    reinplace "s:R64 = R64:R64 =:" ${worksrcpath}/Makefile
+    foreach d {gribex pbio bufrdc bufrtables crexdc interpolation fft} {
+        reinplace "s:R64 = R64:R64 =:" ${worksrcpath}/${d}/Makefile
+    }
+    if {[variant_isset gcc43]} {
+        reinplace "s:-fdefault-real-8 ::" ${worksrcpath}/config/config.site
+    } else {
+        reinplace "s:-r8 ::" ${worksrcpath}/config/config.site
+    }
+    system "cd ${worksrcpath}; make clean; make"
+}
+
+destroot.cmd        ${worksrcpath}/install
+destroot.target     ""
+destroot.destdir    ""
+
+post-destroot {
+    reinplace "s:R64=R64:R64=:" ${worksrcpath}/install
+    system "cd ${worksrcpath}; ./install"
+    system "ln -s emos/libemosR64.a ${destroot}${prefix}/lib/libemosR64.a"
+    system "ln -s emos/libemos.a ${destroot}${prefix}/lib/libemos.a"
+}
+
+use_parallel_build  no
+if {![variant_isset g95]} {
+    default_variants    +gcc43
+}
+universal_variant   no
+
+variant gcc43 conflicts g95 description {builds fortran interface with gfortran} {
+    depends_build-append    port:gcc43
+    configure.args-delete   --disable-fortran
+    configure.compiler      macports-gcc-4.3
+    configure.fflags-append -fdefault-real-8 -fcray-pointer -fno-second-underscore -DPOINTER_64 -DINTEGER_IS_INT -Dlinux -Dgfortran
+    configure.cflags-append -DPOINTER_64 -DINTEGER_IS_INT
+}
+
+variant g95 conflicts gcc43 universal description {builds fortran interface with g95} {
+    depends_build-append    port:g95
+    configure.args-delete   --disable-fortran
+    configure.fc            ${prefix}/bin/g95
+    configure.fflags-append -r8 -fsloppy-char -fno-second-underscore -DUSE_NO_POINTERS -DINTEGER_IS_INT -Dlinux
+    configure.cflags-append -DPOINTER_64 -DINTEGER_IS_INT
+}
+
+livecheck.type      regex
+livecheck.url       ${homepage}
+livecheck.regex     {Latest Emos library ([0-9][0-9][0-9][0-9][0-9][0-9])}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20091226/c309d01f/attachment-0001.html>


More information about the macports-changes mailing list