2013-03-30 14:37:13 +00:00
|
|
|
# Created by: Anton Shterenlikht
|
2011-12-28 06:01:49 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= slatec
|
|
|
|
PORTVERSION= 4.1
|
2014-05-16 20:55:40 +00:00
|
|
|
PORTREVISION= 3
|
2011-12-28 06:01:49 +00:00
|
|
|
CATEGORIES= math
|
|
|
|
MASTER_SITES= NL:slatec,blas
|
|
|
|
MASTER_SITE_SUBDIR= slatec/:slatec blas/:blas
|
|
|
|
# Get d1mach.f, i1mach.f, r1mach.f from BLAS, rather than from Slatec:
|
|
|
|
# See Netlib FAQ #2.17: http://netlib.org/misc/faq.html#2.17
|
|
|
|
DISTFILES= guide:slatec slatec_chk.tgz:slatec slatec_src.tgz:slatec \
|
|
|
|
toc:slatec d1mach.f:blas i1mach.f:blas r1mach.f:blas
|
|
|
|
DIST_SUBDIR= slatec
|
|
|
|
EXTRACT_ONLY= slatec_src.tgz slatec_chk.tgz
|
|
|
|
|
2014-06-02 17:55:42 +00:00
|
|
|
MAINTAINER= ports@FreeBSD.org
|
2011-12-28 06:01:49 +00:00
|
|
|
COMMENT= SLATEC Common Mathematical Library
|
|
|
|
|
2014-09-03 21:07:17 +00:00
|
|
|
USES= fortran uidfix
|
2011-12-28 06:01:49 +00:00
|
|
|
USE_LDCONFIG= yes
|
|
|
|
WRKSRC= ${WRKDIR}/src
|
|
|
|
SHLIB_MAJOR= 1
|
|
|
|
|
|
|
|
PLIST_FILES= lib/libslatec.a lib/libslatec.so lib/libslatec.so.${SHLIB_MAJOR}
|
2012-07-13 13:08:15 +00:00
|
|
|
PORTDOCS= guide toc
|
2011-12-28 06:01:49 +00:00
|
|
|
|
|
|
|
LDFLAGS+= ${FFLAGS}
|
|
|
|
LDADD ?= -lgfortran -lm
|
2013-03-30 14:37:13 +00:00
|
|
|
SRCCONF= /dev/null
|
2011-12-28 06:01:49 +00:00
|
|
|
MAKE_ENV+= LDADD="${LDADD}" SHLIB_MAJOR="${SHLIB_MAJOR}" \
|
|
|
|
SRCCONF="${SRCCONF}"
|
|
|
|
|
2012-07-13 13:08:15 +00:00
|
|
|
OPTIONS_DEFINE= DOCS PROFILE
|
2014-05-16 20:55:40 +00:00
|
|
|
OPTIONS_DEFAULT=DOCS
|
2011-12-28 06:01:49 +00:00
|
|
|
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
|
2012-07-13 13:08:15 +00:00
|
|
|
.if ${PORT_OPTIONS:MPROFILE}
|
2011-12-28 06:01:49 +00:00
|
|
|
.if defined(NOPROFILE) || defined(NO_PROFILE) || defined(WITHOUT_PROFILE)
|
2012-07-13 13:08:15 +00:00
|
|
|
IGNORE= you have selected PROFILE option, but have also defined\
|
2011-12-28 06:01:49 +00:00
|
|
|
WITHOUT_PROFILE, NOPROFILE, or NO_PROFILE
|
|
|
|
.elif !exists(/usr/lib/libc_p.a)
|
2012-07-13 13:08:15 +00:00
|
|
|
IGNORE= you have chosen WITH_PROFILE, but have not installed the\
|
2011-12-28 06:01:49 +00:00
|
|
|
base system profiling libraries
|
|
|
|
.endif
|
|
|
|
PLIST_FILES+= lib/libslatec_p.a
|
|
|
|
.else
|
|
|
|
MAKE_ENV+= NO_PROFILE=
|
|
|
|
.endif
|
|
|
|
|
|
|
|
post-extract:
|
|
|
|
@${CP} ${_DISTDIR}/[dir]1mach.f ${WRKSRC}
|
|
|
|
@cd ${WRKDIR}; ${MV} dfmat.f dgvec.f duivp.f duvec.f fmat.f gvec.f \
|
|
|
|
uivp.f uvec.f ${WRKSRC}
|
|
|
|
@${CP} ${FILESDIR}/makefile.lib ${WRKSRC}/Makefile
|
|
|
|
@${CP} ${FILESDIR}/makefile.test ${WRKDIR}/Makefile
|
|
|
|
|
|
|
|
TEST_VERBOSITY?= 1
|
|
|
|
|
|
|
|
check regression-test test: test-dynamic test-static
|
|
|
|
|
|
|
|
.for l in dynamic static
|
|
|
|
test-${l}: build
|
|
|
|
@${ECHO_CMD} "****** Testing SLATEC ${l} library,"
|
|
|
|
@${ECHO_CMD} "****** using a verbosity of ${TEST_VERBOSITY}."
|
|
|
|
@${ECHO_CMD} "****** (The verbosity level can be selected by defining"
|
|
|
|
@${ECHO_CMD} "****** TEST_VERBOSITY=0|1|2|3.)"
|
|
|
|
@cd ${WRKDIR}; ${SETENV} ${MAKE_ENV} TEST_VERBOSITY="${TEST_VERBOSITY}" \
|
|
|
|
${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} test-${l}
|
|
|
|
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
post-install:
|
2014-05-16 20:55:40 +00:00
|
|
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
|
|
|
@cd ${_DISTDIR}; ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
|
2012-07-13 13:08:15 +00:00
|
|
|
|
2011-12-28 06:01:49 +00:00
|
|
|
.include <bsd.port.mk>
|