summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2010-08-29 17:22:24 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2010-08-29 17:22:24 +0000
commitf99cc59ea5f0c4af03c342f175ee42f21a92ea63 (patch)
treec20c8557784be4cb803099d11f715a79f9ac85d4 /sci-libs
parentarm stable (diff)
downloadgentoo-2-f99cc59ea5f0c4af03c342f175ee42f21a92ea63.tar.gz
gentoo-2-f99cc59ea5f0c4af03c342f175ee42f21a92ea63.tar.bz2
gentoo-2-f99cc59ea5f0c4af03c342f175ee42f21a92ea63.zip
Now uses cmake tar ball. Added a patch from dilfridge that adds a shared library, an install target, builds test on request, and provides a clapack-config.cmake. So far, no more static libraries is being built.
(Portage version: 2.2_rc68/cvs/Linux x86_64)
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/clapack/ChangeLog11
-rw-r--r--sci-libs/clapack/clapack-3.2.1-r3.ebuild34
-rw-r--r--sci-libs/clapack/files/clapack-3.2.1-noblasf2c.patch189
-rw-r--r--sci-libs/clapack/metadata.xml13
4 files changed, 242 insertions, 5 deletions
diff --git a/sci-libs/clapack/ChangeLog b/sci-libs/clapack/ChangeLog
index e96cd01ec059..39f4a39d7d7d 100644
--- a/sci-libs/clapack/ChangeLog
+++ b/sci-libs/clapack/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for sci-libs/clapack
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/clapack/ChangeLog,v 1.5 2010/04/25 11:32:11 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/clapack/ChangeLog,v 1.6 2010/08/29 17:22:24 bicatali Exp $
+
+*clapack-3.2.1-r3 (29 Aug 2010)
+
+ 29 Aug 2010; Sébastien Fabbro <bicatali@gentoo.org>
+ +clapack-3.2.1-r3.ebuild, +files/clapack-3.2.1-noblasf2c.patch,
+ metadata.xml:
+ Now uses cmake tar ball. Added a patch from dilfridge that adds a shared
+ library, an install target, builds test on request, and provides a
+ clapack-config.cmake. So far, no more static libraries is being built.
*clapack-3.2.1-r2 (25 Apr 2010)
diff --git a/sci-libs/clapack/clapack-3.2.1-r3.ebuild b/sci-libs/clapack/clapack-3.2.1-r3.ebuild
new file mode 100644
index 000000000000..43cbe0c946e3
--- /dev/null
+++ b/sci-libs/clapack/clapack-3.2.1-r3.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2010 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-r3.ebuild,v 1.1 2010/08/29 17:22:24 bicatali Exp $
+
+EAPI="3"
+
+inherit eutils 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 ~x86"
+IUSE=""
+
+RDEPEND=">=dev-libs/libf2c-20081126"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${P}-CMAKE"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-noblasf2c.patch
+ rm -rf INCLUDE/f2c.h F2CLIBS
+}
+
+src_configure() {
+ mycmakeargs=( \
+ $(cmake-utils_use_enable static-libs STATIC)
+ $(cmake-utils_use_enable test TESTS)
+ )
+ cmake-utils_src_configure
+}
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..53e358991f7a
--- /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)
++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
index efb490d78817..054845427e54 100644
--- a/sci-libs/clapack/metadata.xml
+++ b/sci-libs/clapack/metadata.xml
@@ -1,8 +1,13 @@
-<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>sci</herd>
-<maintainer>
- <email>sci@gentoo.org</email>
-</maintainer>
+<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>