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