summaryrefslogtreecommitdiffstats
path: root/science/silo/Makefile
blob: c670496e4c23f2ad5e3ca20231a0e43a0374a9f9 (plain)
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
64
65
66
67
68
69
70
71
72
73
74
# New ports collection makefile for:	silo
# Date created:		17 jul 2008
# Whom: 		Pedro F. Giffuni <giffunip@tutopia.com>
#
# $FreeBSD$
#

PORTNAME=	silo
PORTVERSION=	4.6.2
PORTREVISION=	8
CATEGORIES=	science
MASTER_SITES=	https://wci.llnl.gov/codes/${PORTNAME}/silo-${PORTVERSION}/

MAINTAINER=	ports@FreeBSD.org
COMMENT=	A mesh and field I/O library and scientific database

LIB_DEPENDS=	netcdf.4:${PORTSDIR}/science/netcdf

USE_AUTOTOOLS=	libtool
GNU_CONFIGURE=	yes
CPPFLAGS+=	${CFLAGS} ${PTHREAD_CFLAGS}
LDFLAGS+=	${PTHREAD_LIBS}

NO_LATEST_LINK=	yes
USE_GMAKE=	yes
CONFIGURE_ARGS=	--enable-shared
USE_LDCONFIG=	yes

USE_QT_VER=	3
QT_COMPONENTS=	moc uic

.ifdef WITH_PYTHON
USE_PYTHON=	yes
CONFIGURE_ARGS+=	--enable-pythonmodule
PLIST_SUB+=	WITH_PYTHON=""
.else
PLIST_SUB+=	WITH_PYTHON="@comment "
.endif

.ifdef WITH_HDF5
USE_FORTRAN=	yes
CONFIGURE_ENV+=	${MAKE_ENV}
CONFIGURE_ARGS+=	--enable-fortran
.else
CONFIGURE_ARGS+=	--disable-fortran
.endif

.ifdef WITH_HDF5
LIB_DEPENDS+=	hdf5.0:${PORTSDIR}/science/hdf5
CONFIGURE_ARGS=	--with-hdf5=${LOCALBASE}/include,${LOCALBASE}/lib
PLIST_SUB+=	WITH_HDF5=""
PLIST_SUB+=	WITH_NCDF="@comment "
LIBSILO=	libsiloh5
.else
PLIST_SUB+=	WITH_HDF5="@comment "
PLIST_SUB+=	WITH_NCDF=""
LIBSILO=	libsilo
.endif

.ifdef WITH_OPTIMIZATION
CONFIGURE_ARGS+=	--enable-optimization
.endif

post-install:
	@${RM} ${PREFIX}/lib/libsilo*.settings
	@${MV} ${PREFIX}/lib/${LIBSILO}.so ${PREFIX}/lib/${LIBSILO}.so.4
	@${LN} -sf ${PREFIX}/lib/${LIBSILO}.so.4 ${PREFIX}/lib/${LIBSILO}.so

.ifdef MAINTAINER_MODE
regression-test: build
	@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} check
.endif

.include <bsd.port.mk>
OpenPOWER on IntegriCloud