# -*- 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 PortGroup compilers 1.0 name gildas version 201505a 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] categories science platforms darwin maintainers gmail.com:sebastien.maret license permissive description Radioastronomy data analysis software long_description GILDAS is a collection of state-of-the-art softwares \ oriented toward (sub-)millimeter radioastronomical \ applications (either single-dish or interferometer). \ It is daily used to reduce all data acquired with the \ IRAM 30M telescope and Plateau de Bure Interferometer \ PDBI (except VLBI observations). GILDAS is easily \ extensible. GILDAS is written in Fortran-90, with a \ few parts in C/C++ (mainly keyboard interaction, \ plotting, widgets). homepage http://www.iram.fr/IRAMFR/GILDAS/gildas.html master_sites http://www.iram.fr/~gildas/dist/ distname ${name}-src-${my_version} checksums rmd160 c56761c34d62287b7245ab43b9ce362a1d6f8206 \ sha256 6ab6635f5edd0c16e7699fce96094da87194ca467c6e73cef19dbd1d7b9d91d3 patch.pre_args -p1 patchfiles patch-admin-Makefile.def.diff \ patch-admin-Makefile.stdcxxlib.diff \ patch-admin-Makefile.python.diff \ patch-admin-gildas-env.sh.diff \ patch-admin-define-system.sh.diff \ patch-lapack.diff depends_lib port:gtk2 \ port:libpng \ port:python27 \ port:py27-numpy depends_build port:cfitsio \ port:pkgconfig \ port:slatec # need x11 and cannot be used with quartz; see ticket #42886 require_active_variants gtk2 x11 quartz compilers.choose fc compilers.setup -g95 -gcc44 -gcc45 -gcc46 require_fortran configure.python ${prefix}/bin/python2.7 post-extract { if {![gcc_variant_isset]} { reinplace -W ${worksrcpath}/admin "s|-Wrealloc-lhs-all||" define-system.sh } } configure { set cxxstdlib {} if {[string match *clang* ${configure.cxx}]} { set cxxstdlib [string map {lib -l} ${configure.cxx_stdlib}] } reinplace -W ${worksrcpath}/admin "s|@CC@|${configure.cc}|g" Makefile.def Makefile.python gildas-env.sh define-system.sh reinplace -W ${worksrcpath}/admin "s|@CCFLAGS@|${configure.cflags}|g" Makefile.def Makefile.python gildas-env.sh define-system.sh reinplace -W ${worksrcpath}/admin "s|@FC@|${configure.fc}|g" Makefile.def Makefile.python gildas-env.sh define-system.sh reinplace -W ${worksrcpath}/admin "s|@FCFLAGS@|${configure.fcflags}|g" Makefile.def Makefile.python gildas-env.sh define-system.sh reinplace -W ${worksrcpath}/admin "s|@CXX@|${configure.cxx}|g" Makefile.def Makefile.python gildas-env.sh define-system.sh reinplace -W ${worksrcpath}/admin "s|@CPP@|${configure.cpp}|g" Makefile.def Makefile.python gildas-env.sh define-system.sh reinplace -W ${worksrcpath}/admin "s|@CPPFLAGS@|${configure.cppflags}|g" Makefile.def Makefile.python gildas-env.sh define-system.sh reinplace -W ${worksrcpath}/admin "s|@LDFLAGS@|${configure.ldflags}|g" Makefile.def Makefile.python gildas-env.sh define-system.sh reinplace -W ${worksrcpath}/admin "s|@PYTHON@|${configure.python}|g" Makefile.def Makefile.python gildas-env.sh define-system.sh reinplace -W ${worksrcpath}/admin "s|@STDCXXLIB@|${cxxstdlib}|g" Makefile.def Makefile.python gildas-env.sh define-system.sh } build { 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" } destroot { copy ${workpath}/gildas-exe-${my_version} ${destroot}${prefix}/lib/gildas xinstall ${filespath}/astro.in ${destroot}${prefix}/bin/astro xinstall ${filespath}/class.in ${destroot}${prefix}/bin/class xinstall ${filespath}/clic.in ${destroot}${prefix}/bin/clic xinstall ${filespath}/greg.in ${destroot}${prefix}/bin/greg xinstall ${filespath}/mapping.in ${destroot}${prefix}/bin/mapping xinstall ${filespath}/mira.in ${destroot}${prefix}/bin/mira xinstall ${filespath}/sic.in ${destroot}${prefix}/bin/sic reinplace -W ${destroot}${prefix}/bin s|@PREFIX@|${prefix}|g astro class clic greg mapping mira sic }