source: trunk/dports/science/gildas/Portfile @ 152443

Last change on this file since 152443 was 152443, checked in by smaret@…, 21 months ago

gildas: Update to version 201609a.

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