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

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

qrupdate: license

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