diff --git a/sci-libs/superlu/patches/superlu-5.2.1.patchset b/sci-libs/superlu/patches/superlu-5.2.1.patchset new file mode 100644 index 000000000..24b123df5 --- /dev/null +++ b/sci-libs/superlu/patches/superlu-5.2.1.patchset @@ -0,0 +1,25 @@ +From 1b128432e354b8d9277872f7679c1ac439cb781b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= +Date: Sun, 13 Nov 2016 03:15:05 +0100 +Subject: Disable Fortran support for now + +We don't really build gcc with the fortran frontend yet... + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e79ad41..3455ab7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -39,8 +39,8 @@ else() + endif() + + enable_language(C) +-enable_language (Fortran) +-set(NOFORTRAN FALSE) ++#enable_language (Fortran) ++#set(NOFORTRAN FALSE) + set(SUPERLU_VERSION "${PROJECT_VERSION}") + set(SUPERLU_REV "${PROJECT_REV}") + +-- +2.7.0 + diff --git a/sci-libs/superlu/superlu-5.2.1.recipe b/sci-libs/superlu/superlu-5.2.1.recipe new file mode 100644 index 000000000..d87945c84 --- /dev/null +++ b/sci-libs/superlu/superlu-5.2.1.recipe @@ -0,0 +1,81 @@ +SUMMARY="A library for solution of nonsymmetric systems of linear equations" +DESCRIPTION="SuperLU is a general purpose library for the direct solution \ +of large, sparse, nonsymmetric systems of linear equations. The library is \ +written in C and is callable from either C or Fortran program. It uses MPI, \ +OpenMP and CUDA to support various forms of parallelism. It supports both \ +real and complex datatypes, both single and double precision, and 64-bit \ +integer indexing. The library routines performs an LU decomposition with \ +partial pivoting and triangular system solves through forward and back \ +substitution. The LU factorization routines can handle non-square matrices \ +but the triangular solves are performed only for square matrices. The matrix \ +columns may be preordered (before factorization) either through library or \ +user supplied routines. This preordering for sparsity is completely separate \ +from the factorization. Working precision iterative refinement subroutines \ +are provided for improved backward stability. Routines are also provided \ +to equilibrate the system, estimate the condition number, calculate the \ +relative backward error, and estimate error bounds for the refined solutions. \ +Serial SuperLU package also contains ILU routines, using numerical \ +threshold-based dropping, with partial pivoting (ILUTP)." +HOMEPAGE="http://crd.lbl.gov/~xiaoye/SuperLU/" +COPYRIGHT="2003 The Regents of the University of California" +LICENSE="BSD (3-clause)" +# TODO: see "External software" in License.txt +REVISION="1" +SOURCE_URI="http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_5.2.1.tar.gz" +SOURCE_DIR="SuperLU_$portVersion" +CHECKSUM_SHA256="28fb66d6107ee66248d5cf508c79de03d0621852a0ddeba7301801d3d859f463" +PATCHES="superlu-$portVersion.patchset" + +ARCHITECTURES="!x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="!x86_gcc2 x86" + +PROVIDES=" + superlu$secondaryArchSuffix = $portVersion + lib:libsuperlu$secondaryArchSuffix = 5.2.1 compat >= 5 + " +REQUIRES=" + haiku$secondaryArchSuffix + " + +PROVIDES_devel=" + superlu${secondaryArchSuffix}_devel = $portVersion + devel:libsuperlu$secondaryArchSuffix = 5.2.1 compat >= 5 + " +REQUIRES_devel=" + superlu$secondaryArchSuffix == $portVersion base + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:make + #cmd:gfortran + cmd:g++$secondaryArchSuffix + " + +BUILD() +{ + mkdir -p build + cd build + cmake .. -DCMAKE_INSTALL_PREFIX=$prefix \ + -DCMAKE_INSTALL_NAME_DIR=$libDir \ + -DCMAKE_INSTALL_LIBDIR=$libDir \ + -DCMAKE_INSTALL_INCLUDEDIR=$includeDir \ + +#TODO: use shared lib, but it seems to also build libblas.so but not install it +# -DBUILD_SHARED_LIBS=TRUE + make $jobArgs +} + +INSTALL() +{ + cd build + make install + + prepareInstalledDevelLib libsuperlu + + packageEntries devel \ + $developDir +}