summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sci-libs/clapack
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sci-libs/clapack')
-rw-r--r--sci-libs/clapack/Manifest1
-rw-r--r--sci-libs/clapack/clapack-3.2.1-r6.ebuild38
-rw-r--r--sci-libs/clapack/clapack-3.2.1-r7.ebuild38
-rw-r--r--sci-libs/clapack/clapack-3.2.1-r8.ebuild43
-rw-r--r--sci-libs/clapack/files/clapack-3.2.1-findblas-r6.patch50
-rw-r--r--sci-libs/clapack/files/clapack-3.2.1-findblas-r7.patch84
-rw-r--r--sci-libs/clapack/files/clapack-3.2.1-findblas.patch49
-rw-r--r--sci-libs/clapack/files/clapack-3.2.1-fix_include_file.patch25
-rw-r--r--sci-libs/clapack/files/clapack-3.2.1-hang.patch13
-rw-r--r--sci-libs/clapack/files/clapack-3.2.1-noblasf2c.patch189
-rw-r--r--sci-libs/clapack/metadata.xml14
11 files changed, 544 insertions, 0 deletions
diff --git a/sci-libs/clapack/Manifest b/sci-libs/clapack/Manifest
new file mode 100644
index 000000000000..524785805e71
--- /dev/null
+++ b/sci-libs/clapack/Manifest
@@ -0,0 +1 @@
+DIST clapack-3.2.1-CMAKE.tgz 6017667 SHA256 0b3f782bc24845d85f36bafbff0f2f1384dc72df730fda4e7924ec1a70baca5a SHA512 cf19c710291ddff3f6ead7d86bdfdeaebca21291d9df094bf0a8ef599546b007757fb2dbb19b56511bb53ef7456eac0c73973b9627bf4d02982c856124428b49 WHIRLPOOL 9b2e5ba8a2503542c480565e4c34510b9fd501677c30e34b19ede18092ae40b282e4261f1939b5681c82f82d448d4afa24123ce8fb15120c7446e91ea51a698e
diff --git a/sci-libs/clapack/clapack-3.2.1-r6.ebuild b/sci-libs/clapack/clapack-3.2.1-r6.ebuild
new file mode 100644
index 000000000000..b888bddf79ad
--- /dev/null
+++ b/sci-libs/clapack/clapack-3.2.1-r6.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit flag-o-matic 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-r6.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/clapack-3.2.1-r7.ebuild b/sci-libs/clapack/clapack-3.2.1-r7.ebuild
new file mode 100644
index 000000000000..e24e9fb15b1e
--- /dev/null
+++ b/sci-libs/clapack/clapack-3.2.1-r7.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit flag-o-matic 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/clapack-3.2.1-r8.ebuild b/sci-libs/clapack/clapack-3.2.1-r8.ebuild
new file mode 100644
index 000000000000..93558a4ba4c5
--- /dev/null
+++ b/sci-libs/clapack/clapack-3.2.1-r8.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit flag-o-matic 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_prepare() {
+ rm INCLUDE/f2c.h F2CLIBS/libf2c/f2c.h || die
+ cmake-utils_src_prepare
+}
+
+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-r6.patch b/sci-libs/clapack/files/clapack-3.2.1-findblas-r6.patch
new file mode 100644
index 000000000000..028dec609dd8
--- /dev/null
+++ b/sci-libs/clapack/files/clapack-3.2.1-findblas-r6.patch
@@ -0,0 +1,50 @@
+diff -ruN clapack-3.2.1-CMAKE.1.allexfb/CMakeLists.txt clapack-3.2.1-CMAKE/CMakeLists.txt
+--- clapack-3.2.1-CMAKE.1.allexfb/CMakeLists.txt 2011-06-19 22:13:27.000000000 +0200
++++ clapack-3.2.1-CMAKE/CMakeLists.txt 2011-06-19 22:23:14.000000000 +0200
+@@ -30,6 +30,29 @@
+
+ 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)
++
+ add_subdirectory(SRC)
+
+ if(ENABLE_TESTS)
+@@ -44,4 +67,3 @@
+ ${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 -ruN clapack-3.2.1-CMAKE.1.allexfb/SRC/CMakeLists.txt clapack-3.2.1-CMAKE/SRC/CMakeLists.txt
+--- clapack-3.2.1-CMAKE.1.allexfb/SRC/CMakeLists.txt 2011-06-19 22:13:44.000000000 +0200
++++ clapack-3.2.1-CMAKE/SRC/CMakeLists.txt 2011-06-19 22:15:04.000000000 +0200
+@@ -380,7 +380,7 @@
+ endif()
+
+ add_library(clapack SHARED ${ALLOBJ} ${ALLXOBJ})
+-target_link_libraries(clapack blas f2c m)
++target_link_libraries(clapack ${BLAS_LIBRARIES} f2c m)
+ set_target_properties(clapack PROPERTIES SOVERSION "${CLAPACK_VERSION}")
+
+ install(
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/files/clapack-3.2.1-findblas.patch b/sci-libs/clapack/files/clapack-3.2.1-findblas.patch
new file mode 100644
index 000000000000..e2744f8de567
--- /dev/null
+++ b/sci-libs/clapack/files/clapack-3.2.1-findblas.patch
@@ -0,0 +1,49 @@
+diff -ruN clapack-3.2.1-CMAKE.orig/CMakeLists.txt clapack-3.2.1-CMAKE/CMakeLists.txt
+--- clapack-3.2.1-CMAKE.orig/CMakeLists.txt 2011-06-17 23:01:05.275747599 +0200
++++ clapack-3.2.1-CMAKE/CMakeLists.txt 2011-06-17 23:07:49.128747755 +0200
+@@ -30,6 +30,28 @@
+
+ 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( BLAS )
++endif (BLAS_LIBRARIES)
++
++if(NOT BLAS_FOUND)
++ message(FATAL_ERROR "--> BLAS libraries needed but not found.")
++endif(NOT BLAS_FOUND)
++
+ add_subdirectory(SRC)
+
+ if(ENABLE_TESTS)
+@@ -44,4 +66,3 @@
+ ${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 -ruN clapack-3.2.1-CMAKE.orig/SRC/CMakeLists.txt clapack-3.2.1-CMAKE/SRC/CMakeLists.txt
+--- clapack-3.2.1-CMAKE.orig/SRC/CMakeLists.txt 2011-06-17 23:01:05.276747599 +0200
++++ clapack-3.2.1-CMAKE/SRC/CMakeLists.txt 2011-06-17 23:08:43.761747789 +0200
+@@ -377,7 +377,7 @@
+ endif()
+
+ add_library(clapack SHARED ${ALLOBJ} ${ALLXOBJ})
+-target_link_libraries(clapack blas f2c m)
++target_link_libraries(clapack ${BLAS_LIBRARIES} f2c m)
+ set_target_properties(clapack PROPERTIES SOVERSION "${CLAPACK_VERSION}")
+
+ install(
diff --git a/sci-libs/clapack/files/clapack-3.2.1-fix_include_file.patch b/sci-libs/clapack/files/clapack-3.2.1-fix_include_file.patch
new file mode 100644
index 000000000000..002336f2d124
--- /dev/null
+++ b/sci-libs/clapack/files/clapack-3.2.1-fix_include_file.patch
@@ -0,0 +1,25 @@
+diff -urN clapack-3.2.1-CMAKE.old/INCLUDE/clapack.h clapack-3.2.1-CMAKE/INCLUDE/clapack.h
+--- clapack-3.2.1-CMAKE.old/INCLUDE/clapack.h 2011-04-30 11:39:51.000000000 +0200
++++ clapack-3.2.1-CMAKE/INCLUDE/clapack.h 2011-04-30 11:40:39.000000000 +0200
+@@ -3,6 +3,12 @@
+ #ifndef __CLAPACK_H
+ #define __CLAPACK_H
+
++#include <f2c.h>
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
+ /* Subroutine */ int caxpy_(integer *n, complex *ca, complex *cx, integer *
+ incx, complex *cy, integer *incy);
+
+@@ -7250,5 +7256,8 @@
+ integer ilaenv_(integer *ispec, char *name__, char *opts, integer *n1,
+ integer *n2, integer *n3, integer *n4);
+
++#ifdef __cplusplus
++}
++#endif
+
+ #endif /* __CLAPACK_H */
diff --git a/sci-libs/clapack/files/clapack-3.2.1-hang.patch b/sci-libs/clapack/files/clapack-3.2.1-hang.patch
new file mode 100644
index 000000000000..f9ec2e0ec18c
--- /dev/null
+++ b/sci-libs/clapack/files/clapack-3.2.1-hang.patch
@@ -0,0 +1,13 @@
+diff -ruN clapack-3.2.1-CMAKE.orig/SRC/CMakeLists.txt clapack-3.2.1-CMAKE/SRC/CMakeLists.txt
+--- clapack-3.2.1-CMAKE.orig/SRC/CMakeLists.txt 2011-06-21 00:29:16.275749375 +0200
++++ clapack-3.2.1-CMAKE/SRC/CMakeLists.txt 2011-06-21 00:31:06.133749448 +0200
+@@ -355,6 +355,9 @@
+ zla_heamv.c zla_hercond_c.c zla_hercond_x.c zla_herpvgrw.c
+ zla_lin_berr.c zlarscl2.c zlascl2.c zla_wwaddw.c)
+
++if(CMAKE_COMPILER_IS_GNUCC)
++ set_source_files_properties(../INSTALL/dlamch.c ../INSTALL/slamch.c PROPERTIES COMPILE_FLAGS "-ffloat-store -O0")
++endif()
+
+ if( USEXBLAS)
+ set(ALLXOBJ ${SXLASRC} ${DXLASRC} ${CXLASRC} ${ZXLASRC} ${ALLXAUX})
diff --git a/sci-libs/clapack/files/clapack-3.2.1-noblasf2c.patch b/sci-libs/clapack/files/clapack-3.2.1-noblasf2c.patch
new file mode 100644
index 000000000000..5ae9e63977c6
--- /dev/null
+++ b/sci-libs/clapack/files/clapack-3.2.1-noblasf2c.patch
@@ -0,0 +1,189 @@
+diff -u -r -N clapack-3.2.1-CMAKE.orig/CMakeLists.txt clapack-3.2.1-CMAKE/CMakeLists.txt
+--- clapack-3.2.1-CMAKE.orig/CMakeLists.txt 2009-08-10 20:46:33.000000000 +0200
++++ clapack-3.2.1-CMAKE/CMakeLists.txt 2010-08-28 14:04:30.000000000 +0200
+@@ -1,7 +1,10 @@
+ cmake_minimum_required(VERSION 2.6)
+ project(CLAPACK C)
+-enable_testing()
+-include(CTest)
++
++if(ENABLE_TESTS)
++ enable_testing()
++ include(CTest)
++endif(ENABLE_TESTS)
+
+ if(WIN32 AND NOT CYGWIN)
+ set(SECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/winsecond.c)
+@@ -11,24 +14,34 @@
+ set(SECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/second.c)
+ set(DSECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/dsecnd.c)
+ endif()
+-enable_testing()
++
+ option(USE_BLAS_WRAP "pre-pend f2c_ to each function in blas" OFF)
+ if(NOT USE_BLAS_WRAP)
+ # _zrotg_ seems to be missing in the wrap header
+ add_definitions(-DNO_BLAS_WRAP)
+ endif()
++
+ include_directories(${CLAPACK_SOURCE_DIR}/INCLUDE)
+-add_subdirectory(F2CLIBS)
+-add_subdirectory(BLAS)
+-add_subdirectory(SRC)
+-add_subdirectory(TESTING)
++
+ set(CLAPACK_VERSION 3.2.1)
+ 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")
++
++add_subdirectory(SRC)
++
++if(ENABLE_TESTS)
++ add_subdirectory(TESTING)
++endif(ENABLE_TESTS)
++
+ include(CPack)
+-export(TARGETS f2c blas lapack FILE clapack-targets.cmake)
++
++export(TARGETS clapack FILE clapack-targets.cmake)
++
+ 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 -u -r -N clapack-3.2.1-CMAKE.orig/SRC/CMakeLists.txt clapack-3.2.1-CMAKE/SRC/CMakeLists.txt
+--- clapack-3.2.1-CMAKE.orig/SRC/CMakeLists.txt 2009-08-10 19:47:54.000000000 +0200
++++ clapack-3.2.1-CMAKE/SRC/CMakeLists.txt 2010-08-28 14:32:17.000000000 +0200
+@@ -375,6 +375,20 @@
+ if(BUILD_COMPLEX16)
+ set(ALLOBJ ${ZLASRC} ${ALLAUX} ${DZLAUX})
+ endif()
+-add_library(lapack ${ALLOBJ} ${ALLXOBJ})
+-target_link_libraries(lapack blas)
+
++add_library(clapack SHARED ${ALLOBJ} ${ALLXOBJ})
++target_link_libraries(clapack blas f2c m)
++set_target_properties(clapack PROPERTIES SOVERSION "${CLAPACK_VERSION}")
++
++install(
++ TARGETS clapack EXPORT clapack
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++)
++
++install(
++ FILES ../INCLUDE/clapack.h DESTINATION include/clapack
++)
++
++install(
++ EXPORT clapack DESTINATION "share/cmake/Modules" FILE clapack-config.cmake
++)
+diff -u -r -N clapack-3.2.1-CMAKE.orig/TESTING/EIG/CMakeLists.txt clapack-3.2.1-CMAKE/TESTING/EIG/CMakeLists.txt
+--- clapack-3.2.1-CMAKE.orig/TESTING/EIG/CMakeLists.txt 2009-08-10 19:47:54.000000000 +0200
++++ clapack-3.2.1-CMAKE/TESTING/EIG/CMakeLists.txt 2010-08-28 13:46:40.000000000 +0200
+@@ -119,7 +119,7 @@
+
+ macro(add_eig_executable name )
+ add_executable(${name} ${ARGN})
+- target_link_libraries(${name} tmglib lapack )
++ target_link_libraries(${name} tmglib clapack )
+ endmacro(add_eig_executable)
+
+ add_eig_executable(xeigtsts ${SEIGTST} ${SCIGTST} ${AEIGTST}
+diff -u -r -N clapack-3.2.1-CMAKE.orig/TESTING/LIN/CMakeLists.txt clapack-3.2.1-CMAKE/TESTING/LIN/CMakeLists.txt
+--- clapack-3.2.1-CMAKE.orig/TESTING/LIN/CMakeLists.txt 2009-08-10 20:06:06.000000000 +0200
++++ clapack-3.2.1-CMAKE/TESTING/LIN/CMakeLists.txt 2010-08-28 13:46:40.000000000 +0200
+@@ -189,7 +189,7 @@
+
+ macro(add_lin_executable name )
+ add_executable(${name} ${ARGN})
+- target_link_libraries(${name} tmglib lapack)
++ target_link_libraries(${name} tmglib clapack)
+ endmacro(add_lin_executable)
+
+ add_lin_executable(xlintsts ${ALINTST} ${SCLNTST} ${SLINTST}
+diff -u -r -N clapack-3.2.1-CMAKE.orig/TESTING/MATGEN/CMakeLists.txt clapack-3.2.1-CMAKE/TESTING/MATGEN/CMakeLists.txt
+--- clapack-3.2.1-CMAKE.orig/TESTING/MATGEN/CMakeLists.txt 2009-08-10 19:47:54.000000000 +0200
++++ clapack-3.2.1-CMAKE/TESTING/MATGEN/CMakeLists.txt 2010-08-28 13:46:40.000000000 +0200
+@@ -65,5 +65,6 @@
+ if(BUILD_COMPLEX16)
+ set(ALLOBJ $(ZMATGEN) $(DZATGEN))
+ endif()
+-add_library(tmglib ${ALLOBJ} )
++
++add_library(tmglib ${ALLOBJ} i_len_trim.c i_ceiling.c )
+
+diff -u -r -N clapack-3.2.1-CMAKE.orig/TESTING/MATGEN/i_ceiling.c clapack-3.2.1-CMAKE/TESTING/MATGEN/i_ceiling.c
+--- clapack-3.2.1-CMAKE.orig/TESTING/MATGEN/i_ceiling.c 1970-01-01 01:00:00.000000000 +0100
++++ clapack-3.2.1-CMAKE/TESTING/MATGEN/i_ceiling.c 2010-08-28 13:46:40.000000000 +0200
+@@ -0,0 +1,38 @@
++/* file has been copied from the included f2c library - dilfridge */
++
++#include <f2c.h>
++
++#ifdef KR_headers
++integer i_sceiling(x) real *x;
++#else
++#ifdef __cplusplus
++extern "C" {
++#endif
++integer i_sceiling(real *x)
++#endif
++{
++#define CEIL(x) ((int)(x) + ((x) > 0 && (x) != (int)(x)))
++
++ return (integer) CEIL(*x);
++}
++#ifdef __cplusplus
++}
++#endif
++
++
++#ifdef KR_headers
++integer i_dceiling(x) doublereal *x;
++#else
++#ifdef __cplusplus
++extern "C" {
++#endif
++integer i_dceiling(doublereal *x)
++#endif
++{
++#define CEIL(x) ((int)(x) + ((x) > 0 && (x) != (int)(x)))
++
++ return (integer) CEIL(*x);
++}
++#ifdef __cplusplus
++}
++#endif
+diff -u -r -N clapack-3.2.1-CMAKE.orig/TESTING/MATGEN/i_len_trim.c clapack-3.2.1-CMAKE/TESTING/MATGEN/i_len_trim.c
+--- clapack-3.2.1-CMAKE.orig/TESTING/MATGEN/i_len_trim.c 1970-01-01 01:00:00.000000000 +0100
++++ clapack-3.2.1-CMAKE/TESTING/MATGEN/i_len_trim.c 2010-08-28 13:46:40.000000000 +0200
+@@ -0,0 +1,25 @@
++/* file has been copied from the included f2c library - dilfridge */
++
++#include <f2c.h>
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#ifdef KR_headers
++integer i_len_trim(s, n) char *s; ftnlen n;
++#else
++integer i_len_trim(char *s, ftnlen n)
++#endif
++{
++ int i;
++
++ for(i=n-1;i>=0;i--)
++ if(s[i] != ' ')
++ return i + 1;
++
++ return(0);
++}
++#ifdef __cplusplus
++}
++#endif
diff --git a/sci-libs/clapack/metadata.xml b/sci-libs/clapack/metadata.xml
new file mode 100644
index 000000000000..a256cf4867f0
--- /dev/null
+++ b/sci-libs/clapack/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <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
+ decomposition, etc. It is a very comprehensive and reputable package
+ that has found extensive use in the scientific community.
+ This package installs the reference C implementation from Netlib,
+ generated from f2c.
+</longdescription>
+</pkgmetadata>