aboutsummaryrefslogtreecommitdiffstats
path: root/devel/dlmalloc/Makefile
blob: 40794484060d917535016431cd17ed385e6c3583 (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
# New ports collection makefile for:    dlmalloc
# Date created:             4 April 2001
# Whom:                 Maxim Sobolax <sobomax@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   dlmalloc
PORTVERSION=    2.7.0
CATEGORIES= devel
MASTER_SITES=   ftp://gee.cs.oswego.edu/pub/misc/
DISTFILES=  malloc-${PORTVERSION}.c malloc-${PORTVERSION}.h
EXTRACT_ONLY=

MAINTAINER= sobomax@FreeBSD.org

DIST_SUBDIR=    ${PORTNAME}
WRKSRC=     ${WRKDIR}
MAKEFILE=   ${FILESDIR}/Makefile
MAKE_ENV=   PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
        PTHREAD_LIBS="${PTHREAD_LIBS}"
PKGMESSAGE= ${WRKDIR}/pkg-message

do-extract:
    @${MKDIR} ${WRKDIR}
.for file in ${DISTFILES}
    @${CP} ${DISTDIR}/${DIST_SUBDIR}/${file} \
        ${WRKSRC}/${file:S/-${PORTVERSION}//}
.endfor

do-install:
    ${MKDIR} ${PREFIX}/include/${PORTNAME}
    ${MKDIR} ${PREFIX}/share/doc/dlmalloc
    ${INSTALL_DATA} ${WRKSRC}/malloc.h ${PREFIX}/include/${PORTNAME}
.for suffix in "" # "_r" <- thread-safe version doesn't work yet
    ${INSTALL_DATA} ${WRKSRC}/libdlmalloc${suffix}.a ${PREFIX}/lib
    ${INSTALL_PROGRAM} ${WRKSRC}/dlmalloc_module${suffix}.so ${PREFIX}/lib
.endfor
    ${SED} 's|%%PREFIX%%|${PREFIX}|g' ${FILESDIR}/README.FreeBSD | \
        /usr/bin/fmt > ${WRKDIR}/README.FreeBSD
    ${INSTALL_MAN} ${WRKDIR}/README.FreeBSD ${PREFIX}/share/doc/dlmalloc
    @${SED} 's|%%PREFIX%%|${PREFIX}|g' ${PKGDIR}/pkg-message | \
        /usr/bin/fmt > ${PKGMESSAGE}

post-install:
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>