Commit 2ffe6cab authored by José Mª. Fernández's avatar José Mª. Fernández
Browse files

Added patched version of numpy, which does not filter out -lm

parent 0ae16412
AUX numpy-1.10.2-no-hardcode-blas.patch 3295 SHA256 fb1ac68398a9c4fbf2396083e85480d46077d7b29069d8b62c4a929ab48216d1 SHA512 456f3b7016d12fea49c8db08cec81e207575a28018490c5b2eece8b4167e22dd93a5811d90f43435a0341ecb3a3cbc6c2fd804869ba9d96b7b2382736805aadd WHIRLPOOL 2a34f1f6f6a3a37a67b7cb1419b0aca7891ab9375cb5489f4ac974e71dff9f6e9442d0b3414437bf3010f271d7782b89b111ef34dcee1530c39e43bebe1a7b08
DIST numpy-1.10.4.tar.gz 4069996 SHA256 7356e98fbcc529e8d540666f5a919912752e569150e9a4f8d869c686f14c720b SHA512 57ace46e357d49be0efd904e5ceb9862c626c916987c8798a12de7ae1e06816ad8483439ac4619792a04889631b5998f2397dc601c78dea33a784b4831c19c79 WHIRLPOOL 76946c2543b1cade06d71f83fd507bd818c1090baa9c3ddda7d1f48d48ed23672c5d9de76db890df990c6d8b7b26b71d3ce733c448943ad4177374a957360d1c
DIST numpy-html-1.10.1.zip 9663942 BLAKE2B 436ab4185212f8eeaa3d61e29c2c547c9f24bf0869984cc674e66a7360177e999cc70a6573316711e478db62057d5cee90f85b978d095c6b47f1dc3832ffbdf7 SHA512 9d1f3619b801c88604a0495290da4ae8cfb4800257d549214363c554c1dc09a736425d594ed88f492afee6ae7c68fe5c166b9b3a8f24637ea41d67fd23b9d9f9
DIST numpy-ref-1.10.1.pdf 5382006 BLAKE2B c360d40c6ac3d2975a760dcf32ed312f30e9ee6b096020e0513bb22af600de62f5f72309603414b3bbcaf02a1aacd79e84545a6e5d50611bfdabafa9f6441a10 SHA512 25085eb7cb80343abffe04ee01ea93603427913ba4443fbfdaa1ef1ad07a8642c47259d0bb1cb91a9059f786c03395bba76f608c6f0a2fd26d1afec4847d885c
DIST numpy-user-1.10.1.pdf 406114 BLAKE2B 88d43e87071eb88223c84720001671677c6f8c1e745b4434331434a9c48cee4591e67740ef102e49e839e4b2aa690798a5415fa25eaa79d823dbcfa29780fa85 SHA512 998bce3777944e7b366c619e968ac4b6cc4351cd2819d6ecba7f422e20b6cd4d7332a8dede4036cd12e85b24c4c3d973bd9ef2d407610369c2591fce990fa8f4
EBUILD numpy-1.10.4-r1.ebuild 4067 SHA256 d01922f74d1d2185cb4fec6a3bee715a17581a759b83e665468c884995f2934d SHA512 8681790f986e1e31d4aa3a7f1e89335d94c379cd1b186f12f24abcbed8e42afb55f5879ba7487c7d3e521bdc3ab63c228cdb81b9e1a02dec4609df1bf0c5a0de WHIRLPOOL bc2e357a1ec9d1a31f72358c3c599fc4fbbbeffce84f03e5d7b5f870c4c71de4b57e46cbbaac28dc8740391cd586f094b57920182366d6d3fe3d253964a720d9
numpy/distutils/system_info.py | 29 +++++------------------------
1 file changed, 5 insertions(+), 24 deletions(-)
diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
index d7eb49e..aa62b09 100644
--- a/numpy/distutils/system_info.py
+++ b/numpy/distutils/system_info.py
@@ -306,26 +306,7 @@ def get_info(name, notfound_action=0):
1 - display warning message
2 - raise error
"""
- cl = {'atlas': atlas_info, # use lapack_opt or blas_opt instead
- 'atlas_threads': atlas_threads_info, # ditto
- 'atlas_blas': atlas_blas_info,
- 'atlas_blas_threads': atlas_blas_threads_info,
- 'lapack_atlas': lapack_atlas_info, # use lapack_opt instead
- 'lapack_atlas_threads': lapack_atlas_threads_info, # ditto
- 'atlas_3_10': atlas_3_10_info, # use lapack_opt or blas_opt instead
- 'atlas_3_10_threads': atlas_3_10_threads_info, # ditto
- 'atlas_3_10_blas': atlas_3_10_blas_info,
- 'atlas_3_10_blas_threads': atlas_3_10_blas_threads_info,
- 'lapack_atlas_3_10': lapack_atlas_3_10_info, # use lapack_opt instead
- 'lapack_atlas_3_10_threads': lapack_atlas_3_10_threads_info, # ditto
- 'mkl': mkl_info,
- # openblas which may or may not have embedded lapack
- 'openblas': openblas_info, # use blas_opt instead
- # openblas with embedded lapack
- 'openblas_lapack': openblas_lapack_info, # use blas_opt instead
- 'lapack_mkl': lapack_mkl_info, # use lapack_opt instead
- 'blas_mkl': blas_mkl_info, # use blas_opt instead
- 'x11': x11_info,
+ cl = {'x11': x11_info,
'fft_opt': fft_opt_info,
'fftw': fftw_info,
'fftw2': fftw2_info,
@@ -1690,7 +1671,7 @@ class blas_info(system_info):
lib = self.has_cblas(info)
if lib is not None:
info['language'] = 'c'
- info['libraries'] = [lib]
+ info['libraries'] = lib
info['define_macros'] = [('HAVE_CBLAS', None)]
self.set_info(**info)
@@ -1722,16 +1703,16 @@ class blas_info(system_info):
# check for cblas lib, and if not present check for blas lib.
try:
c.link_executable(obj, os.path.join(tmpdir, "a.out"),
- libraries=["cblas"],
+ libraries=info["libraries"],
library_dirs=info['library_dirs'],
extra_postargs=info.get('extra_link_args', []))
- res = "cblas"
+ res = info["libraries"]
except distutils.ccompiler.LinkError:
c.link_executable(obj, os.path.join(tmpdir, "a.out"),
libraries=["blas"],
library_dirs=info['library_dirs'],
extra_postargs=info.get('extra_link_args', []))
- res = "blas"
+ res = ["blas"]
except distutils.ccompiler.CompileError:
res = None
finally:
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
PYTHON_REQ_USE="threads(+)"
FORTRAN_NEEDED=lapack
inherit distutils-r1 eutils flag-o-matic fortran-2 multilib multiprocessing toolchain-funcs versionator
DOC_PV="1.10.1"
DOC_P="${PN}-${DOC_PV}"
DESCRIPTION="Fast array and numerical python library"
HOMEPAGE="http://www.numpy.org/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
doc? (
http://docs.scipy.org/doc/${DOC_P}/${PN}-html-${DOC_PV}.zip
http://docs.scipy.org/doc/${DOC_P}/${PN}-ref-${DOC_PV}.pdf
http://docs.scipy.org/doc/${DOC_P}/${PN}-user-${DOC_PV}.pdf
)"
# It appears the docs haven't been upgraded, still @ 1.8.1
LICENSE="BSD"
SLOT="0"
KEYWORDS="alpha amd64 ~arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
IUSE="doc lapack test"
RDEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
lapack? ( virtual/cblas virtual/lapack )"
DEPEND="${RDEPEND}
doc? ( app-arch/unzip )
lapack? ( virtual/pkgconfig )
test? ( >=dev-python/nose-1.0[${PYTHON_USEDEP}] )"
# Uses distutils.command.config.
DISTUTILS_IN_SOURCE_BUILD=1
PATCHES=(
"${FILESDIR}"/${PN}-1.10.2-no-hardcode-blas.patch
)
src_unpack() {
default
if use doc; then
unzip -qo "${DISTDIR}"/${PN}-html-${DOC_PV}.zip -d html || die
fi
}
pc_incdir() {
$(tc-getPKG_CONFIG) --cflags-only-I $@ | \
sed -e 's/^-I//' -e 's/[ ]*-I/:/g' -e 's/[ ]*$//' -e 's|^:||'
}
pc_libdir() {
$(tc-getPKG_CONFIG) --libs-only-L $@ | \
sed -e 's/^-L//' -e 's/[ ]*-L/:/g' -e 's/[ ]*$//' -e 's|^:||'
}
pc_libs() {
$(tc-getPKG_CONFIG) --libs-only-l $@ | \
sed -e 's/[ ]-l*\(pthread\)\([ ]\|$\)//g' \
-e 's/^-l//' -e 's/[ ]*-l/,/g' -e 's/[ ]*$//' \
| tr ',' '\n' | sort -u | tr '\n' ',' | sed -e 's|,$||'
}
python_prepare_all() {
if use lapack; then
append-ldflags "$($(tc-getPKG_CONFIG) --libs-only-other cblas lapack)"
local libdir="${EPREFIX}"/usr/$(get_libdir)
cat >> site.cfg <<-EOF
[blas]
include_dirs = $(pc_incdir cblas)
library_dirs = $(pc_libdir cblas blas):${libdir}
blas_libs = $(pc_libs cblas blas)
[lapack]
library_dirs = $(pc_libdir lapack):${libdir}
lapack_libs = $(pc_libs lapack)
EOF
else
export {ATLAS,PTATLAS,BLAS,LAPACK,MKL}=None
fi
export CC="$(tc-getCC) ${CFLAGS}"
append-flags -fno-strict-aliasing
# See progress in http://projects.scipy.org/scipy/numpy/ticket/573
# with the subtle difference that we don't want to break Darwin where
# -shared is not a valid linker argument
if [[ ${CHOST} != *-darwin* ]]; then
append-ldflags -shared
fi
# only one fortran to link with:
# linking with cblas and lapack library will force
# autodetecting and linking to all available fortran compilers
append-fflags -fPIC
if use lapack; then
NUMPY_FCONFIG="config_fc --noopt --noarch"
# workaround bug 335908
[[ $(tc-getFC) == *gfortran* ]] && NUMPY_FCONFIG+=" --fcompiler=gnu95"
fi
# don't version f2py, we will handle it.
sed -i -e '/f2py_exe/s: + os\.path.*$::' numpy/f2py/setup.py || die
# we don't have f2py-3.3
sed \
-e 's:test_f2py:_&:g' \
-i numpy/tests/test_scripts.py || die
distutils-r1_python_prepare_all
epatch_user
}
python_compile() {
distutils-r1_python_compile \
$(usex python_targets_python3_5 "" "-j $(makeopts_jobs)") \
${NUMPY_FCONFIG}
}
python_test() {
distutils_install_for_testing ${NUMPY_FCONFIG}
cd "${TMPDIR}" || die
${EPYTHON} -c "
import numpy, sys
r = numpy.test(label='full', verbose=3)
sys.exit(0 if r.wasSuccessful() else 1)" || die "Tests fail with ${EPYTHON}"
}
python_install() {
distutils-r1_python_install ${NUMPY_FCONFIG}
}
python_install_all() {
DOCS+=( COMPATIBILITY DEV_README.txt THANKS.txt )
if use doc; then
HTML_DOCS=( "${WORKDIR}"/html/. )
DOCS+=( "${DISTDIR}"/${PN}-{user,ref}-${DOC_PV}.pdf )
fi
distutils-r1_python_install_all
docinto f2py
dodoc doc/f2py/*.txt
doman doc/f2py/f2py.1
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment