source: trunk/dports/math/qrupdate/Portfile

Last change on this file was 149149, checked in by dstrubbe@…, 18 months ago

qrupdate: Restore patch removed in r148974, which caused issue #51539.

  • 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 149149 2016-06-02 02:20:37Z ryandesign@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    if {[variant_isset g95]} {
46        reinplace "s|Makeconf|Makeconf.g95|" ${worksrcpath}/Makefile
47        reinplace "s|Makeconf|Makeconf.g95|" ${worksrcpath}/src/Makefile
48        reinplace "s|Makeconf|Makeconf.g95|" ${worksrcpath}/test/Makefile
49    } else {
50        reinplace "s|gfortran|${configure.fc}|" ${worksrcpath}/Makeconf
51    }
52}
53
54# Fortran compilers cannot cross-compile
55if {${os.arch} eq "i386"} {
56    set universal_archs_supported "i386 x86_64"
57} else {
58    set universal_archs_supported "ppc ppc64"
59}
60
61post-configure {
62    if { ! [variant_isset universal] } {
63        if {${build_arch} eq "x86_64" || ${build_arch} eq "ppc64"} {
64            reinplace "s|^FFLAGS=|FFLAGS=-m64 |"  ${worksrcpath}/Makeconf
65        } else {
66            reinplace "s|^FFLAGS=|FFLAGS=-m32 |"  ${worksrcpath}/Makeconf
67        }
68    } else {
69        foreach arch ${universal_archs_to_use} {
70            if {${arch} eq "x86_64" || ${arch} eq "ppc64"} {
71                reinplace "s|^FFLAGS=|FFLAGS=-m64 |"  ${worksrcpath}-${arch}/Makeconf
72            } else {
73                reinplace "s|^FFLAGS=|FFLAGS=-m32 |"  ${worksrcpath}-${arch}/Makeconf
74            }
75        }
76    }
77
78    build.args-append       BLAS="${linalglib}"
79    destroot.args-append    BLAS="${linalglib}"
80    test.args-append        BLAS="${linalglib}"
81}
82
83test.run    yes
Note: See TracBrowser for help on using the repository browser.