summaryrefslogtreecommitdiff
path: root/math/blis/Makefile
blob: d7c4f8e6ae232205d255b2a508bb65a56ef5be88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Created by: Johannes M Dieterich <jmd@FreeBSD.org>
# $FreeBSD$

PORTNAME=	blis
LIBVERSION=	0.3.2
PORTVERSION=	${LIBVERSION}g20180501
PORTREVISION=	1
CATEGORIES=	math

MAINTAINER=	jmd@FreeBSD.org
COMMENT=	Software framework for high-performance BLAS-like libraries

LICENSE=	BSD3CLAUSE
LICENSE_FILE=	${WRKSRC}/LICENSE

BUILD_DEPENDS=	bash:shells/bash \
		llvm50>=0:devel/llvm50

BROKEN_powerpc64=	fails to configure: common.mk:118: Unable to determine compiler vendor

OPTIONS_DEFINE=	PARA CBLAS
PARA_DESC=	use pthread parallelization
CBLAS_DESC=	build the CBLAS compatibility layer
OPTIONS_DEFAULT=	PARA CBLAS
OPTIONS_SUB=		yes

USE_GITHUB=	yes
GH_ACCOUNT=	flame
GH_TAGNAME=	8adb2f9

USES=		gmake python shebangfix
USE_LDCONFIG=	yes
SHEBANG_FILES=	build/flatten-headers.py

HAS_CONFIGURE=	yes

.include <bsd.port.options.mk>

# enable BLAS and static/shared libs by default
CONFIGURE_ARGS+=	--enable-blas \
			--prefix=${PREFIX} \
			--enable-shared \
			--enable-static
#--prefix=PREFIX

.if ${PORT_OPTIONS:MPARA}
CONFIGURE_ARGS+=	-t pthreads
.endif

.if ${PORT_OPTIONS:MCBLAS}
CONFIGURE_ARGS+=	--enable-cblas
.endif

.if ${ARCH} == amd64
LIBNAME=	x86_64
CONFIGURE_ARGS+=	x86_64
PLIST_SUB+=	X8664=""
.else
LIBNAME=	generic
CONFIGURE_ARGS+=	generic
PLIST_SUB+=	X8664="@comment "
.endif

CC=	${LOCALBASE}/bin/clang50
CXX=	${LOCALBASE}/bin/clang++50

post-install:
	${MV} ${STAGEDIR}/${PREFIX}/lib/libblis-${LIBVERSION}-${LIBNAME}.a ${STAGEDIR}/${PREFIX}/lib/libblis.a
	${MV} ${STAGEDIR}/${PREFIX}/lib/libblis-${LIBVERSION}-${LIBNAME}.so ${STAGEDIR}/${PREFIX}/lib/libblis.so
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libblis.so

.include <bsd.port.mk>