From 91b3b7e8fc5fabfc4592e08db79d78fba5917d8f Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Mon, 20 Oct 2008 04:13:52 -0500 Subject: [PATCH 1/3] add function --- basis/unix/stat/netbsd/netbsd.factor | 1 + 1 file changed, 1 insertion(+) diff --git a/basis/unix/stat/netbsd/netbsd.factor b/basis/unix/stat/netbsd/netbsd.factor index aefa9fd2cf..0bcb886417 100644 --- a/basis/unix/stat/netbsd/netbsd.factor +++ b/basis/unix/stat/netbsd/netbsd.factor @@ -35,3 +35,4 @@ C-STRUCT: statvfs { { "char" _VFS_NAMELEN } "f_mntonname" } { { "char" _VFS_NAMELEN } "f_mntfromname" } ; +FUNCTION: int statvfs ( char* path, statvfs* buf ) ; From e701e66399d8868e5b0e74104b51bd98d81758ad Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Fri, 30 Jan 2009 21:46:47 -0600 Subject: [PATCH 2/3] Load right blas libraries on netbsd --- basis/math/blas/cblas/cblas.factor | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/basis/math/blas/cblas/cblas.factor b/basis/math/blas/cblas/cblas.factor index 11552d67bb..f14c6cfd43 100644 --- a/basis/math/blas/cblas/cblas.factor +++ b/basis/math/blas/cblas/cblas.factor @@ -1,4 +1,5 @@ -USING: alien alien.c-types alien.syntax kernel system combinators ; +USING: alien alien.c-types alien.syntax kernel system +combinators combinators.short-circuit ; IN: math.blas.cblas << @@ -10,7 +11,10 @@ IN: math.blas.cblas "cblas" { { [ os macosx? ] [ "libblas.dylib" "cdecl" add-library ] } { [ os windows? ] [ "blas.dll" "cdecl" add-library ] } - { [ os openbsd? ] [ "libcblas.so" "cdecl" add-library load-blas ] } + { + [ os { [ openbsd? ] [ netbsd? ] } 1|| ] + [ "libcblas.so" "cdecl" add-library load-blas ] + } { [ os freebsd? ] [ "libcblas.so" "cdecl" add-library load-atlas ] } [ "libblas.so" "cdecl" add-library ] } cond From 12ca0eec41540f3569afe4673f18732310561885 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Fri, 30 Jan 2009 22:42:36 -0600 Subject: [PATCH 3/3] blas from netbsd pkgsrc depends on f2c runtime libs --- basis/math/blas/cblas/cblas.factor | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/basis/math/blas/cblas/cblas.factor b/basis/math/blas/cblas/cblas.factor index f14c6cfd43..2a2e9e3a72 100644 --- a/basis/math/blas/cblas/cblas.factor +++ b/basis/math/blas/cblas/cblas.factor @@ -1,20 +1,24 @@ USING: alien alien.c-types alien.syntax kernel system -combinators combinators.short-circuit ; +combinators ; IN: math.blas.cblas << : load-atlas ( -- ) "atlas" "libatlas.so" "cdecl" add-library ; +: load-fortran ( -- ) + "I77" "libI77.so" "cdecl" add-library + "F77" "libF77.so" "cdecl" add-library ; : load-blas ( -- ) "blas" "libblas.so" "cdecl" add-library ; "cblas" { { [ os macosx? ] [ "libblas.dylib" "cdecl" add-library ] } { [ os windows? ] [ "blas.dll" "cdecl" add-library ] } - { - [ os { [ openbsd? ] [ netbsd? ] } 1|| ] - [ "libcblas.so" "cdecl" add-library load-blas ] - } + { [ os openbsd? ] [ "libcblas.so" "cdecl" add-library load-blas ] } + { [ os netbsd? ] [ + load-fortran load-blas + "/usr/local/lib/libcblas.so" "cdecl" add-library + ] } { [ os freebsd? ] [ "libcblas.so" "cdecl" add-library load-atlas ] } [ "libblas.so" "cdecl" add-library ] } cond