pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/54079: Please import mk/ so that wip packages can start using it

>Number:         54079
>Category:       pkg
>Synopsis:       Please import mk/ so that wip packages can start using it
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 26 12:35:00 +0000 2019
>Originator:     Dr. Thomas Orgis
>Release:        CVS trunk, target 2019Q1
Universität Hamburg / RRZ
I am working on getting support for optimized BLAS and LAPACK libraries into shape. Part of that is the existence of wip/openblas{,_pthread,_openmp} and wip/{lapack,cblas,lapacke}-ng. Another part is a new file mk/ to replace the direct dependencies of packages on math/blas and math/lapack.

Can we include this file in the upcoming pkgsrc release? It won't harm anyone if it is just present and with it, I can push wip packages that use it. Further improvements can follow.
Try to choose between BLAS implementations on current pkgsrc;-)
# $NetBSD$
# This Makefile fragment is meant to be included by packages
# that use any BLAS implementation instead of one particular one.
# Since we always ship BLAS and LAPACK together (as upstream variants
# do), this sets both BLAS_LIBS to the linker flags needed to pull in
# the BLAS library and LAPACK_LIBS to the flags for the LAPACK library.
# Often, they will be identical or at least redundant. It is a matter
# of style to stay consistent in their use.

# TODO: Also set a variable to find a matching pkg-config file
# to avoid duplicating its contents in BLAS_LIBS?
# === User-settable variables ===
#	This value represents the type of BLAS we wish to use on the system.
#	Possible: netlib, openblas, openblas_pthread, openblas_openmp
#	Default: netlib
# === Per-package variables ===
#	This is a list of blas packages that are compatible with the current
#	package. If not set, any package is OK.

.if !defined(BLAS_BUILDLINK3_MK)
BLAS_BUILDLINK3_MK=	# define it

.include "../../mk/"

# List of all possible BLAS choices.
_BLAS_TYPES=	netlib openblas openblas_pthread openblas_openmp
# Add Accelerate framework on Darwin (pulled from math/R).
.if exists(/System/Library/Frameworks/Accelerate.framework)
_BLAS_TYPES+=	accelerate.framework
# Currently chosen type.
# Default is the standard, slow, easily available.
BLAS_TYPE?=	netlib

.  else
_BLAS_TYPE=     none
.  endif

.if $(_BLAS_TYPE) == "netlib"
_BLAS_PACKAGE=	wip/lapack-ng
BLAS_LIBS=	-lblas
.elif $(_BLAS_TYPE) == "openblas"
_BLAS_PACKAGE=	wip/openblas
BLAS_LIBS=	-lopenblas
.elif $(_BLAS_TYPE) == "openblas_pthread"
_BLAS_PACKAGE=	wip/openblas_pthread
BLAS_LIBS=	-lopenblas_pthread
.elif $(_BLAS_TYPE) == "openblas_openmp"
_BLAS_PACKAGE=	wip/openblas_openmp
BLAS_LIBS=	-lopenblas_openmp
.elif $(_BLAS_TYPE) == "accelerate.framework"
BLAS_LIBS=	-framework Accelerate
# TODO: atlas
# TODO: external BLAS (other OpenBLAS/ATLAS, Intel MKL)
.else # invalid or unimplemented type
	"${BLAS_TYPE} is not an acceptable BLAS type for ${PKGNAME}."

.if defined(_BLAS_PACKAGE)
.include "../../${_BLAS_PACKAGE}/"


Home | Main Index | Thread Index | Old Index