All of lore.kernel.org
 help / color / mirror / Atom feed
From: Samuel Martin <s.martin49@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 14/14] package/lapack: new package
Date: Sun,  3 Jul 2016 15:47:50 +0200	[thread overview]
Message-ID: <20160703134750.7516-15-s.martin49@gmail.com> (raw)
In-Reply-To: <20160703134750.7516-1-s.martin49@gmail.com>

From: Benjamin Kamath <kamath.ben@gmail.com>

lapack is a fortran-based linear algebra math library.

Signed-off-by: Benjamin Kamath <bkamath@spaceflight.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>

---
changes v1->v2:
- integrate this patch in this series
- slightly tweak the commit log
- s/BR2_INSTALL_LIBFORTRAN/BR2_TOOLCHAIN_HAS_FORTRAN/

changes v2->v3:
- change the powerpc/uclibc dependency to allow build with musl (ThomasP)
- add comment when the toolchain does not have fortran support (ThomasP)
- fix license (ThomasP)
- fix case in config options (ThomasP)
---
 package/Config.in                              |  1 +
 package/lapack/0001-case-sensitive-paths.patch | 22 ++++++++++++++++++++++
 package/lapack/Config.in                       | 20 ++++++++++++++++++++
 package/lapack/lapack.hash                     |  2 ++
 package/lapack/lapack.mk                       | 25 +++++++++++++++++++++++++
 5 files changed, 70 insertions(+)
 create mode 100644 package/lapack/0001-case-sensitive-paths.patch
 create mode 100644 package/lapack/Config.in
 create mode 100644 package/lapack/lapack.hash
 create mode 100644 package/lapack/lapack.mk

diff --git a/package/Config.in b/package/Config.in
index 73bf32f..8305ffe 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1259,6 +1259,7 @@ menu "Other"
 	source "package/gmp/Config.in"
 	source "package/gsl/Config.in"
 	source "package/gtest/Config.in"
+	source "package/lapack/Config.in"
 	source "package/libargtable2/Config.in"
 	source "package/libatomic_ops/Config.in"
 	source "package/libbsd/Config.in"
