aboutsummaryrefslogtreecommitdiff
path: root/math/suitesparse
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2019-09-30 08:17:43 +0000
committerJan Beich <jbeich@FreeBSD.org>2019-09-30 08:17:43 +0000
commita7a310c79a86483e0d21d97763ee806d0254a092 (patch)
treebdbe0268920b5f501df8ecb005f10d4af69b178a /math/suitesparse
parent3aaae59d2cfe31b4067985d7a60aa647dd31510b (diff)
downloadports-a7a310c79a86483e0d21d97763ee806d0254a092.tar.gz
ports-a7a310c79a86483e0d21d97763ee806d0254a092.zip
math/suitesparse: simplify
- Allow using Clang again (base libomp.so or OpenMP disabled) - Respect C++ library if using GCC (must be libc++ on Clang architectures) - Respect CFLAGS/CXXFLAGS in subdirectories using CMake - Respect BLAS/LAPACK choice (actually use OpenBLAS) - Enable Intel threading building blocks support - Switch to vendor build/install targets - Adjust plist for new items (GraphBLAS, Mongoose, DOCS) - Skip running demos during build PR: 240899 Tested by: pkubaj Approved by: fortran (thierry) MFH: 2019Q4
Notes
Notes: svn path=/head/; revision=513331
Diffstat (limited to 'math/suitesparse')
-rw-r--r--math/suitesparse/Makefile110
-rw-r--r--math/suitesparse/pkg-plist44
2 files changed, 77 insertions, 77 deletions
diff --git a/math/suitesparse/Makefile b/math/suitesparse/Makefile
index 0eed22b442f1..def96c71c72a 100644
--- a/math/suitesparse/Makefile
+++ b/math/suitesparse/Makefile
@@ -3,7 +3,7 @@
PORTNAME= suitesparse
DISTVERSION= 5.4.0
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= math
MASTER_SITES= http://faculty.cse.tamu.edu/davis/SuiteSparse/ \
https://mirror.sobukus.de/files/src/suitesparse/
@@ -15,83 +15,57 @@ COMMENT= SuiteSparse is a set of packages for sparse matrices calculation
LICENSE= GPLv2 LGPL21
LICENSE_COMB= dual
-LIB_DEPENDS= libmetis.so:math/metis \
- liblapack.so:math/lapack
+LIB_DEPENDS= libmetis.so:math/metis
-USES= cmake:insource compiler:openmp fortran gmake
+USES= cmake:insource compiler:${OPENMP}c++11-lib fortran gmake localbase:ldflags
USE_LDCONFIG= yes
-
WRKSRC= ${WRKDIR}/SuiteSparse
-WRKSRC_SHARED= ${WRKSRC}_shared
-
-OPTIONS_RADIO= BLAS
-OPTIONS_RADIO_BLAS= OPENBLAS NETLIB ATLAS
-OPTIONS_DEFAULT= OPENBLAS
-
-OPENBLAS_USES= blaslapack:openblas
-NETLIB_USES= blaslapack:netlib
-ATLAS_USES= blaslapack:atlas
+ALL_TARGET= library # skip demos
+INSTALL_TARGET= install # skip USES=cmake
+MAKE_ENV= BLAS="${BLASLIB}" LAPACK="${LAPACKLIB}" \
+ MY_METIS_LIB="-lmetis" \
+ JOBS="${MAKE_JOBS_NUMBER}" \
+ CMAKE_OPTIONS='${CMAKE_ARGS}' \
+ INSTALL="${STAGEDIR}${PREFIX}" \
+ INSTALL_DOC="${STAGEDIR}${DOCSDIR}" \
+ INSTALL_INCLUDE="${STAGEDIR}${PREFIX}/include/${PORTNAME}"
+CMAKE_ARGS= -DCMAKE_INSTALL_INCLUDEDIR:PATH="include/${PORTNAME}"
+LDFLAGS+= -L${WRKSRC}/lib # prevent linking with shared libs from the preinstalled older versions
-.include <bsd.port.options.mk>
+CONFLICTS_INSTALL= mongoose plinkseq # bin/mongoose
-.if ${ARCH} == "sparc64"
-PICFLAG?= -fPIC
-.else
-PICFLAG?= -fpic
+OPTIONS_DEFINE= DOCS OPENMP TBB
+OPTIONS_RADIO= BLAS
+OPTIONS_RADIO_BLAS= ATLAS GOTOBLAS NETLIB OPENBLAS
+OPTIONS_DEFAULT= OPENBLAS OPENMP TBB
+
+ATLAS_USES= blaslapack:atlas
+GOTOBLAS_DESC= Goto blas implementation
+GOTOBLAS_USES= blaslapack:gotoblas
+NETLIB_USES= blaslapack:netlib
+OPENBLAS_USES= blaslapack:openblas
+
+OPENMP_USES= compiler:openmp
+OPENMP_MAKE_ENV_OFF= CFOPENMP=
+.if !exists(/usr/include/omp.h)
+# XXX ports/199603 + ports/210337
+OPENMP_VARS= OPENMP=gcc-
.endif
-METIS= ${LOCALBASE}/lib/libmetis.a
-METIS_PATH= ${LOCALBASE}/include/metis
-CHOLMOD_CONFIG=
-CFLAGS+= -I${LOCALBASE}/include
-CXXFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${WRKSRC}/lib # prevent linking with shared libs from the preinstalled older versions
-MAKE_ARGS+= JOBS="${MAKE_JOBS_NUMBER}"
-MAKE_ARGS+= MY_METIS_LIB="-L${LOCALBASE}/lib -lmetis $(LDFLAGS)"
+TBB_DESC= Intel threading building blocks
+TBB_LIB_DEPENDS= libtbb.so:devel/tbb
+TBB_MAKE_ENV= TBB="-ltbb" SPQR_CONFIG="-DHAVE_TBB"
-pre-configure:
- ${RM} -r ${WRKSRC}/metis-5.1.0
- ${FIND} -X ${WRKSRC} -type f -name 'Makefile' -or -name '*.mk' | ${XARGS} \
- ${REINPLACE_CMD} \
- -e '\|^AR =|s|ar|${AR}|' \
- -e '\|^ *BLAS =|s|=.*|= ${LDFLAGS} ${BLASLIB}|' \
- -e '\|^CC =|d' \
- -e '\|^CFLAGS =|{s|-O[1-9]\{0,1\}||g;s|=|= ${CFLAGS} $${PICFLAG} |;}' \
- -e '\|^CHOLMOD_CONFIG =|s|=.*|= ${CHOLMOD_CONFIG}|' \
- -e '\|^CPLUSPLUS =|s|=.*|= ${CXX}|' \
- -e '\|^F77 =|d' \
- -e '\|^F77FLAGS =|s|=.*|= ${FFLAGS} $${PICFLAG}|' \
- -e '\|^LAPACK =|s|=.*|= ${LDFLAGS} ${LAPACKLIB}|' \
- -e '\|^METIS =|s|=.*|= ${METIS}|' \
- -e '\|^METIS_PATH =|s|=.*|= ${METIS_PATH}|' \
- -e 's|-I\$$(METIS_PATH)/Lib|-I${METIS_PATH}|' \
- -e '\|^RANLIB =|s|ranlib|${RANLIB}|' \
- -e '\|^SPQR_CONFIG =|s|=.*|= ${CHOLMOD_CONFIG}|' \
- -e 's|# MAKE = gmake|MAKE = gmake|g' \
- -e 's|/usr/local|${LOCALBASE}|g'
- ${CP} -r ${WRKSRC} ${WRKSRC_SHARED}
- ${FIND} -X ${WRKSRC_SHARED} -type f -name 'Makefile' -or -name '*.mk' | ${XARGS} \
- ${REINPLACE_CMD} -e 's|$$(CFLAGS)|$$(CFLAGS) $$(PICFLAG)|g'
+post-extract:
+ ${RM} -r ${WRKSRC}/metis-*
-do-configure:
- @${DO_NADA}
+do-configure: # skip USES=cmake
-do-build:
- cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} PICFLAG= \
- LD_LIBRARY_PATH=${WRKDIR}/SuiteSparse/lib ${MAKE_CMD} ${MAKE_ARGS}
- cd ${WRKSRC_SHARED} && ${SETENV} ${MAKE_ENV} PICFLAG=${PICFLAG} \
- LD_LIBRARY_PATH=${WRKDIR}/SuiteSparse/lib ${MAKE_CMD} ${MAKE_ARGS}
+post-patch-OPENMP-off:
+ @${REINPLACE_CMD} -e '/find_package.*OpenMP/d' \
+ ${WRKSRC}/GraphBLAS/CMakeLists.txt
-do-install:
- @${MKDIR} ${STAGEDIR}${PREFIX}/include/suitesparse
- cd ${STAGEDIR}${PREFIX}/include && ${LN} -s suitesparse ufsparse
-.for d in AMD BTF CAMD CCOLAMD CHOLMOD COLAMD CSparse CXSparse KLU SPQR UMFPACK # CSparse: shared lib bot built
- ${INSTALL_DATA} ${WRKSRC}/${d}/Include/*.h ${STAGEDIR}${PREFIX}/include/suitesparse
-.endfor
- ${INSTALL_DATA} ${WRKSRC}/SuiteSparse_config/SuiteSparse_config.h ${STAGEDIR}${PREFIX}/include/suitesparse
- ${INSTALL_DATA} ${WRKSRC}/UMFPACK/Source/umf_config.h ${STAGEDIR}${PREFIX}/include/suitesparse
- ${INSTALL_DATA} ${WRKSRC}/SPQR/Include/*.hpp ${STAGEDIR}${PREFIX}/include/suitesparse
- ${INSTALL_DATA} ${WRKSRC_SHARED}/lib/*.so* ${STAGEDIR}${PREFIX}/lib/
- @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so*
+post-install:
+ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/* ${STAGEDIR}${PREFIX}/lib/*.so
.include <bsd.port.mk>
diff --git a/math/suitesparse/pkg-plist b/math/suitesparse/pkg-plist
index 6c0a116c52db..fbde943a0f40 100644
--- a/math/suitesparse/pkg-plist
+++ b/math/suitesparse/pkg-plist
@@ -1,13 +1,14 @@
+bin/mongoose
+include/suitesparse/GraphBLAS.h
+include/suitesparse/Mongoose.hpp
+include/suitesparse/RBio.h
include/suitesparse/SuiteSparseQR.hpp
include/suitesparse/SuiteSparseQR_C.h
include/suitesparse/SuiteSparseQR_definitions.h
include/suitesparse/SuiteSparse_config.h
include/suitesparse/amd.h
-include/suitesparse/amd_internal.h
include/suitesparse/btf.h
-include/suitesparse/btf_internal.h
include/suitesparse/camd.h
-include/suitesparse/camd_internal.h
include/suitesparse/ccolamd.h
include/suitesparse/cholmod.h
include/suitesparse/cholmod_blas.h
@@ -20,7 +21,6 @@ include/suitesparse/cholmod_core.h
include/suitesparse/cholmod_function.h
include/suitesparse/cholmod_gpu.h
include/suitesparse/cholmod_gpu_kernels.h
-include/suitesparse/cholmod_internal.h
include/suitesparse/cholmod_io64.h
include/suitesparse/cholmod_matrixops.h
include/suitesparse/cholmod_modify.h
@@ -30,11 +30,8 @@ include/suitesparse/cholmod_template.h
include/suitesparse/colamd.h
include/suitesparse/cs.h
include/suitesparse/klu.h
-include/suitesparse/klu_internal.h
-include/suitesparse/klu_version.h
+include/suitesparse/ldl.h
include/suitesparse/spqr.hpp
-include/suitesparse/spqrgpu.hpp
-include/suitesparse/umf_config.h
include/suitesparse/umfpack.h
include/suitesparse/umfpack_col_to_triplet.h
include/suitesparse/umfpack_defaults.h
@@ -68,7 +65,6 @@ include/suitesparse/umfpack_timer.h
include/suitesparse/umfpack_transpose.h
include/suitesparse/umfpack_triplet_to_col.h
include/suitesparse/umfpack_wsolve.h
-include/ufsparse
lib/libamd.so
lib/libamd.so.2
lib/libamd.so.2.4.6
@@ -90,12 +86,20 @@ lib/libcolamd.so.2.9.6
lib/libcxsparse.so
lib/libcxsparse.so.3
lib/libcxsparse.so.3.2.0
+lib/libgraphblas.a
+lib/libgraphblas.so
+lib/libgraphblas.so.2
+lib/libgraphblas.so.2.2.2
lib/libklu.so
lib/libklu.so.1
lib/libklu.so.1.3.8
lib/libldl.so
lib/libldl.so.2
lib/libldl.so.2.2.6
+lib/libmongoose.a
+lib/libmongoose.so
+lib/libmongoose.so.2
+lib/libmongoose.so.2.0.3
lib/librbio.so
lib/librbio.so.2
lib/librbio.so.2.2.6
@@ -108,3 +112,25 @@ lib/libsuitesparseconfig.so.5.4.0
lib/libumfpack.so
lib/libumfpack.so.5
lib/libumfpack.so.5.7.8
+%%PORTDOCS%%%%DOCSDIR%%/AMD_README.txt
+%%PORTDOCS%%%%DOCSDIR%%/AMD_UserGuide.pdf
+%%PORTDOCS%%%%DOCSDIR%%/BTF_README.txt
+%%PORTDOCS%%%%DOCSDIR%%/CAMD_README.txt
+%%PORTDOCS%%%%DOCSDIR%%/CAMD_UserGuide.pdf
+%%PORTDOCS%%%%DOCSDIR%%/CCOLAMD_README.txt
+%%PORTDOCS%%%%DOCSDIR%%/CHOLMOD_README.txt
+%%PORTDOCS%%%%DOCSDIR%%/CHOLMOD_UserGuide.pdf
+%%PORTDOCS%%%%DOCSDIR%%/COLAMD_README.txt
+%%PORTDOCS%%%%DOCSDIR%%/CXSPARSE_README.txt
+%%PORTDOCS%%%%DOCSDIR%%/KLU_README.txt
+%%PORTDOCS%%%%DOCSDIR%%/KLU_UserGuide.pdf
+%%PORTDOCS%%%%DOCSDIR%%/LDL_README.txt
+%%PORTDOCS%%%%DOCSDIR%%/RBIO_README.txt
+%%PORTDOCS%%%%DOCSDIR%%/SPQR_README.txt
+%%PORTDOCS%%%%DOCSDIR%%/SUITESPARSECONFIG_README.txt
+%%PORTDOCS%%%%DOCSDIR%%/SuiteSparse_README.txt
+%%PORTDOCS%%%%DOCSDIR%%/UMFPACK_QuickStart.pdf
+%%PORTDOCS%%%%DOCSDIR%%/UMFPACK_README.txt
+%%PORTDOCS%%%%DOCSDIR%%/UMFPACK_UserGuide.pdf
+%%PORTDOCS%%%%DOCSDIR%%/ldl_userguide.pdf
+%%PORTDOCS%%%%DOCSDIR%%/spqr_user_guide.pdf