From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E7702139085 for ; Fri, 3 Feb 2017 10:25:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C457021C088; Fri, 3 Feb 2017 10:25:27 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 92EBD21C088 for ; Fri, 3 Feb 2017 10:25:27 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0864C34112A for ; Fri, 3 Feb 2017 10:25:26 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 72F173DC2 for ; Fri, 3 Feb 2017 10:25:24 +0000 (UTC) From: "Marius Brehler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Marius Brehler" Message-ID: <1486090496.4f5313ae510454f6cea2008d1319f192d6d9a4c9.marbre@gentoo> Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/cblas-reference/, sci-libs/cblas-reference/files/ X-VCS-Repository: proj/sci X-VCS-Files: sci-libs/cblas-reference/cblas-reference-20161223-r100.ebuild sci-libs/cblas-reference/files/lapack-reference-3.7.0-fix-build-system.patch X-VCS-Directories: sci-libs/cblas-reference/files/ sci-libs/cblas-reference/ X-VCS-Committer: marbre X-VCS-Committer-Name: Marius Brehler X-VCS-Revision: 4f5313ae510454f6cea2008d1319f192d6d9a4c9 X-VCS-Branch: master Date: Fri, 3 Feb 2017 10:25:24 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 67406926-043b-41bd-8b9a-128c1ff8511f X-Archives-Hash: e8e662d121318dea6eb5484be9a3352d commit: 4f5313ae510454f6cea2008d1319f192d6d9a4c9 Author: Matthias Maier gentoo org> AuthorDate: Fri Feb 3 02:54:56 2017 +0000 Commit: Marius Brehler linux sungazer de> CommitDate: Fri Feb 3 02:54:56 2017 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=4f5313ae sci-libs/cblas-reference: version bump to 20161223 (3.7.0) Package-Manager: Portage-2.3.3, Repoman-2.3.1 .../cblas-reference-20161223-r100.ebuild | 125 +++++++++++++++++++++ .../lapack-reference-3.7.0-fix-build-system.patch | 56 +++++++++ 2 files changed, 181 insertions(+) diff --git a/sci-libs/cblas-reference/cblas-reference-20161223-r100.ebuild b/sci-libs/cblas-reference/cblas-reference-20161223-r100.ebuild new file mode 100644 index 0000000..ba874d8 --- /dev/null +++ b/sci-libs/cblas-reference/cblas-reference-20161223-r100.ebuild @@ -0,0 +1,125 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) + +NUMERIC_MODULE_NAME="refcblas" + +inherit alternatives-2 cmake-utils eutils fortran-2 numeric-int64-multibuild python-any-r1 toolchain-funcs + +LPN=lapack +LPV=3.7.0 + +DESCRIPTION="C wrapper interface to the F77 reference BLAS implementation" +HOMEPAGE="http://www.netlib.org/cblas/" +SRC_URI="http://www.netlib.org/${LPN}/${LPN}-${LPV}.tgz" + +LICENSE="BSD" +SLOT="0/${LPV}" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="static-libs test" + +REQUIRED_USE="test? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND="virtual/blas" +DEPEND="${RDEPEND} + test? ( ${PYTHON_DEPS} ) + virtual/pkgconfig" + +S="${WORKDIR}/${LPN}-${LPV}" +PATCHES=( "${FILESDIR}/lapack-reference-${LPV}-fix-build-system.patch" ) + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/cblas/cblas.h +) +src_prepare() { + default + + # rename library to avoid collision with other blas implementations + # ${LIBNAME} and ${PROFNAME} are not defined here, they are in single + # quotes in the following seds. They are later set by defining cmake + # variables with -DPROFNAME etc in src_configure + sed -i \ + -e 's:\([^xc]\)blas:\1${LIBNAME}:g' \ + -e '/ALL_TARGETS/s:cblas):${LIBNAME}):' \ + -e '/_librar/s:cblas:${LIBNAME}:' \ + CMakeLists.txt \ + CBLAS/src/CMakeLists.txt || die + sed -i \ + -e 's:/CMAKE/:/cmake/:g' \ + CBLAS/CMakeLists.txt || die + sed -i \ + -e '/Name: /s:cblas:@PROFNAME@:' \ + -e 's:-lcblas:-l@LIBNAME@:g' \ + CBLAS/cblas.pc.in || die + sed -i \ + -e 's:cblas):${LIBNAME}):' \ + CBLAS/testing/CMakeLists.txt || die + sed -i \ + -e 's:BINARY_DIR}/cblas:BINARY_DIR}/${PROFNAME}:' \ + -e '/CBLAS_INCLUDE/s:include ):include/${PROFNAME} ):g' \ + CBLAS/CMakeLists.txt || die +} + +src_configure() { + cblas_configure() { + local FCFLAGS="${FCFLAGS}" + append-fflags $($(tc-getPKG_CONFIG) --cflags ${blas_profname}) + append-fflags $(get_abi_CFLAGS) + append-fflags $(numeric-int64_get_fortran_int64_abi_fflags) + + local blas_profname=$(numeric-int64_get_blas_alternative) + local profname=$(numeric-int64_get_module_name) + local libname="${profname//-/_}" + + local mycmakeargs=( + -Wno-dev + -DCBLAS=ON + -DPROFNAME="${profname}" + -DLIBNAME="${libname}" + -DUSE_OPTIMIZED_BLAS=ON + -DBLAS_LIBRARIES="$($(tc-getPKG_CONFIG) --libs ${blas_profname})" + -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)" + -DBUILD_TESTING=$(usex test) + ) + 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 cblas_configure +} + +src_compile() { + local each target_dirs=( CBLAS ) + use test && target_dirs+=( testing ) + for each in ${target_dirs[@]}; do + numeric-int64-multibuild_foreach_all_abi_variants \ + cmake-utils_src_compile -C ${each} + done + +} + +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 -C CBLAS + numeric-int64-multibuild_install_alternative cblas reference /usr/include/cblas.h refcblas/cblas.h + multilib_install_wrappers +} diff --git a/sci-libs/cblas-reference/files/lapack-reference-3.7.0-fix-build-system.patch b/sci-libs/cblas-reference/files/lapack-reference-3.7.0-fix-build-system.patch new file mode 100644 index 0000000..70f7cb0 --- /dev/null +++ b/sci-libs/cblas-reference/files/lapack-reference-3.7.0-fix-build-system.patch @@ -0,0 +1,56 @@ +diff --git a/BLAS/blas.pc.in b/BLAS/blas.pc.in +index 7fd6f1e..e52f3ad 100644 +--- a/BLAS/blas.pc.in ++++ b/BLAS/blas.pc.in +@@ -1,5 +1,7 @@ +-prefix=@prefix@ +-libdir=@libdir@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=${prefix} ++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ ++includedir=${prefix}/include + + Name: BLAS + Description: FORTRAN reference implementation of BLAS Basic Linear Algebra Subprograms +diff --git a/CBLAS/cblas.pc.in b/CBLAS/cblas.pc.in +index 4a938fe..311aed9 100644 +--- a/CBLAS/cblas.pc.in ++++ b/CBLAS/cblas.pc.in +@@ -1,5 +1,7 @@ +-prefix=@prefix@ +-libdir=@libdir@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=${prefix} ++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ ++includedir=${prefix}/include + + Name: CBLAS + Description: C Standard Interface to BLAS Basic Linear Algebra Subprograms +diff --git a/LAPACKE/lapacke.pc.in b/LAPACKE/lapacke.pc.in +index 028f8da..dc092b1 100644 +--- a/LAPACKE/lapacke.pc.in ++++ b/LAPACKE/lapacke.pc.in +@@ -1,5 +1,7 @@ +-prefix=@prefix@ +-libdir=@libdir@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=${prefix} ++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ ++includedir=${prefix}/include + + Name: LAPACKE + Description: C Standard Interface to LAPACK Linear Algebra PACKage +diff --git a/lapack.pc.in b/lapack.pc.in +index 878efc2..2cca4c2 100644 +--- a/lapack.pc.in ++++ b/lapack.pc.in +@@ -1,5 +1,7 @@ +-prefix=@prefix@ +-libdir=@libdir@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=${prefix} ++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ ++includedir=${prefix}/include + + Name: LAPACK + Description: FORTRAN reference implementation of LAPACK Linear Algebra PACKage