# -*- 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 152443 2016-09-09 09:10:21Z smaret@macports.org $ PortSystem 1.0 PortGroup compilers 1.0 PortGroup active_variants 1.1 name gildas version 201609a revision 1 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 smaret \ iram.fr:bardeau 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/ \ http://www.iram.fr/~gildas/dist/archive/gildas/ distname ${name}-src-${my_version} checksums rmd160 4cc0ec9ff2483827c3ca07337d7eb7b19e78fe57 \ sha256 dcaecc7776c778a75ed40a36d217bc2f18df6063288086261292498fa74d2efd patch.pre_args -p1 patchfiles patch-admin-Makefile.def.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 # need the fortran interface; see ticket #50543 compilers.enforce_some_fortran cfitsio 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}/mrtcal.in ${destroot}${prefix}/bin/mrtcal xinstall ${filespath}/sic.in ${destroot}${prefix}/bin/sic reinplace -W ${destroot}${prefix}/bin s|@PREFIX@|${prefix}|g astro class clic greg mapping mira mrtcal sic # delete broken module delete ${destroot}${prefix}/lib/gildas/x86_64-darwin-gfortran/python/pyclassfiller }