aboutsummaryrefslogtreecommitdiffstats
path: root/science/hdf5/Makefile
blob: a7f204b5a21520ea2c294cf6bb12f8a5255fd637 (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
# ex:ts=8
# New ports collection makefile for:    HDF5
# Date created:         Jul 7, 2002
# Whom:             ijliao
#
# $FreeBSD$
#

PORTNAME=   hdf5
PORTVERSION=    1.6.7
CATEGORIES= science archivers graphics
MASTER_SITES=   ftp://ftp.hdfgroup.org/HDF5/current16/src/ \
        ftp://ftp.hdfgroup.org/HDF5/prev-releases/ \
        ftp://ftp.hdfgroup.org/HDF5/prev-releases/hdf5-${PORTVERSION}/src/ \
        LOCAL/chinsan

MAINTAINER= koziol@hdfgroup.org
COMMENT=    Hierarchical Data Format library (from NCSA)

USE_LDCONFIG=   yes
USE_AUTOTOOLS=  libtool:15
GNU_CONFIGURE=  yes
LIBTOOLFILES=   configure c++/configure
CONFIGURE_ARGS= --disable-debug \
        --enable-cxx \
        --enable-instrument \
        --enable-production \
        --enable-strict-format-checks \
        --enable-threadsafe \
        --with-pthread=/usr \
        --with-ssl=/usr \
        --with-zlib=/usr
ALL_TARGET= lib progs

.include <bsd.port.pre.mk>

.if ${ARCH} == "sparc64"
BROKEN=     Does not compile on ${ARCH}
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure
    @${REINPLACE_CMD} -e 's|-D_THREAD_SAFE|${PTHREAD_CFLAGS}|g' \
        -e 's|[\$$]LDFLAGS -pthread|\$$LDFLAGS ${PTHREAD_LIBS}|g'  \
            ${WRKSRC}/config/freebsd ${WRKSRC}/c++/config/freebsd
    @${REINPLACE_CMD} -e 's|-O3||g' ${WRKSRC}/config/gnu-flags
    @${REINPLACE_CMD} -e 's|objformat=|#objformat=|g' \
        -e 's|\(version_type=freebsd\)-.*|\1-elf|g' \
            ${WRKSRC}/aclocal.m4 ${WRKSRC}/configure
.if defined(NOPORTEXAMPLES)
.for i in . c++ hl
    @${REINPLACE_CMD} \
        -e 's,\((cd examples && $$(MAKE) $$@) || exit 1;\),#\1,g' \
            ${WRKSRC}/${i}/Makefile.in
.endfor
.endif

post-install:
.for i in gif2h5 h52gif h5debug h5diff h5dump h5import h5jam h5ls h5repack h5repart h5unjam
    @${STRIP_CMD} ${PREFIX}/bin/${i}
.endfor

.include <bsd.port.post.mk>