Update science/R-cran-snow to version 0.3.13_3
[dports.git] / science / hdf5 / Makefile
1 # Created by: ijliao
2 # $FreeBSD$
3
4 PORTNAME=       hdf5
5 PORTVERSION=    1.6.9
6 PORTREVISION=   2
7 CATEGORIES=     science archivers graphics
8 MASTER_SITES=   ftp://ftp.hdfgroup.org/HDF5/current16/src/ \
9                 ftp://ftp.hdfgroup.org/HDF5/prev-releases/ \
10                 ftp://ftp.hdfgroup.org/HDF5/prev-releases/hdf5-${PORTVERSION}/src/ \
11                 LOCAL/chinsan
12
13 MAINTAINER=     koziol@hdfgroup.org
14 COMMENT=        Hierarchical Data Format library (from NCSA)
15
16 CONFLICTS=      hdf5-1.8.*
17
18 USE_LDCONFIG=   yes
19 USE_AUTOTOOLS=  libtool
20 GNU_CONFIGURE=  yes
21 LIBTOOLFILES=   configure c++/configure
22 CONFIGURE_ARGS= --disable-debug \
23                 --enable-cxx \
24                 --enable-instrument \
25                 --enable-production \
26                 --enable-strict-format-checks \
27                 --enable-threadsafe \
28                 --with-pthread=/usr \
29                 --with-ssl=/usr \
30                 --with-zlib=/usr
31 ALL_TARGET=     lib progs
32 MAKE_JOBS_UNSAFE=       yes
33
34 NO_STAGE=       yes
35 .include <bsd.port.pre.mk>
36
37 .if defined(WITH_FORTRAN)
38 LIBTOOLFILES+=          fortran/configure
39 USES+=                  fortran
40 CONFIGURE_ENV+=         F9X=${FC}
41 CONFIGURE_ARGS+=        --enable-fortran
42 PLIST_SUB+=             FORTRAN=""
43 .else
44 PLIST_SUB+=             FORTRAN="@comment "
45 .endif
46
47 .if ${ARCH} == "sparc64"
48 BROKEN=         Does not compile on ${ARCH}
49 .endif
50
51 post-patch:
52         @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure
53         @${REINPLACE_CMD} -e 's|-D_THREAD_SAFE|${PTHREAD_CFLAGS}|g' \
54                 -e 's|[\$$]LDFLAGS -pthread|\$$LDFLAGS ${PTHREAD_LIBS}|g'  \
55                         ${WRKSRC}/config/freebsd ${WRKSRC}/c++/config/freebsd
56         @${REINPLACE_CMD} -e 's|-O3||g' ${WRKSRC}/config/gnu-flags
57         @${REINPLACE_CMD} -e 's|objformat=|#objformat=|g' \
58                 -e 's|\(version_type=freebsd\)-.*|\1-elf|g' \
59                         ${WRKSRC}/aclocal.m4 ${WRKSRC}/configure
60 .if defined(NOPORTEXAMPLES)
61 .for i in . c++ hl fortran
62         @${REINPLACE_CMD} \
63                 -e 's,\((cd examples && $$(MAKE) $$@) || exit 1;\),#\1,g' \
64                         ${WRKSRC}/${i}/Makefile.in
65 .endfor
66 .endif
67
68 post-install:
69 .for i in gif2h5 h52gif h5debug h5diff h5dump h5import h5jam h5ls h5repack h5repart h5unjam
70         @${STRIP_CMD} ${PREFIX}/bin/${i}
71 .endfor
72
73 regression-test: build
74         @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} check
75
76 .include <bsd.port.post.mk>