aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/blas-reference/blas-reference-20131116-r1.ebuild118
-rw-r--r--sci-libs/blas-reference/blas-reference-20131116-r2.ebuild107
-rw-r--r--sci-libs/blas-reference/blas-reference-20131116.ebuild78
-rw-r--r--sci-libs/blas-reference/blas-reference-99999999.ebuild76
-rw-r--r--sci-libs/blas-reference/metadata.xml4
-rw-r--r--sci-libs/cblas-reference/cblas-reference-20110218-r1.ebuild98
-rw-r--r--sci-libs/cblas-reference/cblas-reference-20110218.ebuild116
-rw-r--r--sci-libs/gotoblas2/gotoblas2-1.13.ebuild139
-rw-r--r--sci-libs/lapack-reference/lapack-reference-3.4.2.ebuild139
-rw-r--r--sci-libs/lapack-reference/lapack-reference-3.5.0.ebuild81
-rw-r--r--sci-libs/lapack-reference/lapack-reference-9999.ebuild86
-rw-r--r--sci-libs/openblas/openblas-0.2.11.ebuild227
-rw-r--r--sci-libs/openblas/openblas-0.2.12.ebuild227
-rw-r--r--sci-libs/openblas/openblas-0.2.14.ebuild190
-rw-r--r--sci-libs/openblas/openblas-0.2.8.ebuild126
-rw-r--r--sci-libs/openblas/openblas-9999.ebuild190
-rw-r--r--sci-libs/xblas/xblas-1.0.248-r1.ebuild78
-rw-r--r--sci-libs/xblas/xblas-1.0.248.ebuild93
18 files changed, 509 insertions, 1664 deletions
diff --git a/sci-libs/blas-reference/blas-reference-20131116-r1.ebuild b/sci-libs/blas-reference/blas-reference-20131116-r1.ebuild
deleted file mode 100644
index 4b9d2eaf7..000000000
--- a/sci-libs/blas-reference/blas-reference-20131116-r1.ebuild
+++ /dev/null
@@ -1,118 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-EBASE_PROFNAME="refblas"
-ESTATIC_MULTIBUILD="true"
-inherit fortran-2 cmake-utils alternatives-2 multibuild multilib-build toolchain-funcs fortran-int64
-
-LPN=lapack
-LPV=3.5.0
-
-if [[ ${PV} == "99999999" ]] ; then
- ESVN_REPO_URI="https://icl.cs.utk.edu/svn/lapack-dev/${LPN}/trunk"
- inherit subversion
- KEYWORDS=""
-else
- SRC_URI="http://www.netlib.org/${LPN}/${LPN}-${LPV}.tgz"
- KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-fi
-
-DESCRIPTION="Reference implementation of BLAS"
-HOMEPAGE="http://www.netlib.org/lapack/"
-
-LICENSE="BSD"
-SLOT="0"
-IUSE="int64 static-libs test"
-
-RDEPEND=""
-DEPEND="${RDEPEND}
- virtual/pkgconfig"
-PDEPEND=">=virtual/blas-2.1-r3[int64?]"
-
-S="${WORKDIR}/${LPN}-${LPV}"
-
-src_prepare() {
- # 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' \
- CMakeLists.txt \
- BLAS/SRC/CMakeLists.txt || die
- sed -i \
- -e '/Name: /s:blas:${PROFNAME}:' \
- -e 's:-lblas:-l${LIBNAME}:g' \
- BLAS/blas.pc.in || die
- sed -i \
- -e 's:blas):${LIBNAME}):' \
- BLAS/TESTING/CMakeLists.txt || die
- sed -i \
- -e 's:BINARY_DIR}/blas:BINARY_DIR}/${PROFNAME}:' \
- BLAS/CMakeLists.txt || die
-}
-
-src_configure() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- blas_configure() {
- local profname=$(fortran-int64_get_profname)
- local libname="${profname//-/_}"
- local mycmakeargs=(
- -Wno-dev
- -DPROFNAME="${profname}"
- -DLIBNAME="${libname}"
- -DUSE_OPTIMIZED_BLAS=OFF
- $(cmake-utils_use_build test TESTING)
- -DCMAKE_Fortran_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) $(get_abi_CFLAGS) $(fortran-int64_get_fortran_int64_abi_fflags) ${FCFLAGS}"
- -DLAPACK_PKGCONFIG_FFLAGS="$(fortran-int64_get_fortran_int64_abi_fflags)"
- )
- if $(fortran-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
- }
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper blas_configure
-}
-
-src_compile() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper cmake-utils_src_compile -C BLAS
-}
-
-src_test() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- blas_test() {
- _check_build_dir
- pushd "${BUILD_DIR}/BLAS" > /dev/null
- local ctestargs
- [[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure"
- ctest ${ctestargs} || die
- popd > /dev/null
- }
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper blas_test
-}
-
-src_install() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- my_src_install() {
- cmake-utils_src_install -C BLAS
- if ! $(fortran-int64_is_static_build); then
- local profname=$(fortran-int64_get_profname)
- local provider=$(fortran-int64_get_blas_provider)
- alternatives_for ${provider} $(fortran-int64_get_profname "reference") 0 \
- /usr/$(get_libdir)/pkgconfig/${provider}.pc ${profname}.pc
- fi
- }
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper my_src_install
-}
diff --git a/sci-libs/blas-reference/blas-reference-20131116-r2.ebuild b/sci-libs/blas-reference/blas-reference-20131116-r2.ebuild
new file mode 100644
index 000000000..3b4d976d3
--- /dev/null
+++ b/sci-libs/blas-reference/blas-reference-20131116-r2.ebuild
@@ -0,0 +1,107 @@
+# 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="refblas"
+
+inherit alternatives-2 cmake-utils fortran-2 numeric-int64-multibuild python-any-r1 toolchain-funcs
+
+LPN=lapack
+LPV=3.5.0
+
+DESCRIPTION="Reference implementation of BLAS"
+HOMEPAGE="http://www.netlib.org/lapack/"
+SRC_URI="http://www.netlib.org/${LPN}/${LPN}-${LPV}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="static-libs test"
+
+REQUIRED_USE="test? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ test? ( ${PYTHON_DEPS} )
+ virtual/pkgconfig"
+
+S="${WORKDIR}/${LPN}-${LPV}"
+
+src_prepare() {
+ # 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' \
+ CMakeLists.txt \
+ BLAS/SRC/CMakeLists.txt || die
+ sed -i \
+ -e '/Name: /s:blas:${PROFNAME}:' \
+ -e 's:-lblas:-l${LIBNAME}:g' \
+ BLAS/blas.pc.in || die
+ sed -i \
+ -e 's:blas):${LIBNAME}):' \
+ BLAS/TESTING/CMakeLists.txt || die
+ sed -i \
+ -e 's:BINARY_DIR}/blas:BINARY_DIR}/${PROFNAME}:' \
+ BLAS/CMakeLists.txt || die
+}
+
+src_configure() {
+ blas_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 profname=$(numeric-int64_get_module_name)
+ local libname="${profname//-/_}"
+
+ local mycmakeargs=(
+ -Wno-dev
+ -DPROFNAME="${profname}"
+ -DLIBNAME="${libname}"
+ -DUSE_OPTIMIZED_BLAS=OFF
+ -DCMAKE_Fortran_FLAGS="${FCFLAGS}"
+ -DLAPACK_PKGCONFIG_FFLAGS="$(numeric-int64_get_fortran_int64_abi_fflags)"
+ $(cmake-utils_use_build test TESTING)
+ )
+ 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 blas_configure
+}
+
+src_compile() {
+ local each target_dirs=( BLAS )
+ 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 BLAS
+ numeric-int64-multibuild_install_alternative blas reference
+}
diff --git a/sci-libs/blas-reference/blas-reference-20131116.ebuild b/sci-libs/blas-reference/blas-reference-20131116.ebuild
deleted file mode 100644
index 94337c973..000000000
--- a/sci-libs/blas-reference/blas-reference-20131116.ebuild
+++ /dev/null
@@ -1,78 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit fortran-2 cmake-utils alternatives-2
-
-LPN=lapack
-LPV=3.5.0
-
-if [[ ${PV} == "99999999" ]] ; then
- ESVN_REPO_URI="https://icl.cs.utk.edu/svn/lapack-dev/${LPN}/trunk"
- inherit subversion
- KEYWORDS=""
-else
- SRC_URI="http://www.netlib.org/${LPN}/${LPN}-${LPV}.tgz"
- KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-fi
-
-DESCRIPTION="Reference implementation of BLAS"
-HOMEPAGE="http://www.netlib.org/lapack/"
-
-LICENSE="BSD"
-SLOT="0"
-IUSE="static-libs test"
-
-S="${WORKDIR}/${LPN}-${LPV}"
-
-src_prepare() {
- # rename library to avoid collision with other blas implementations
- sed -i \
- -e 's:blas:refblas:g' \
- CMakeLists.txt BLAS/blas.pc.in \
- BLAS/{SRC,TESTING}/CMakeLists.txt || die
- sed -i \
- -e 's:BINARY_DIR}/blas:BINARY_DIR}/refblas:' \
- BLAS/CMakeLists.txt || die
- use static-libs && mkdir "${WORKDIR}/${PN}_static"
-}
-
-src_configure() {
- blas_configure() {
- local mycmakeargs=(
- -DUSE_OPTIMIZED_BLAS=OFF
- $(cmake-utils_use_build test TESTING)
- $@
- )
- cmake-utils_src_configure
- }
-
- blas_configure -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF
- use static-libs && \
- CMAKE_BUILD_DIR="${WORKDIR}/${PN}_static" blas_configure \
- -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON
-}
-
-src_compile() {
- cmake-utils_src_compile -C BLAS
- use static-libs && CMAKE_BUILD_DIR="${WORKDIR}/${PN}_static" \
- cmake-utils_src_compile -C BLAS
-}
-
-src_test() {
- pushd "${CMAKE_BUILD_DIR}/BLAS" > /dev/null
- local ctestargs
- [[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure"
- ctest ${ctestargs} || die
- popd > /dev/null
-}
-
-src_install() {
- cmake-utils_src_install -C BLAS
- use static-libs && CMAKE_BUILD_DIR="${WORKDIR}/${PN}_static" \
- cmake-utils_src_install -C BLAS
- alternatives_for blas reference 0 \
- /usr/$(get_libdir)/pkgconfig/blas.pc refblas.pc
-}
diff --git a/sci-libs/blas-reference/blas-reference-99999999.ebuild b/sci-libs/blas-reference/blas-reference-99999999.ebuild
index 4b9d2eaf7..b079855d0 100644
--- a/sci-libs/blas-reference/blas-reference-99999999.ebuild
+++ b/sci-libs/blas-reference/blas-reference-99999999.ebuild
@@ -1,34 +1,32 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
-EBASE_PROFNAME="refblas"
-ESTATIC_MULTIBUILD="true"
-inherit fortran-2 cmake-utils alternatives-2 multibuild multilib-build toolchain-funcs fortran-int64
+PYTHON_COMPAT=( python2_7 )
+
+NUMERIC_MODULE_NAME="refblas"
+
+inherit alternatives-2 cmake-utils fortran-2 numeric-int64-multibuild python-any-r1 toolchain-funcs subversion
LPN=lapack
LPV=3.5.0
-if [[ ${PV} == "99999999" ]] ; then
- ESVN_REPO_URI="https://icl.cs.utk.edu/svn/lapack-dev/${LPN}/trunk"
- inherit subversion
- KEYWORDS=""
-else
- SRC_URI="http://www.netlib.org/${LPN}/${LPN}-${LPV}.tgz"
- KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-fi
-
DESCRIPTION="Reference implementation of BLAS"
HOMEPAGE="http://www.netlib.org/lapack/"
+ESVN_REPO_URI="https://icl.cs.utk.edu/svn/lapack-dev/${LPN}/trunk"
LICENSE="BSD"
SLOT="0"
-IUSE="int64 static-libs test"
+KEYWORDS=""
+IUSE="static-libs test"
+
+REQUIRED_USE="test? ( ${PYTHON_REQUIRED_USE} )"
RDEPEND=""
DEPEND="${RDEPEND}
+ test? ( ${PYTHON_DEPS} )
virtual/pkgconfig"
PDEPEND=">=virtual/blas-2.1-r3[int64?]"
@@ -56,20 +54,25 @@ src_prepare() {
}
src_configure() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
blas_configure() {
- local profname=$(fortran-int64_get_profname)
+ 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 profname=$(numeric-int64_get_module_name)
local libname="${profname//-/_}"
+
local mycmakeargs=(
-Wno-dev
-DPROFNAME="${profname}"
-DLIBNAME="${libname}"
-DUSE_OPTIMIZED_BLAS=OFF
+ -DCMAKE_Fortran_FLAGS="${FCFLAGS}"
+ -DLAPACK_PKGCONFIG_FFLAGS="$(numeric-int64_get_fortran_int64_abi_fflags)"
$(cmake-utils_use_build test TESTING)
- -DCMAKE_Fortran_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) $(get_abi_CFLAGS) $(fortran-int64_get_fortran_int64_abi_fflags) ${FCFLAGS}"
- -DLAPACK_PKGCONFIG_FFLAGS="$(fortran-int64_get_fortran_int64_abi_fflags)"
)
- if $(fortran-int64_is_static_build); then
+ if $(numeric-int64_is_static_build); then
mycmakeargs+=(
-DBUILD_SHARED_LIBS=OFF
-DBUILD_STATIC_LIBS=ON
@@ -82,37 +85,24 @@ src_configure() {
fi
cmake-utils_src_configure
}
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper blas_configure
+ numeric-int64-multibuild_foreach_all_abi_variants blas_configure
}
src_compile() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper cmake-utils_src_compile -C BLAS
+ local each target_dirs=( BLAS )
+ 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() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- blas_test() {
- _check_build_dir
- pushd "${BUILD_DIR}/BLAS" > /dev/null
- local ctestargs
- [[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure"
- ctest ${ctestargs} || die
- popd > /dev/null
- }
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper blas_test
+ numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_test
}
src_install() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- my_src_install() {
- cmake-utils_src_install -C BLAS
- if ! $(fortran-int64_is_static_build); then
- local profname=$(fortran-int64_get_profname)
- local provider=$(fortran-int64_get_blas_provider)
- alternatives_for ${provider} $(fortran-int64_get_profname "reference") 0 \
- /usr/$(get_libdir)/pkgconfig/${provider}.pc ${profname}.pc
- fi
- }
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper my_src_install
+ numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_install -C BLAS
+ numeric-int64-multibuild_install_alternative blas reference
}
diff --git a/sci-libs/blas-reference/metadata.xml b/sci-libs/blas-reference/metadata.xml
index 346d64cd5..f5000ebba 100644
--- a/sci-libs/blas-reference/metadata.xml
+++ b/sci-libs/blas-reference/metadata.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<herd>sci</herd>
-<longdescription lang="en">
+ <herd>sci</herd>
+ <longdescription lang="en">
The BLAS (Basic Linear Algebra Subprograms) are high quality "building
block" routines for performing basic vector and matrix operations. Level 1
BLAS do vector-vector operations, Level 2 BLAS do matrix-vector operations,
diff --git a/sci-libs/cblas-reference/cblas-reference-20110218-r1.ebuild b/sci-libs/cblas-reference/cblas-reference-20110218-r1.ebuild
index 9e7e1f391..e875937f8 100644
--- a/sci-libs/cblas-reference/cblas-reference-20110218-r1.ebuild
+++ b/sci-libs/cblas-reference/cblas-reference-20110218-r1.ebuild
@@ -4,8 +4,9 @@
EAPI=5
-EBASE_PROFNAME="refcblas"
-inherit eutils alternatives-2 flag-o-matic toolchain-funcs versionator multilib fortran-2 multilib-build fortran-int64
+NUMERIC_MODULE_NAME="refcblas"
+
+inherit alternatives-2 flag-o-matic fortran-2 multilib numeric numeric-int64-multibuild toolchain-funcs versionator
MYPN="${PN/-reference/}"
@@ -15,13 +16,12 @@ SRC_URI="http://www.netlib.org/blas/blast-forum/${MYPN}.tgz -> ${P}.tgz"
SLOT="0"
LICENSE="public-domain"
-IUSE="int64 static-libs"
KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
+IUSE="static-libs"
RDEPEND="virtual/blas"
DEPEND="${RDEPEND}
virtual/pkgconfig"
-PDEPEND=">=virtual/cblas-2.0-r2[int64?]"
S="${WORKDIR}/CBLAS"
@@ -31,7 +31,7 @@ MULTILIB_WRAPPED_HEADERS=(
static_to_shared() {
local libstatic=$1
- shift
+ shift || die
local libname=$(basename ${libstatic%.a})
local soname=${libname}$(get_libname $(get_version_component_range 1-2))
local libdir=$(dirname ${libstatic})
@@ -55,22 +55,20 @@ static_to_shared() {
}
src_prepare() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- fortran-int64_ensure_blas
+ numeric-int64_ensure_blas_int_support
find . -name Makefile -exec sed -i \
-e 's:make:$(MAKE):g' '{}' \; || die
- multibuild_copy_sources
+ numeric-int64-multibuild_copy_sources
}
src_configure() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- my_configure() {
- local profname=$(fortran-int64_get_profname)
+ cblas_configure() {
+ local profname=$(numeric-int64_get_module_name)
local libname="${profname//-/_}"
append-cflags -DADD_
cat > Makefile.in <<-EOF
- BLLIB=$($(tc-getPKG_CONFIG) --libs $(fortran-int64_get_blas_provider))
- FC=$(tc-getFC) $(get_abi_CFLAGS) $(fortran-int64_get_fortran_int64_abi_fflags)
+ BLLIB=$($(tc-getPKG_CONFIG) --libs $(numeric-int64_get_blas_alternative))
+ FC=$(tc-getFC) $(get_abi_CFLAGS) $(numeric-int64_get_fortran_int64_abi_fflags)
CC=$(tc-getCC)
CBLIB=../lib/lib${libname}.a
LOADER=\$(FC)
@@ -79,79 +77,69 @@ src_configure() {
RANLIB=$(tc-getRANLIB)
EOF
}
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_configure
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir cblas_configure
}
src_compile() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- my_src_compile() {
- local profname=$(fortran-int64_get_profname)
+ cblas_src_compile() {
+ local profname=$(numeric-int64_get_module_name)
local libname="${profname//-/_}"
emake \
FFLAGS="${FFLAGS} -fPIC" \
CFLAGS="${CFLAGS} -fPIC" \
alllib
- static_to_shared lib/lib${libname}.a $($(tc-getPKG_CONFIG) --libs $(fortran-int64_get_blas_profname))
+ static_to_shared lib/lib${libname}.a $($(tc-getPKG_CONFIG) --libs $(numeric-int64_get_blas_alternative))
if use static-libs; then
emake clean
emake alllib
fi
}
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_compile
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir cblas_src_compile
}
src_test() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- my_src_test () {
- local profname=$(fortran-int64_get_profname)
+ cblas_src_test () {
+ local profname=$(numeric-int64_get_module_name)
local libname="${profname//-/_}"
cd testing || die
- default
- emake run
+ emake && emake run
}
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_test
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir cblas_src_test
}
src_install() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- my_src_install() {
- local profname=$(fortran-int64_get_profname)
+ cblas_src_install() {
+ local profname=$(numeric-int64_get_module_name)
local libname="${profname//-/_}"
- local provider=$(fortran-int64_get_cblas_provider)
# On linux dynamic libraries are of the form .so.${someversion}
# On OS X dynamic libraries are of the form ${someversion}.dylib
- dolib.so lib/lib${libname}*$(get_libname)*
- use static-libs && dolib.a lib/lib${libname}.a
- insinto /usr/include/cblas
- doins include/cblas.h
- cat <<-EOF > ${profname}.pc
- prefix=${EPREFIX}/usr
- libdir=\${prefix}/$(get_libdir)
- includedir=\${prefix}/include
- Name: ${profname}
- Description: ${DESCRIPTION}
- Version: ${PV}
- URL: ${HOMEPAGE}
- Libs: -L\${libdir} -l${libname}
- Private: -lm
- Cflags: -I\${includedir}/cblas
- Requires: $(fortran-int64_get_blas_profname)
- Fflags=$(fortran-int64_get_fortran_int64_abi_fflags)
- EOF
- insinto /usr/$(get_libdir)/pkgconfig
- doins ${profname}.pc
- alternatives_for ${provider} $(fortran-int64_get_profname "reference") 0 \
- /usr/$(get_libdir)/pkgconfig/${provider}.pc ${profname}.pc \
- /usr/include/cblas.h cblas/cblas.h
+ if numeric-int64_is_static_build; then
+ dolib.a lib/lib${libname}.a
+ else
+ dolib.so lib/lib${libname}*$(get_libname)*
+ insinto /usr/include/cblas
+ doins include/cblas.h
+ create_pkgconfig \
+ --name "${profname}" \
+ --libs "-L\${libdir} -l${libname}" \
+ --libs-private "-lm" \
+ --cflags "-I\${includedir}/cblas $(numeric-int64_get_fortran_int64_abi_fflags)" \
+ --requires $(numeric-int64_get_blas_alternative) \
+ ${profname}
+ fi
+
if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 ]]; then
multilib_prepare_wrappers
multilib_check_headers
fi
}
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_install
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir cblas_src_install
+
+ numeric-int64-multibuild_install_alternative cblas reference /usr/include/cblas.h cblas/cblas.h
+
multilib_install_wrappers
dodoc README
- insinto /usr/share/doc/${PF}
- doins examples/*.c
+ docinto examples
+ dodoc examples/*.c
}
diff --git a/sci-libs/cblas-reference/cblas-reference-20110218.ebuild b/sci-libs/cblas-reference/cblas-reference-20110218.ebuild
deleted file mode 100644
index c2c9b6f1f..000000000
--- a/sci-libs/cblas-reference/cblas-reference-20110218.ebuild
+++ /dev/null
@@ -1,116 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit eutils alternatives-2 flag-o-matic toolchain-funcs versionator multilib fortran-2
-
-MYPN="${PN/-reference/}"
-
-DESCRIPTION="C wrapper interface to the F77 reference BLAS implementation"
-HOMEPAGE="http://www.netlib.org/blas/"
-SRC_URI="http://www.netlib.org/blas/blast-forum/${MYPN}.tgz -> ${P}.tgz"
-
-SLOT="0"
-LICENSE="public-domain"
-IUSE="static-libs"
-KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
-
-RDEPEND="virtual/blas"
-DEPEND="${RDEPEND}
- virtual/pkgconfig"
-
-S="${WORKDIR}/CBLAS"
-
-LIBNAME=refcblas
-
-static_to_shared() {
- local libstatic=$1
- shift
- local libname=$(basename ${libstatic%.a})
- local soname=${libname}$(get_libname $(get_version_component_range 1-2))
- local libdir=$(dirname ${libstatic})
-
- einfo "Making ${soname} from ${libstatic}"
- if [[ ${CHOST} == *-darwin* ]] ; then
- ${LINK:-$(tc-getCC)} ${LDFLAGS} \
- -dynamiclib -install_name "${EPREFIX}"/usr/lib/${soname} \
- -Wl,-all_load -Wl,${libstatic} \
- "$@" -o ${libdir}/${soname} || die "${soname} failed"
- else
- ${LINK:-$(tc-getCC)} ${LDFLAGS} \
- -shared -Wl,-soname=${soname} \
- -Wl,--whole-archive ${libstatic} -Wl,--no-whole-archive \
- "$@" -o ${libdir}/${soname} || die "${soname} failed"
- if [[ $(get_version_component_count) -gt 1 ]]; then
- ln -s ${soname} ${libdir}/${libname}$(get_libname $(get_major_version)) || die
- fi
- fi
- ln -s ${soname} ${libdir}/${libname}$(get_libname) || die
-}
-
-src_prepare() {
- find . -name Makefile -exec sed -i \
- -e 's:make:$(MAKE):g' '{}' \; || die
- append-cflags -DADD_
- cat > Makefile.in <<-EOF
- BLLIB=$($(tc-getPKG_CONFIG) --libs blas)
- FC=$(tc-getFC)
- CC=$(tc-getCC)
- CBLIB=../lib/lib${LIBNAME}.a
- LOADER=\$(FC)
- ARCH=$(tc-getAR)
- ARCHFLAGS=cr
- RANLIB=$(tc-getRANLIB)
- EOF
-}
-
-src_compile() {
- emake \
- FFLAGS="${FFLAGS} -fPIC" \
- CFLAGS="${CFLAGS} -fPIC" \
- CBLIB=../lib/lib${LIBNAME}.a \
- alllib
- static_to_shared lib/lib${LIBNAME}.a $($(tc-getPKG_CONFIG) --libs blas)
- if use static-libs; then
- emake clean
- emake alllib
- fi
-}
-
-src_test() {
- cd testing || die
- default
- emake run
-}
-
-src_install() {
- # On linux dynamic libraries are of the form .so.${someversion}
- # On OS X dynamic libraries are of the form ${someversion}.dylib
- dolib.so lib/lib${LIBNAME}*$(get_libname)*
- use static-libs && dolib.a lib/lib${LIBNAME}.a
- insinto /usr/include/cblas
- doins include/cblas.h
- cat <<-EOF > ${LIBNAME}.pc
- prefix=${EPREFIX}/usr
- libdir=\${prefix}/$(get_libdir)
- includedir=\${prefix}/include
- Name: ${LIBNAME}
- Description: ${DESCRIPTION}
- Version: ${PV}
- URL: ${HOMEPAGE}
- Libs: -L\${libdir} -l${LIBNAME}
- Private: -lm
- Cflags: -I\${includedir}/cblas
- Requires: blas
- EOF
- insinto /usr/$(get_libdir)/pkgconfig
- doins ${LIBNAME}.pc
- dodoc README
- insinto /usr/share/doc/${PF}
- doins examples/*.c
- alternatives_for cblas reference 0 \
- /usr/$(get_libdir)/pkgconfig/cblas.pc ${LIBNAME}.pc \
- /usr/include/cblas.h cblas/cblas.h
-}
diff --git a/sci-libs/gotoblas2/gotoblas2-1.13.ebuild b/sci-libs/gotoblas2/gotoblas2-1.13.ebuild
index e95dfbf83..997a22061 100644
--- a/sci-libs/gotoblas2/gotoblas2-1.13.ebuild
+++ b/sci-libs/gotoblas2/gotoblas2-1.13.ebuild
@@ -4,7 +4,9 @@
EAPI=5
-inherit eutils toolchain-funcs alternatives-2 multilib
+NUMERIC_MODULE_NAME=goto2
+
+inherit eutils numeric-int64-multibuild fortran-2 multilib toolchain-funcs
MYPN="GotoBLAS2"
MYP="${MYPN}-${PV}_bsd"
@@ -17,11 +19,9 @@ SRC_URI="http://dev.gentoo.org/~bicatali/${MYP}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~x86-macos ~ppc-macos ~x64-macos"
+IUSE="+incblas +openmp static-libs threads"
-IUSE="+incblas int64 dynamic openmp static-libs threads"
-
-RDEPEND="virtual/fortran"
-DEPEND="${RDEPEND}"
+REQUIRED_USE="|| ( openmp threads )"
S="${WORKDIR}/${MYPN}"
@@ -29,11 +29,9 @@ src_prepare() {
epatch "${FILESDIR}"/${P}-{dynamic,sharedlibs,fcheck,aliasing}.patch
# respect LDFLAGS
sed -i -e '/^LDFLAGS\s*=/d' Makefile.* || die
- if ! use dynamic; then
- sed -i \
- -e "/^COMMON_OPT/s/-O2/${CFLAGS}/" \
- Makefile.rule || die
- fi
+ sed -i \
+ -e "/^COMMON_OPT/s/-O2/${CFLAGS}/" \
+ Makefile.rule || die
# fix executable stacks
local i
for i in $(find . -name \*.S); do
@@ -43,80 +41,89 @@ src_prepare() {
#endif
EOF
done
+ numeric-int64-multibuild_copy_sources
}
src_configure() {
- local use_openmp=$(use openmp && echo 1)
- use threads && use openmp && use_openmp="" && \
- einfo "openmp and threads enabled: using threads"
- sed -i \
- -e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \
- -e "s:^#\s*\(CC\)\s*=.*:\1=$(tc-getCC):" \
- -e "s:^#\s*\(FC\)\s*=.*:\1=$(tc-getFC):" \
- -e "s:^#\s*\(USE_THREAD\)\s*=.*:\1=$(use threads && echo 1 || echo 0):" \
- -e "s:^#\s*\(USE_OPENMP\)\s*=.*:\1=${use_openmp}:" \
- -e "s:^#\s*\(DYNAMIC_ARCH\)\s*=.*:\1=$(use dynamic && echo 1):" \
- -e "s:^#\s*\(INTERFACE64\)\s*=.*:\1=$(use int64 && echo 1):" \
- -e "s:^#\s*\(NO_CBLAS\)\s*=.*:\1=$(use incblas || echo 1):" \
- Makefile.rule || die
+ myconfigure() {
+ sed \
+ -e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \
+ -e "s:^#\s*\(CC\)\s*=.*:\1=$(tc-getCC):" \
+ -e "s:^#\s*\(FC\)\s*=.*:\1=$(tc-getFC):" \
+ -e "s:^#\s*\(USE_THREAD\)\s*=.*:\1=$(usex threads 1 0):" \
+ -e "s:^#\s*\(USE_OPENMP\)\s*=.*:\1=$(usex openmp 1 ""):" \
+ -e "s:^#\s*\(DYNAMIC_ARCH\)\s*=.*:\1=1:" \
+ -e "s:^#\s*\(INTERFACE64\)\s*=.*:\1=$(numeric-int64_is_int64_build && echo 1 || echo ""):" \
+ -e "s:^#\s*\(NO_CBLAS\)\s*=.*:\1=$(usex incblas 1 ""):" \
+ -i Makefile.rule || die
+ if numeric-int64_is_int64_build; then
+ sed \
+ -e 's:libgoto2:libgoto2_int64:g' \
+ -i Makefile* || die
+ fi
+ }
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir myconfigure
}
src_compile() {
- mkdir solibs
- emake libs shared && mv *$(get_libname) solibs/
- use static-libs && emake clean && emake libs NEED_PIC=
+ mycompile() {
+ if numeric-int64_is_static_build; then
+ use static-libs && emake clean && emake libs NEED_PIC=
+ else
+ mkdir solibs || die
+ emake libs shared && mv *$(get_libname) solibs/ || die
+ fi
+ }
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir mycompile
}
src_test() {
- emake tests
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir emake tests
}
src_install() {
- local profname=${PN} threads
- use int64 && profname=${profname}-int64
- if use threads; then
- threads="-pthread"
- profname=${profname}-threads
- elif use openmp; then
- profname=${profname}-openmp
- fi
-
- dolib.so solibs/lib*$(get_libname)
- use static-libs && dolib.a lib*.a
-
- # create pkg-config file and associated eselect file
- cat <<-EOF > ${profname}.pc
- prefix=${EPREFIX}/usr
- libdir=\${prefix}/$(get_libdir)
- includedir=\${prefix}/include
- Name: ${MYPN}
- Description: ${DESCRIPTION}
- Version: ${PV}
- URL: ${HOMEPAGE}
- Libs: -L\${libdir} -lgoto2 -lm ${threads}
- EOF
-
- alternatives_for blas ${profname} 0 \
- "/usr/$(get_libdir)/pkgconfig/blas.pc" "${profname}.pc"
-
- if use incblas; then
- insinto /usr/include/${PN}
- doins cblas.h
- echo >> ${profname}.pc "Cflags: -I\${includedir}/${PN}"
- alternatives_for cblas ${profname} 0 \
- "/usr/$(get_libdir)/pkgconfig/cblas.pc" "${profname}.pc" \
- "/usr/include/cblas.h" "${PN}/cblas.h"
- fi
+ myinstall() {
+ local profname=$(numeric-int64_get_module_name)
+ local libname=libgoto2
+ local libs="-L\${libdir} -lm"
+ if numeric-int64_is_int64_build; then
+ libs+=" -lgoto2_int64"
+ else
+ libs+=" -lgoto2"
+ fi
+ use threads && libs+=" -pthread"
+
+ numeric-int64_is_static_build && libname=libgoto2_int64
+
+ if numeric-int64_is_static_build; then
+ dolib.a lib*.a
+ else
+ dolib.so solibs/lib*$(get_libname)
+
+ create_pkgconfig \
+ --name "${MYPN}" \
+ --libs "${libs}" \
+ --cflags "-I\${includedir}/${PN}" \
+ ${profname}
+ fi
+
+ if use incblas; then
+ insinto /usr/include/${PN}
+ doins cblas.h
+ fi
+ }
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir myinstall
+
+ numeric-int64-multibuild_install_alternative blas ${NUMERIC_MODULE_NAME} /usr/include/cblas.h ${PN}/cblas.h
- insinto /usr/$(get_libdir)/pkgconfig
- doins ${profname}.pc
dodoc 01Readme.txt 03FAQ.txt 05LargePage 06WeirdPerformance
if [[ ${CHOST} == *-darwin* ]] ; then
- cd "${ED}"/usr/$(get_libdir)
+ cd "${ED}"/usr/$(get_libdir) || die
+ local d
for d in *.dylib ; do
ebegin "correcting install_name of ${d}"
- install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}"
+ install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}" || die
eend $?
done
fi
diff --git a/sci-libs/lapack-reference/lapack-reference-3.4.2.ebuild b/sci-libs/lapack-reference/lapack-reference-3.4.2.ebuild
deleted file mode 100644
index e81c5a2fc..000000000
--- a/sci-libs/lapack-reference/lapack-reference-3.4.2.ebuild
+++ /dev/null
@@ -1,139 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-EBASE_PROFNAME="reflapack"
-ESTATIC_MULTIBUILD=1
-inherit fortran-2 cmake-utils multibuild alternatives-2 multilib-build toolchain-funcs fortran-int64
-
-if [[ ${PV} == "9999" ]] ; then
- # 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
-
-DESCRIPTION="Reference implementation of LAPACK"
-HOMEPAGE="http://www.netlib.org/lapack/"
-
-LICENSE="BSD"
-SLOT="0"
-
-IUSE="int64 static-libs test xblas"
-
-RDEPEND="
- >=virtual/blas-2.1-r3[int64?]
- xblas? ( sci-libs/xblas[fortran,int64?] )"
-DEPEND="${RDEPEND}
- virtual/pkgconfig"
-PDEPEND="
- >=virtual/lapack-3.5-r2[int64?]"
-
-S="${WORKDIR}/${MYP}"
-
-src_prepare() {
- fortran-int64_ensure_blas
-
- # 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 -i \
- -e 's:BINARY_DIR}/lapack.pc:BINARY_DIR}/${PROFNAME}.pc:' \
- -e '/ALL_TARGETS/s:lapack):${LIBNAME}):' \
- -e '/LAPACK_LIBRARIES/s:lapack:${LIBNAME}:g' \
- CMakeLists.txt || die
- sed -i \
- -e '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() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- my_src_configure() {
- local profname=$(fortran-int64_get_profname)
- local libname="${profname//-/_}"
- local blas_profname=$(fortran-int64_get_blas_profname)
- local xblas_profname=$(fortran-int64_get_xblas_profname)
- 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) $(fortran-int64_get_fortran_int64_abi_fflags) ${FCFLAGS}"
- -DLAPACK_PKGCONFIG_FFLAGS="$(fortran-int64_get_fortran_int64_abi_fflags)"
- )
- use xblas && \
- mycmakeargs+=( -DXBLAS_LIBRARY:FILEPATH="${EROOT}usr/$(get_libdir)/lib${xblas_libname}.so" )
- if $(fortran-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
- }
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper my_src_configure
-}
-
-src_compile() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper cmake-utils_src_compile
-}
-
-src_test() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper cmake-utils_src_test
-}
-
-src_install() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- my_src_install() {
- cmake-utils_src_install
- if ! $(fortran-int64_is_static_build); then
- local profname=$(fortran-int64_get_profname)
- local provider=$(fortran-int64_get_lapack_provider)
- alternatives_for ${provider} $(fortran-int64_get_profname "reference") 0 \
- /usr/$(get_libdir)/pkgconfig/${provider}.pc ${profname}.pc
- fi
- }
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper my_src_install
-}
diff --git a/sci-libs/lapack-reference/lapack-reference-3.5.0.ebuild b/sci-libs/lapack-reference/lapack-reference-3.5.0.ebuild
index e81c5a2fc..30458b504 100644
--- a/sci-libs/lapack-reference/lapack-reference-3.5.0.ebuild
+++ b/sci-libs/lapack-reference/lapack-reference-3.5.0.ebuild
@@ -1,49 +1,40 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
-EBASE_PROFNAME="reflapack"
-ESTATIC_MULTIBUILD=1
-inherit fortran-2 cmake-utils multibuild alternatives-2 multilib-build toolchain-funcs fortran-int64
-
-if [[ ${PV} == "9999" ]] ; then
- # 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
+
+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"
-IUSE="int64 static-libs test xblas"
+REQUIRED_USE="test? ( ${PYTHON_REQUIRED_USE} )"
RDEPEND="
- >=virtual/blas-2.1-r3[int64?]
+ >=virtual/blas-2.1-r3[int64?,${MULTILIB_USEDEP}]
xblas? ( sci-libs/xblas[fortran,int64?] )"
DEPEND="${RDEPEND}
- virtual/pkgconfig"
-PDEPEND="
- >=virtual/lapack-3.5-r2[int64?]"
+ virtual/pkgconfig
+ test? ( ${PYTHON_DEPS} )"
S="${WORKDIR}/${MYP}"
src_prepare() {
- fortran-int64_ensure_blas
+ 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
@@ -73,12 +64,11 @@ src_prepare() {
}
src_configure() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- my_src_configure() {
- local profname=$(fortran-int64_get_profname)
+ lapack_configure() {
+ local profname=$(numeric-int64_get_module_name)
local libname="${profname//-/_}"
- local blas_profname=$(fortran-int64_get_blas_profname)
- local xblas_profname=$(fortran-int64_get_xblas_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 && \
@@ -93,12 +83,12 @@ src_configure() {
$(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) $(fortran-int64_get_fortran_int64_abi_fflags) ${FCFLAGS}"
- -DLAPACK_PKGCONFIG_FFLAGS="$(fortran-int64_get_fortran_int64_abi_fflags)"
+ -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 $(fortran-int64_is_static_build); then
+ if $(numeric-int64_is_static_build); then
mycmakeargs+=(
-DBUILD_SHARED_LIBS=OFF
-DBUILD_STATIC_LIBS=ON
@@ -111,29 +101,18 @@ src_configure() {
fi
cmake-utils_src_configure
}
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper my_src_configure
+ numeric-int64-multibuild_foreach_all_abi_variants lapack_configure
}
src_compile() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper cmake-utils_src_compile
+ numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_compile
}
src_test() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper cmake-utils_src_test
+ numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_test
}
src_install() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- my_src_install() {
- cmake-utils_src_install
- if ! $(fortran-int64_is_static_build); then
- local profname=$(fortran-int64_get_profname)
- local provider=$(fortran-int64_get_lapack_provider)
- alternatives_for ${provider} $(fortran-int64_get_profname "reference") 0 \
- /usr/$(get_libdir)/pkgconfig/${provider}.pc ${profname}.pc
- fi
- }
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper my_src_install
+ numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_install
+ numeric-int64-multibuild_install_alternative lapack reference
}
diff --git a/sci-libs/lapack-reference/lapack-reference-9999.ebuild b/sci-libs/lapack-reference/lapack-reference-9999.ebuild
index e81c5a2fc..466c762e8 100644
--- a/sci-libs/lapack-reference/lapack-reference-9999.ebuild
+++ b/sci-libs/lapack-reference/lapack-reference-9999.ebuild
@@ -1,49 +1,45 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
-EBASE_PROFNAME="reflapack"
-ESTATIC_MULTIBUILD=1
-inherit fortran-2 cmake-utils multibuild alternatives-2 multilib-build toolchain-funcs fortran-int64
-
-if [[ ${PV} == "9999" ]] ; then
- # 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
+
+PYTHON_COMPAT=( python2_7 )
+
+NUMERIC_MODULE_NAME="reflapack"
+
+inherit alternatives-2 cmake-utils fortran-2 git-r3 numeric-int64-multibuild python-any-r1
+
+# 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
+
+MY_PN=lapack-reference
+MYP=${MY_PN}-${PV}
DESCRIPTION="Reference implementation of LAPACK"
HOMEPAGE="http://www.netlib.org/lapack/"
+EGIT_REPO_URI="https://github.com/nschloe/lapack.git"
LICENSE="BSD"
SLOT="0"
+KEYWORDS=""
+IUSE="static-libs test xblas"
-IUSE="int64 static-libs test xblas"
+REQUIRED_USE="test? ( ${PYTHON_REQUIRED_USE} )"
RDEPEND="
- >=virtual/blas-2.1-r3[int64?]
+ >=virtual/blas-2.1-r3[int64?,${MULTILIB_USEDEP}]
xblas? ( sci-libs/xblas[fortran,int64?] )"
DEPEND="${RDEPEND}
- virtual/pkgconfig"
-PDEPEND="
- >=virtual/lapack-3.5-r2[int64?]"
+ virtual/pkgconfig
+ test? ( ${PYTHON_DEPS} )"
S="${WORKDIR}/${MYP}"
src_prepare() {
- fortran-int64_ensure_blas
+ 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
@@ -73,12 +69,11 @@ src_prepare() {
}
src_configure() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- my_src_configure() {
- local profname=$(fortran-int64_get_profname)
+ lapack_configure() {
+ local profname=$(numeric-int64_get_module_name)
local libname="${profname//-/_}"
- local blas_profname=$(fortran-int64_get_blas_profname)
- local xblas_profname=$(fortran-int64_get_xblas_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 && \
@@ -93,12 +88,12 @@ src_configure() {
$(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) $(fortran-int64_get_fortran_int64_abi_fflags) ${FCFLAGS}"
- -DLAPACK_PKGCONFIG_FFLAGS="$(fortran-int64_get_fortran_int64_abi_fflags)"
+ -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 $(fortran-int64_is_static_build); then
+ if $(numeric-int64_is_static_build); then
mycmakeargs+=(
-DBUILD_SHARED_LIBS=OFF
-DBUILD_STATIC_LIBS=ON
@@ -111,29 +106,18 @@ src_configure() {
fi
cmake-utils_src_configure
}
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper my_src_configure
+ numeric-int64-multibuild_foreach_all_abi_variants lapack_configure
}
src_compile() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper cmake-utils_src_compile
+ numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_compile
}
src_test() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper cmake-utils_src_test
+ numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_test
}
src_install() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- my_src_install() {
- cmake-utils_src_install
- if ! $(fortran-int64_is_static_build); then
- local profname=$(fortran-int64_get_profname)
- local provider=$(fortran-int64_get_lapack_provider)
- alternatives_for ${provider} $(fortran-int64_get_profname "reference") 0 \
- /usr/$(get_libdir)/pkgconfig/${provider}.pc ${profname}.pc
- fi
- }
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper my_src_install
+ numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_install
+ numeric-int64-multibuild_install_alternative lapack reference
}
diff --git a/sci-libs/openblas/openblas-0.2.11.ebuild b/sci-libs/openblas/openblas-0.2.11.ebuild
deleted file mode 100644
index 3b7d0b72b..000000000
--- a/sci-libs/openblas/openblas-0.2.11.ebuild
+++ /dev/null
@@ -1,227 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-EBASE_PROFNAME="openblas"
-inherit alternatives-2 eutils multilib fortran-2 multibuild multilib-build toolchain-funcs fortran-int64
-
-SRC_URI+="http://dev.gentoo.org/~gienah/distfiles/${PN}-0.2.11-gentoo.patch"
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="https://github.com/xianyi/OpenBLAS.git"
- EGIT_BRANCH="develop"
- inherit git-r3
- KEYWORDS=""
-else
- SRC_URI+=" http://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz"
- KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~ppc-macos ~x64-macos"
-fi
-
-DESCRIPTION="Optimized BLAS library based on GotoBLAS2"
-HOMEPAGE="http://xianyi.github.com/OpenBLAS/"
-LICENSE="BSD"
-SLOT="0"
-IUSE="dynamic int64 openmp static-libs threads"
-
-RDEPEND=""
-DEPEND="${RDEPEND}
- virtual/pkgconfig"
-PDEPEND="
- >=virtual/blas-2.1-r2[int64?]
- >=virtual/cblas-2.0-r1[int64?]"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/openblas/cblas.h
- /usr/include/openblas/f77blas.h
- /usr/include/openblas/openblas_config.h
-)
-
-get_openblas_flags() {
- local openblas_flags=""
- use dynamic && \
- openblas_flags+=" DYNAMIC_ARCH=1 TARGET=GENERIC NUM_THREADS=64 NO_AFFINITY=1"
- $(fortran-int64_is_int64_build) && \
- openblas_flags+=" INTERFACE64=1"
- # choose posix threads over openmp when the two are set
- # yet to see the need of having the two profiles simultaneously
- if use threads; then
- openblas_flags+=" USE_THREAD=1 USE_OPENMP=0"
- elif use openmp; then
- openblas_flags+=" USE_THREAD=0 USE_OPENMP=1"
- fi
- local profname=$(fortran-int64_get_profname)
- local libname="${profname//-/_}"
- local underscoresuffix="${libname#${PN}}"
- if [[ "${underscoresuffix}" != "_" ]]; then
- local libnamesuffix="${underscoresuffix#_}"
- openblas_flags+=" LIBNAMESUFFIX=${libnamesuffix}"
- fi
- echo "${openblas_flags}"
-}
-
-get_openblas_abi_cflags() {
- local openblas_abi_cflags=""
- if [[ "${ABI}" == "x86" ]]; then
- openblas_abi_cflags="-DOPENBLAS_ARCH_X86=1 -DOPENBLAS___32BIT__=1"
- else
- openblas_abi_cflags="-DOPENBLAS_ARCH_X86_64=1 -DOPENBLAS___64BIT__=1"
- fi
- $(fortran-int64_is_int64_build) && \
- openblas_abi_cflags+=" -DOPENBLAS_USE64BITINT"
- echo "${openblas_abi_cflags}"
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git-r3_src_unpack
- else
- default
- if [[ ${PV} != "9999" ]] ; then
- find "${WORKDIR}" -maxdepth 1 -type d -name \*OpenBLAS\* && \
- mv "${WORKDIR}"/*OpenBLAS* "${S}"
- fi
- fi
-}
-
-src_prepare() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- epatch "${DISTDIR}/${PN}-0.2.11-gentoo.patch"
- if [[ ${PV} == "0.2.11" ]] ; then
- epatch "${FILESDIR}/${PN}-0.2.11-cpuid_x86.patch"
- fi
- # lapack and lapacke are not modified from upstream lapack
- sed \
- -e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \
- -e "s:^#\s*\(NO_LAPACKE\)\s*=.*:\1=1:" \
- -i Makefile.rule || die
- multibuild_copy_sources
-}
-
-src_configure() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- my_configure() {
- local openblas_abi_cflags="$(get_openblas_abi_cflags)"
- local internal_openblas_abi_cflags="${openblas_abi_cflags//OPENBLAS_}"
- sed \
- -e "s:^#\s*\(CC\)\s*=.*:\1=$(tc-getCC) $(get_abi_CFLAGS):" \
- -e "s:^#\s*\(FC\)\s*=.*:\1=$(tc-getFC) $(get_abi_CFLAGS):" \
- -e "s:^#\s*\(COMMON_OPT\)\s*=.*:\1=${CFLAGS} ${internal_openblas_abi_cflags}:" \
- -i Makefile.rule || die
- }
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_configure
-}
-
-src_compile() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- # openblas already does multi-jobs
- MAKEOPTS+=" -j1"
- my_src_compile () {
- local openblas_flags=$(get_openblas_flags)
- local profname=$(fortran-int64_get_profname)
- local libname="${profname//-/_}"
- einfo "Compiling profile ${profname}"
- # cflags already defined twice
- unset CFLAGS
- emake clean
- emake libs shared ${openblas_flags}
- mkdir -p libs && mv libopenblas* libs/
- # avoid pic when compiling static libraries, so re-compiling
- if use static-libs; then
- emake clean
- emake libs ${openblas_flags} NO_SHARED=1 NEED_PIC=
- mv libopenblas* libs/
- fi
- # Fix Bug 524612 - [science overlay] sci-libs/openblas-0.2.11 - Assembler messages:
- # ../kernel/x86_64/gemm_kernel_8x4_barcelona.S:451: Error: missing ')'
- # The problem is applying this patch in src_prepare() causes build failures on
- # assembler code as the assembler does not understand sizeof(float). So
- # delay applying the patch until after building the libraries.
- epatch "${FILESDIR}/${PN}-0.2.11-openblas_config_header_same_between_ABIs.patch"
- rm -f config.h config_last.h
- # Note: prints this spurious warning: make: Nothing to be done for 'config.h'.
- emake config.h
- cp config.h config_last.h || die
- cat <<-EOF > ${profname}.pc
- prefix=${EPREFIX}/usr
- libdir=\${prefix}/$(get_libdir)
- includedir=\${prefix}/include
- Name: ${profname}
- Description: ${DESCRIPTION}
- Version: ${PV}
- URL: ${HOMEPAGE}
- Libs: -L\${libdir} -l${libname}
- Libs.private: -lm
- EOF
- local openblas_abi_cflags=$(get_openblas_abi_cflags)
- local openblas_abi_fflags=$(fortran-int64_get_fortran_int64_abi_fflags)
- cat <<-EOF >> ${profname}.pc
- Cflags: -I\${includedir}/${PN} ${openblas_abi_cflags}
- Fflags=${openblas_abi_fflags}
- EOF
- mv libs/libopenblas* . || die
- }
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_compile
-}
-
-src_test() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- my_src_test () {
- local openblas_flags=$(get_openblas_flags)
- emake tests ${openblas_flags}
- }
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_test
-}
-
-src_install() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- my_src_install() {
- local openblas_flags=$(get_openblas_flags)
- local profname=$(fortran-int64_get_profname)
- local pcfile
- for pcfile in *.pc; do
- local profname=${pcfile%.pc}
- # The file /usr/include/openblas/openblas_config.h is generated during the install.
- # The sed on config_last.h removes the #define's OPENBLAS_USE64BITINT
- # OPENBLASS__32BIT__ OPENBLASS__64BIT__ OPENBLAS__ARCH_X86 OPENBLAS__ARCH_X86_64
- # from /usr/include/openblas/openblas_config.h. We then specify it in Cflags in
- # the /usr/lib64/pkg-config/openblas-int64-{threads,openmp}.pc file.
- sed -e '/#define USE64BITINT/d' \
- -e '/#define ARCH_X86/d' \
- -e '/#define __\(32\|64\)BIT__/d' \
- -i config_last.h \
- || die "Could not ensure there is no definition of USE64BITINT in config_last.h"
- emake install \
- PREFIX="${ED}"usr ${openblas_flags} \
- OPENBLAS_INCLUDE_DIR="${ED}"usr/include/${PN} \
- OPENBLAS_LIBRARY_DIR="${ED}"usr/$(get_libdir)
- use static-libs || rm "${ED}"usr/$(get_libdir)/lib*.a
- alternatives_for $(fortran-int64_get_blas_provider) ${profname} 0 \
- /usr/$(get_libdir)/pkgconfig/$(fortran-int64_get_blas_provider).pc ${pcfile}
- alternatives_for $(fortran-int64_get_cblas_provider) ${profname} 0 \
- /usr/$(get_libdir)/pkgconfig/$(fortran-int64_get_cblas_provider).pc ${pcfile} \
- /usr/include/cblas.h ${PN}/cblas.h
- insinto /usr/$(get_libdir)/pkgconfig
- doins ${pcfile}
- done
-
- if [[ ${CHOST} == *-darwin* ]] ; then
- cd "${ED}"/usr/$(get_libdir)
- local d
- for d in *.dylib ; do
- ebegin "Correcting install_name of ${d}"
- install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}"
- eend $?
- done
- fi
- if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 ]]; then
- multilib_prepare_wrappers
- multilib_check_headers
- fi
- }
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_install
- multilib_install_wrappers
-
- dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt
- dodoc *md Changelog.txt
-}
diff --git a/sci-libs/openblas/openblas-0.2.12.ebuild b/sci-libs/openblas/openblas-0.2.12.ebuild
deleted file mode 100644
index 91736c817..000000000
--- a/sci-libs/openblas/openblas-0.2.12.ebuild
+++ /dev/null
@@ -1,227 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-EBASE_PROFNAME="openblas"
-inherit alternatives-2 eutils multilib fortran-2 multibuild multilib-build toolchain-funcs fortran-int64
-
-SRC_URI+="http://dev.gentoo.org/~gienah/distfiles/${PN}-0.2.11-gentoo.patch"
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="https://github.com/xianyi/OpenBLAS.git"
- EGIT_BRANCH="develop"
- inherit git-r3
- KEYWORDS=""
-else
- SRC_URI+=" http://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz"
- KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~ppc-macos ~x64-macos"
-fi
-
-DESCRIPTION="Optimized BLAS library based on GotoBLAS2"
-HOMEPAGE="http://xianyi.github.com/OpenBLAS/"
-LICENSE="BSD"
-SLOT="0"
-IUSE="dynamic int64 openmp static-libs threads"
-
-RDEPEND=""
-DEPEND="${RDEPEND}
- virtual/pkgconfig"
-PDEPEND="
- >=virtual/blas-2.1-r2[int64?]
- >=virtual/cblas-2.0-r1[int64?]"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/openblas/cblas.h
- /usr/include/openblas/f77blas.h
- /usr/include/openblas/openblas_config.h
-)
-
-get_openblas_flags() {
- local openblas_flags=""
- use dynamic && \
- openblas_flags+=" DYNAMIC_ARCH=1 TARGET=GENERIC NUM_THREADS=64 NO_AFFINITY=1"
- $(fortran-int64_is_int64_build) && \
- openblas_flags+=" INTERFACE64=1"
- # choose posix threads over openmp when the two are set
- # yet to see the need of having the two profiles simultaneously
- if use threads; then
- openblas_flags+=" USE_THREAD=1 USE_OPENMP=0"
- elif use openmp; then
- openblas_flags+=" USE_OPENMP=1"
- fi
- local profname=$(fortran-int64_get_profname)
- local libname="${profname//-/_}"
- local underscoresuffix="${libname#${PN}}"
- if [[ "${underscoresuffix}" != "_" ]]; then
- local libnamesuffix="${underscoresuffix#_}"
- openblas_flags+=" LIBNAMESUFFIX=${libnamesuffix}"
- fi
- echo "${openblas_flags}"
-}
-
-get_openblas_abi_cflags() {
- local openblas_abi_cflags=""
- if [[ "${ABI}" == "x86" ]]; then
- openblas_abi_cflags="-DOPENBLAS_ARCH_X86=1 -DOPENBLAS___32BIT__=1"
- else
- openblas_abi_cflags="-DOPENBLAS_ARCH_X86_64=1 -DOPENBLAS___64BIT__=1"
- fi
- $(fortran-int64_is_int64_build) && \
- openblas_abi_cflags+=" -DOPENBLAS_USE64BITINT"
- echo "${openblas_abi_cflags}"
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git-r3_src_unpack
- else
- default
- if [[ ${PV} != "9999" ]] ; then
- find "${WORKDIR}" -maxdepth 1 -type d -name \*OpenBLAS\* && \
- mv "${WORKDIR}"/*OpenBLAS* "${S}"
- fi
- fi
-}
-
-src_prepare() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- epatch "${DISTDIR}/${PN}-0.2.11-gentoo.patch"
- if [[ ${PV} == "0.2.11" ]] ; then
- epatch "${FILESDIR}/${PN}-0.2.11-cpuid_x86.patch"
- fi
- # lapack and lapacke are not modified from upstream lapack
- sed \
- -e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \
- -e "s:^#\s*\(NO_LAPACKE\)\s*=.*:\1=1:" \
- -i Makefile.rule || die
- multibuild_copy_sources
-}
-
-src_configure() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- my_configure() {
- local openblas_abi_cflags="$(get_openblas_abi_cflags)"
- local internal_openblas_abi_cflags="${openblas_abi_cflags//OPENBLAS_}"
- sed \
- -e "s:^#\s*\(CC\)\s*=.*:\1=$(tc-getCC) $(get_abi_CFLAGS):" \
- -e "s:^#\s*\(FC\)\s*=.*:\1=$(tc-getFC) $(get_abi_CFLAGS):" \
- -e "s:^#\s*\(COMMON_OPT\)\s*=.*:\1=${CFLAGS} ${internal_openblas_abi_cflags}:" \
- -i Makefile.rule || die
- }
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_configure
-}
-
-src_compile() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- # openblas already does multi-jobs
- MAKEOPTS+=" -j1"
- my_src_compile () {
- local openblas_flags=$(get_openblas_flags)
- local profname=$(fortran-int64_get_profname)
- local libname="${profname//-/_}"
- einfo "Compiling profile ${profname}"
- # cflags already defined twice
- unset CFLAGS
- emake clean
- emake libs shared ${openblas_flags}
- mkdir -p libs && mv libopenblas* libs/
- # avoid pic when compiling static libraries, so re-compiling
- if use static-libs; then
- emake clean
- emake libs ${openblas_flags} NO_SHARED=1 NEED_PIC=
- mv libopenblas* libs/
- fi
- # Fix Bug 524612 - [science overlay] sci-libs/openblas-0.2.11 - Assembler messages:
- # ../kernel/x86_64/gemm_kernel_8x4_barcelona.S:451: Error: missing ')'
- # The problem is applying this patch in src_prepare() causes build failures on
- # assembler code as the assembler does not understand sizeof(float). So
- # delay applying the patch until after building the libraries.
- epatch "${FILESDIR}/${PN}-0.2.11-openblas_config_header_same_between_ABIs.patch"
- rm -f config.h config_last.h
- # Note: prints this spurious warning: make: Nothing to be done for 'config.h'.
- emake config.h
- cp config.h config_last.h || die
- cat <<-EOF > ${profname}.pc
- prefix=${EPREFIX}/usr
- libdir=\${prefix}/$(get_libdir)
- includedir=\${prefix}/include
- Name: ${profname}
- Description: ${DESCRIPTION}
- Version: ${PV}
- URL: ${HOMEPAGE}
- Libs: -L\${libdir} -l${libname}
- Libs.private: -lm
- EOF
- local openblas_abi_cflags=$(get_openblas_abi_cflags)
- local openblas_abi_fflags=$(fortran-int64_get_fortran_int64_abi_fflags)
- cat <<-EOF >> ${profname}.pc
- Cflags: -I\${includedir}/${PN} ${openblas_abi_cflags}
- Fflags=${openblas_abi_fflags}
- EOF
- mv libs/libopenblas* . || die
- }
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_compile
-}
-
-src_test() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- my_src_test () {
- local openblas_flags=$(get_openblas_flags)
- emake tests ${openblas_flags}
- }
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_test
-}
-
-src_install() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- my_src_install() {
- local openblas_flags=$(get_openblas_flags)
- local profname=$(fortran-int64_get_profname)
- local pcfile
- for pcfile in *.pc; do
- local profname=${pcfile%.pc}
- # The file /usr/include/openblas/openblas_config.h is generated during the install.
- # The sed on config_last.h removes the #define's OPENBLAS_USE64BITINT
- # OPENBLASS__32BIT__ OPENBLASS__64BIT__ OPENBLAS__ARCH_X86 OPENBLAS__ARCH_X86_64
- # from /usr/include/openblas/openblas_config.h. We then specify it in Cflags in
- # the /usr/lib64/pkg-config/openblas-int64-{threads,openmp}.pc file.
- sed -e '/#define USE64BITINT/d' \
- -e '/#define ARCH_X86/d' \
- -e '/#define __\(32\|64\)BIT__/d' \
- -i config_last.h \
- || die "Could not ensure there is no definition of USE64BITINT in config_last.h"
- emake install \
- PREFIX="${ED}"usr ${openblas_flags} \
- OPENBLAS_INCLUDE_DIR="${ED}"usr/include/${PN} \
- OPENBLAS_LIBRARY_DIR="${ED}"usr/$(get_libdir)
- use static-libs || rm "${ED}"usr/$(get_libdir)/lib*.a
- alternatives_for $(fortran-int64_get_blas_provider) ${profname} 0 \
- /usr/$(get_libdir)/pkgconfig/$(fortran-int64_get_blas_provider).pc ${pcfile}
- alternatives_for $(fortran-int64_get_cblas_provider) ${profname} 0 \
- /usr/$(get_libdir)/pkgconfig/$(fortran-int64_get_cblas_provider).pc ${pcfile} \
- /usr/include/cblas.h ${PN}/cblas.h
- insinto /usr/$(get_libdir)/pkgconfig
- doins ${pcfile}
- done
-
- if [[ ${CHOST} == *-darwin* ]] ; then
- cd "${ED}"/usr/$(get_libdir)
- local d
- for d in *.dylib ; do
- ebegin "Correcting install_name of ${d}"
- install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}"
- eend $?
- done
- fi
- if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 ]]; then
- multilib_prepare_wrappers
- multilib_check_headers
- fi
- }
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_install
- multilib_install_wrappers
-
- dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt
- dodoc *md Changelog.txt
-}
diff --git a/sci-libs/openblas/openblas-0.2.14.ebuild b/sci-libs/openblas/openblas-0.2.14.ebuild
index 91736c817..3a92aef0f 100644
--- a/sci-libs/openblas/openblas-0.2.14.ebuild
+++ b/sci-libs/openblas/openblas-0.2.14.ebuild
@@ -4,32 +4,24 @@
EAPI=5
-EBASE_PROFNAME="openblas"
-inherit alternatives-2 eutils multilib fortran-2 multibuild multilib-build toolchain-funcs fortran-int64
-
-SRC_URI+="http://dev.gentoo.org/~gienah/distfiles/${PN}-0.2.11-gentoo.patch"
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="https://github.com/xianyi/OpenBLAS.git"
- EGIT_BRANCH="develop"
- inherit git-r3
- KEYWORDS=""
-else
- SRC_URI+=" http://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz"
- KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~ppc-macos ~x64-macos"
-fi
+NUMERIC_MODULE_NAME="openblas"
+
+inherit alternatives-2 numeric numeric-int64-multibuild
DESCRIPTION="Optimized BLAS library based on GotoBLAS2"
HOMEPAGE="http://xianyi.github.com/OpenBLAS/"
+SRC_URI="
+ http://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz
+ http://dev.gentoo.org/~gienah/distfiles/${PN}-0.2.11-gentoo.patch"
+
LICENSE="BSD"
SLOT="0"
-IUSE="dynamic int64 openmp static-libs threads"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~ppc-macos ~x64-macos"
+IUSE="dynamic openmp static-libs threads"
RDEPEND=""
DEPEND="${RDEPEND}
virtual/pkgconfig"
-PDEPEND="
- >=virtual/blas-2.1-r2[int64?]
- >=virtual/cblas-2.0-r1[int64?]"
MULTILIB_WRAPPED_HEADERS=(
/usr/include/openblas/cblas.h
@@ -38,69 +30,59 @@ MULTILIB_WRAPPED_HEADERS=(
)
get_openblas_flags() {
- local openblas_flags=""
+ local openblas_flags=()
use dynamic && \
- openblas_flags+=" DYNAMIC_ARCH=1 TARGET=GENERIC NUM_THREADS=64 NO_AFFINITY=1"
- $(fortran-int64_is_int64_build) && \
- openblas_flags+=" INTERFACE64=1"
+ openblas_flags+=( DYNAMIC_ARCH=1 TARGET=GENERIC NUM_THREADS=64 NO_AFFINITY=1 )
+ $(numeric-int64_is_int64_build) && \
+ openblas_flags+=( INTERFACE64=1 )
# choose posix threads over openmp when the two are set
# yet to see the need of having the two profiles simultaneously
if use threads; then
- openblas_flags+=" USE_THREAD=1 USE_OPENMP=0"
+ openblas_flags+=( USE_THREAD=1 USE_OPENMP=0 )
elif use openmp; then
- openblas_flags+=" USE_OPENMP=1"
+ openblas_flags+=( USE_OPENMP=1 )
fi
- local profname=$(fortran-int64_get_profname)
+ local profname=$(numeric-int64_get_module_name)
local libname="${profname//-/_}"
local underscoresuffix="${libname#${PN}}"
if [[ "${underscoresuffix}" != "_" ]]; then
local libnamesuffix="${underscoresuffix#_}"
- openblas_flags+=" LIBNAMESUFFIX=${libnamesuffix}"
+ openblas_flags+=( LIBNAMESUFFIX=${libnamesuffix} )
fi
- echo "${openblas_flags}"
+ echo "${openblas_flags[@]}"
}
get_openblas_abi_cflags() {
- local openblas_abi_cflags=""
+ local openblas_abi_cflags=()
if [[ "${ABI}" == "x86" ]]; then
- openblas_abi_cflags="-DOPENBLAS_ARCH_X86=1 -DOPENBLAS___32BIT__=1"
+ openblas_abi_cflags=( -DOPENBLAS_ARCH_X86=1 -DOPENBLAS___32BIT__=1 )
else
- openblas_abi_cflags="-DOPENBLAS_ARCH_X86_64=1 -DOPENBLAS___64BIT__=1"
+ openblas_abi_cflags=( -DOPENBLAS_ARCH_X86_64=1 -DOPENBLAS___64BIT__=1 )
fi
- $(fortran-int64_is_int64_build) && \
- openblas_abi_cflags+=" -DOPENBLAS_USE64BITINT"
- echo "${openblas_abi_cflags}"
+ $(numeric-int64_is_int64_build) && \
+ openblas_abi_cflags+=( -DOPENBLAS_USE64BITINT )
+ echo "${openblas_abi_cflags[@]}"
}
src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git-r3_src_unpack
- else
- default
- if [[ ${PV} != "9999" ]] ; then
- find "${WORKDIR}" -maxdepth 1 -type d -name \*OpenBLAS\* && \
- mv "${WORKDIR}"/*OpenBLAS* "${S}"
- fi
- fi
+ default
+ find "${WORKDIR}" -maxdepth 1 -type d -name \*OpenBLAS\* && \
+ mv "${WORKDIR}"/*OpenBLAS* "${S}" || die
}
src_prepare() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
epatch "${DISTDIR}/${PN}-0.2.11-gentoo.patch"
- if [[ ${PV} == "0.2.11" ]] ; then
- epatch "${FILESDIR}/${PN}-0.2.11-cpuid_x86.patch"
- fi
+
# lapack and lapacke are not modified from upstream lapack
sed \
-e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \
-e "s:^#\s*\(NO_LAPACKE\)\s*=.*:\1=1:" \
-i Makefile.rule || die
- multibuild_copy_sources
+ numeric-int64-multibuild_copy_sources
}
src_configure() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- my_configure() {
+ blas_configure() {
local openblas_abi_cflags="$(get_openblas_abi_cflags)"
local internal_openblas_abi_cflags="${openblas_abi_cflags//OPENBLAS_}"
sed \
@@ -109,28 +91,23 @@ src_configure() {
-e "s:^#\s*\(COMMON_OPT\)\s*=.*:\1=${CFLAGS} ${internal_openblas_abi_cflags}:" \
-i Makefile.rule || die
}
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_configure
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir blas_configure
}
src_compile() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
# openblas already does multi-jobs
MAKEOPTS+=" -j1"
my_src_compile () {
local openblas_flags=$(get_openblas_flags)
- local profname=$(fortran-int64_get_profname)
- local libname="${profname//-/_}"
- einfo "Compiling profile ${profname}"
# cflags already defined twice
- unset CFLAGS
- emake clean
- emake libs shared ${openblas_flags}
- mkdir -p libs && mv libopenblas* libs/
+ unset CFLAGS || die
+ emake clean && emake libs shared ${openblas_flags}
+ mkdir -p libs && mv libopenblas* libs/ || die
# avoid pic when compiling static libraries, so re-compiling
if use static-libs; then
emake clean
emake libs ${openblas_flags} NO_SHARED=1 NEED_PIC=
- mv libopenblas* libs/
+ mv libopenblas* libs/ || die
fi
# Fix Bug 524612 - [science overlay] sci-libs/openblas-0.2.11 - Assembler messages:
# ../kernel/x86_64/gemm_kernel_8x4_barcelona.S:451: Error: missing ')'
@@ -138,79 +115,64 @@ src_compile() {
# assembler code as the assembler does not understand sizeof(float). So
# delay applying the patch until after building the libraries.
epatch "${FILESDIR}/${PN}-0.2.11-openblas_config_header_same_between_ABIs.patch"
- rm -f config.h config_last.h
+ rm -f config.h config_last.h || die
# Note: prints this spurious warning: make: Nothing to be done for 'config.h'.
emake config.h
cp config.h config_last.h || die
- cat <<-EOF > ${profname}.pc
- prefix=${EPREFIX}/usr
- libdir=\${prefix}/$(get_libdir)
- includedir=\${prefix}/include
- Name: ${profname}
- Description: ${DESCRIPTION}
- Version: ${PV}
- URL: ${HOMEPAGE}
- Libs: -L\${libdir} -l${libname}
- Libs.private: -lm
- EOF
- local openblas_abi_cflags=$(get_openblas_abi_cflags)
- local openblas_abi_fflags=$(fortran-int64_get_fortran_int64_abi_fflags)
- cat <<-EOF >> ${profname}.pc
- Cflags: -I\${includedir}/${PN} ${openblas_abi_cflags}
- Fflags=${openblas_abi_fflags}
- EOF
+
mv libs/libopenblas* . || die
}
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_compile
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_compile
}
src_test() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
my_src_test () {
local openblas_flags=$(get_openblas_flags)
emake tests ${openblas_flags}
}
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_test
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_test
}
src_install() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
my_src_install() {
local openblas_flags=$(get_openblas_flags)
- local profname=$(fortran-int64_get_profname)
+ local profname=$(numeric-int64_get_module_name)
local pcfile
- for pcfile in *.pc; do
- local profname=${pcfile%.pc}
- # The file /usr/include/openblas/openblas_config.h is generated during the install.
- # The sed on config_last.h removes the #define's OPENBLAS_USE64BITINT
- # OPENBLASS__32BIT__ OPENBLASS__64BIT__ OPENBLAS__ARCH_X86 OPENBLAS__ARCH_X86_64
- # from /usr/include/openblas/openblas_config.h. We then specify it in Cflags in
- # the /usr/lib64/pkg-config/openblas-int64-{threads,openmp}.pc file.
- sed -e '/#define USE64BITINT/d' \
- -e '/#define ARCH_X86/d' \
- -e '/#define __\(32\|64\)BIT__/d' \
- -i config_last.h \
- || die "Could not ensure there is no definition of USE64BITINT in config_last.h"
- emake install \
- PREFIX="${ED}"usr ${openblas_flags} \
- OPENBLAS_INCLUDE_DIR="${ED}"usr/include/${PN} \
- OPENBLAS_LIBRARY_DIR="${ED}"usr/$(get_libdir)
- use static-libs || rm "${ED}"usr/$(get_libdir)/lib*.a
- alternatives_for $(fortran-int64_get_blas_provider) ${profname} 0 \
- /usr/$(get_libdir)/pkgconfig/$(fortran-int64_get_blas_provider).pc ${pcfile}
- alternatives_for $(fortran-int64_get_cblas_provider) ${profname} 0 \
- /usr/$(get_libdir)/pkgconfig/$(fortran-int64_get_cblas_provider).pc ${pcfile} \
- /usr/include/cblas.h ${PN}/cblas.h
- insinto /usr/$(get_libdir)/pkgconfig
- doins ${pcfile}
- done
+ # The file /usr/include/openblas/openblas_config.h is generated during the install.
+ # The sed on config_last.h removes the #define's OPENBLAS_USE64BITINT
+ # OPENBLASS__32BIT__ OPENBLASS__64BIT__ OPENBLAS__ARCH_X86 OPENBLAS__ARCH_X86_64
+ # from /usr/include/openblas/openblas_config.h. We then specify it in Cflags in
+ # the /usr/lib64/pkg-config/openblas-int64-{threads,openmp}.pc file.
+ sed -e '/#define USE64BITINT/d' \
+ -e '/#define ARCH_X86/d' \
+ -e '/#define __\(32\|64\)BIT__/d' \
+ -i config_last.h \
+ || die "Could not ensure there is no definition of USE64BITINT in config_last.h"
+ emake install \
+ PREFIX="${ED}"usr ${openblas_flags} \
+ OPENBLAS_INCLUDE_DIR="${ED}"usr/include/${PN} \
+ OPENBLAS_LIBRARY_DIR="${ED}"usr/$(get_libdir)
+ if ! use static-libs; then
+ rm "${ED}"usr/$(get_libdir)/lib*.a || die
+ fi
+
+ local openblas_abi_cflags=$(get_openblas_abi_cflags)
+ local openblas_abi_fflags=$(numeric-int64_get_fortran_int64_abi_fflags)
+ local libname="${profname//-/_}"
+
+ create_pkgconfig \
+ --name "${profname}" \
+ --libs "-L\${libdir} -l${libname}" \
+ --libs-private "-lm" \
+ --cflags "-I\${includedir}/${PN} ${openblas_abi_cflags}" \
+ ${profname}
if [[ ${CHOST} == *-darwin* ]] ; then
- cd "${ED}"/usr/$(get_libdir)
+ cd "${ED}"/usr/$(get_libdir) || die
local d
- for d in *.dylib ; do
+ for d in *.dylib; do
ebegin "Correcting install_name of ${d}"
- install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}"
+ install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}" || die
eend $?
done
fi
@@ -219,9 +181,13 @@ src_install() {
multilib_check_headers
fi
}
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_install
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_install
+
+ printf "/usr/include/cblas.h ${PN}/cblas.h" > "${T}"/alternative-cblas-generic.sh || die
+ numeric-int64-multibuild_install_alternative blas ${NUMERIC_MODULE_NAME}
+ numeric-int64-multibuild_install_alternative cblas ${NUMERIC_MODULE_NAME}
+
multilib_install_wrappers
- dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt
- dodoc *md Changelog.txt
+ dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt *md Changelog.txt
}
diff --git a/sci-libs/openblas/openblas-0.2.8.ebuild b/sci-libs/openblas/openblas-0.2.8.ebuild
deleted file mode 100644
index 05c420fa3..000000000
--- a/sci-libs/openblas/openblas-0.2.8.ebuild
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit eutils multilib toolchain-funcs alternatives-2 multilib fortran-2
-
-DESCRIPTION="Optimized BLAS library based on GotoBLAS2"
-HOMEPAGE="http://xianyi.github.com/OpenBLAS/"
-SRC_URI="http://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~ppc-macos ~x64-macos"
-
-LICENSE="BSD"
-SLOT="0"
-
-IUSE="int64 dynamic openmp static-libs threads"
-
-RDEPEND=""
-DEPEND="${RDEPEND}"
-
-src_unpack() {
- default
- find "${WORKDIR}" -maxdepth 1 -type d -name \*OpenBLAS\* && \
- mv "${WORKDIR}"/*OpenBLAS* "${S}"
-}
-
-src_configure() {
- # lapack and lapacke are not modified from upstream lapack
- sed -i \
- -e "s:^#\s*\(CC\)\s*=.*:\1=$(tc-getCC):" \
- -e "s:^#\s*\(FC\)\s*=.*:\1=$(tc-getFC):" \
- -e "s:^#\s*\(COMMON_OPT\)\s*=.*:\1=${CFLAGS}:" \
- -e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \
- -e "s:^#\s*\(NO_LAPACKE\)\s*=.*:\1=1:" \
- Makefile.rule || die
-}
-
-openblas_compile() {
- local profname=$1
- einfo "Compiling profile ${profname}"
- # cflags already defined twice
- unset CFLAGS
- emake clean
- emake libs shared ${openblas_flags}
- mkdir -p libs && mv libopenblas* libs/
- # avoid pic when compiling static libraries, so re-compiling
- if use static-libs; then
- emake clean
- emake libs ${openblas_flags} NO_SHARED=1 NEED_PIC=
- mv libopenblas* libs/
- fi
- cat <<-EOF > ${profname}.pc
- prefix=${EPREFIX}/usr
- libdir=\${prefix}/$(get_libdir)
- includedir=\${prefix}/include
- Name: ${PN}
- Description: ${DESCRIPTION}
- Version: ${PV}
- URL: ${HOMEPAGE}
- Libs: -L\${libdir} -lopenblas
- Libs.private: -lm
- Cflags: -I\${includedir}/${PN}
- EOF
-}
-
-src_compile() {
- # openblas already does multi-jobs
- MAKEOPTS+=" -j1"
- openblas_flags=""
- local openblas_name=openblas
- use dynamic && \
- openblas_name+="-dynamic" && \
- openblas_flags+=" DYNAMIC_ARCH=1 TARGET=GENERIC NUM_THREADS=64 NO_AFFINITY=1"
- use int64 && \
- openblas_name+="-int64" && \
- openblas_flags+=" INTERFACE64=1"
-
- # choose posix threads over openmp when the two are set
- # yet to see the need of having the two profiles simultaneously
- if use threads; then
- openblas_name+="-threads"
- openblas_flags+=" USE_THREAD=1 USE_OPENMP=0"
- elif use openmp; then
- openblas_name+="-openmp"
- openblas_flags+=" USE_THREAD=0 USE_OPENMP=1"
- fi
- openblas_compile ${openblas_name}
- mv libs/libopenblas* . || die
-}
-
-src_test() {
- emake tests ${openblas_flags}
-}
-
-src_install() {
- local pcfile
- for pcfile in *.pc; do
- local profname=${pcfile%.pc}
- emake install \
- PREFIX="${ED}"usr ${openblas_flags} \
- OPENBLAS_INCLUDE_DIR="${ED}"usr/include/${PN} \
- OPENBLAS_LIBRARY_DIR="${ED}"usr/$(get_libdir)
- use static-libs || rm "${ED}"usr/$(get_libdir)/lib*.a
- alternatives_for blas ${profname} 0 \
- /usr/$(get_libdir)/pkgconfig/blas.pc ${pcfile}
- alternatives_for cblas ${profname} 0 \
- /usr/$(get_libdir)/pkgconfig/cblas.pc ${pcfile} \
- /usr/include/cblas.h ${PN}/cblas.h
- insinto /usr/$(get_libdir)/pkgconfig
- doins ${pcfile}
- done
-
- dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt
- dodoc *md Changelog.txt
-
- if [[ ${CHOST} == *-darwin* ]] ; then
- cd "${ED}"/usr/$(get_libdir)
- local d
- for d in *.dylib ; do
- ebegin "Correcting install_name of ${d}"
- install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}"
- eend $?
- done
- fi
-}
diff --git a/sci-libs/openblas/openblas-9999.ebuild b/sci-libs/openblas/openblas-9999.ebuild
index 91736c817..25ccea3c8 100644
--- a/sci-libs/openblas/openblas-9999.ebuild
+++ b/sci-libs/openblas/openblas-9999.ebuild
@@ -4,32 +4,24 @@
EAPI=5
-EBASE_PROFNAME="openblas"
-inherit alternatives-2 eutils multilib fortran-2 multibuild multilib-build toolchain-funcs fortran-int64
-
-SRC_URI+="http://dev.gentoo.org/~gienah/distfiles/${PN}-0.2.11-gentoo.patch"
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="https://github.com/xianyi/OpenBLAS.git"
- EGIT_BRANCH="develop"
- inherit git-r3
- KEYWORDS=""
-else
- SRC_URI+=" http://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz"
- KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~ppc-macos ~x64-macos"
-fi
+NUMERIC_MODULE_NAME="openblas"
+
+inherit alternatives-2 git-r3 numeric numeric-int64-multibuild
DESCRIPTION="Optimized BLAS library based on GotoBLAS2"
HOMEPAGE="http://xianyi.github.com/OpenBLAS/"
+SRC_URI="http://dev.gentoo.org/~gienah/distfiles/${PN}-0.2.11-gentoo.patch"
+EGIT_REPO_URI="https://github.com/xianyi/OpenBLAS.git"
+EGIT_BRANCH="develop"
+
LICENSE="BSD"
SLOT="0"
-IUSE="dynamic int64 openmp static-libs threads"
+KEYWORDS=""
+IUSE="dynamic openmp static-libs threads"
RDEPEND=""
DEPEND="${RDEPEND}
virtual/pkgconfig"
-PDEPEND="
- >=virtual/blas-2.1-r2[int64?]
- >=virtual/cblas-2.0-r1[int64?]"
MULTILIB_WRAPPED_HEADERS=(
/usr/include/openblas/cblas.h
@@ -38,69 +30,53 @@ MULTILIB_WRAPPED_HEADERS=(
)
get_openblas_flags() {
- local openblas_flags=""
+ local openblas_flags=()
use dynamic && \
- openblas_flags+=" DYNAMIC_ARCH=1 TARGET=GENERIC NUM_THREADS=64 NO_AFFINITY=1"
- $(fortran-int64_is_int64_build) && \
- openblas_flags+=" INTERFACE64=1"
+ openblas_flags+=( DYNAMIC_ARCH=1 TARGET=GENERIC NUM_THREADS=64 NO_AFFINITY=1 )
+ $(numeric-int64_is_int64_build) && \
+ openblas_flags+=( INTERFACE64=1 )
# choose posix threads over openmp when the two are set
# yet to see the need of having the two profiles simultaneously
if use threads; then
- openblas_flags+=" USE_THREAD=1 USE_OPENMP=0"
+ openblas_flags+=( USE_THREAD=1 USE_OPENMP=0 )
elif use openmp; then
- openblas_flags+=" USE_OPENMP=1"
+ openblas_flags+=( USE_OPENMP=1 )
fi
- local profname=$(fortran-int64_get_profname)
+ local profname=$(numeric-int64_get_module_name)
local libname="${profname//-/_}"
local underscoresuffix="${libname#${PN}}"
if [[ "${underscoresuffix}" != "_" ]]; then
local libnamesuffix="${underscoresuffix#_}"
- openblas_flags+=" LIBNAMESUFFIX=${libnamesuffix}"
+ openblas_flags+=( LIBNAMESUFFIX=${libnamesuffix} )
fi
- echo "${openblas_flags}"
+ echo "${openblas_flags[@]}"
}
get_openblas_abi_cflags() {
- local openblas_abi_cflags=""
+ local openblas_abi_cflags=()
if [[ "${ABI}" == "x86" ]]; then
- openblas_abi_cflags="-DOPENBLAS_ARCH_X86=1 -DOPENBLAS___32BIT__=1"
- else
- openblas_abi_cflags="-DOPENBLAS_ARCH_X86_64=1 -DOPENBLAS___64BIT__=1"
- fi
- $(fortran-int64_is_int64_build) && \
- openblas_abi_cflags+=" -DOPENBLAS_USE64BITINT"
- echo "${openblas_abi_cflags}"
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git-r3_src_unpack
+ openblas_abi_cflags=( -DOPENBLAS_ARCH_X86=1 -DOPENBLAS___32BIT__=1 )
else
- default
- if [[ ${PV} != "9999" ]] ; then
- find "${WORKDIR}" -maxdepth 1 -type d -name \*OpenBLAS\* && \
- mv "${WORKDIR}"/*OpenBLAS* "${S}"
- fi
+ openblas_abi_cflags=( -DOPENBLAS_ARCH_X86_64=1 -DOPENBLAS___64BIT__=1 )
fi
+ $(numeric-int64_is_int64_build) && \
+ openblas_abi_cflags+=( -DOPENBLAS_USE64BITINT )
+ echo "${openblas_abi_cflags[@]}"
}
src_prepare() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
epatch "${DISTDIR}/${PN}-0.2.11-gentoo.patch"
- if [[ ${PV} == "0.2.11" ]] ; then
- epatch "${FILESDIR}/${PN}-0.2.11-cpuid_x86.patch"
- fi
+
# lapack and lapacke are not modified from upstream lapack
sed \
-e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \
-e "s:^#\s*\(NO_LAPACKE\)\s*=.*:\1=1:" \
-i Makefile.rule || die
- multibuild_copy_sources
+ numeric-int64-multibuild_copy_sources
}
src_configure() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- my_configure() {
+ blas_configure() {
local openblas_abi_cflags="$(get_openblas_abi_cflags)"
local internal_openblas_abi_cflags="${openblas_abi_cflags//OPENBLAS_}"
sed \
@@ -109,28 +85,23 @@ src_configure() {
-e "s:^#\s*\(COMMON_OPT\)\s*=.*:\1=${CFLAGS} ${internal_openblas_abi_cflags}:" \
-i Makefile.rule || die
}
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_configure
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir blas_configure
}
src_compile() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
# openblas already does multi-jobs
MAKEOPTS+=" -j1"
my_src_compile () {
local openblas_flags=$(get_openblas_flags)
- local profname=$(fortran-int64_get_profname)
- local libname="${profname//-/_}"
- einfo "Compiling profile ${profname}"
# cflags already defined twice
- unset CFLAGS
- emake clean
- emake libs shared ${openblas_flags}
- mkdir -p libs && mv libopenblas* libs/
+ unset CFLAGS || die
+ emake clean && emake libs shared ${openblas_flags}
+ mkdir -p libs && mv libopenblas* libs/ || die
# avoid pic when compiling static libraries, so re-compiling
if use static-libs; then
emake clean
emake libs ${openblas_flags} NO_SHARED=1 NEED_PIC=
- mv libopenblas* libs/
+ mv libopenblas* libs/ || die
fi
# Fix Bug 524612 - [science overlay] sci-libs/openblas-0.2.11 - Assembler messages:
# ../kernel/x86_64/gemm_kernel_8x4_barcelona.S:451: Error: missing ')'
@@ -138,79 +109,64 @@ src_compile() {
# assembler code as the assembler does not understand sizeof(float). So
# delay applying the patch until after building the libraries.
epatch "${FILESDIR}/${PN}-0.2.11-openblas_config_header_same_between_ABIs.patch"
- rm -f config.h config_last.h
+ rm -f config.h config_last.h || die
# Note: prints this spurious warning: make: Nothing to be done for 'config.h'.
emake config.h
cp config.h config_last.h || die
- cat <<-EOF > ${profname}.pc
- prefix=${EPREFIX}/usr
- libdir=\${prefix}/$(get_libdir)
- includedir=\${prefix}/include
- Name: ${profname}
- Description: ${DESCRIPTION}
- Version: ${PV}
- URL: ${HOMEPAGE}
- Libs: -L\${libdir} -l${libname}
- Libs.private: -lm
- EOF
- local openblas_abi_cflags=$(get_openblas_abi_cflags)
- local openblas_abi_fflags=$(fortran-int64_get_fortran_int64_abi_fflags)
- cat <<-EOF >> ${profname}.pc
- Cflags: -I\${includedir}/${PN} ${openblas_abi_cflags}
- Fflags=${openblas_abi_fflags}
- EOF
+
mv libs/libopenblas* . || die
}
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_compile
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_compile
}
src_test() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
my_src_test () {
local openblas_flags=$(get_openblas_flags)
emake tests ${openblas_flags}
}
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_test
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_test
}
src_install() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
my_src_install() {
local openblas_flags=$(get_openblas_flags)
- local profname=$(fortran-int64_get_profname)
+ local profname=$(numeric-int64_get_module_name)
local pcfile
- for pcfile in *.pc; do
- local profname=${pcfile%.pc}
- # The file /usr/include/openblas/openblas_config.h is generated during the install.
- # The sed on config_last.h removes the #define's OPENBLAS_USE64BITINT
- # OPENBLASS__32BIT__ OPENBLASS__64BIT__ OPENBLAS__ARCH_X86 OPENBLAS__ARCH_X86_64
- # from /usr/include/openblas/openblas_config.h. We then specify it in Cflags in
- # the /usr/lib64/pkg-config/openblas-int64-{threads,openmp}.pc file.
- sed -e '/#define USE64BITINT/d' \
- -e '/#define ARCH_X86/d' \
- -e '/#define __\(32\|64\)BIT__/d' \
- -i config_last.h \
- || die "Could not ensure there is no definition of USE64BITINT in config_last.h"
- emake install \
- PREFIX="${ED}"usr ${openblas_flags} \
- OPENBLAS_INCLUDE_DIR="${ED}"usr/include/${PN} \
- OPENBLAS_LIBRARY_DIR="${ED}"usr/$(get_libdir)
- use static-libs || rm "${ED}"usr/$(get_libdir)/lib*.a
- alternatives_for $(fortran-int64_get_blas_provider) ${profname} 0 \
- /usr/$(get_libdir)/pkgconfig/$(fortran-int64_get_blas_provider).pc ${pcfile}
- alternatives_for $(fortran-int64_get_cblas_provider) ${profname} 0 \
- /usr/$(get_libdir)/pkgconfig/$(fortran-int64_get_cblas_provider).pc ${pcfile} \
- /usr/include/cblas.h ${PN}/cblas.h
- insinto /usr/$(get_libdir)/pkgconfig
- doins ${pcfile}
- done
+ # The file /usr/include/openblas/openblas_config.h is generated during the install.
+ # The sed on config_last.h removes the #define's OPENBLAS_USE64BITINT
+ # OPENBLASS__32BIT__ OPENBLASS__64BIT__ OPENBLAS__ARCH_X86 OPENBLAS__ARCH_X86_64
+ # from /usr/include/openblas/openblas_config.h. We then specify it in Cflags in
+ # the /usr/lib64/pkg-config/openblas-int64-{threads,openmp}.pc file.
+ sed -e '/#define USE64BITINT/d' \
+ -e '/#define ARCH_X86/d' \
+ -e '/#define __\(32\|64\)BIT__/d' \
+ -i config_last.h \
+ || die "Could not ensure there is no definition of USE64BITINT in config_last.h"
+ emake install \
+ PREFIX="${ED}"usr ${openblas_flags} \
+ OPENBLAS_INCLUDE_DIR="${ED}"usr/include/${PN} \
+ OPENBLAS_LIBRARY_DIR="${ED}"usr/$(get_libdir)
+ if ! use static-libs; then
+ rm "${ED}"usr/$(get_libdir)/lib*.a || die
+ fi
+
+ local openblas_abi_cflags=$(get_openblas_abi_cflags)
+ local openblas_abi_fflags=$(numeric-int64_get_fortran_int64_abi_fflags)
+ local libname="${profname//-/_}"
+
+ create_pkgconfig \
+ --name "${profname}" \
+ --libs "-L\${libdir} -l${libname}" \
+ --libs-private "-lm" \
+ --cflags "-I\${includedir}/${PN} ${openblas_abi_cflags}" \
+ ${profname}
if [[ ${CHOST} == *-darwin* ]] ; then
- cd "${ED}"/usr/$(get_libdir)
+ cd "${ED}"/usr/$(get_libdir) || die
local d
- for d in *.dylib ; do
+ for d in *.dylib; do
ebegin "Correcting install_name of ${d}"
- install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}"
+ install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}" || die
eend $?
done
fi
@@ -219,9 +175,13 @@ src_install() {
multilib_check_headers
fi
}
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_install
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_install
+
+ printf "/usr/include/cblas.h ${PN}/cblas.h" > "${T}"/alternative-cblas-generic.sh
+ numeric-int64-multibuild_install_alternative blas ${NUMERIC_MODULE_NAME}
+ numeric-int64-multibuild_install_alternative cblas ${NUMERIC_MODULE_NAME}
+
multilib_install_wrappers
- dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt
- dodoc *md Changelog.txt
+ dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt *md Changelog.txt
}
diff --git a/sci-libs/xblas/xblas-1.0.248-r1.ebuild b/sci-libs/xblas/xblas-1.0.248-r1.ebuild
index 5005e9dfa..93ecafdf2 100644
--- a/sci-libs/xblas/xblas-1.0.248-r1.ebuild
+++ b/sci-libs/xblas/xblas-1.0.248-r1.ebuild
@@ -4,8 +4,10 @@
EAPI=5
-EBASE_PROFNAME="xblas"
-inherit eutils flag-o-matic fortran-2 fortran-int64 multibuild multilib multilib-build toolchain-funcs versionator
+NUMERIC_MODULE_NAME="xblas"
+FORTRAN_NEEDED=fortran
+
+inherit flag-o-matic fortran-2 numeric-int64-multibuild toolchain-funcs versionator
DESCRIPTION="Extra Precise Basic Linear Algebra Subroutines"
HOMEPAGE="http://www.netlib.org/xblas"
@@ -14,9 +16,9 @@ SRC_URI="${HOMEPAGE}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="doc fortran int64 static-libs"
+IUSE="doc fortran static-libs"
-RDEPEND="fortran? ( virtual/fortran )"
+RDEPEND=""
DEPEND="${RDEPEND}
sys-devel/m4"
@@ -38,8 +40,8 @@ static_to_shared() {
-Wl,--whole-archive ${libstatic} -Wl,--no-whole-archive \
"$@" -o ${libdir}/${soname} || die "${soname} failed"
[[ $(get_version_component_count) -gt 1 ]] && \
- ln -s ${soname} ${libdir}/${libname}$(get_libname $(get_major_version))
- ln -s ${soname} ${libdir}/${libname}$(get_libname)
+ ln -s ${soname} ${libdir}/${libname}$(get_libname $(get_major_version)) || die
+ ln -s ${soname} ${libdir}/${libname}$(get_libname) || die
fi
}
@@ -48,23 +50,20 @@ pkg_setup() {
}
src_prepare() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- multibuild_copy_sources
+ numeric-int64-multibuild_copy_sources
}
src_configure() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- my_configure() {
- export FCFLAGS="${FCFLAGS} $(get_abi_CFLAGS) $(fortran-int64_get_fortran_int64_abi_fflags)"
+ xblas_configure() {
+ export FCFLAGS="${FCFLAGS} $(get_abi_CFLAGS) $(numeric-int64_get_fortran_int64_abi_fflags)"
econf $(use_enable fortran)
}
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_configure
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir xblas_configure
}
src_compile() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- my_src_compile() {
- local profname=$(fortran-int64_get_profname)
+ xblas_src_compile() {
+ local profname=$(numeric-int64_get_module_name)
local libname="${profname//-/_}"
# default target builds and runs tests - split
# build first static libs because of fPIC afterwards
@@ -81,42 +80,31 @@ src_compile() {
emake lib XBLASLIB=lib${libname}.a
static_to_shared lib${libname}.a
}
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_compile
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir xblas_src_compile
}
src_test() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- my_src_test () {
- emake tests
- }
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_test
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir emake tests
}
src_install() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- my_src_install() {
- local profname=$(fortran-int64_get_profname)
+ xblas_src_install() {
+ local profname=$(numeric-int64_get_module_name)
local libname="${profname//-/_}"
- dolib.so lib${libname}$(get_libname)*
- use static-libs && newlib.a lib${libname}_nonpic.a lib${libname}.a
- dodoc README README.devel
- use doc && dodoc doc/report.ps
-
- # pkg-config file for our multliple numeric stuff
- cat > ${profname}.pc <<-EOF
- prefix=${EPREFIX}/usr
- libdir=\${prefix}/$(get_libdir)
- includedir=\${prefix}/include/${PN}
- Name: ${profname}
- Description: ${DESCRIPTION}
- Version: ${PV}
- URL: ${HOMEPAGE}
- Libs: -L\${libdir} -l${libname}
- Cflags: -I\${includedir}
- Fflags=$(fortran-int64_get_fortran_int64_abi_fflags)
- EOF
- insinto /usr/$(get_libdir)/pkgconfig
- doins ${profname}.pc
+ if numeric-int64_is_static_build; then
+ use static-libs && newlib.a lib${libname}_nonpic.a lib${libname}.a
+ else
+ dolib.so lib${libname}$(get_libname)*
+
+ create_pkgconfig \
+ --name ${profname} \
+ --libs "-L\${libdir} -l${libname}" \
+ --cflags "-I\${includedir} $(numeric-int64_get_fortran_int64_abi_fflags)" \
+ ${profname}
+ fi
}
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_install
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir xblas_src_install
+
+ dodoc README README.devel
+ use doc && dodoc doc/report.ps
}
diff --git a/sci-libs/xblas/xblas-1.0.248.ebuild b/sci-libs/xblas/xblas-1.0.248.ebuild
deleted file mode 100644
index 609d8b931..000000000
--- a/sci-libs/xblas/xblas-1.0.248.ebuild
+++ /dev/null
@@ -1,93 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit eutils flag-o-matic fortran-2 multilib toolchain-funcs versionator
-
-DESCRIPTION="Extra Precise Basic Linear Algebra Subroutines"
-HOMEPAGE="http://www.netlib.org/xblas"
-SRC_URI="${HOMEPAGE}/${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="doc fortran static-libs"
-
-RDEPEND="fortran? ( virtual/fortran )"
-DEPEND="${RDEPEND}"
-
-static_to_shared() {
- local libstatic=${1}; shift
- local libname=$(basename ${libstatic%.a})
- local soname=${libname}$(get_libname $(get_version_component_range 1-2))
- local libdir=$(dirname ${libstatic})
-
- einfo "Making ${soname} from ${libstatic}"
- if [[ ${CHOST} == *-darwin* ]] ; then
- ${LINK:-$(tc-getCC)} ${LDFLAGS} \
- -dynamiclib -install_name "${EPREFIX}"/usr/lib/"${soname}" \
- -Wl,-all_load -Wl,${libstatic} \
- "$@" -o ${libdir}/${soname} || die "${soname} failed"
- else
- ${LINK:-$(tc-getCC)} ${LDFLAGS} \
- -shared -Wl,-soname=${soname} \
- -Wl,--whole-archive ${libstatic} -Wl,--no-whole-archive \
- "$@" -o ${libdir}/${soname} || die "${soname} failed"
- [[ $(get_version_component_count) -gt 1 ]] && \
- ln -s ${soname} ${libdir}/${libname}$(get_libname $(get_major_version))
- ln -s ${soname} ${libdir}/${libname}$(get_libname)
- fi
-}
-
-pkg_setup() {
- use fortran && fortran-2_pkg_setup
-}
-
-src_configure() {
- econf $(use_enable fortran)
-}
-
-src_compile() {
- # default target builds and runs tests - split
- # build first static libs because of fPIC afterwards
- # and we link tests with shared ones
- if use static-libs; then
- emake makefiles
- emake lib XBLASLIB=lib${PN}_nonpic.a
- emake clean
- fi
- sed -i \
- -e 's:\(CFLAGS.*\).*:\1 -fPIC:' \
- make.inc || die
- emake makefiles
- emake lib
- static_to_shared lib${PN}.a
-}
-
-src_test() {
- emake tests
-}
-
-src_install() {
- dolib.so lib${PN}$(get_libname)*
- use static-libs && newlib.a lib${PN}_nonpic.a lib${PN}.a
- dodoc README README.devel
- use doc && dodoc doc/report.ps
-
- # pkg-config file for our multliple numeric stuff
- cat > ${PN}.pc <<-EOF
- prefix=${EPREFIX}/usr
- libdir=\${prefix}/$(get_libdir)
- includedir=\${prefix}/include/${PN}
- Name: ${PN}
- Description: ${DESCRIPTION}
- Version: ${PV}
- URL: ${HOMEPAGE}
- Libs: -L\${libdir} -l${PN}
- Cflags: -I\${includedir}
- EOF
- insinto /usr/$(get_libdir)/pkgconfig
- doins ${PN}.pc
-}