blob: 13dd7172677cb1713e0a6ef6a2e8c37bb767ffaa (
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
|
# New ports collection makefile for: cgnslib
# Date created: Sat 24 oct 2007
# Whom: thierry@pompo.net
#
# $FreeBSD$
#
PORTNAME= cgnslib
DISTVERSION= 2.5-1
CATEGORIES= science
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= cgns
DISTNAME= ${PORTNAME}_${DISTVERSION}
MAINTAINER= thierry@FreeBSD.org
COMMENT= CFD General Notation System library code
GNU_CONFIGURE= yes
CONFIGURE_ENV= F77=${F77}
CONFIGURE_ARGS= --enable-shared=all
MAKE_ENV= PTHREAD_LIBS="${PTHREAD_LIBS}"
USE_LDCONFIG= yes
.if !defined(WITHOUT_HDF5)
LIB_DEPENDS+= hdf5.0:${PORTSDIR}/science/hdf5
CONFIGURE_ARGS+=--with-hdf5=${LOCALBASE}
PLIST_SUB= HDF5=""
.else
CONFIGURE_ARGS+=--with-hdf5=no
PLIST_SUB= HDF5="@comment "
.endif
.if !defined(WITHOUT_TESTS)
WANT_FORTRAN= yes #dummy but future use
BUILD_DEPENDS+= gfortran42:${PORTSDIR}/lang/gcc42
FC= gfortran42
F77= gfortran42
TESTSBIN= rundbtest cgwrite cgread
.endif
WRKSRC= ${WRKDIR}/${PORTNAME}_${PORTVERSION:R}
CNVBIN= adf2hdf hdf2adf
post-build:
.if !defined(WITHOUT_TESTS)
@(cd ${BUILD_WRKSRC}/tests; \
${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET})
@(cd ${BUILD_WRKSRC}/tests; \
${SETENV} ${MAKE_ENV} FOPTS="${FFLAGS} -I.." ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} fortran)
.endif
regression-test:
.for pg in ${TESTSBIN}
@(cd ${BUILD_WRKSRC}/tests; ./${pg})
.endfor
post-install:
${MV} ${PREFIX}/lib/libcgns.so ${PREFIX}/lib/libcgns.so.0
${LN} -sf ${PREFIX}/lib/libcgns.so.0 ${PREFIX}/lib/libcgns.so
${INSTALL_PROGRAM} ${CNVBIN:C|^|${BUILD_WRKSRC}/${OPSYS:U}/|} ${PREFIX}/bin
.include <bsd.port.mk>
|