aboutsummaryrefslogtreecommitdiffstats
path: root/math/diehard/Makefile
blob: 9cbbf517cd11a75c163fab1d1ae025f7a40e75ad (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
# New ports collection makefile for:    diehard
# Date created:    04 Jule 2002
# Whom:        Sergey Skvortsov <skv@protey.ru>
#
# $FreeBSD$
#

PORTNAME=   diehard
PORTVERSION=    0.1
CATEGORIES= math
MASTER_SITES=   http://www.cs.hku.hk/~diehard/cdrom/ \
        http://stat.fsu.edu/pub/diehard/
DISTNAME=   die.c

MAINTAINER= skv@FreeBSD.org
COMMENT=    Marsaglia's Diehard Battery of Tests of Randomness

ALL_TARGET= diehard
WRKSRC=     ${WRKDIR}/${DISTNAME}
PLIST_SUB=  DOCSDIR="share/doc/${PORTNAME}" DATADIR="share/${PORTNAME}"

DOCSLIST=   NOTES readme

post-patch:
    @${REINPLACE_CMD} -e 's|operm5\.cov|${DATADIR}/operm5.cov|g;' \
        ${WRKSRC}/cdoperm5.c
    @${REINPLACE_CMD} -e 's|CC=gcc||g;' ${WRKSRC}/Makefile

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/diehard ${PREFIX}/bin
    @${MKDIR} ${DATADIR}
    ${INSTALL_DATA} ${WRKSRC}/operm5.cov ${DATADIR}

post-install:
.ifndef(NOPORTDOCS)
    @${ECHO_MSG} "===>   Installing documentation for ${PKGNAME}"
    @${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${DOCSLIST:S!^!${WRKSRC}/!} ${DOCSDIR}
.endif

.include <bsd.port.mk>