mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-11 06:10:06 +02:00
numpy, bump version, add patch (#5950)
This commit is contained in:
@@ -9,10 +9,11 @@ general-purpose data-base applications."
|
||||
HOMEPAGE="https://www.numpy.org/"
|
||||
COPYRIGHT="2005-2021 Travis E. Oliphant et al."
|
||||
LICENSE="BSD (3-clause)"
|
||||
REVISION="2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/numpy/numpy/releases/download/v$portVersion/numpy-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="67b630745a71b541ff6517d6f3d62b00690dc8ba0684cad0d7b0ac55aec1de53"
|
||||
CHECKSUM_SHA256="b7340f0628ce1823c151e3d2a2a8cba2a3ff1357fba4475a24b1816e75c21f90"
|
||||
SOURCE_DIR="numpy-$portVersion"
|
||||
PATCHES="numpy-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
@@ -1,103 +0,0 @@
|
||||
SUMMARY="Array processing for numbers, strings, records, and objects"
|
||||
DESCRIPTION="NumPy is a general-purpose array-processing package designed to \
|
||||
efficiently manipulate large multi-dimensional arrays of arbitrary records \
|
||||
without sacrificing too much speed for small multi-dimensional arrays.
|
||||
NumPy is built on the Numeric code base and adds features introduced by \
|
||||
numarray as well as an extended C-API and the ability to create arrays of \
|
||||
arbitrary type which also makes NumPy suitable for interfacing with \
|
||||
general-purpose data-base applications."
|
||||
HOMEPAGE="https://www.numpy.org/"
|
||||
COPYRIGHT="2005-2019 Travis E. Oliphant et al."
|
||||
LICENSE="BSD (3-clause)"
|
||||
REVISION="3"
|
||||
SOURCE_URI="https://github.com/numpy/numpy/releases/download/v$portVersion/numpy-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="2b63c414fb43a4f0cb69b29b7e9d48275af0dbb5b1ffd2f2de99c4df9967e151"
|
||||
SOURCE_DIR="numpy-$portVersion"
|
||||
PATCHES="numpy-$portVersion.patch"
|
||||
|
||||
ARCHITECTURES="x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="?x86"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
cmd:f2py2.7
|
||||
cmd:f2py2
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
# lib:libamd$secondaryArchSuffix
|
||||
lib:libblis$secondaryArchSuffix
|
||||
lib:libexecinfo$secondaryArchSuffix
|
||||
# lib:libfftw3$secondaryArchSuffix
|
||||
lib:liblapack$secondaryArchSuffix
|
||||
lib:libopenblas$secondaryArchSuffix
|
||||
# lib:libumfpack$secondaryArchSuffix
|
||||
cmd:python2.7
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
# devel:cblas$secondaryArchSuffix
|
||||
# devel:libamd$secondaryArchSuffix
|
||||
devel:libblis$secondaryArchSuffix
|
||||
devel:libexecinfo$secondaryArchSuffix
|
||||
# devel:libfftw3$secondaryArchSuffix
|
||||
devel:liblapack$secondaryArchSuffix
|
||||
devel:libopenblas$secondaryArchSuffix
|
||||
# devel:libumfpack$secondaryArchSuffix
|
||||
setuptools_python
|
||||
"
|
||||
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
||||
cmd:git
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:gfortran$secondaryArchSuffix
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:python2.7
|
||||
"
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
# Check at every update in site.cfg.example!
|
||||
cat > site.cfg << EOF
|
||||
[ALL]
|
||||
libraries = execinfo,lapack,openblas
|
||||
library_dirs = /system/$relativeDevelopLibDir
|
||||
include_dirs = /system/$relativeIncludeDir
|
||||
runtime_library_dirs = /system/$relativeLibDir
|
||||
[openblas]
|
||||
libraries = openblas
|
||||
library_dirs = /system/$relativeDevelopLibDir
|
||||
include_dirs = /system/$relativeIncludeDir
|
||||
runtime_library_dirs = /system/$relativeLibDir
|
||||
[blis]
|
||||
libraries = blis
|
||||
library_dirs = /system/$relativeDevelopLibDir
|
||||
include_dirs = /system/$relativeIncludeDir/blis
|
||||
runtime_library_dirs = /system/$relativeLibDir
|
||||
#[amd]
|
||||
#amd_libs = amd
|
||||
#[umfpack]
|
||||
#umfpack_libs = umfpack
|
||||
#[fftw]
|
||||
#libraries = fftw3
|
||||
EOF
|
||||
|
||||
rm -rf doc/sphinxext/.git
|
||||
|
||||
pythonPackage=python
|
||||
pythonVersion=2.7
|
||||
|
||||
python=python$pythonVersion
|
||||
installLocation=$prefix/lib/$python/vendor-packages/
|
||||
export PYTHONPATH=$installLocation:$PYTHONPATH
|
||||
mkdir -p $installLocation
|
||||
rm -rf build
|
||||
$python setup.py build install \
|
||||
--root=/ --prefix=$prefix
|
||||
rm -rf $binDir/f2py
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
python2.7 runtests.py
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
diff --git a/numpy/core/src/umath/cpuid.c b/numpy/core/src/umath/cpuid.c
|
||||
index 6744ceb..b1aaa09 100644
|
||||
--- a/numpy/core/src/umath/cpuid.c
|
||||
+++ b/numpy/core/src/umath/cpuid.c
|
||||
@@ -19,7 +19,9 @@
|
||||
static NPY_INLINE
|
||||
int os_avx_support(void)
|
||||
{
|
||||
-#if HAVE_XGETBV
|
||||
+// See, GCC bug < 7.3.1
|
||||
+// https://github.com/numpy/numpy/pull/10814
|
||||
+#if 0
|
||||
/*
|
||||
* use bytes for xgetbv to avoid issues with compiler not knowing the
|
||||
* instruction
|
||||
23
dev-python/numpy/patches/numpy-1.20.3.patchset
Normal file
23
dev-python/numpy/patches/numpy-1.20.3.patchset
Normal file
@@ -0,0 +1,23 @@
|
||||
From ff351e2c21cd45401f8b18a89ef13ab2938f19cf Mon Sep 17 00:00:00 2001
|
||||
From: begasus <begasus@gmail.com>
|
||||
Date: Mon, 24 May 2021 17:46:53 +0000
|
||||
Subject: Haiku doesn't define __STDC_NO_THREADS__ nor __GLIBC__
|
||||
|
||||
|
||||
diff --git a/numpy/f2py/cfuncs.py b/numpy/f2py/cfuncs.py
|
||||
index f403a66..e916c1d 100644
|
||||
--- a/numpy/f2py/cfuncs.py
|
||||
+++ b/numpy/f2py/cfuncs.py
|
||||
@@ -552,7 +552,8 @@ cppmacros["F2PY_THREAD_LOCAL_DECL"] = """\
|
||||
#elif defined(__STDC_VERSION__) \\
|
||||
&& (__STDC_VERSION__ >= 201112L) \\
|
||||
&& !defined(__STDC_NO_THREADS__) \\
|
||||
- && (!defined(__GLIBC__) || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 12))
|
||||
+ && (!defined(__GLIBC__) || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 12)) \\
|
||||
+ && !defined(__HAIKU__)
|
||||
/* __STDC_NO_THREADS__ was first defined in a maintenance release of glibc 2.12,
|
||||
see https://lists.gnu.org/archive/html/commit-hurd/2012-07/msg00180.html,
|
||||
so `!defined(__STDC_NO_THREADS__)` may give false positive for the existence
|
||||
--
|
||||
2.30.2
|
||||
|
||||
Reference in New Issue
Block a user