diff options
Diffstat (limited to 'sci-libs')
-rw-r--r-- | sci-libs/clapack/ChangeLog | 8 | ||||
-rw-r--r-- | sci-libs/clapack/clapack-3.2.1-r7.ebuild | 37 | ||||
-rw-r--r-- | sci-libs/clapack/files/clapack-3.2.1-findblas-r7.patch | 84 | ||||
-rw-r--r-- | sci-libs/clapack/metadata.xml | 5 |
4 files changed, 131 insertions, 3 deletions
diff --git a/sci-libs/clapack/ChangeLog b/sci-libs/clapack/ChangeLog index 867d565507b5..16a0525d742f 100644 --- a/sci-libs/clapack/ChangeLog +++ b/sci-libs/clapack/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sci-libs/clapack # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/clapack/ChangeLog,v 1.21 2012/08/03 17:19:41 bicatali Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/clapack/ChangeLog,v 1.22 2012/12/12 16:26:56 jlec Exp $ + +*clapack-3.2.1-r7 (12 Dec 2012) + + 12 Dec 2012; Justin Lecher <jlec@gentoo.org> +clapack-3.2.1-r7.ebuild, + +files/clapack-3.2.1-findblas-r7.patch, metadata.xml: + Add libdir path to linker flags, #446930; don't build testsuite with fPIC 03 Aug 2012; Sébastien Fabbro <bicatali@gentoo.org> clapack-3.2.1-r6.ebuild: keyword x86-linux diff --git a/sci-libs/clapack/clapack-3.2.1-r7.ebuild b/sci-libs/clapack/clapack-3.2.1-r7.ebuild new file mode 100644 index 000000000000..0e161d744f52 --- /dev/null +++ b/sci-libs/clapack/clapack-3.2.1-r7.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/clapack/clapack-3.2.1-r7.ebuild,v 1.1 2012/12/12 16:26:56 jlec Exp $ + +EAPI=4 + +inherit flag-o-matic base cmake-utils + +DESCRIPTION="f2c'ed version of LAPACK" +HOMEPAGE="http://www.netlib.org/clapack/" +SRC_URI="http://www.netlib.org/${PN}/${P}-CMAKE.tgz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux" +IUSE="test" + +RDEPEND=">=dev-libs/libf2c-20090407-r1 + virtual/blas" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/${P}-CMAKE + +PATCHES=( + "${FILESDIR}/${P}-fix_include_file.patch" + "${FILESDIR}/${P}-noblasf2c.patch" + "${FILESDIR}/${P}-hang.patch" + "${FILESDIR}/${P}-findblas-r7.patch" +) + +src_configure() { + filter-flags -ftree-vectorize + # causes an internal compiler error with gcc-4.6.2 + + local mycmakeargs=( $(cmake-utils_use_enable test TESTS) ) + cmake-utils_src_configure +} diff --git a/sci-libs/clapack/files/clapack-3.2.1-findblas-r7.patch b/sci-libs/clapack/files/clapack-3.2.1-findblas-r7.patch new file mode 100644 index 000000000000..c82cd50a2c5b --- /dev/null +++ b/sci-libs/clapack/files/clapack-3.2.1-findblas-r7.patch @@ -0,0 +1,84 @@ + CMakeLists.txt | 29 +++++++++++++++++++++++++++-- + SRC/CMakeLists.txt | 7 ++++++- + TESTING/CMakeLists.txt | 5 +++++ + 3 files changed, 38 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 37fb433..fe29d4c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -28,7 +28,33 @@ set(CPACK_PACKAGE_VERSION_MAJOR 3) + set(CPACK_PACKAGE_VERSION_MINOR 2) + set(CPACK_PACKAGE_VERSION_PATCH 1) + +-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") ++if(BLAS_LIBRARIES) ++ include(CheckFortranFunctionExists) ++ set(CMAKE_REQUIRED_LIBRARIES ${BLAS_LIBRARIES}) ++ CHECK_FORTRAN_FUNCTION_EXISTS("dgemm" BLAS_FOUND) ++ unset( CMAKE_REQUIRED_LIBRARIES ) ++ if(BLAS_FOUND) ++ message(STATUS "--> BLAS supplied by user is WORKING, will use ${BLAS_LIBRARIES}.") ++ else(BLAS_FOUND) ++ message(ERROR "--> BLAS supplied by user is not WORKING, CANNOT USE ${BLAS_LIBRARIES}.") ++ message(ERROR "--> Will use REFERENCE BLAS (by default)") ++ message(ERROR "--> Or Correct your BLAS_LIBRARIES entry ") ++ message(ERROR "--> Or Consider checking USE_OPTIMIZED_BLAS") ++ endif(BLAS_FOUND) ++else(BLAS_LIBRARIES) ++ # User did not provide a BLAS Library ++ find_package(PkgConfig) ++ pkg_check_modules(BLAS blas) ++endif (BLAS_LIBRARIES) ++ ++if(NOT BLAS_FOUND) ++ message(FATAL_ERROR "--> BLAS libraries needed but not found.") ++endif(NOT BLAS_FOUND) ++ ++if(BLAS_LIBRARY_DIRS) ++# SET_TARGET_PROPERTIES(clapack PROPERTIES LINK_FLAGS ${LINK_FLAGS} -L"${BLAS_LIBRARY_DIRS}") ++ SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L\"${BLAS_LIBRARY_DIRS}\"") ++endif() + + add_subdirectory(SRC) + +@@ -44,4 +70,3 @@ configure_file(${CLAPACK_SOURCE_DIR}/clapack-config-version.cmake.in + ${CLAPACK_BINARY_DIR}/clapack-config-version.cmake @ONLY) + configure_file(${CLAPACK_SOURCE_DIR}/clapack-config.cmake.in + ${CLAPACK_BINARY_DIR}/clapack-config.cmake @ONLY) +- +diff --git a/SRC/CMakeLists.txt b/SRC/CMakeLists.txt +index 7b75ee9..39380ed 100644 +--- a/SRC/CMakeLists.txt ++++ b/SRC/CMakeLists.txt +@@ -376,8 +376,13 @@ if(BUILD_COMPLEX16) + set(ALLOBJ ${ZLASRC} ${ALLAUX} ${DZLAUX}) + endif() + ++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") ++ + add_library(clapack SHARED ${ALLOBJ} ${ALLXOBJ}) +-target_link_libraries(clapack blas f2c m) ++target_link_libraries(clapack ${BLAS_LIBRARIES} f2c m) ++if(BLAS_LIBRARY_DIRS) ++ SET_TARGET_PROPERTIES(clapack PROPERTIES LINK_FLAGS ${LINK_FLAGS} -L"${BLAS_LIBRARY_DIRS}") ++endif() + set_target_properties(clapack PROPERTIES SOVERSION "${CLAPACK_VERSION}") + + install( +diff --git a/TESTING/CMakeLists.txt b/TESTING/CMakeLists.txt +index d59359d..174672e 100644 +--- a/TESTING/CMakeLists.txt ++++ b/TESTING/CMakeLists.txt +@@ -4,6 +4,11 @@ if(MSVC_VERSION) + string(REGEX REPLACE "(.*)/STACK:(.*) (.*)" "\\1/STACK:900000000000000000 \\3" + CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}") + endif() ++if(BLAS_LIBRARY_DIRS) ++# SET_TARGET_PROPERTIES(clapack PROPERTIES LINK_FLAGS ${LINK_FLAGS} -L"${BLAS_LIBRARY_DIRS}") ++ SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -L\"${BLAS_LIBRARY_DIRS}\"") ++endif() ++ + add_subdirectory(MATGEN) + add_subdirectory(LIN) + add_subdirectory(EIG) diff --git a/sci-libs/clapack/metadata.xml b/sci-libs/clapack/metadata.xml index 054845427e54..fe3f51cd1a6d 100644 --- a/sci-libs/clapack/metadata.xml +++ b/sci-libs/clapack/metadata.xml @@ -1,7 +1,8 @@ +<?xml version="1.0"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<herd>sci</herd> -<longdescription lang="en"> + <herd>sci</herd> + <longdescription lang="en"> LAPACK is a comprehensive library that does linear algebra operations including matrix inversions, least squared solutions to linear sets of equations, eigenvector analysis, singular value |