mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-05 06:27:37 +00:00
7d41edc0c3
Don't unconditionally depend on libomp, this breaks compilation on GCC architectures. Instead, add USES=compiler:openmp. Bump PORTREVISION because of dependency change. PR: 241017 Approved by: linimon (mentor), yuri (maintainer timeout)
38 lines
1.2 KiB
Makefile
38 lines
1.2 KiB
Makefile
# $FreeBSD$
|
|
|
|
PORTNAME= hmat-oss
|
|
DISTVERSION= 1.5.0-348
|
|
PORTREVISION= 3
|
|
DISTVERSIONSUFFIX= -g76beaf3
|
|
CATEGORIES= math
|
|
|
|
MAINTAINER= yuri@FreeBSD.org
|
|
COMMENT= Hierarchical matrix C/C++ library
|
|
|
|
LICENSE= GPLv2
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE.md
|
|
|
|
LIB_DEPENDS= libcblas.so:math/cblas \
|
|
libopenblas.so:math/openblas
|
|
|
|
USES= cmake compiler:openmp
|
|
USE_GITHUB= yes
|
|
GH_ACCOUNT= jeromerobert
|
|
USE_LDCONFIG= yes
|
|
|
|
CMAKE_ARGS= -DBLAS_LIBRARIES:STRING=${LOCALBASE}/lib/libopenblas.so \
|
|
-DLAPACK_LIBRARIES:STRING=${LOCALBASE}/lib/libopenblas.so \
|
|
-DCBLAS_LIBRARIES:STRING=${LOCALBASE}/lib/libcblas.so
|
|
|
|
post-configure: # fix the error in math/openturns: /usr/local/lib/libhmat-oss.so.1: undefined reference to `openblas_set_num_threads(int)'
|
|
@${REINPLACE_CMD} "s|#define OPENBLAS_DISABLE_THREADS|\/\/&|" ${BUILD_WRKSRC}/config.h # OPENBLAS_DISABLE_THREADS enables openblas_set_num_threads(int) here
|
|
|
|
do-test:
|
|
@cd ${BUILD_WRKSRC} && \
|
|
${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} -DBUILD_EXAMPLES:BOOL=ON ${CMAKE_SOURCE_PATH} && \
|
|
${REINPLACE_CMD} "s|#define OPENBLAS_DISABLE_THREADS|\/\/&|" ${BUILD_WRKSRC}/config.h && \
|
|
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET} && \
|
|
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} test
|
|
|
|
.include <bsd.port.mk>
|