Ticket #42886: Portfile

File Portfile, 3.5 KB (added by smaret (Sebastien Maret), 10 years ago)
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$
3
4PortSystem       1.0
5PortGroup        compilers 1.0
6
7name             gildas
8version          201404b
9categories       science
10platforms        darwin
11maintainers      gmail.com:sebastien.maret
12license          permissive
13
14description      Radioastronomy data analysis software
15
16long_description GILDAS is a collection of state-of-the-art softwares \
17                 oriented toward (sub-)millimeter radioastronomical \
18                 applications (either single-dish or interferometer). \
19                 It is daily used to reduce all data acquired with the \
20                 IRAM 30M telescope and Plateau de Bure Interferometer \
21                 PDBI (except VLBI observations). GILDAS is easily \
22                 extensible. GILDAS is written in Fortran-90, with a \
23                 few parts in C/C++ (mainly keyboard interaction, \
24                 plotting, widgets).
25
26homepage         http://www.iram.fr/IRAMFR/GILDAS/gildas.html
27master_sites     http://www.iram.fr/~gildas/dist/
28distname         ${name}-src-apr14b
29
30checksums        rmd160 02f59882bc19c656bd5bec6f79a220915003fb76 \
31                 sha256 4a6c7ef9bb7c96549c61847eb58fc4adca361b4fb260faf94f7d84e760193981
32
33patchfiles       patch-admin-Makefile.build.diff \
34                 patch-admin-Makefile.def.diff \
35                 patch-admin-Makefile.python.diff \
36                 patch-admin-gildas-env.sh.diff \
37                 patch-packages-clic-lib-Makefile.diff
38
39depends_lib      port:gtk2 \
40                 port:libpng \
41                 port:python27 \
42                 port:py27-numpy
43
44depends_build    port:cfitsio \
45                 port:pkgconfig \
46                 port:slatec
47
48use_configure    no
49
50compilers.choose    cc cpp fc
51compilers.setup     -clang -dragonegg -g95 -gcc44 -gcc45 -gcc46 -gfortran -llvm require_fortran
52configure.python    ${prefix}/bin/python2.7
53
54if {![fortran_variant_isset]} {
55    default_variants-append +gcc48
56}
57
58build {
59    reinplace -W ${worksrcpath}/admin "s|@CC@|${configure.cc}|g" Makefile.def Makefile.python gildas-env.sh
60    reinplace -W ${worksrcpath}/admin "s|@CXX@|${configure.cxx}|g" Makefile.def Makefile.python gildas-env.sh
61    reinplace -W ${worksrcpath}/admin "s|@CPP@|${configure.cpp}|g" Makefile.def Makefile.python gildas-env.sh
62    reinplace -W ${worksrcpath}/admin "s|@PYTHON@|${configure.python}|g" Makefile.def Makefile.python gildas-env.sh
63
64    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='-install_name ${prefix}/lib/gildas/x86_64-darwin-gfortran/lib/\$(notdir \$@)' && export DYLD_LIBRARY_PATH=${worksrcpath}/integ/x86_64-darwin-gfortran/lib && make install"
65}
66
67destroot {
68    xinstall -d ${destroot}${prefix}/lib
69    copy ${workpath}/gildas-exe-apr14b ${destroot}${prefix}/lib/gildas
70
71    xinstall ${filespath}/astro.in ${destroot}${prefix}/bin/astro
72    xinstall ${filespath}/class.in ${destroot}${prefix}/bin/class
73    xinstall ${filespath}/clic.in ${destroot}${prefix}/bin/clic
74    xinstall ${filespath}/greg.in ${destroot}${prefix}/bin/greg
75    xinstall ${filespath}/mapping.in ${destroot}${prefix}/bin/mapping
76    xinstall ${filespath}/mira.in ${destroot}${prefix}/bin/mira
77    xinstall ${filespath}/sic.in ${destroot}${prefix}/bin/sic
78
79    reinplace -W ${destroot}${prefix}/bin s|@PREFIX@|${prefix}|g astro class clic greg mapping mira sic
80}