- Switched to automake 1.11.6, see CVE-2012-3386. - #14669: Fixed extraction of CC from gmp.h. - Fixed case of intermediate zero real or imaginary part in mpc_fma, found by hydra with GMP_CHECK_RANDOMIZE=1346362345. This is on top of the following changes from version 1.0 - Licence change towards LGPLv3+ for the code and GFDLv1.3+ (with no invariant sections) for the documentation. - 100% of all lines are covered by tests - Renamed functions . mpc_mul_2exp to mpc_mul_2ui . mpc_div_2exp to mpc_div_2ui - 0^0, which returned (NaN,NaN) previously, now returns (1,+0). - Removed compatibility with K&R compilers, which was untestable due to lack of such compilers. - New functions . mpc_log10 . mpc_mul_2si, mpc_div_2si - Speed-ups . mpc_fma - Bug fixes . mpc_div and mpc_norm now return a value indicating the effective rounding direction, as the other functions. . mpc_mul, mpc_sqr and mpc_norm now return correct results even if there are over- or underflows during the computation. . mpc_asin, mpc_proj, mpc_sqr: Wrong result when input variable has infinite part and equals output variable is corrected. . mpc_fr_sub: Wrong return value for imaginary part is corrected. Convert to the new LIB_DEPENDS standard and remove hard-coded .so versions from a couple of dependent ports. Bump PORTREVISIONS of all dependent ports. PR: 183141 Approved by: portmgr (bdrewery)
135 lines
3.5 KiB
Makefile
135 lines
3.5 KiB
Makefile
# Created by: bf@FreeBSD.org
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= cblas
|
|
PORTVERSION= 1.0
|
|
PORTREVISION= 1
|
|
CATEGORIES= math
|
|
MASTER_SITES= NL/blas/blast-forum/ LOCAL/bf
|
|
DISTFILES= cblas.tgz
|
|
|
|
MAINTAINER= bf@FreeBSD.org
|
|
COMMENT= Reference implementation of the C interface to the legacy Fortran BLAS
|
|
|
|
LICENSE= BSD
|
|
|
|
USE_FORTRAN= yes
|
|
|
|
CONFLICTS_INSTALL= atlas-[0-9]* atlas-devel-[0-9]*
|
|
|
|
OPTIONS_DEFINE= PROFILE SHARED STATIC
|
|
OPTIONS_DEFAULT= SHARED STATIC
|
|
PROFILE_DESC= Build profiling libraries
|
|
SHARED_DESC= Build shared libraries and PIC archives
|
|
STATIC_DESC= Build (non-PIC) archives
|
|
|
|
PLIST_FILES= include/cblas.h include/cblas_f77.h
|
|
PLIST_SUB= SVERSION="${SVERSION}"
|
|
|
|
SVERSION= 2
|
|
|
|
WRKSRC = ${WRKDIR}/CBLAS
|
|
WRKSRC_PROFILE = ${WRKSRC}_PROFILE
|
|
WRKSRC_SHARED= ${WRKSRC}_SHARED
|
|
WRKSRC_STATIC= ${WRKSRC}
|
|
|
|
NO_STAGE= yes
|
|
.include <bsd.port.options.mk>
|
|
|
|
.if make(makesum) || ${PORT_OPTIONS:MDOCS}
|
|
DISTFILES+= blas-report.pdf
|
|
EXTRACT_ONLY= cblas.tgz
|
|
.endif
|
|
|
|
MANGLING?= -DADD_
|
|
CFLAGS+= ${MANGLING}
|
|
|
|
.if ${ARCH} == "sparc64"
|
|
PICFLAG?= -fPIC
|
|
.else
|
|
PICFLAG?= -fpic
|
|
.endif
|
|
|
|
FLAGS_PROFILE?= -pg
|
|
FLAGS_SHARED ?= ${PICFLAG}
|
|
|
|
.if ${PORT_OPTIONS:MSHARED}
|
|
PLIST_FILES+= lib/libcblas_pic.a lib/libcblas.so lib/libcblas.so.${SVERSION}
|
|
TESTS ?= test-shared
|
|
USE_LDCONFIG= yes
|
|
.endif
|
|
.if ${PORT_OPTIONS:MSTATIC}
|
|
PLIST_FILES+= lib/libcblas.a
|
|
TESTS ?= test-static
|
|
.endif
|
|
.if ${PORT_OPTIONS:MPROFILE}
|
|
PLIST_FILES+= lib/libcblas_p.a
|
|
TESTS ?= test-profile
|
|
.endif
|
|
|
|
post-patch:
|
|
@${SED} -Ee '\@^CBLIB[[:blank:]]*=@s@cblas.*\.a@libcblas.a@; \
|
|
\@^((BL|RAN)LIB|CC|FC)[[:blank:]]*=@d; \
|
|
\@^((C|F)FLAGS)[[:blank:]]*=@s@=.*@+= $${EXTRAFLAGS}@; \
|
|
\@^LOADER@{x; s|^|LOADFLAGS = $${LDFLAGS} $${EXTRAFLAGS}|; G;};' \
|
|
${WRKSRC}/Makefile.LINUX > ${WRKSRC}/Makefile.in
|
|
@${REINPLACE_CMD} -e 's@$$(ARCH)@$$(AR)@' ${WRKSRC}/src/Makefile
|
|
.for o in PROFILE SHARED
|
|
.if ${PORT_OPTIONS:M${o}}
|
|
@${CP} -a ${WRKSRC} ${WRKSRC_${o}}
|
|
.endif
|
|
.endfor
|
|
|
|
do-build: build-profile build-shared build-static
|
|
|
|
.for o in PROFILE SHARED STATIC
|
|
build-${o:L}: patch
|
|
.if ${PORT_OPTIONS:M${o}}
|
|
@${PRINTF} "\n\nBuilding ${o:L} libraries:\n\n\n"
|
|
@cd ${WRKSRC_${o}}/src; ${SETENV} ${MAKE_ENV} EXTRAFLAGS="${FLAGS_${o}}" \
|
|
${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} all
|
|
|
|
.endif
|
|
.endfor
|
|
|
|
post-build:
|
|
.if ${PORT_OPTIONS:MSHARED}
|
|
cd ${WRKSRC_SHARED}/lib ; ${FC} ${FFLAGS} ${FFLAGS_SHARED} ${LDFLAGS} -shared \
|
|
-o libcblas.so.${SVERSION} -Wl,-x -Wl,-soname,libcblas.so.${SVERSION} \
|
|
-Wl,--whole-archive libcblas.a -Wl,--no-whole-archive
|
|
.endif
|
|
|
|
.if defined(MAINTAINER_MODE) || defined(PACKAGE_BUILDING)
|
|
BLAS?= -L${LOCALBASE}/lib -lblas
|
|
BUILD_DEPENDS += ${LOCALBASE}/lib/libblas.so:${PORTSDIR}/math/blas
|
|
MAKE_ENV+= BLLIB="${BLAS}"
|
|
|
|
check regression-test test: ${TESTS}
|
|
|
|
.for o in PROFILE SHARED STATIC
|
|
test-${o:L}: build-${o:L}
|
|
.if ${PORT_OPTIONS:M${o}}
|
|
@${PRINTF} "\n\nTesting ${o:L} libraries:\n\n\n"
|
|
@cd ${WRKSRC_${o}}/testing; ${SETENV} ${MAKE_ENV} EXTRAFLAGS="${FLAGS_${o}}" \
|
|
${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} all run
|
|
@${CAT} ${WRKSRC_${o}}/testing/*.out
|
|
|
|
.endif
|
|
.endfor
|
|
.endif
|
|
|
|
do-install:
|
|
@${INSTALL_DATA} ${WRKSRC}/include/*.h ${PREFIX}/include
|
|
.if ${PORT_OPTIONS:MSTATIC}
|
|
@${INSTALL_DATA} ${WRKSRC}/lib/libcblas.a ${PREFIX}/lib
|
|
.endif
|
|
.if ${PORT_OPTIONS:MSHARED}
|
|
@${INSTALL_DATA} ${WRKSRC_SHARED}/lib/libcblas.a ${PREFIX}/lib/libcblas_pic.a
|
|
@${INSTALL_DATA} ${WRKSRC_SHARED}/lib/libcblas.so.${SVERSION} ${PREFIX}/lib
|
|
@${LN} -sf libcblas.so.${SVERSION} ${PREFIX}/lib/libcblas.so
|
|
.endif
|
|
.if ${PORT_OPTIONS:MPROFILE}
|
|
@${INSTALL_DATA} ${WRKSRC_PROFILE}/lib/libcblas.a ${PREFIX}/lib/libcblas_p.a
|
|
.endif
|
|
|
|
.include <bsd.port.mk>
|