Gentoo Archives: gentoo-commits

From: Justin Lecher <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/lapack-reference/
Date: Mon, 30 Nov 2015 18:33:43
Message-Id: 1448889646.6d88f2276ab3a1c256b3fb98482c6381f4ee030d.jlec@gentoo
1 commit: 6d88f2276ab3a1c256b3fb98482c6381f4ee030d
2 Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 30 13:20:46 2015 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 30 13:20:46 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=6d88f227
7
8 sci-libs/lapack-reference: Version Bump
9
10 Package-Manager: portage-2.2.25
11 Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
12
13 .../lapack-reference/lapack-reference-3.6.0.ebuild | 119 +++++++++++++++++++++
14 1 file changed, 119 insertions(+)
15
16 diff --git a/sci-libs/lapack-reference/lapack-reference-3.6.0.ebuild b/sci-libs/lapack-reference/lapack-reference-3.6.0.ebuild
17 new file mode 100644
18 index 0000000..5e3cb88
19 --- /dev/null
20 +++ b/sci-libs/lapack-reference/lapack-reference-3.6.0.ebuild
21 @@ -0,0 +1,119 @@
22 +# Copyright 1999-2015 Gentoo Foundation
23 +# Distributed under the terms of the GNU General Public License v2
24 +# $Id$
25 +
26 +EAPI=5
27 +
28 +PYTHON_COMPAT=( python2_7 )
29 +
30 +NUMERIC_MODULE_NAME="reflapack"
31 +
32 +inherit alternatives-2 cmake-utils fortran-2 numeric-int64-multibuild python-any-r1
33 +
34 +MY_PN=lapack
35 +MYP=${MY_PN}-${PV}
36 +
37 +DESCRIPTION="Reference implementation of LAPACK"
38 +HOMEPAGE="http://www.netlib.org/lapack/"
39 +SRC_URI="http://www.netlib.org/lapack/${MYP}.tgz"
40 +
41 +LICENSE="BSD"
42 +SLOT="0"
43 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
44 +IUSE="static-libs test xblas"
45 +
46 +REQUIRED_USE="test? ( ${PYTHON_REQUIRED_USE} )"
47 +
48 +RDEPEND="
49 + >=virtual/blas-2.1-r3[int64?,${MULTILIB_USEDEP}]
50 + xblas? ( sci-libs/xblas[fortran,int64?] )"
51 +DEPEND="${RDEPEND}
52 + virtual/pkgconfig
53 + test? ( ${PYTHON_DEPS} )"
54 +
55 +S="${WORKDIR}/${MYP}"
56 +
57 +src_prepare() {
58 + numeric-int64_ensure_blas_int_support
59 +
60 + # rename library to avoid collision with other lapack implementations
61 + # ${PROFNAME}, ${LIBNAME} and ${BLAS_REQUIRES} are not defined here, they
62 + # are in single quotes in the following seds. They are set later by
63 + # defining a cmake variables with -DPROFNAME etc in src_configure.
64 + sed \
65 + -e 's:BINARY_DIR}/lapack.pc:BINARY_DIR}/${PROFNAME}.pc:' \
66 + -e '/ALL_TARGETS/s:lapack):${LIBNAME}):' \
67 + -e '/LAPACK_LIBRARIES/s:lapack:${LIBNAME}:g' \
68 + -i CMakeLists.txt || die
69 + sed -i \
70 + -e 's:(lapack:(${LIBNAME}:g' \
71 + -e '/PROPERTIES/s:lapack:${LIBNAME}:g' \
72 + SRC/CMakeLists.txt || die
73 + sed -i \
74 + -e '/Name: /s:lapack:${PROFNAME}:' \
75 + -e 's:-llapack:-l${LIBNAME}:g' \
76 + -e '/Requires: /s:blas:${BLAS_REQUIRES}\nFflags=${LAPACK_PKGCONFIG_FFLAGS}:' \
77 + lapack.pc.in || die
78 + # some string does not get passed properly
79 + sed -i \
80 + -e '/lapack_testing.py/d' \
81 + CTestCustom.cmake.in || die
82 + # separate ebuild to tmglib
83 + sed -i \
84 + -e '/lapack_install_library(tmglib)/d' \
85 + TESTING/MATGEN/CMakeLists.txt || die
86 +}
87 +
88 +src_configure() {
89 + lapack_configure() {
90 + local profname=$(numeric-int64_get_module_name)
91 + local libname="${profname//-/_}"
92 + local blas_profname=$(numeric-int64_get_blas_alternative)
93 + local xblas_profname=$(numeric-int64_get_xblas_alternative)
94 + local xblas_libname="${xblas_profname//-/_}"
95 + local blas_requires="${blas_profname}"
96 + use xblas && \
97 + blas_requires+=" ${xblas_profname}"
98 + local mycmakeargs=(
99 + -DPROFNAME="${profname}"
100 + -DBLAS_REQUIRES="${blas_requires}"
101 + -DLIBNAME="${libname}"
102 + -DUSE_OPTIMIZED_BLAS=ON
103 + -DBLAS_LIBRARIES="$($(tc-getPKG_CONFIG) --libs ${blas_profname})"
104 + $(cmake-utils_use_build test TESTING)
105 + $(cmake-utils_use_use xblas XBLAS)
106 + -DCMAKE_C_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) ${CFLAGS}"
107 + -DCMAKE_CXX_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) ${CXXFLAGS}"
108 + -DCMAKE_Fortran_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) $(get_abi_CFLAGS) $(numeric-int64_get_fortran_int64_abi_fflags) ${FCFLAGS}"
109 + -DLAPACK_PKGCONFIG_FFLAGS="$(numeric-int64_get_fortran_int64_abi_fflags)"
110 + )
111 + use xblas && \
112 + mycmakeargs+=( -DXBLAS_LIBRARY:FILEPATH="${EROOT}usr/$(get_libdir)/lib${xblas_libname}.so" )
113 + if $(numeric-int64_is_static_build); then
114 + mycmakeargs+=(
115 + -DBUILD_SHARED_LIBS=OFF
116 + -DBUILD_STATIC_LIBS=ON
117 + )
118 + else
119 + mycmakeargs+=(
120 + -DBUILD_SHARED_LIBS=ON
121 + -DBUILD_STATIC_LIBS=OFF
122 + )
123 + fi
124 + cmake-utils_src_configure
125 + }
126 + numeric-int64-multibuild_foreach_all_abi_variants lapack_configure
127 +}
128 +
129 +src_compile() {
130 + numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_compile
131 +}
132 +
133 +src_test() {
134 + numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_test
135 +}
136 +
137 +src_install() {
138 + numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_install
139 + numeric-int64-multibuild_install_alternative lapack reference
140 +}