Ticket #38142: Portfile

File Portfile, 2.3 KB (added by danieljprice (Daniel Price), 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                giza
8version             0.9.1
9categories          science graphics
10platforms           darwin
11maintainers         monash.edu:daniel.price
12description         C/Fortran graphics library, PGPLOT replacement
13long_description    giza is a 2D scientific plotting library \
14                    for C/Fortran built on the cairo graphics library. \
15                    Designed as a low-dependency, drop-in replacement for PGPLOT \
16                    with antialiasing, real fonts, and PDF/svg/eps/png/X11 output. \
17                    Builds both libpgplot and libcpgplot that directly replace the PGPLOT libraries.                 
18                   
19homepage            http://giza.sourceforge.net/
20master_sites        sourceforge:giza
21license             GPL-2+
22
23checksums           rmd160  965fc07a989b1092003bc8de85560f0ac7ee91fd \
24                    sha256  95b67be1e6a98ed650cc7d36405ae67a579bd089d6314c74353af1adec6303c5
25
26conflicts           pgplot
27use_configure       no
28
29compilers.choose    fc f90
30compilers.setup     require_fortran -dragonegg
31
32build.cmd           make
33build.args          CC=${configure.cc} FC=${configure.fc}
34
35build.args-append   X11DIR=${prefix} PREFIX=${prefix}
36
37depends_lib         port:cairo port:xorg-libX11
38
39destroot.args       PREFIX=${prefix}
40use_parallel_build  no
41
42set gcc_versions {4.4 4.5 4.6 4.7 4.8 4.9}
43
44foreach ver ${gcc_versions} {
45    set ver_no_dot [join [split ${ver} "."] ""]
46
47    if {[variant_isset gcc${ver_no_dot}]} {
48        configure.fc  ${prefix}/bin/gfortran-mp-${ver}
49        configure.cc  ${prefix}/bin/gcc-mp-${ver}
50        build.args-append   CC=${configure.cc} FC=${configure.fc} FLIBS="-L${prefix}/lib/gcc${ver_no_dot} -lgfortran"
51    }
52}
53
54if {[variant_isset g95]} {
55   configure.fc  ${prefix}/bin/g95
56   build.args-append FC=${configure.fc} FLIBS="-L${prefix}/lib/ -lf95"
57}
58
59if {![fortran_variant_isset]} {
60   default_variants-append +gcc48
61   set ver 4.8
62   set ver_no_dot [join [split ${ver} "."] ""]
63   configure.fc  ${prefix}/bin/gfortran-mp-${ver}
64   configure.cc  ${prefix}/bin/gcc-mp-${ver}
65   build.args-append  CC=${configure.cc} FC=${configure.fc} FLIBS="-L${prefix}/lib/gcc${ver_no_dot} -lgfortran"
66}