aboutsummaryrefslogtreecommitdiffstats
path: root/devel/stxxl/Makefile
blob: ada17b9ea8d5c52e6b37471b4b4950249a84d1f1 (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
# Created by: Dmitry Marakasov <amdmi3@FreeBSD.org>
# $FreeBSD$

PORTNAME=   stxxl
PORTVERSION=    1.3.1
CATEGORIES= devel
MASTER_SITES=   SF

MAINTAINER= amdmi3@FreeBSD.org
COMMENT=    Standard Template Library for Extra Large Data Sets

USES=       gmake
ALL_TARGET= library_g++

MAKE_ENV+=  COMPILER_GCC="${CXX}" OPT="${CXXFLAGS}" \
        PTHREAD_FLAG="-lpthread"

PORTDOCS=   *

OPTIONS_DEFINE= DOCS OPTIMIZED_CFLAGS
OPTIONS_DEFAULT=OPTIMIZED_CFLAGS

OPTIMIZED_CFLAGS_CXXFLAGS=  -O3

.include <bsd.port.options.mk>

post-patch:
.if ${OSVERSION} >= 1000000
    @${REINPLACE_CMD} -i '' -e 's|std::tr1::|std::|' \
        ${WRKSRC}/include/stxxl/bits/compat/type_traits.h \
        ${WRKSRC}/include/stxxl/bits/compat/shared_ptr.h \
        ${WRKSRC}/include/stxxl/bits/compat_hash_map.h
.endif

do-install:
    ${INSTALL_DATA} ${WRKSRC}/lib/lib${PORTNAME}.a ${STAGEDIR}${PREFIX}/lib
    cd ${WRKSRC}/include && ${COPYTREE_SHARE} "${PORTNAME} ${PORTNAME}.h" \
        ${STAGEDIR}${PREFIX}/include
    ${RM} -f ${STAGEDIR}${PREFIX}/include/stxxl/bits/mng/config.h.orig
    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}

regression-test:
    cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} tests_g++
    cd ${WRKSRC}/misc && ${SH} run-all-tests

.include <bsd.port.mk>