Sun Jan 11 11:45:12 2009 UTC ()
posix_memalign() only in recent NetBSD's so use malloc() instead.


(markd)
diff -r1.2 -r1.3 pkgsrc/math/eigen2/Makefile
diff -r1.2 -r1.3 pkgsrc/math/eigen2/distinfo
diff -r1.1 -r1.2 pkgsrc/math/eigen2/patches/patch-aa

cvs diff -r1.2 -r1.3 pkgsrc/math/eigen2/Makefile (expand / switch to unified diff)

--- pkgsrc/math/eigen2/Makefile 2009/01/11 10:11:48 1.2
+++ pkgsrc/math/eigen2/Makefile 2009/01/11 11:45:11 1.3
@@ -1,18 +1,18 @@ @@ -1,18 +1,18 @@
1# $NetBSD: Makefile,v 1.2 2009/01/11 10:11:48 markd Exp $ 1# $NetBSD: Makefile,v 1.3 2009/01/11 11:45:11 markd Exp $
2 2
3DISTNAME= eigen-2.0-beta5 3DISTNAME= eigen-2.0-beta5
4PKGNAME= ${DISTNAME:S/-beta/beta/} 4PKGNAME= ${DISTNAME:S/-beta/beta/}
5PKGREVISION= 1 5PKGREVISION= 2
6CATEGORIES= math 6CATEGORIES= math
7MASTER_SITES= http://download.tuxfamily.org/eigen/ 7MASTER_SITES= http://download.tuxfamily.org/eigen/
8EXTRACT_SUFX= .tar.bz2 8EXTRACT_SUFX= .tar.bz2
9 9
10MAINTAINER= pkgsrc-users@NetBSD.org 10MAINTAINER= pkgsrc-users@NetBSD.org
11HOMEPAGE= http://eigen.tuxfamily.org/ 11HOMEPAGE= http://eigen.tuxfamily.org/
12COMMENT= C++ template library for linear algebra 12COMMENT= C++ template library for linear algebra
13 13
14USE_LANGUAGES+= c c++ 14USE_LANGUAGES+= c c++
15USE_CMAKE= yes 15USE_CMAKE= yes
16 16
17WRKSRC= ${WRKDIR}/eigen2 17WRKSRC= ${WRKDIR}/eigen2
18 18

cvs diff -r1.2 -r1.3 pkgsrc/math/eigen2/distinfo (expand / switch to unified diff)

--- pkgsrc/math/eigen2/distinfo 2009/01/11 10:11:48 1.2
+++ pkgsrc/math/eigen2/distinfo 2009/01/11 11:45:11 1.3
@@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
1$NetBSD: distinfo,v 1.2 2009/01/11 10:11:48 markd Exp $ 1$NetBSD: distinfo,v 1.3 2009/01/11 11:45:11 markd Exp $
2 2
3SHA1 (eigen-2.0-beta5.tar.bz2) = 045155ddd498f43168d197547fdc86755497a7a8 3SHA1 (eigen-2.0-beta5.tar.bz2) = 045155ddd498f43168d197547fdc86755497a7a8
4RMD160 (eigen-2.0-beta5.tar.bz2) = 8cf6b34f2499d7016f62419a8eae555988ec234b 4RMD160 (eigen-2.0-beta5.tar.bz2) = 8cf6b34f2499d7016f62419a8eae555988ec234b
5Size (eigen-2.0-beta5.tar.bz2) = 320560 bytes 5Size (eigen-2.0-beta5.tar.bz2) = 320560 bytes
6SHA1 (patch-aa) = f43e78d120fcc2810fd934da05d91ddd2e3eb20b 6SHA1 (patch-aa) = 702b670eefa101b1f48dee11bd14c17a3689a157

cvs diff -r1.1 -r1.2 pkgsrc/math/eigen2/patches/Attic/patch-aa (expand / switch to unified diff)

--- pkgsrc/math/eigen2/patches/Attic/patch-aa 2009/01/11 10:11:48 1.1
+++ pkgsrc/math/eigen2/patches/Attic/patch-aa 2009/01/11 11:45:12 1.2
@@ -1,22 +1,22 @@ @@ -1,22 +1,22 @@
1$NetBSD: patch-aa,v 1.1 2009/01/11 10:11:48 markd Exp $ 1$NetBSD: patch-aa,v 1.2 2009/01/11 11:45:12 markd Exp $
2 2
3--- ./Eigen/src/Core/util/Memory.h.orig 2009-01-06 07:21:44.000000000 +1300 3--- Eigen/src/Core/util/Memory.h.orig 2009-01-06 07:21:44.000000000 +1300
4+++ ./Eigen/src/Core/util/Memory.h 4+++ Eigen/src/Core/util/Memory.h
5@@ -48,7 +48,7 @@ inline T* ei_aligned_malloc(size_t size) 5@@ -56,7 +56,7 @@ inline T* ei_aligned_malloc(size_t size)
6 if(ei_packet_traits<T>::size>1 || ei_force_aligned_malloc<T>::ret) 6 #else
7 { 7 #ifdef _MSC_VER
8 void *void_result; 8 void_result = _aligned_malloc(size*sizeof(T), 16);
9- #ifdef __linux 9- #elif defined(__APPLE__)
10+ #if defined(__linux) || defined(__NetBSD__) 10+ #elif defined(__APPLE__) || defined(__NetBSD__)
11 #ifdef EIGEN_EXCEPTIONS 11 void_result = malloc(size*sizeof(T)); // Apple's malloc() already returns aligned ptrs
12 const int failed = 12 #else
13 #endif 13 void_result = _mm_malloc(size*sizeof(T), 16);
14@@ -95,7 +95,7 @@ inline void ei_aligned_free(T* ptr, size 14@@ -97,7 +97,7 @@ inline void ei_aligned_free(T* ptr, size
15 // need to call manually the dtor in case T is some user-defined fancy numeric type. 
16 // always destruct an array starting from the end. 
17 while(size) ptr[--size].~T(); 15 while(size) ptr[--size].~T();
18- #if defined(__linux) 16 #if defined(__linux)
19+ #if defined(__linux) || defined(__NetBSD__) 
20 free(ptr); 17 free(ptr);
21 #elif defined(__APPLE__) 18- #elif defined(__APPLE__)
 19+ #elif defined(__APPLE__) || defined(__NetBSD__)
22 free(ptr); 20 free(ptr);
 21 #elif defined(_MSC_VER)
 22 _aligned_free(ptr);