diff options
author | jerry73204 | 2016-04-12 12:07:22 +0800 |
---|---|---|
committer | jerry73204 | 2016-04-12 12:07:22 +0800 |
commit | 605381b99c252e8dc56a5bc28bd42720b98f887a (patch) | |
tree | 026c6383002e377a93a41d5ba7abf5c2217597fb | |
parent | ef004ddc2e7b9d0759a6dc726beca99377ee2dc7 (diff) | |
download | aur-605381b99c252e8dc56a5bc28bd42720b98f887a.tar.gz |
Updated to 2.0.1-2. Upload kmeans_impl.patch to make sure the building would not fail with gcc 5.3.0
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 19 | ||||
-rw-r--r-- | kmeans_impl.patch | 13 |
3 files changed, 32 insertions, 6 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Sat Feb 6 20:31:59 UTC 2016 +# Tue Apr 12 04:05:06 UTC 2016 pkgbase = mlpack pkgdesc = a scalable c++ machine learning library pkgver = 2.0.1 - pkgrel = 1 + pkgrel = 2 url = http://www.mlpack.org arch = i686 arch = x86_64 @@ -15,7 +15,9 @@ pkgbase = mlpack depends = lapack depends = libxml2>=2.6.0 source = http://www.mlpack.org/files/mlpack-2.0.1.tar.gz + source = kmeans_impl.patch sha1sums = 27df05cff83d202f5d64a3d3fa4bdc4d9a6bc4be + sha1sums = 0d9801873e44d340185081b9d1398bf60a37771b pkgname = mlpack @@ -3,15 +3,26 @@ # Former Maintainer: Daniel Wallace <danielwallace at gtmanfred dot com> pkgname=mlpack pkgver=2.0.1 -pkgrel=1 +pkgrel=2 pkgdesc='a scalable c++ machine learning library' arch=('i686' 'x86_64') url="http://www.mlpack.org" license=('LGPLv3') -depends=('armadillo>=4.100.0' 'boost>=1.49' 'lapack' 'libxml2>=2.6.0') +depends=('armadillo>=4.100.0' + 'boost>=1.49' + 'lapack' + 'libxml2>=2.6.0') makedepends=('cmake>=2.8.5' 'txt2man') -source=("http://www.mlpack.org/files/${pkgname}-${pkgver}.tar.gz") -sha1sums=('27df05cff83d202f5d64a3d3fa4bdc4d9a6bc4be') +source=("http://www.mlpack.org/files/${pkgname}-${pkgver}.tar.gz" + 'kmeans_impl.patch') +sha1sums=('27df05cff83d202f5d64a3d3fa4bdc4d9a6bc4be' + '0d9801873e44d340185081b9d1398bf60a37771b') + +prepare() { + cd "${srcdir}/${pkgname}-${pkgver}" + + patch -Np1 < "${srcdir}/kmeans_impl.patch" +} build() { cd "${srcdir}/${pkgname}-${pkgver}" diff --git a/kmeans_impl.patch b/kmeans_impl.patch new file mode 100644 index 000000000000..13748f07b6a8 --- /dev/null +++ b/kmeans_impl.patch @@ -0,0 +1,13 @@ +diff --git a/src/mlpack/methods/kmeans/kmeans_impl.hpp b/src/mlpack/methods/kmeans/kmeans_impl.hpp +index c3254b3..20681cc 100644 +--- a/src/mlpack/methods/kmeans/kmeans_impl.hpp ++++ b/src/mlpack/methods/kmeans/kmeans_impl.hpp +@@ -175,7 +175,7 @@ Cluster(const MatType& data, + iteration++; + Log::Info << "KMeans::Cluster(): iteration " << iteration << ", residual " + << cNorm << ".\n"; +- if (isnan(cNorm) || isinf(cNorm)) ++ if (std::isnan(cNorm) || std::isinf(cNorm)) + cNorm = 1e-4; // Keep iterating. + + } while (cNorm > 1e-5 && iteration != maxIterations); |