2010-11-20 14:56:47 -05:00
|
|
|
# $OpenBSD: fortran.port.mk,v 1.12 2010/11/20 19:57:30 espie Exp $
|
2010-05-23 04:59:36 -04:00
|
|
|
|
2010-10-23 11:05:47 -04:00
|
|
|
MODFORTRAN_COMPILER ?= g77
|
|
|
|
|
|
|
|
.if empty(MODFORTRAN_COMPILER)
|
|
|
|
ERRORS += "Fatal: need to specify MODFORTRAN_COMPILER"
|
2010-05-23 04:59:36 -04:00
|
|
|
.endif
|
|
|
|
|
2010-10-23 11:16:27 -04:00
|
|
|
.if ${MODFORTRAN_COMPILER:L} == "g77"
|
2010-10-23 11:05:47 -04:00
|
|
|
. if ${COMPILER_VERSION:L:Mgcc[34]*}
|
2010-11-20 14:56:47 -05:00
|
|
|
_MODFORTRAN_LIB_DEPENDS_G77 = devel/libf2c
|
2010-10-23 11:05:47 -04:00
|
|
|
_MODFORTRAN_WANTLIB_G77 = g2c
|
2010-11-20 14:56:47 -05:00
|
|
|
_MODFORTRAN_BUILD_DEPENDS_G77 = lang/g77 devel/libf2c
|
2010-10-23 11:05:47 -04:00
|
|
|
. else
|
2010-11-20 14:56:47 -05:00
|
|
|
_MODFORTRAN_LIB_DEPENDS_G77 = devel/libf2c-old
|
2010-10-23 11:05:47 -04:00
|
|
|
_MODFORTRAN_WANTLIB_G77 += g2c
|
2010-11-20 14:56:47 -05:00
|
|
|
_MODFORTRAN_BUILD_DEPENDS_G77 = lang/g77-old devel/libf2c-old
|
2010-10-23 11:05:47 -04:00
|
|
|
. endif
|
|
|
|
MODFORTRAN_LIB_DEPENDS += ${_MODFORTRAN_LIB_DEPENDS_G77}
|
|
|
|
MODFORTRAN_WANTLIB += ${_MODFORTRAN_WANTLIB_G77}
|
|
|
|
MODFORTRAN_BUILD_DEPENDS += ${_MODFORTRAN_BUILD_DEPENDS_G77}
|
2010-06-05 12:38:47 -04:00
|
|
|
MODFORTRAN_post-patch = \
|
|
|
|
if test -e /usr/bin/g77 -o -e /usr/bin/f77; then \
|
|
|
|
echo "Error: remove old fortran compiler /usr/bin/f77 /usr/bin/g77"; \
|
|
|
|
exit 1; \
|
|
|
|
fi
|
2010-10-23 11:05:47 -04:00
|
|
|
.elif ${MODFORTRAN_COMPILER:L} == "gfortran"
|
|
|
|
. if ${COMPILER_VERSION:L:Mgcc4}
|
2010-11-20 14:56:47 -05:00
|
|
|
_MODFORTRAN_LIB_DEPENDS_GFORTRAN = lang/gfortran,-lib
|
2010-10-23 11:30:00 -04:00
|
|
|
_MODFORTRAN_WANTLIB_GFORTRAN = gfortran
|
2010-11-20 14:56:47 -05:00
|
|
|
_MODFORTRAN_BUILD_DEPENDS_GFORTRAN = lang/gfortran
|
2010-10-23 11:05:47 -04:00
|
|
|
. else
|
|
|
|
MODULES += gcc4
|
|
|
|
MODGCC4_LANGS += fortran
|
|
|
|
. endif
|
|
|
|
MODFORTRAN_LIB_DEPENDS += ${_MODFORTRAN_LIB_DEPENDS_GFORTRAN}
|
|
|
|
MODFORTRAN_WANTLIB += ${_MODFORTRAN_WANTLIB_GFORTRAN}
|
|
|
|
MODFORTRAN_BUILD_DEPENDS += ${_MODFORTRAN_BUILD_DEPENDS_GFORTRAN}
|
|
|
|
.else
|
|
|
|
ERRORS += "Fatal: MODFORTRAN_COMPILER must be one of: g77 gfortran"
|
2010-05-23 04:59:36 -04:00
|
|
|
.endif
|