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

Last change on this file since 148973 was 148973, checked in by dstrubbe@…, 3 years ago

qrupdate: Use linear_algebra port group. This corrects the wrong description of +openblas too.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.9 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 148973 2016-05-24 01:49:14Z dstrubbe@macports.org $
3
4PortSystem          1.0
5PortGroup           muniversal 1.0
6PortGroup           compilers 1.0
7PortGroup           linear_algebra 1.0
8
9compilers.choose    fc
10compilers.setup     require_fortran -dragonegg
11
12name                qrupdate
13version             1.1.2
14revision            4
15# upstream follows a weird folder naming policy, we need last two digits of version separated by a dot
16set branch          [join [lrange [split ${version} .] 1 2] .]
17categories          math
18license             GPL-3+
19maintainers         nomaintainer
20description         library for fast updates of QR and Cholesky decompositions
21long_description    a Fortran library for fast updates of QR and Cholesky decompositions
22homepage            http://sourceforge.net/projects/${name}/
23platforms           darwin
24master_sites        sourceforge:project/qrupdate/qrupdate/${branch}
25
26checksums           rmd160  9d23b2d13278c335f6208ebb6775df4b4049785c \
27                    sha256  e2a1c711dc8ebc418e21195833814cb2f84b878b90a2774365f0166402308e08
28
29use_configure       no
30build.target        lib solib
31
32build.args          PREFIX=${prefix} LAPACK=""
33destroot.args       PREFIX=${prefix} LAPACK=""
34test.args           PREFIX=${prefix} LAPACK=""
35
36patchfiles          patch-Makefile.diff
37
38post-patch {
39    # Mac install program does not support -D flag.
40    reinplace "s|install -D|install|"  ${worksrcpath}/src/Makefile
41
42    # Running ranlib on static libraries make universal builds a little more complicated.
43    reinplace "s|ar -cr |libtool -o |"  ${worksrcpath}/src/Makefile
44}
45
46# Fortran compilers cannot cross-compile
47if {${os.arch} eq "i386"} {
48    set universal_archs_supported "i386 x86_64"
49} else {
50    set universal_archs_supported "ppc ppc64"
51}
52
53post-configure {
54    if { ! [variant_isset universal] } {
55        if {${build_arch} eq "x86_64" || ${build_arch} eq "ppc64"} {
56            reinplace "s|^FFLAGS=|FFLAGS=-m64 |"  ${worksrcpath}/Makeconf
57        } else {
58            reinplace "s|^FFLAGS=|FFLAGS=-m32 |"  ${worksrcpath}/Makeconf
59        }
60    } else {
61        foreach arch ${universal_archs_to_use} {
62            if {${arch} eq "x86_64" || ${arch} eq "ppc64"} {
63                reinplace "s|^FFLAGS=|FFLAGS=-m64 |"  ${worksrcpath}-${arch}/Makeconf
64            } else {
65                reinplace "s|^FFLAGS=|FFLAGS=-m32 |"  ${worksrcpath}-${arch}/Makeconf
66            }
67        }
68    }
69
70    build.args-append       BLAS="${linalglib}"
71    destroot.args-append    BLAS="${linalglib}"
72    test.args-append        BLAS="${linalglib}"
73}
74
75if {[variant_isset g95]} {
76    post-patch {
77        reinplace "s|Makeconf|Makeconf.g95|" ${worksrcpath}/Makefile
78        reinplace "s|Makeconf|Makeconf.g95|" ${worksrcpath}/src/Makefile
79    }
80} else {
81    post-patch {
82        reinplace "s|gfortran|${configure.fc}|" ${worksrcpath}/Makeconf
83    }
84}
85
86test.run    yes
Note: See TracBrowser for help on using the repository browser.