diff options
author | bf <bf@FreeBSD.org> | 2012-01-02 01:34:49 +0800 |
---|---|---|
committer | bf <bf@FreeBSD.org> | 2012-01-02 01:34:49 +0800 |
commit | 491e5c000ea95f1b996d31a5bb303c66c4dee09b (patch) | |
tree | 66e1e2432b1143239bc01f9ecbedb6147c2ce39d /math | |
parent | 44566fbb9520652d02264f52dece066c8e31bd80 (diff) | |
download | freebsd-ports-gnome-491e5c000ea95f1b996d31a5bb303c66c4dee09b.tar.gz freebsd-ports-gnome-491e5c000ea95f1b996d31a5bb303c66c4dee09b.tar.zst freebsd-ports-gnome-491e5c000ea95f1b996d31a5bb303c66c4dee09b.zip |
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
Diffstat (limited to 'math')
-rw-r--r-- | math/mtl/Makefile | 48 | ||||
-rw-r--r-- | math/mtl/distinfo | 4 | ||||
-rw-r--r-- | math/mtl/files/patch-mtl__external_vector.h | 10 | ||||
-rw-r--r-- | math/mtl/files/patch-mtl__light1D.h | 12 | ||||
-rw-r--r-- | math/mtl/files/patch-mtl__linalg_vec.h | 10 | ||||
-rw-r--r-- | math/mtl/files/patch-test__src__algo_test.h | 60 | ||||
-rw-r--r-- | math/mtl/files/patch-test__src__matrix_test.h | 12 | ||||
-rw-r--r-- | math/mtl/pkg-descr | 1 |
8 files changed, 151 insertions, 6 deletions
diff --git a/math/mtl/Makefile b/math/mtl/Makefile index 4198ce3d2b2c..00148bcd2f61 100644 --- a/math/mtl/Makefile +++ b/math/mtl/Makefile @@ -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} + +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 -.include <bsd.port.mk> +.endif +.include <bsd.port.post.mk> diff --git a/math/mtl/distinfo b/math/mtl/distinfo index f8f6c89f1980..30f0da628b19 100644 --- a/math/mtl/distinfo +++ b/math/mtl/distinfo @@ -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 diff --git a/math/mtl/files/patch-mtl__external_vector.h b/math/mtl/files/patch-mtl__external_vector.h new file mode 100644 index 000000000000..55cff6e58159 --- /dev/null +++ b/math/mtl/files/patch-mtl__external_vector.h @@ -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 { + diff --git a/math/mtl/files/patch-mtl__light1D.h b/math/mtl/files/patch-mtl__light1D.h new file mode 100644 index 000000000000..dfd3ad8d296f --- /dev/null +++ b/math/mtl/files/patch-mtl__light1D.h @@ -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 { + diff --git a/math/mtl/files/patch-mtl__linalg_vec.h b/math/mtl/files/patch-mtl__linalg_vec.h new file mode 100644 index 000000000000..d8910e343a12 --- /dev/null +++ b/math/mtl/files/patch-mtl__linalg_vec.h @@ -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: diff --git a/math/mtl/files/patch-test__src__algo_test.h b/math/mtl/files/patch-test__src__algo_test.h new file mode 100644 index 000000000000..69d901ccdb2c --- /dev/null +++ b/math/mtl/files/patch-test__src__algo_test.h @@ -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) diff --git a/math/mtl/files/patch-test__src__matrix_test.h b/math/mtl/files/patch-test__src__matrix_test.h new file mode 100644 index 000000000000..11d3d411cdce --- /dev/null +++ b/math/mtl/files/patch-test__src__matrix_test.h @@ -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 diff --git a/math/mtl/pkg-descr b/math/mtl/pkg-descr index 4c9d3f769f03..00dfe45af3d9 100644 --- a/math/mtl/pkg-descr +++ b/math/mtl/pkg-descr @@ -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 |