1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

update to 2.1.2.23; add LICENSE and test targets; respect CXX and

CXXFLAGS; fix the build with lang/gcc46 (refactored libstdc++
headers) and clang (stricter unqualified lookups in templates);
install examples
This commit is contained in:
Brendan Fabeny 2012-01-01 17:34:49 +00:00
parent cedadbf3ef
commit 486a856d6b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=288375
8 changed files with 151 additions and 6 deletions

View File

@ -7,15 +7,55 @@
#
PORTNAME= mtl
PORTVERSION= 2.1.2.22
DISTVERSION= 2.1.2-23.tentative
CATEGORIES= math devel
MASTER_SITES= http://www.osl.iu.edu/download/research/mtl/
DISTNAME= ${PORTNAME}-2.1.2-22
MAINTAINER= bf@FreeBSD.org
COMMENT= The Matrix Template Library
COMMENT= The Matrix Template Library, Version 2
LICENSE= MTL
LICENSE_NAME= Matrix Template Library License
LICENSE_FILE= ${WRKSRC}/license.mtl.txt
LICENSE_PERMS= auto-accept
CONFIGURE_ENV= CXXCPP="${CXXCPP}"
CXXCPP?= ${CXX} -E
GNU_CONFIGURE= yes
NO_BUILD= yes
USE_PERL5_BUILD= yes
WRKSRC = ${WRKDIR}/${DISTNAME:R}
.include <bsd.port.mk>
post-patch:
@${REINPLACE_CMD} -e '/gnu\*)/,/;;/{/CXX=/d; /CXX_OPTIMIZE_FLAGS=/d; \
s/CXXFLAGS="/&$$ac_cv_env_CXXFLAGS_value /; }' \
${WRKSRC}/configure
@${REINPLACE_CMD} -e 's|\./.*\.pl[[:blank:]]|${PERL} &|' \
${WRKSRC}/test/Makefile.in
@${FIND} ${WRKSRC} -type f | ${XARGS} ${TOUCH} -m
check regression-test test: build
@cd ${WRKSRC}/test; ${SETENV} ${MAKE_ENV} ${MAKE} ${_MAKE_JOBS} \
${MAKE_ARGS} QUICK=-qQ test summary
fulltest: build
@cd ${WRKSRC}/test; ${SETENV} ${MAKE_ENV} ${MAKE} ${_MAKE_JOBS} \
${MAKE_ARGS} QUICK= test summary
.include <bsd.port.pre.mk>
.if defined(USE_GCC) || !empty(CXX:M*g++4*)
CXXFLAGS+= -fpermissive
.endif
.if !defined(NOPORTEXAMPLES)
PORTEXAMPLES= *
post-install:
@${INSTALL_DATA} -d ${EXAMPLESDIR}/doubledouble
@${INSTALL_DATA} ${WRKSRC}/contrib/examples/* ${EXAMPLESDIR}
@${INSTALL_DATA} ${WRKSRC}/contrib/doubledouble/* ${EXAMPLESDIR}/doubledouble
.endif
.include <bsd.port.post.mk>

View File

@ -1,2 +1,2 @@
SHA256 (mtl-2.1.2-22.tar.gz) = 2782f28215d91f1dbc587c87ede89a5735a69d7c401b39e66f274445bffa9bb8
SIZE (mtl-2.1.2-22.tar.gz) = 287018
SHA256 (mtl-2.1.2-23.tentative.tar.gz) = 351bb9692639df74d8258bc973e98460203a7db1c9c49387558c51838b498193
SIZE (mtl-2.1.2-23.tentative.tar.gz) = 330538

View File

@ -0,0 +1,10 @@
--- mtl/external_vector.h.orig 2007-04-10 16:03:10.000000000 -0400
+++ mtl/external_vector.h 2012-01-01 03:59:14.000000000 -0500
@@ -3,6 +3,7 @@
#include "mtl/mtl_iterator.h"
#include "mtl/mtl_exception.h"
+#include <cstddef>
namespace mtl {

View File

@ -0,0 +1,12 @@
--- mtl/light1D.h.orig 2007-04-10 16:03:10.000000000 -0400
+++ mtl/light1D.h 2012-01-01 03:58:53.000000000 -0500
@@ -19,7 +19,8 @@
#include "mtl/reverse_iter.h"
#include "mtl/matrix_traits.h"
#include "mtl/scaled1D.h"
-#include <stdlib.h>
+#include <cstddef>
+#include <cstdlib>
namespace mtl {

View File

@ -0,0 +1,10 @@
--- mtl/linalg_vec.h.orig 2007-04-10 16:03:10.000000000 -0400
+++ mtl/linalg_vec.h 2012-01-01 06:06:12.000000000 -0500
@@ -116,6 +116,7 @@
typedef difference_type Vec_difference_type;
typedef iterator Vec_iterator;
typedef const_iterator Vec_const_iterator;
+ typedef value_type Vec_value_type;
class IndexArray {
public:

View File

@ -0,0 +1,60 @@
--- test/src/algo_test.h.orig 2007-04-10 16:03:10.000000000 -0400
+++ test/src/algo_test.h 2012-01-01 08:04:04.000000000 -0500
@@ -8,6 +8,28 @@
using mtl::dense1D;
template <class Matrix>
+void
+set_diagonal_test(std::string test_name, Matrix& A, bool& success)
+{
+ if (A.is_unit()) {
+ std::cout << test_name.c_str() << " skipping set_diagonal" << std::endl;
+ return;
+ }
+ typedef typename mtl::matrix_traits<Matrix>::value_type T;
+ typedef typename mtl::matrix_traits<Matrix>::size_type Int;
+ // set_diagnal
+ Int i;
+ mtl::set_diagonal(A, T(1));
+
+ for (i = 0; i < A.nrows() && i < A.ncols(); ++i)
+ if (A(i,i) != T(1)) {
+ std::cout << test_name.c_str() << " failed set_diagnal(A,a) *****" << std::endl;
+ success = false;
+ break;
+ }
+}
+
+template <class Matrix>
bool
mat_algo_test(Matrix& A, std::string test_name)
{
@@ -110,28 +132,6 @@
return success;
}
-template <class Matrix>
-void
-set_diagonal_test(std::string test_name, Matrix& A, bool& success)
-{
- if (A.is_unit()) {
- std::cout << test_name.c_str() << " skipping set_diagonal" << std::endl;
- return;
- }
- typedef typename mtl::matrix_traits<Matrix>::value_type T;
- typedef typename mtl::matrix_traits<Matrix>::size_type Int;
- // set_diagnal
- Int i;
- mtl::set_diagonal(A, T(1));
-
- for (i = 0; i < A.nrows() && i < A.ncols(); ++i)
- if (A(i,i) != T(1)) {
- std::cout << test_name.c_str() << " failed set_diagnal(A,a) *****" << std::endl;
- success = false;
- break;
- }
-}
-
template <class Mat>
inline void
fill_matrix(Mat& A, int /*sub*/, int /*super*/, mtl::rectangle_tag)

View File

@ -0,0 +1,12 @@
--- test/src/matrix_test.h.orig 2007-04-10 16:03:10.000000000 -0400
+++ test/src/matrix_test.h 2012-01-01 07:40:34.000000000 -0500
@@ -52,6 +52,9 @@
#include "fill_matrix.h"
+template <class Matrix>
+void
+do_test(Matrix& A, std::string test_name);
template <class Matrix>
void

View File

@ -1,6 +1,7 @@
The Matrix Template Library (MTL) is a high-performance generic component
library that provides comprehensive linear algebra functionality for a wide
variety of matrix formats.
As with the Standard Template Library (STL), MTL uses a five-fold approach,
consisting of generic functions, containers, iterators, adaptors, and function
objects, all developed specifically for high performance numerical linear