Revision: 148817 https://trac.macports.org/changeset/148817 Author: dstrubbe@macports.org Date: 2016-05-19 08:41:15 -0700 (Thu, 19 May 2016) Log Message: ----------- New port group, linear_algebra, to be used for providing variants for BLAS/LAPACK from ATLAS, Accelerate, or OpenBLAS. Added Paths: ----------- trunk/dports/_resources/port1.0/group/linear_algebra-1.0.tcl Added: trunk/dports/_resources/port1.0/group/linear_algebra-1.0.tcl =================================================================== --- trunk/dports/_resources/port1.0/group/linear_algebra-1.0.tcl (rev 0) +++ trunk/dports/_resources/port1.0/group/linear_algebra-1.0.tcl 2016-05-19 15:41:15 UTC (rev 148817) @@ -0,0 +1,77 @@ +# -*- 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 +# $Id$ +# +# Copyright (c) 2016 The MacPorts Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of The MacPorts Project nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# +# This PortGroup sets up variants for serial linear algebra (Accelerate/ATLAS/OpenBLAS/OpenBLAS-devel). +# +# Usage: +# +# PortGroup linear_algebra 1.0 +# +# in pre-configure, a line like this may be needed: +# configure.args-append --with-blas="-L${prefix}/lib ${linalglib}" +# +# If +threads and +atlas are set, the threaded ATLAS library will be used. +# + +# scalapack. +# vecLibFort only needed if calling Accelerate from Fortran. +# enforcing +lapack for OpenBLAS can be optional. + +PortGroup active_variants 1.1 + +default linalglib "" + +if {![variant_isset accelerate] && ![variant_isset atlas] && ![variant_isset openblas]} { + default_variants-append +accelerate +} + +# choose one of the following for serial linear algebra +variant accelerate conflicts atlas openblas description {Build with linear algebra from built-in Accelerate framework} { + depends_lib-append port:vecLibFort + set linalglib -lvecLibFort +} + +variant atlas conflicts accelerate openblas description {Build with linear algebra from ATLAS} { + depends_lib-append port:atlas + if {[variant_isset threads]} { + set linalglib -ltatlas + } else { + set linalglib -lsatlas + } +} + +variant openblas conflicts accelerate atlas description {Build with linear algebra from OpenBLAS} { + # allow OpenBLAS-devel too + depends_lib-append path:lib/libopenblas.dylib:OpenBLAS + require_active_variants path:lib/libopenblas.dylib:OpenBLAS lapack + set linalglib -lopenblas +} Property changes on: trunk/dports/_resources/port1.0/group/linear_algebra-1.0.tcl ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native