From: "Justin Lecher" <jlec@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/lapack-reference/
Date: Mon, 6 Oct 2014 05:56:37 +0000 (UTC) [thread overview]
Message-ID: <1411816158.272370d6abb3eb6975e2a9fc5ba4a4a0767440b7.jlec@gentoo> (raw)
commit: 272370d6abb3eb6975e2a9fc5ba4a4a0767440b7
Author: gienah <gienah <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 27 11:09:18 2014 +0000
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sat Sep 27 11:09:18 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=272370d6
Fix rebase lapack-multibuild to master conflict 1 on sci-libs/lapack-reference
---
sci-libs/lapack-reference/ChangeLog | 4 +
.../lapack-reference/lapack-reference-9999.ebuild | 142 +++++++++++++++++----
sci-libs/lapack-reference/metadata.xml | 1 +
3 files changed, 119 insertions(+), 28 deletions(-)
diff --git a/sci-libs/lapack-reference/ChangeLog b/sci-libs/lapack-reference/ChangeLog
index 3c1104e..4df9585 100644
--- a/sci-libs/lapack-reference/ChangeLog
+++ b/sci-libs/lapack-reference/ChangeLog
@@ -11,6 +11,10 @@
lapack-reference-9999.ebuild:
Add xblas to the .pc file when it is in use see bug#523388
+ 18 Feb 2014; Mark Wright <gienah@gentoo.org> lapack-reference-9999.ebuild,
+ metadata.xml:
+ multibuild lapack-reference when USE=int64 and/or USE=static is specified.
+
*lapack-reference-3.5.0 (08 Dec 2013)
08 Dec 2013; Sébastien Fabbro <bicatali@gentoo.org>
diff --git a/sci-libs/lapack-reference/lapack-reference-9999.ebuild b/sci-libs/lapack-reference/lapack-reference-9999.ebuild
index aca6ba0..9b14bf0 100644
--- a/sci-libs/lapack-reference/lapack-reference-9999.ebuild
+++ b/sci-libs/lapack-reference/lapack-reference-9999.ebuild
@@ -3,15 +3,21 @@
# $Header: $
EAPI=5
-inherit fortran-2 cmake-utils alternatives-2 toolchain-funcs
-
-MYP=lapack-${PV}
+inherit fortran-2 cmake-utils multibuild alternatives-2 toolchain-funcs
if [[ ${PV} == "9999" ]] ; then
- ESVN_REPO_URI="https://icl.cs.utk.edu/svn/lapack-dev/lapack/trunk"
- inherit subversion
+ # The master ESVN_REPO_URI is difficult to access, the git mirror is easier
+ # ESVN_REPO_URI="https://icl.cs.utk.edu/svn/lapack-dev/lapack/trunk"
+ # MY_PN=lapack
+ # inherit subversion
+ EGIT_REPO_URI="https://github.com/nschloe/lapack.git"
+ MY_PN=lapack-reference
+ MYP=${MY_PN}-${PV}
+ inherit git-r3
KEYWORDS=""
else
+ MY_PN=lapack
+ MYP=${MY_PN}-${PV}
SRC_URI="http://www.netlib.org/lapack/${MYP}.tgz"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
fi
@@ -22,7 +28,7 @@ HOMEPAGE="http://www.netlib.org/lapack/"
LICENSE="BSD"
SLOT="0"
-IUSE="static-libs test xblas"
+IUSE="int64 static-libs test xblas"
RDEPEND="
virtual/blas
@@ -32,21 +38,66 @@ DEPEND="${RDEPEND}
S="${WORKDIR}/${MYP}"
+INT64_SUFFIX="int64"
+STATIC_SUFFIX="static"
+BASE_PROFNAME="reflapack"
+
+get_profname() {
+ local profname="${1:-${BASE_PROFNAME}}"
+ if [[ "${MULTIBUILD_ID}" =~ "_${INT64_SUFFIX}" ]]; then
+ profname+="-${INT64_SUFFIX}"
+ fi
+ echo "${profname}"
+}
+
+get_variant_suffix() {
+ local profname="${1:-$(get_profname)}"
+ local variant_suffix="${profname//${BASE_PROFNAME}/}"
+ echo "${variant_suffix}"
+}
+
+get_blas_profname() {
+ local profname="${1:-$(get_profname)}"
+ local variant_suffix=$(get_variant_suffix "${profname}")
+ local selected_blas_profile="${blas_profile}"
+ local blas_no_int64="${selected_blas_profile/-int64/}"
+ local blas_base="${blas_no_int64%-*}"
+ local blas_name="${blas_no_int64/${blas_base}/${blas_base}${variant_suffix}}"
+ echo "${blas_name}"
+}
+
+pkg_setup() {
+ blas_profile=$(eselect blas show)
+ MULTIBUILD_VARIANTS=( )
+ use static-libs && MULTIBUILD_VARIANTS+=( ${BASE_PROFNAME}_${STATIC_SUFFIX} )
+ if use int64; then
+ MULTIBUILD_VARIANTS+=( ${BASE_PROFNAME}_${INT64_SUFFIX} )
+ use static-libs && MULTIBUILD_VARIANTS+=( ${BASE_PROFNAME}_${INT64_SUFFIX}_${STATIC_SUFFIX} )
+ fi
+ MULTIBUILD_VARIANTS+=( ${BASE_PROFNAME} )
+}
+
src_prepare() {
+ if use int64; then
+ local blas_int64_profname=$(get_blas_profname "${BASE_PROFNAME}-${INT64_SUFFIX}")
+ pkg-config --exists "${blas_int64_profname}" || die "Use int64 requires ${blas_int64_profname}"
+ fi
+
# rename library to avoid collision with other lapack implementations
+ local LIBNAME="${PROFNAME//-/_}"
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' \
+ -e 's:BINARY_DIR}/lapack.pc:BINARY_DIR}/${PROFNAME}.pc:' \
+ -e '/export/s:lapack:${LIBNAME}:g' \
+ -e '/ALL_TARGETS/s:lapack):${LIBNAME}):' \
+ -e '/LAPACK_LIBRARIES/s:lapack:${LIBNAME}:g' \
CMakeLists.txt || die
sed -i \
- -e 's:(lapack:(reflapack:g' \
+ -e 's:(lapack:(${LIBNAME}:g' \
SRC/CMakeLists.txt || die
sed -i \
- -e 's:-llapack:-lreflapack:g' \
+ -e 's:-llapack:-l${LIBNAME}:g' \
+ -e 's/Requires: blas/Requires: ${BLAS_PROFNAME}\nFflags=${LAPACK_PKGCONFIG_FFLAGS}/' \
lapack.pc.in || die
- use static-libs && mkdir "${WORKDIR}/${PN}_static"
# some string does not get passed properly
sed -i \
-e '/lapack_testing.py/d' \
@@ -64,33 +115,68 @@ src_prepare() {
}
src_configure() {
- lapack_configure() {
+ my_src_configure() {
+ local profname=$(get_profname)
+ local libname="${profname//-/_}"
+ local blas_profname=$(get_blas_profname)
+ echo "profname: ${profname}, blas_profname: ${blas_profname}"
local mycmakeargs=(
+ -DPROFNAME="${profname}"
+ -DBLAS_PROFNAME="${blas_profname}"
+ -DLIBNAME="${libname}"
-DUSE_OPTIMIZED_BLAS=ON
- -DBLAS_LIBRARIES="$($(tc-getPKG_CONFIG) --libs blas)"
+ -DBLAS_LIBRARIES="$($(tc-getPKG_CONFIG) --libs ${blas_profname})"
$(cmake-utils_use_build test TESTING)
$(cmake-utils_use_use xblas XBLAS)
$@
)
+ if [[ "${MULTIBUILD_ID}" =~ "_${INT64_SUFFIX}" ]]; then
+ mycmakeargs+=(
+ -DCMAKE_Fortran_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) -fdefault-integer-8"
+ -DLAPACK_PKGCONFIG_FFLAGS="-fdefault-integer-8"
+ )
+ else
+ mycmakeargs+=(
+ -DCMAKE_Fortran_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname})"
+ -DLAPACK_PKGCONFIG_FFLAGS=""
+ )
+ fi
+ mycmakeargs+=(
+ -DCMAKE_C_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) ${CFLAGS}"
+ -DCMAKE_CXX_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) ${CXXFLAGS}"
+ )
+ if [[ "${MULTIBUILD_ID}" =~ "_${STATIC_SUFFIX}" ]]; 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
}
-
- 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
+ multibuild_foreach_variant my_src_configure
}
src_compile() {
- cmake-utils_src_compile
- use static-libs && \
- CMAKE_BUILD_DIR="${WORKDIR}/${PN}_static" cmake-utils_src_compile
+ multibuild_foreach_variant cmake-utils_src_compile
+}
+
+src_test() {
+ multibuild_foreach_variant cmake-utils_src_test
}
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
+ my_src_install() {
+ cmake-utils_src_install
+ if [[ ! "${MULTIBUILD_ID}" =~ "_${STATIC_SUFFIX}" ]]; then
+ local profname=$(get_profname)
+ alternatives_for lapack $(get_profname "reference") 0 \
+ /usr/$(get_libdir)/pkgconfig/lapack.pc ${profname}.pc
+ fi
+ }
+ multibuild_foreach_variant my_src_install
}
diff --git a/sci-libs/lapack-reference/metadata.xml b/sci-libs/lapack-reference/metadata.xml
index d769a14..9b618ae 100644
--- a/sci-libs/lapack-reference/metadata.xml
+++ b/sci-libs/lapack-reference/metadata.xml
@@ -13,6 +13,7 @@
Algebra Subprogram (BLAS).
</longdescription>
<use>
+ <flag name="int64">Build the 64 bits integer library</flag>
<flag name="xblas">Build LAPACK with extra precision (needs
<pkg>sci-libs/xblas</pkg>)</flag>
</use>
next reply other threads:[~2014-10-06 5:56 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-06 5:56 Justin Lecher [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-06-21 19:47 [gentoo-commits] proj/sci:master commit in: sci-libs/lapack-reference/ Justin Lecher
2018-06-21 18:43 Justin Lecher
2018-06-21 18:43 Justin Lecher
2018-06-21 18:43 Justin Lecher
2016-10-12 6:30 Marius Brehler
2015-12-03 9:55 Justin Lecher
2015-12-03 9:54 Justin Lecher
2015-12-01 6:52 Justin Lecher
2015-11-30 18:33 Justin Lecher
2015-11-30 18:33 Justin Lecher
2014-10-13 9:19 Francois Bissey
2014-10-08 14:16 Honza Macháček
2014-10-06 6:53 Justin Lecher
2014-10-06 5:56 Justin Lecher
2014-10-06 5:56 Justin Lecher
2014-10-06 5:56 Justin Lecher
2014-09-25 21:21 Francois Bissey
2014-09-25 10:45 Francois Bissey
2014-01-28 19:01 Sebastien Fabbro
2013-05-23 5:13 Sebastien Fabbro
2013-03-03 17:52 Justin Lecher
2012-11-29 0:06 Sebastien Fabbro
2012-11-29 0:06 Sebastien Fabbro
2012-11-29 0:06 Sebastien Fabbro
2012-10-26 16:53 Sebastien Fabbro
2012-04-25 15:10 Justin Lecher
2012-04-25 6:47 Justin Lecher
2012-02-23 9:18 Justin Lecher
2012-02-17 16:26 Sebastien Fabbro
2012-02-16 0:38 Sebastien Fabbro
2012-01-26 17:41 Sebastien Fabbro
2011-08-19 15:26 Andrea Arteaga
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1411816158.272370d6abb3eb6975e2a9fc5ba4a4a0767440b7.jlec@gentoo \
--to=jlec@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox