source: trunk/dports/math/qrupdate/Portfile @ 69685

Last change on this file since 69685 was 69685, checked in by jmr@…, 7 years ago

qrupdate: gcc needs to be in depends_lib (didn't check g95)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.1 KB
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: Portfile 69685 2010-07-13 15:23:13Z jmr@macports.org $
3
4PortSystem                      1.0
5PortGroup           muniversal 1.0
6
7name                qrupdate
8version             1.1.1
9revision            1
10categories          math
11maintainers         nomaintainer
12description         library for fast updates of QR and Cholesky decompositions
13long_description \
14    a Fortran library for fast updates of QR and Cholesky decompositions
15homepage            http://sourceforge.net/projects/${name}/
16platforms           darwin
17master_sites        sourceforge
18
19checksums           md5     7782c7ee6c234e56a72d6b86c1856fa0 \
20                    sha1    8fbaba202b0d4bf80852b2dc6c8d1d4b90b816d4 \
21                    rmd160  fd63306abe91adcd5d47e408d9cd4af3e1b32b0c
22
23depends_lib-append  port:atlas
24
25use_configure       no
26build.target        lib solib
27
28build.args          PREFIX=${prefix} BLAS="-L${prefix}/lib" LAPACK="-L${prefix}/lib -llapack"
29destroot.args       PREFIX=${prefix} BLAS="-L${prefix}/lib" LAPACK="-L${prefix}/lib -llapack"
30test.args           PREFIX=${prefix} BLAS="-L${prefix}/lib" LAPACK="-L${prefix}/lib -llapack"
31
32patchfiles          patch-Makefile.diff
33
34post-patch {
35    # Mac install program does not support -D flag.
36    reinplace "s|install -D|install|"  ${worksrcpath}/src/Makefile
37
38    # Running ranlib on static libraries make universal builds a little more complicated.
39    reinplace "s|ar -cr |libtool -o |"  ${worksrcpath}/src/Makefile
40}
41
42# Fortran compilers can not cross-compile
43if { ${os.arch}=="i386" } {
44    set universal_archs_supported "i386 x86_64"
45} else {
46    set universal_archs_supported "ppc ppc64"
47}
48
49post-configure {
50    if { ! [variant_isset universal] } {
51        if { ${build_arch} == "x86_64" || ${build_arch} == "ppc64" } {
52            reinplace "s|^FFLAGS=|FFLAGS=-m64 |"  ${worksrcpath}/Makeconf
53        } else {
54            reinplace "s|^FFLAGS=|FFLAGS=-m32 |"  ${worksrcpath}/Makeconf
55        }
56    } else {
57        foreach arch ${universal_archs_to_use} {
58            if { ${arch}=="x86_64" || ${arch}=="ppc64" } {
59                reinplace "s|^FFLAGS=|FFLAGS=-m64 |"  ${worksrcpath}-${arch}/Makeconf
60            } else {
61                reinplace "s|^FFLAGS=|FFLAGS=-m32 |"  ${worksrcpath}-${arch}/Makeconf
62            }
63        }
64    }
65}
66
67variant g95 conflicts gcc43 gcc44 universal description {build with g95} {
68    depends_build-append    port:g95
69    post-patch {
70        reinplace "s|Makeconf|Makeconf.g95|" ${worksrcpath}/Makefile
71        reinplace "s|Makeconf|Makeconf.g95|" ${worksrcpath}/src/Makefile
72    }
73}
74
75variant gcc43 conflicts g95 gcc44 universal description {build with gcc43 fortran} {
76    depends_lib-append    port:gcc43
77    post-patch {
78        reinplace "s|gfortran|gfortran-mp-4.3|" ${worksrcpath}/Makeconf
79    }
80}
81
82variant gcc44 conflicts g95 gcc43 description {build with gcc44 fortran} {
83    depends_lib-append    port:gcc44
84    post-patch {
85        reinplace "s|gfortran|gfortran-mp-4.4|" ${worksrcpath}/Makeconf
86    }
87}
88
89if {![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset g95]} {
90    default_variants +gcc44
91}
92
93test.run yes
Note: See TracBrowser for help on using the repository browser.