diff --git a/sci-libs/scipy/patches/scipy-1.3.3.patchset b/sci-libs/scipy/patches/scipy-1.3.3.patchset new file mode 100644 index 000000000..a7fcee9f7 --- /dev/null +++ b/sci-libs/scipy/patches/scipy-1.3.3.patchset @@ -0,0 +1,22 @@ +From 8e314a5e6f9faf2d527d6572d1b05c47bc791090 Mon Sep 17 00:00:00 2001 +From: Aleksei Gerasimov +Date: Thu, 15 Oct 2020 14:13:11 +0200 +Subject: disable ndimage + + +diff --git a/scipy/setup.py b/scipy/setup.py +index 0a17f94..f0fe37a 100644 +--- a/scipy/setup.py ++++ b/scipy/setup.py +@@ -22,7 +22,7 @@ def configuration(parent_package='',top_path=None): + config.add_subpackage('spatial') + config.add_subpackage('special') + config.add_subpackage('stats') +- config.add_subpackage('ndimage') ++ #config.add_subpackage('ndimage') + config.add_subpackage('_build_utils') + config.add_subpackage('_lib') + config.make_config_py() +-- +2.28.0 + diff --git a/sci-libs/scipy/scipy-1.3.3.recipe b/sci-libs/scipy/scipy-1.3.3.recipe new file mode 100644 index 000000000..73c1791cb --- /dev/null +++ b/sci-libs/scipy/scipy-1.3.3.recipe @@ -0,0 +1,123 @@ +SUMMARY="Scientific algorithms library for Python" +DESCRIPTION="SciPy is an open source library of scientific tools for Python. \ +SciPy supplements the popular numpy module, gathering a variety of high level \ +science and engineering modules together as a single package. SciPy includes \ +modules for graphics and plotting, optimization, integration, special \ +functions, signal and image processing, genetic algorithms, ODE solvers, and \ +others. + +This package does not contain ndimage module." +HOMEPAGE="https://www.scipy.org/" +COPYRIGHT=" 2001-2002 Enthought, Inc. + 2003-2019 SciPy Developers" +LICENSE="BSD (3-clause)" +REVISION="1" +SOURCE_URI="https://github.com/scipy/scipy/releases/download/v$portVersion/scipy-$portVersion.tar.xz" +CHECKSUM_SHA256="6de202d30b9e9e0704972f2b9272b1ff1090e2b089ddbdccfcf6271ce5ffb2d9" +SOURCE_DIR="scipy-$portVersion" +PATCHES="scipy-$portVersion.patchset" + +ARCHITECTURES="!x86_gcc2 x86 x86_64" +# scipy can be build directly on x86 +# but I was unable to make recipe do +# in the same way as "setarch x86" do +SECONDARY_ARCHITECTURES="!x86" + +PROVIDES=" + $portName = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + cblas_reference$secondaryArchSuffix + lib:libarpack$secondaryArchSuffix + lib:libblis$secondaryArchSuffix + lib:liblapack$secondaryArchSuffix + lib:libopenblas$secondaryArchSuffix + lib:libumfpack$secondaryArchSuffix # not sure if actually used + numpy$secondaryArchSuffix + " + +PYTHON_PACKAGES=(python36 python3) +PYTHON_VERSIONS=(3.6 3.7) +for i in "${!PYTHON_PACKAGES[@]}"; do +pythonPackage=${PYTHON_PACKAGES[i]} +pythonVersion=${PYTHON_VERSIONS[$i]} +eval "PROVIDES_${pythonPackage}=\"\ + ${portName}_$pythonPackage = $portVersion\n\ + \"; \ +REQUIRES_$pythonPackage=\"\ + haiku$secondaryArchSuffix\n\ + scipy$secondaryArchSuffix\n\ + cmd:f2py$pythonVersion\n\ + cmd:python$pythonVersion\ + \"" +done + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:cblas$secondaryArchSuffix + devel:libarpack$secondaryArchSuffix + devel:libblis$secondaryArchSuffix + devel:liblapack$secondaryArchSuffix + devel:libopenblas$secondaryArchSuffix + devel:libumfpack$secondaryArchSuffix + numpy${secondaryArchSuffix}_python3 + numpy${secondaryArchSuffix}_python36 + setuptools_python3 + setuptools_python36 + " + +BUILD_PREREQUIRES=" + cmd:g++$secondaryArchSuffix + cmd:gfortran$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + cmd:python3.6 + cmd:python3.7 + cmd:swig # not sure if actually used + " + + +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 +[lapack] +library_dirs = /system/$relativeDevelopLibDir +include_dirs = /system/$relativeIncludeDir +runtime_library_dirs = /system/$relativeLibDir +EOF + + rm -rf doc/sphinxext/.git + + for i in "${!PYTHON_PACKAGES[@]}"; do + pythonPackage=${PYTHON_PACKAGES[i]} + pythonVersion=${PYTHON_VERSIONS[$i]} + + 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 + + packageEntries $pythonPackage \ + $prefix/lib/python* + done +}