[shark] 08/11: Enable compilation with CBLAS.

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Tue Feb 9 12:16:49 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch debian/sid
in repository shark.

commit 25dacc10bbec8903a2bb38e1452593d23cd17a4a
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date:   Mon Feb 8 09:15:38 2016 +0000

    Enable compilation with CBLAS.
---
 debian/control                                     |  1 +
 debian/patches/Fix-CBLAS-detection-on-Debian.patch | 43 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 debian/rules                                       |  2 +-
 4 files changed, 46 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 4a98f08..400906f 100644
--- a/debian/control
+++ b/debian/control
@@ -6,6 +6,7 @@ Testsuite: autopkgtest
 Priority: optional
 Build-Depends: cmake,
                debhelper (>= 9),
+               libblas-dev | libblas.so,
                libboost-date-time-dev,
                libboost-filesystem-dev,
                libboost-program-options-dev,
diff --git a/debian/patches/Fix-CBLAS-detection-on-Debian.patch b/debian/patches/Fix-CBLAS-detection-on-Debian.patch
new file mode 100644
index 0000000..a5f7112
--- /dev/null
+++ b/debian/patches/Fix-CBLAS-detection-on-Debian.patch
@@ -0,0 +1,43 @@
+From: Ghislain Antony Vaillant <ghisvail at gmail.com>
+Date: Mon, 8 Feb 2016 18:50:03 +0000
+Subject: Fix CBLAS detection on Debian.
+
+---
+ CMakeLists.txt | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 83ebecd..d39d310 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -236,16 +236,16 @@ if( ENABLE_CBLAS )
+ 	else()
+ 		#todo: do a propper vendor check
+ 		find_library(OPENBLAS_LIBRARY openblas
+-			HINTS ${CBLAS_ROOT}/lib /opt/local/lib
++			HINTS ${CBLAS_ROOT}/lib /opt/local/lib /usr/lib/openblas-base
+ 		)
+-		find_library(CBLAS_LIBRARY cblas
+-			HINTS ${ATLAS_ROOT}/lib ${CBLAS_ROOT}/lib /opt/local/lib /usr/lib64/atlas/
++		find_library(CBLAS_LIBRARY blas
++			HINTS ${ATLAS_ROOT}/lib ${CBLAS_ROOT}/lib /opt/local/lib /usr/lib64/atlas/ /usr/lib/libblas
+ 		)
+ 		find_library(CLAPACK_LIBRARY lapack
+-			HINTS ${ATLAS_ROOT}/lib ${CBLAS_ROOT}/lib /opt/local/lib /usr/lib64/atlas/
++			HINTS ${ATLAS_ROOT}/lib ${CBLAS_ROOT}/lib /opt/local/lib /usr/lib64/atlas/ /usr/lib/lapack
+ 		)
+ 		find_library(ATLAS_LIBRARY atlas
+-			HINTS ${ATLAS_ROOT}/lib ${CBLAS_ROOT}/lib /opt/local/lib /usr/lib64/atlas/
++			HINTS ${ATLAS_ROOT}/lib ${CBLAS_ROOT}/lib /opt/local/lib /usr/lib64/atlas/ /usr/lib/atlas-base
+ 		)
+ 		mark_as_advanced(
+ 			OPENBLAS_LIBRARY
+@@ -261,7 +261,7 @@ if( ENABLE_CBLAS )
+ 		endif()
+ 		if(CBLAS_LIB_PATH)
+ 			find_file(CBLAS_INCLUDES cblas.h 
+-				PATHS ${CBLAS_LIB_PATH} ${CBLAS_LIB_PATH}/../include ${CBLAS_LIB_PATH}/../../include/atlas
++				PATHS ${CBLAS_LIB_PATH} ${CBLAS_LIB_PATH}/../include ${CBLAS_LIB_PATH}/../../include ${CBLAS_LIB_PATH}/../../include/atlas ${CBLAS_LIB_PATH}/../../include/openblas
+ 			)
+ 			get_filename_component(CBLAS_INCLUDES ${CBLAS_INCLUDES} PATH )
+ 		endif()
diff --git a/debian/patches/series b/debian/patches/series
index d7b976f..90a17d2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,3 +8,4 @@ Fix-examples-install-target.patch
 Fix-library-install-target.patch
 Disable-doxygen-generate-tagfile.patch
 Disable-privacy-breaching-content.patch
+Fix-CBLAS-detection-on-Debian.patch
diff --git a/debian/rules b/debian/rules
index db7e0ae..7a805e3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,7 +14,7 @@ DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 # Common cmake options.
 CMAKE_BUILD_OPTIONS = \
 	-DBUILD_SHARED_LIBS=ON \
-	-DENABLE_ATLAS=OFF \
+	-DENABLE_CBLAS=ON \
 	-DENABLE_OPENMP=ON \
 	-DSHARK_INSTALL_DOC_DIR=share/doc/shark-doc \
 	-DSHARK_INSTALL_EXAMPLE_DIR=share/doc/shark-doc/examples

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/shark.git



More information about the debian-science-commits mailing list