aboutsummaryrefslogtreecommitdiffstats
path: root/math/spblas/Makefile
blob: 2b8522444cc49a22681e4ad67b93e5fd3848074c (plain) (blame)
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
73
74
75
76
77
78
79
80
# ex:ts=8
# Ports collection makefile for:    spblas
# Date created:         5 January 2012
# Whom:             bf@FreeBSD.org
#
# $FreeBSD$
#

PORTNAME=   spblas
DISTVERSION=    1_02
CATEGORIES= math
MASTER_SITES=   http://math.nist.gov/spblas/:1 LOCAL/bf/:1 NL/blas/blast-forum/:2
DISTFILES=  nist_spblas_${DISTVERSION}.zip:1
.ifndef(NOPORTDOCS) || make(makesum)
DISTFILES+= blas-report.pdf:2
EXTRACT_ONLY=   nist_spblas_${DISTVERSION}.zip
.endif

MAINTAINER= bf@FreeBSD.org
COMMENT=    NIST Sparse Basic Linear Algebra Subprograms (BLAS)

USE_DOS2UNIX=   yes
USE_LDCONFIG=   yes
USE_ZIP=    yes

HEADERS=    blas_enum.h blas_sparse.h blas_sparse_proto.h
HDIR =      include/spblas
MAKE_ENV=   LIB=spblas SHLIB_MAJOR="${SHLIB_MAJOR}" \
        SRCCONF="${NONEXISTENT}" SRCS="${SRCS}"

NO_WRKSUBDIR=   yes
OPTIONS=    PROFILE "Build and install a profiling library" Off

PLIST_DIRS= ${HDIR}
PLIST_FILES=    ${HEADERS:S|^|${HDIR}/|} lib/libspblas.a lib/libspblas.so \
        lib/libspblas.so.${SHLIB_MAJOR}

SHLIB_MAJOR=    1
SRCS=       nist_spblas.cc

.include <bsd.port.options.mk>

.if defined(WITH_PROFILE)
.if defined(NOPROFILE) || defined(NO_PROFILE) || defined(WITHOUT_PROFILE)
IGNORE =    you have defined WITH_PROFILE, but have also defined\
WITHOUT_PROFILE, NOPROFILE, or NO_PROFILE
.elif !exists(/usr/lib/libc_p.a)
IGNORE  =   you have chosen WITH_PROFILE, but have not installed the\
base system profiling libraries
.endif
PLIST_FILES+=   lib/libspblas_p.a
.else
MAKE_ENV+=  NO_PROFILE=yes
.endif

.ifndef(NOPORTDOCS)
PORTDOCS=   blas-report.pdf
.endif

.ifndef(NOPORTEXAMPLES)
PORTEXAMPLES=   ${SRCS}
.endif

post-extract:
    @${PRINTF} "LIBDIR=\t${PREFIX}/lib\n.include <bsd.lib.mk>\n" > \
        ${WRKSRC}/Makefile

post-install:
    @${MKDIR} ${PREFIX}/${HDIR}
    @cd ${WRKSRC}; ${INSTALL_DATA} ${HEADERS} ${PREFIX}/${HDIR}
.ifndef(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    @${INSTALL_DATA} ${_DISTDIR}/${PORTDOCS} ${DOCSDIR}
.endif
.ifndef(NOPORTEXAMPLES)
    @${MKDIR} ${EXAMPLESDIR}
    @cd ${WRKSRC}; ${INSTALL_DATA} ${PORTEXAMPLES} ${EXAMPLESDIR}
.endif

.include <bsd.port.mk>