aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2015-09-19 09:14:19 +0200
committerJustin Lecher <jlec@gentoo.org>2015-11-28 18:25:09 +0100
commitbc36b5406f2bb289a3920ef13d50853a567bc83d (patch)
treeee431372f2726c8ffbc5ca294fd07076be18f737 /sci-libs/openblas/openblas-0.2.8.ebuild
parentdev-util/amdapp: Version bump; Fixes issue #542 (diff)
downloadsci-bc36b5406f2bb289a3920ef13d50853a567bc83d.tar.gz
sci-bc36b5406f2bb289a3920ef13d50853a567bc83d.tar.bz2
sci-bc36b5406f2bb289a3920ef13d50853a567bc83d.zip
Large fix of numeric code
fortran-int64.eclass code has been splitted into numeric-int64-multibuild.eclass, fortran-2.eclass and numeric.eclass. Gentoo: https://bugs.gentoo.org/show_bug.cgi?id=563292 https://bugs.gentoo.org/show_bug.cgi?id=551764 https://bugs.gentoo.org/show_bug.cgi?id=555302 Github: resolves gentoo-science/sci#438 resolves gentoo-science/sci#443 resolves gentoo-science/sci#447 resolves gentoo-science/sci#450 resolves gentoo-science/sci#467 resolves gentoo-science/sci#492 resolves gentoo-science/sci#507 resolves gentoo-science/sci#508 resolves gentoo-science/sci#522 Signed-off-by: Justin Lecher <jlec@gentoo.org>
Diffstat (limited to 'sci-libs/openblas/openblas-0.2.8.ebuild')
-rw-r--r--sci-libs/openblas/openblas-0.2.8.ebuild126
1 files changed, 0 insertions, 126 deletions
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
-}