aboutsummaryrefslogtreecommitdiff
path: root/math/xblas
diff options
context:
space:
mode:
authorBrendan Fabeny <bf@FreeBSD.org>2012-01-06 10:50:11 +0000
committerBrendan Fabeny <bf@FreeBSD.org>2012-01-06 10:50:11 +0000
commit6ff43c65124e071e5279675013914a1d0df7860b (patch)
tree217e7daa8a3183d196467a731999cf491f2d7389 /math/xblas
parentdc46c963cedabb154693a3281de76b6fb00bdf92 (diff)
downloadports-6ff43c65124e071e5279675013914a1d0df7860b.tar.gz
ports-6ff43c65124e071e5279675013914a1d0df7860b.zip
Add xblas 1.0.248, extra Precise Basic Linear Algebra Subroutines
(BLAS).
Notes
Notes: svn path=/head/; revision=288627
Diffstat (limited to 'math/xblas')
-rw-r--r--math/xblas/Makefile119
-rw-r--r--math/xblas/distinfo2
-rw-r--r--math/xblas/pkg-descr20
3 files changed, 141 insertions, 0 deletions
diff --git a/math/xblas/Makefile b/math/xblas/Makefile
new file mode 100644
index 000000000000..fdf1ee57cce1
--- /dev/null
+++ b/math/xblas/Makefile
@@ -0,0 +1,119 @@
+# ex:ts=8
+# Ports collection makefile for: xblas
+# Date created: 5 January 2012
+# Whom: bf@FreeBSD.org
+#
+# $FreeBSD$
+#
+
+PORTNAME= xblas
+PORTVERSION= 1.0.248
+CATEGORIES= math
+MASTER_SITES= NL/xblas LOCAL/bf
+DISTNAME= xblas
+
+MAINTAINER= bf@FreeBSD.org
+COMMENT= Extra Precise Basic Linear Algebra Subroutines (BLAS)
+
+LICENSE= BSD
+
+USE_LDCONFIG= yes
+
+CFLAGS+= ${MANGLING}
+HDIR= include/xblas
+HEADERS= blas_dense_proto.h blas_enum.h blas_extended.h \
+ blas_extended_private.h blas_extended_proto.h blas_fpu.h \
+ blas_malloc.h f2c-bridge.h
+MAKE_ENV= EXTRA_LIBS="-lm" LINKER="${CC}" M4="${M4}" RANLIB="${RANLIB}"
+OPTIONS= SHARED "Build a shared library and PIC archive" on \
+ STATIC "Build a non-PIC archive" off
+PLIST_DIRS= ${HDIR}
+PLIST_FILES= ${HEADERS:S|^|${HDIR}/|}
+SHLIB_MAJOR= 0
+WRKSRC = ${WRKDIR}/xblas-${PORTVERSION}
+
+.include <bsd.port.options.mk>
+
+M4?= m4
+M4_OPTS?= #empty
+MANGLING?= -DCONFIG_FC_UNDERSCORE
+
+.if ${ARCH} == "i386" || ${ARCH} == "amd64"
+CFLAGS+= -Dx86
+.endif
+
+.if ${ARCH} == "sparc64"
+PICFLAG= -fPIC
+.else
+PICFLAG= -fpic
+.endif
+
+.ifndef(NOPORTDOCS)
+PORTDOCS= report.ps
+.endif
+
+.ifdef(WITH_SHARED)
+PLIST_FILES+= lib/libxblas_pic.a lib/libxblas.so lib/libxblas.so.${SHLIB_MAJOR}
+.endif
+
+.ifdef(WITH_STATIC)
+PLIST_FILES+= lib/libxblas.a
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} -E \
+ -e '/(ARCH|CC|(C|LD)FLAGS|EXTRA_LIBS|M4|M4_OPTS|RANLIB|XBLASLIB)[[:blank:]]*=/d' \
+ ${WRKSRC}/make.inc
+.ifdef(WITH_STATIC)
+ @${CP} -af ${WRKSRC} ${WRKSRC}_STATIC
+.endif
+ @${PRINTF} "\nCFLAGS+=\t${PICFLAG}\n" >> ${WRKSRC}/make.inc
+
+do-build: build-shared build-static
+
+build-shared: patch
+.ifdef(WITH_SHARED)
+ @cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} XBLASLIB="libxblas_pic.a" ${MAKE} \
+ ${_MAKE_JOBS} ${MAKE_ARGS} ARCH="${AR}" lib ; \
+ ${CC} ${CFLAGS} ${PICFLAG} ${LDFLAGS} -shared -Wl,-x \
+ -Wl,-soname,libxblas.so.${SHLIB_MAJOR} -o libxblas.so.${SHLIB_MAJOR} \
+ -Wl,--whole-archive libxblas_pic.a -Wl,--no-whole-archive -Wl,--as-needed -lm
+.endif
+
+build-static: patch
+.ifdef(WITH_STATIC)
+ @cd ${WRKSRC}_STATIC; ${SETENV} ${MAKE_ENV} XBLASLIB="libxblas.a" ${MAKE} \
+ ${_MAKE_JOBS} ${MAKE_ARGS} ARCH="${AR}" lib
+.endif
+
+do-install:
+ @${INSTALL_DATA} -d ${PREFIX}/${HDIR}
+ @cd ${WRKSRC}/src; ${INSTALL_DATA} ${HEADERS} ${PREFIX}/${HDIR}
+.ifdef(WITH_SHARED)
+ @cd ${WRKSRC}; ${INSTALL_DATA} libxblas_pic.a \
+ libxblas.so.${SHLIB_MAJOR} ${PREFIX}/lib
+ @${LN} -sf libxblas.so.${SHLIB_MAJOR} ${PREFIX}/lib/libxblas.so
+.endif
+.ifdef(WITH_STATIC)
+ @${INSTALL_DATA} ${WRKSRC}_STATIC/libxblas.a ${PREFIX}/lib
+.endif
+.ifndef(NOPORTDOCS)
+ @${INSTALL_DATA} -d ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/doc/report.ps ${DOCSDIR}
+.endif
+
+check regression-test test: test-shared test-static
+
+test-shared: build
+.ifdef(WITH_SHARED)
+ @cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} XBLASLIB="libxblas_pic.a" ${MAKE} \
+ ${_MAKE_JOBS} ${MAKE_ARGS} ARCH="${AR}" tests
+.endif
+
+test-static: build
+.ifdef(WITH_STATIC)
+ @cd ${WRKSRC}_STATIC; ${SETENV} ${MAKE_ENV} XBLASLIB="libxblas.a" ${MAKE} \
+ ${_MAKE_JOBS} ${MAKE_ARGS} ARCH="${AR}" tests
+.endif
+
+.include <bsd.port.mk>
diff --git a/math/xblas/distinfo b/math/xblas/distinfo
new file mode 100644
index 000000000000..bc180ca2fbf8
--- /dev/null
+++ b/math/xblas/distinfo
@@ -0,0 +1,2 @@
+SHA256 (xblas.tar.gz) = b5fe7c71c2da1ed9bcdc5784a12c5fa9fb417577513fe8a38de5de0007f7aaa1
+SIZE (xblas.tar.gz) = 2087424
diff --git a/math/xblas/pkg-descr b/math/xblas/pkg-descr
new file mode 100644
index 000000000000..a7fd8864ee48
--- /dev/null
+++ b/math/xblas/pkg-descr
@@ -0,0 +1,20 @@
+This library of routines is part of a reference implementation for the Dense
+and Banded BLAS routines, along with their Extended and Mixed Precision
+versions, as documented in Chapters 2 and 4 of the new BLAS Standard.
+
+EXTENDED PRECISION is only used internally; the input and output arguments
+remain the same as in the existing BLAS. At present, we only allow Single,
+Double, or Extra internal precision. Extra precision is implemented as
+double-double precision (128-bit total, 106-bit significand). The routines
+for the double-double precision basic arithmetic operations +, -, *, / were
+developed by David Bailey.
+
+We have designed all our routines assuming that single precision arithmetic
+is actually done in IEEE single precision (32 bits) and that double precision
+arithmetic is actually done in IEEE double precision (64 bits). The routines
+also pass our tests on an Intel machine with 80-bit floating point registers.
+
+MIXED PRECISION permits some input/output arguments to be of different types
+(mixing real and complex) or precisions (mixing single and double).
+
+WWW: http://www.netlib.org/xblas/