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

Last change on this file since 86279 was 86279, checked in by ryandesign@…, 8 years ago

rewrite master_sites to avoid redirects

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