From 5198c0a8ef22883b403070684cd72cee1cdf02d3 Mon Sep 17 00:00:00 2001 From: Calvin Hill Date: Tue, 2 May 2017 02:18:18 +0100 Subject: [PATCH] eigen: bump version and update recipe (#1312) --- dev-cpp/eigen/eigen-3.1.2.recipe | 31 --------- dev-cpp/eigen/eigen-3.3.3.recipe | 78 ++++++++++++++++++++++ dev-cpp/eigen/patches/eigen-3.3.3.patchset | 34 ++++++++++ 3 files changed, 112 insertions(+), 31 deletions(-) delete mode 100644 dev-cpp/eigen/eigen-3.1.2.recipe create mode 100644 dev-cpp/eigen/eigen-3.3.3.recipe create mode 100644 dev-cpp/eigen/patches/eigen-3.3.3.patchset diff --git a/dev-cpp/eigen/eigen-3.1.2.recipe b/dev-cpp/eigen/eigen-3.1.2.recipe deleted file mode 100644 index 89fb41c8f..000000000 --- a/dev-cpp/eigen/eigen-3.1.2.recipe +++ /dev/null @@ -1,31 +0,0 @@ -DESCRIPTION="C++ template library for linear algebra: vectors, matrices, and related algorithms" -HOMEPAGE="http://bitbucket.org/eigen" -SOURCE_URI="http://bitbucket.org/eigen/eigen/get/3.1.2.tar.bz2" -CHECKSUM_MD5="e9c081360dde5e7dcb8eba3c8430fde2" -REVISION="1" -STATUS_HAIKU="stable" -DEPEND="" -BUILD() -{ - cd eigen-eigen-5097c01bcdc4 - mkdir build - cd build - cmake .. - make -} - -INSTALL() -{ - cd eigen-eigen-5097c01bcdc4/build - make install -} - -TEST() -{ - cd eigen-eigen-5097c01bcdc4/build - make check -} - -LICENSE="MPL v2" -COPYRIGHT="2006-2011 Benoit Jacob - 2008-2012 Gael Guennebaud, et al." diff --git a/dev-cpp/eigen/eigen-3.3.3.recipe b/dev-cpp/eigen/eigen-3.3.3.recipe new file mode 100644 index 000000000..c116c95b5 --- /dev/null +++ b/dev-cpp/eigen/eigen-3.3.3.recipe @@ -0,0 +1,78 @@ +SUMMARY="A C++ template library for linear algebra, vectors and more" +DESCRIPTION="Eigen is a versatile, fast, elegant and reliable template library \ +that supports all matrix sizes, from small fixed-size matrices to arbitrarily \ +large dense matrices, and even sparse matrices. +- It supports all standard numeric types, including std::complex, integers, \ +and is easily extensible to custom numeric types. +- It supports various matrix decompositions and geometry features. +- Its ecosystem of unsupported modules provides many specialized features \ +such as non-linear optimization, matrix functions, a polynomial solver, FFT, \ +and much more. +- Expression templates allow to intelligently remove temporaries and enable \ +lazy evaluation, when that is appropriate. +- Explicit vectorization is performed for SSE 2/3/4, AVX, FMA, AVX512, \ +ARM NEON (32-bit and 64-bit), PowerPC instruction sets, and now S390x SIMD \ +(ZVector) with graceful fallback to non-vectorized code. +- Fixed-size matrices are fully optimized: dynamic memory allocation is \ +avoided, and the loops are unrolled when that makes sense. +- For large matrices, special attention is paid to cache-friendliness. +- Algorithms are carefully selected for reliability. Reliability trade-offs are \ +clearly documented and extremely safe decompositions are available. +- Eigen is thoroughly tested through its own test suite (over 500 executables) \ +the standard BLAS test suite, and parts of the LAPACK test suite. +- The API is extremely clean and expressive while feeling natural to C++ \ +programmers, thanks to expression templates. +- Implementing an algorithm on top of Eigen feels like just copying pseudocode." +HOMEPAGE="http://eigen.tuxfamily.org" +COPYRIGHT="2006-2011 Benoit Jacob + 2008-2012 Gael Guennebaud, et al." +LICENSE="MPL v2" +REVISION="1" +SOURCE_URI="http://bitbucket.org/eigen/eigen/get/$portVersion.tar.bz2" +CHECKSUM_SHA256="a4143fc45e4454b4b98fcea3516b3a79b8cdb3bc7fadf996d088c6a0d805fea1" +SOURCE_DIR="eigen-eigen-67e894c6cd8f" +PATCHES="eigen-$portVersion.patchset" + +ARCHITECTURES="x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + eigen$secondaryArchSuffix = $portVersion + devel:eigen$secondaryArchSuffix = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + " +BUILD_PREREQUIRES=" + cmd:make + cmd:gcc$secondaryArchSuffix + cmd:cmake + cmd:pkg_config$secondaryArchSuffix + " + +BUILD() +{ + mkdir -p build + cd build + cmake .. -DCMAKE_INSTALL_PREFIX=$prefix -DINCLUDE_INSTALL_DIR=$includeDir + make $jobArgs +} + +INSTALL() +{ + cd build + make install PREFIX=$prefix + mkdir -p $dataDir + mv $prefix/share $dataDir + fixPkgconfig +} + +TEST() +{ + cd build + make check +} diff --git a/dev-cpp/eigen/patches/eigen-3.3.3.patchset b/dev-cpp/eigen/patches/eigen-3.3.3.patchset new file mode 100644 index 000000000..d9cda2daa --- /dev/null +++ b/dev-cpp/eigen/patches/eigen-3.3.3.patchset @@ -0,0 +1,34 @@ +From 48dd773e90210054e48cb53df40222bf8a8af12f Mon Sep 17 00:00:00 2001 +From: Calvin Hill +Date: Mon, 1 May 2017 04:17:23 +0100 +Subject: [PATCH] Eigen patch to run tests for Haiku + +--- + unsupported/Eigen/src/SparseExtra/MatrixMarketIterator.h | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/unsupported/Eigen/src/SparseExtra/MatrixMarketIterator.h b/unsupported/Eigen/src/SparseExtra/MatrixMarketIterator.h +index 02916ea..7bd2713 100644 +--- a/unsupported/Eigen/src/SparseExtra/MatrixMarketIterator.h ++++ b/unsupported/Eigen/src/SparseExtra/MatrixMarketIterator.h +@@ -193,11 +193,13 @@ class MatrixMarketIterator + std::string curfile; + curfile = m_folder + "/" + m_curs_id->d_name; + // Discard if it is a folder ++#ifndef __HAIKU__ + if (m_curs_id->d_type == DT_DIR) continue; //FIXME This may not be available on non BSD systems +-// struct stat st_buf; +-// stat (curfile.c_str(), &st_buf); +-// if (S_ISDIR(st_buf.st_mode)) continue; +- ++#else ++ struct stat st_buf; ++ stat (curfile.c_str(), &st_buf); ++ if (S_ISDIR(st_buf.st_mode)) continue; ++#endif + // Determine from the header if it is a matrix or a right hand side + bool isvector,iscomplex=false; + if(!getMarketHeader(curfile,m_sym,iscomplex,isvector)) continue; +-- +2.12.2 +