source: trunk/dports/science/gildas/Portfile

Last change on this file was 153461, checked in by smaret@…, 14 months ago

gildas: Update to version 201609b.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.4 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: Portfile 153461 2016-10-01 10:24:47Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           compilers 1.0
6PortGroup           active_variants 1.1 
7
8name                gildas
9version             201609b
10set my_version      [string tolower [clock format [clock scan 2000-[string range ${version} 4 5]-10] -format %b]][string range ${version} 2 3][string range ${version} 6 end]
11categories          science
12platforms           darwin
13maintainers         smaret \
14                    iram.fr:bardeau
15license             permissive
16
17description         Radioastronomy data analysis software
18
19long_description    GILDAS is a collection of state-of-the-art softwares \
20                    oriented toward (sub-)millimeter radioastronomical \
21                    applications (either single-dish or interferometer). \
22                    It is daily used to reduce all data acquired with the \
23                    IRAM 30M telescope and Plateau de Bure Interferometer \
24                    PDBI (except VLBI observations). GILDAS is easily \
25                    extensible. GILDAS is written in Fortran-90, with a \
26                    few parts in C/C++ (mainly keyboard interaction, \
27                    plotting, widgets).
28
29homepage            http://www.iram.fr/IRAMFR/GILDAS/gildas.html
30master_sites        http://www.iram.fr/~gildas/dist/ \
31                    http://www.iram.fr/~gildas/dist/archive/gildas/
32distname            ${name}-src-${my_version}
33
34checksums           rmd160  16eaa2862d3e762915d7a0a11e9512242603effa \
35                    sha256  81ad4d2fb524875954a509141dbad8b65620e839512cfc18cf757c5443e8775f
36
37patch.pre_args      -p1
38patchfiles          patch-admin-Makefile.def.diff \
39                    patch-admin-Makefile.python.diff \
40                    patch-admin-gildas-env.sh.diff \
41                    patch-admin-define-system.sh.diff \
42                    patch-lapack.diff
43
44depends_lib         port:gtk2 \
45                    port:libpng \
46                    port:python27 \
47                    port:py27-numpy
48
49depends_build       port:cfitsio \
50                    port:pkgconfig \
51                    port:slatec
52
53# need x11 and cannot be used with quartz; see ticket #42886
54require_active_variants gtk2 x11 quartz
55
56# need the fortran interface; see ticket #50543
57compilers.enforce_some_fortran cfitsio
58
59compilers.choose    fc
60compilers.setup     -g95 -gcc44 -gcc45 -gcc46 require_fortran
61configure.python    ${prefix}/bin/python2.7
62
63post-extract {
64    if {![gcc_variant_isset]} {
65        reinplace -W ${worksrcpath}/admin "s|-Wrealloc-lhs-all||" define-system.sh
66    }
67}
68
69configure {
70    set cxxstdlib {}
71    if {[string match *clang* ${configure.cxx}]} {
72        set cxxstdlib [string map {lib -l} ${configure.cxx_stdlib}]
73    }
74
75    reinplace -W ${worksrcpath}/admin "s|@CC@|${configure.cc}|g" Makefile.def Makefile.python gildas-env.sh define-system.sh
76    reinplace -W ${worksrcpath}/admin "s|@CCFLAGS@|${configure.cflags}|g" Makefile.def Makefile.python gildas-env.sh define-system.sh
77    reinplace -W ${worksrcpath}/admin "s|@FC@|${configure.fc}|g" Makefile.def Makefile.python gildas-env.sh define-system.sh
78    reinplace -W ${worksrcpath}/admin "s|@FCFLAGS@|${configure.fcflags}|g" Makefile.def Makefile.python gildas-env.sh define-system.sh
79    reinplace -W ${worksrcpath}/admin "s|@CXX@|${configure.cxx}|g" Makefile.def Makefile.python gildas-env.sh define-system.sh
80    reinplace -W ${worksrcpath}/admin "s|@CPP@|${configure.cpp}|g" Makefile.def Makefile.python gildas-env.sh define-system.sh
81    reinplace -W ${worksrcpath}/admin "s|@CPPFLAGS@|${configure.cppflags}|g" Makefile.def Makefile.python gildas-env.sh define-system.sh
82    reinplace -W ${worksrcpath}/admin "s|@LDFLAGS@|${configure.ldflags}|g" Makefile.def Makefile.python gildas-env.sh define-system.sh
83    reinplace -W ${worksrcpath}/admin "s|@PYTHON@|${configure.python}|g" Makefile.def Makefile.python gildas-env.sh define-system.sh
84    reinplace -W ${worksrcpath}/admin "s|@STDCXXLIB@|${cxxstdlib}|g" Makefile.def Makefile.python gildas-env.sh define-system.sh
85}
86
87build {
88    system -W ${worksrcpath} "source admin/gildas-env.sh -c ${configure.fc} -s ${prefix}/include:${prefix}/lib:/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Versions/Current/ && export GAG_SLDFLAGS='-shared -o ${prefix}/lib/gildas/x86_64-darwin-gfortran/lib/\$(notdir \$@) -install_name ${prefix}/lib/gildas/x86_64-darwin-gfortran/lib/\$(notdir \$@)' && export DYLD_LIBRARY_PATH=${worksrcpath}/integ/x86_64-darwin-gfortran/lib && make install"
89}
90
91destroot {
92    copy ${workpath}/gildas-exe-${my_version} ${destroot}${prefix}/lib/gildas
93
94    xinstall ${filespath}/astro.in ${destroot}${prefix}/bin/astro
95    xinstall ${filespath}/class.in ${destroot}${prefix}/bin/class
96    xinstall ${filespath}/clic.in ${destroot}${prefix}/bin/clic
97    xinstall ${filespath}/greg.in ${destroot}${prefix}/bin/greg
98    xinstall ${filespath}/mapping.in ${destroot}${prefix}/bin/mapping
99    xinstall ${filespath}/mira.in ${destroot}${prefix}/bin/mira
100    xinstall ${filespath}/mrtcal.in ${destroot}${prefix}/bin/mrtcal
101    xinstall ${filespath}/sic.in ${destroot}${prefix}/bin/sic
102
103    reinplace -W ${destroot}${prefix}/bin s|@PREFIX@|${prefix}|g astro class clic greg mapping mira mrtcal sic
104
105    # delete broken module
106    delete ${destroot}${prefix}/lib/gildas/x86_64-darwin-gfortran/python/pyclassfiller
107   
108}
Note: See TracBrowser for help on using the repository browser.