From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-849436-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id E3F581384B4 for <garchives@archives.gentoo.org>; Mon, 30 Nov 2015 18:33:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5D537E089B; Mon, 30 Nov 2015 18:33:43 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B4092E089B for <gentoo-commits@lists.gentoo.org>; Mon, 30 Nov 2015 18:33:42 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7EC57340836 for <gentoo-commits@lists.gentoo.org>; Mon, 30 Nov 2015 18:33:41 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BE3A0ABD for <gentoo-commits@lists.gentoo.org>; Mon, 30 Nov 2015 18:33:37 +0000 (UTC) From: "Justin Lecher" <jlec@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Justin Lecher" <jlec@gentoo.org> Message-ID: <1448889646.6d88f2276ab3a1c256b3fb98482c6381f4ee030d.jlec@gentoo> Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/lapack-reference/ X-VCS-Repository: proj/sci X-VCS-Files: sci-libs/lapack-reference/lapack-reference-3.6.0.ebuild X-VCS-Directories: sci-libs/lapack-reference/ X-VCS-Committer: jlec X-VCS-Committer-Name: Justin Lecher X-VCS-Revision: 6d88f2276ab3a1c256b3fb98482c6381f4ee030d X-VCS-Branch: master Date: Mon, 30 Nov 2015 18:33:37 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 38848866-da48-474a-a367-15286cacf4f3 X-Archives-Hash: 28cfbc044751a98884fb4b5d504d2164 commit: 6d88f2276ab3a1c256b3fb98482c6381f4ee030d Author: Justin Lecher <jlec <AT> gentoo <DOT> org> AuthorDate: Mon Nov 30 13:20:46 2015 +0000 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> CommitDate: Mon Nov 30 13:20:46 2015 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=6d88f227 sci-libs/lapack-reference: Version Bump Package-Manager: portage-2.2.25 Signed-off-by: Justin Lecher <jlec <AT> gentoo.org> .../lapack-reference/lapack-reference-3.6.0.ebuild | 119 +++++++++++++++++++++ 1 file changed, 119 insertions(+) diff --git a/sci-libs/lapack-reference/lapack-reference-3.6.0.ebuild b/sci-libs/lapack-reference/lapack-reference-3.6.0.ebuild new file mode 100644 index 0000000..5e3cb88 --- /dev/null +++ b/sci-libs/lapack-reference/lapack-reference-3.6.0.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +NUMERIC_MODULE_NAME="reflapack" + +inherit alternatives-2 cmake-utils fortran-2 numeric-int64-multibuild python-any-r1 + +MY_PN=lapack +MYP=${MY_PN}-${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" + +REQUIRED_USE="test? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND=" + >=virtual/blas-2.1-r3[int64?,${MULTILIB_USEDEP}] + xblas? ( sci-libs/xblas[fortran,int64?] )" +DEPEND="${RDEPEND} + virtual/pkgconfig + test? ( ${PYTHON_DEPS} )" + +S="${WORKDIR}/${MYP}" + +src_prepare() { + numeric-int64_ensure_blas_int_support + + # rename library to avoid collision with other lapack implementations + # ${PROFNAME}, ${LIBNAME} and ${BLAS_REQUIRES} are not defined here, they + # are in single quotes in the following seds. They are set later by + # defining a cmake variables with -DPROFNAME etc in src_configure. + sed \ + -e 's:BINARY_DIR}/lapack.pc:BINARY_DIR}/${PROFNAME}.pc:' \ + -e '/ALL_TARGETS/s:lapack):${LIBNAME}):' \ + -e '/LAPACK_LIBRARIES/s:lapack:${LIBNAME}:g' \ + -i CMakeLists.txt || die + sed -i \ + -e 's:(lapack:(${LIBNAME}:g' \ + -e '/PROPERTIES/s:lapack:${LIBNAME}:g' \ + SRC/CMakeLists.txt || die + sed -i \ + -e '/Name: /s:lapack:${PROFNAME}:' \ + -e 's:-llapack:-l${LIBNAME}:g' \ + -e '/Requires: /s:blas:${BLAS_REQUIRES}\nFflags=${LAPACK_PKGCONFIG_FFLAGS}:' \ + lapack.pc.in || die + # some string does not get passed properly + sed -i \ + -e '/lapack_testing.py/d' \ + CTestCustom.cmake.in || die + # separate ebuild to tmglib + sed -i \ + -e '/lapack_install_library(tmglib)/d' \ + TESTING/MATGEN/CMakeLists.txt || die +} + +src_configure() { + lapack_configure() { + local profname=$(numeric-int64_get_module_name) + local libname="${profname//-/_}" + local blas_profname=$(numeric-int64_get_blas_alternative) + local xblas_profname=$(numeric-int64_get_xblas_alternative) + local xblas_libname="${xblas_profname//-/_}" + local blas_requires="${blas_profname}" + use xblas && \ + blas_requires+=" ${xblas_profname}" + local mycmakeargs=( + -DPROFNAME="${profname}" + -DBLAS_REQUIRES="${blas_requires}" + -DLIBNAME="${libname}" + -DUSE_OPTIMIZED_BLAS=ON + -DBLAS_LIBRARIES="$($(tc-getPKG_CONFIG) --libs ${blas_profname})" + $(cmake-utils_use_build test TESTING) + $(cmake-utils_use_use xblas XBLAS) + -DCMAKE_C_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) ${CFLAGS}" + -DCMAKE_CXX_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) ${CXXFLAGS}" + -DCMAKE_Fortran_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) $(get_abi_CFLAGS) $(numeric-int64_get_fortran_int64_abi_fflags) ${FCFLAGS}" + -DLAPACK_PKGCONFIG_FFLAGS="$(numeric-int64_get_fortran_int64_abi_fflags)" + ) + use xblas && \ + mycmakeargs+=( -DXBLAS_LIBRARY:FILEPATH="${EROOT}usr/$(get_libdir)/lib${xblas_libname}.so" ) + if $(numeric-int64_is_static_build); then + mycmakeargs+=( + -DBUILD_SHARED_LIBS=OFF + -DBUILD_STATIC_LIBS=ON + ) + else + mycmakeargs+=( + -DBUILD_SHARED_LIBS=ON + -DBUILD_STATIC_LIBS=OFF + ) + fi + cmake-utils_src_configure + } + numeric-int64-multibuild_foreach_all_abi_variants lapack_configure +} + +src_compile() { + numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_compile +} + +src_test() { + numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_test +} + +src_install() { + numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_install + numeric-int64-multibuild_install_alternative lapack reference +}