aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorS├ębastien Fabbro <bicatali@gentoo.org>2012-10-26 17:34:10 +0100
committerS├ębastien Fabbro <bicatali@gentoo.org>2012-10-26 17:34:10 +0100
commit2d3eb84ba606d2d92e8ddd23d23579bd36db6ff6 (patch)
tree4b7a99669961c4e94e11bbe6d75f512920b42319 /sci-libs/lapack-reference/lapack-reference-3.4.2.ebuild
parentMerge blas to master (diff)
downloadsci-2d3eb84ba606d2d92e8ddd23d23579bd36db6ff6.tar.gz
sci-2d3eb84ba606d2d92e8ddd23d23579bd36db6ff6.tar.bz2
sci-2d3eb84ba606d2d92e8ddd23d23579bd36db6ff6.zip
sci-libs/lapack-reference: Version bump. Restore the reflapack library name instead of lapack
Package-Manager: portage-2.2.0_alpha141
Diffstat (limited to 'sci-libs/lapack-reference/lapack-reference-3.4.2.ebuild')
-rw-r--r--sci-libs/lapack-reference/lapack-reference-3.4.2.ebuild74
1 files changed, 74 insertions, 0 deletions
diff --git a/sci-libs/lapack-reference/lapack-reference-3.4.2.ebuild b/sci-libs/lapack-reference/lapack-reference-3.4.2.ebuild
new file mode 100644
index 000000000..0ce4f0084
--- /dev/null
+++ b/sci-libs/lapack-reference/lapack-reference-3.4.2.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+inherit eutils fortran-2 cmake-utils alternatives-2 toolchain-funcs
+
+MYP=lapack-${PV}
+
+DESCRIPTION="Reference implementation of LAPACK"
+HOMEPAGE="http://www.netlib.org/lapack/"
+SRC_URI="http://www.netlib.org/lapack/${MYP}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="static-libs test xblas"
+
+RDEPEND="virtual/blas
+ virtual/fortran
+ xblas? ( sci-libs/xblas )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/${MYP}"
+
+src_prepare() {
+ # avoid collision with other lapack
+ sed -i \
+ -e 's:BINARY_DIR}/lapack.pc:BINARY_DIR}/reflapack.pc:' \
+ -e '/export/s:lapack:reflapack:g' \
+ -e '/ALL_TARGETS/s:lapack):reflapack):' \
+ -e '/LAPACK_LIBRARIES/s:lapack:reflapack:g' \
+ CMakeLists.txt || die
+ sed -i \
+ -e 's:(lapack:(reflapack:g' \
+ SRC/CMakeLists.txt || die
+ sed -i \
+ -e 's:-llapack:-lreflapack:g' \
+ lapack.pc.in || die
+ use static-libs && mkdir "${WORKDIR}/${PN}_static"
+}
+
+src_configure() {
+ lapack_configure() {
+ local mycmakeargs=(
+ -DUSE_OPTIMIZED_BLAS=ON
+ -DBLAS_LIBRARIES="$($(tc-getPKG_CONFIG) --libs blas)"
+ $(cmake-utils_use_build test TESTING)
+ $(cmake-utils_use_use xblas XBLAS)
+ $@
+ )
+ cmake-utils_src_configure
+ }
+
+ lapack_configure -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF
+ use static-libs && \
+ CMAKE_BUILD_DIR="${WORKDIR}/${PN}_static" lapack_configure \
+ -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON
+}
+
+src_compile() {
+ cmake-utils_src_compile
+ use static-libs && \
+ CMAKE_BUILD_DIR="${WORKDIR}/${PN}_static" cmake-utils_src_compile
+}
+
+src_install() {
+ cmake-utils_src_install
+ use static-libs && \
+ CMAKE_BUILD_DIR="${WORKDIR}/${PN}_static" cmake-utils_src_install
+ alternatives_for lapack reference 0 \
+ "/usr/$(get_libdir)/pkgconfig/lapack.pc" "reflapack.pc"
+}