diff --git a/package/lapack/0001-case-sensitive-paths.patch b/package/lapack/0001-case-sensitive-paths.patch
new file mode 100644
index 0000000..3722b88
--- /dev/null
+++ b/package/lapack/0001-case-sensitive-paths.patch
@@ -0,0 +1,22 @@
+Fix upper case issue in CMakeLists
+
+Fix the 3.6.0 release of lapack to work with case-sensitive file systems,
+reported as bug 145 in LAPACK's bug list. Corrected in SVN rev 1651.
+
+Signed-off-by: Benjamin Kamath <kamath.ben@gmail.com>
+
+diff -rupN lapack-3.6.0/CBLAS/CMakeLists.txt lapack-3.6.0-old/CBLAS/CMakeLists.txt
+--- lapack-3.6.0/CBLAS/CMakeLists.txt	2016-03-17 13:42:31.121248051 -0700
++++ lapack-3.6.0-old/CBLAS/CMakeLists.txt	2016-03-17 13:41:37.819316904 -0700
+@@ -65,9 +65,9 @@ if(ALL_TARGETS)
+   list(GET ALL_TARGETS 0 _cblas_config_build_guard_target)
+ endif()
+ 
+-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/cblas-config-version.cmake.in
++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/cblas-config-version.cmake.in
+   ${LAPACK_BINARY_DIR}/cblas-config-version.cmake @ONLY)
+-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/cblas-config-build.cmake.in
++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/cblas-config-build.cmake.in
+   ${LAPACK_BINARY_DIR}/cblas-config.cmake @ONLY)
+ 
+ 
diff --git a/package/lapack/Config.in b/package/lapack/Config.in
new file mode 100644
index 0000000..73b55c5
--- /dev/null
+++ b/package/lapack/Config.in
@@ -0,0 +1,20 @@
+comment "lapack/blas needs a toolchain w/ fortran"
+	depends on !(BR2_powerpc && BR2_TOOLCHAIN_USES_UCLIBC)
+	depends on !BR2_TOOLCHAIN_HAS_FORTRAN
+
+config BR2_PACKAGE_LAPACK
+	bool "lapack/blas"
+	depends on BR2_TOOLCHAIN_HAS_FORTRAN
+	# _fpu_control is used on PowerPC, but not available with uClibc
+	depends on !(BR2_powerpc && BR2_TOOLCHAIN_USES_UCLIBC)
+	help
+	  LAPACK and BLAS FORTRAN implementation.
+
+	  http://www.netlib.org/lapack/
+
+config BR2_PACKAGE_LAPACK_COMPLEX
+	bool "Complex/Complex16 support"
+	depends on BR2_PACKAGE_LAPACK
+	default y
+	help
+	  Builds support for COMPLEX and COMPLEX16 data types.
diff --git a/package/lapack/lapack.hash b/package/lapack/lapack.hash
new file mode 100644
index 0000000..99d25b5
--- /dev/null
+++ b/package/lapack/lapack.hash
@@ -0,0 +1,2 @@
+# Locally computed:
+sha256  a9a0082c918fe14e377bbd570057616768dca76cbdc713457d8199aaa233ffc3  lapack-3.6.0.tgz
diff --git a/package/lapack/lapack.mk b/package/lapack/lapack.mk
new file mode 100644
index 0000000..af6d627
--- /dev/null
+++ b/package/lapack/lapack.mk
@@ -0,0 +1,25 @@
+################################################################################
+#
+# lapack
+#
+################################################################################
+
+# This package provides 2 libraries:
+# - libblas
+# - liblapack
+
+LAPACK_VERSION = 3.6.0
+LAPACK_SOURCE = lapack-$(LAPACK_VERSION).tgz
+LAPACK_LICENSE = BSD-3c
+LAPACK_LICENSE_FILES = LICENSE
+LAPACK_SITE = http://www.netlib.org/lapack
+LAPACK_INSTALL_STAGING = YES
+LAPACK_CONF_OPTS = -DLAPACKE=ON -DCBLAS=ON
+
+ifeq ($(BR2_PACKAGE_LAPACK_COMPLEX),y)
+LAPACK_CONF_OPTS += -DBUILD_COMPLEX=ON -DBUILD_COMPLEX16=ON
+else
+LAPACK_CONF_OPTS += -DBUILD_COMPLEX=OFF -DBUILD_COMPLEX16=OFF
+endif
+
+$(eval $(cmake-package))
-- 
2.9.0

  parent reply	other threads:[~2016-07-03 13:47 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-03 13:47 [Buildroot] [PATCH v3 00/14] Fortran support for all toolchains Samuel Martin
2016-07-03 13:47 ` [Buildroot] [PATCH v3 01/14] toolchain/toolchain-common.in: add BR2_TOOLCHAIN_HAS_LIBQUADMATH hidden symbol Samuel Martin
2016-07-04  9:16   ` Arnout Vandecappelle
2016-07-04 14:22     ` Thomas Petazzoni
2016-07-03 13:47 ` [Buildroot] [PATCH v3 02/14] package/gcc: complete the logic on libquadmath Samuel Martin
2016-07-03 13:47 ` [Buildroot] [PATCH v3 03/14] package/gcc: fix fortran support Samuel Martin
2016-07-03 13:47 ` [Buildroot] [PATCH v3 04/14] toolchain: add hidden symbol for fortran support in the toolchain Samuel Martin
2016-07-03 13:47 ` [Buildroot] [PATCH v3 05/14] docs/manual: document dependency on fortran Samuel Martin
2016-07-03 13:47 ` [Buildroot] [PATCH v3 06/14] package/gcc: select BR2_TOOLCHAIN_HAS_FORTRAN when appropriate Samuel Martin
2016-07-03 13:47 ` [Buildroot] [PATCH v3 07/14] pkg-cmake.mk: export the fortran compiler path in the CMake toolchain file Samuel Martin
2016-07-03 13:47 ` [Buildroot] [PATCH v3 08/14] toolchain/helpers: add fortran check Samuel Martin
2016-07-03 13:47 ` [Buildroot] [PATCH v3 09/14] toolchain/toolchain-external: enable fortran check when it is selected Samuel Martin
2016-07-03 13:47 ` [Buildroot] [PATCH v3 10/14] toolchain/toolchain-external: add libgfortran and libquadmath to the TOOLCHAIN_EXTERNAL_LIBS list Samuel Martin
2016-07-03 13:47 ` [Buildroot] [PATCH v3 11/14] toolchain/toolchain-external: add knob for fortran support Samuel Martin
2016-07-03 13:47 ` [Buildroot] [PATCH v3 12/14] toolchain/toolchain-external: update external toolchain configuration with BR2_TOOLCHAIN_HAS_FORTRAN Samuel Martin
2016-07-03 13:47 ` [Buildroot] [PATCH v3 13/14] package/fftw: add fortran support Samuel Martin
2016-07-03 13:47 ` Samuel Martin [this message]
2016-07-03 15:02 ` [Buildroot] [PATCH v3 00/14] Fortran support for all toolchains Thomas Petazzoni
2016-07-04 22:56   ` Samuel Martin
2016-07-05  6:33     ` Thomas Petazzoni
2016-07-05  6:48       ` Samuel Martin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160703134750.7516-15-s.martin49@gmail.com \
    --to=s.martin49@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.