ports/math/scalapack/Makefile
Muhammad Moinur Rahman bbab7f59e9 */*: Sunset 12.4-RELEASE/12-STABLE from ports tree
- Remove all references to defunct ARCH arm
- Remove all references to defunct ARCH sparc64
- Remove x11-drivers/xf86-video-sunffb which requires defunct sparc64
  ARCH
- Remove sysutils/afbinit requires defunct sparc64 ARCH
- Remove all references to bktr driver
- Remove all references to defunct FreeBSD_12
- Remove all references to OSVERSION/OSREL corresponding to 12
- Remove conditionals in Mk/Uses/cabal.mk
- Remove sparc reference from Mk/Uses/qt-dist.mk
- Remove BROKEN_sparc64/NOT_FOR_ARCH=sparc64
- Remove BROKEN_FreeBSD_12* from:
- Remove OpenSSL patches from:
- Remove conditional flags for OSVERSION >= 1300000 to fixed flags.
  Also move conditional flags for non sparc64/arm ARCH to fixed flags.

Reviewed by:	brooks, jbeich, rene, salvadore
Differential Revision: https://reviews.freebsd.org/D42068
2023-12-31 01:37:05 +01:00

98 lines
2.9 KiB
Makefile

PORTNAME= scalapack
PORTVERSION= 2.2.0
PORTREVISION= 3
DISTVERSIONPREFIX= v
CATEGORIES= math
MAINTAINER= ports@FreeBSD.org
COMMENT= ScaLAPACK Scalable LAPACK library
WWW= https://www.netlib.org/scalapack/
LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
CONFLICTS= elmer-mathlibs-1*
USE_GITHUB= yes
GH_ACCOUNT= Reference-ScaLAPACK
USES= cmake fortran pathfix
USE_LDCONFIG= yes
CMAKE_ARGS= -DBUILD_STATIC_LIBS:BOOL=ON
ARCH2FIX= PBLAS/SRC PBLAS/SRC/PBBLAS PBLAS/SRC/PTOOLS PBLAS/SRC/PTZBLAS \
REDIST/SRC SRC TOOLS TOOLS/LAPACK
DATADIR= ${PREFIX}/share/${PORTNAME:tu}
EXAMPLESDIR= ${PREFIX}/share/examples/${PORTNAME:tu}
SUB_FILES= pkg-message
PLIST_SUB= SVERSION=${SVERSION} PORTVERSION=2.1.0
OPTIONS_DEFINE= EXAMPLES
OPTIONS_RADIO= LA MPI
OPTIONS_RADIO_LA= ATLAS BLAS
LA_DESC= Linear Algebra library support
BLAS_DESC= LAPACK blass implementation
OPTIONS_RADIO_MPI= MPICH OPENMPI
OPTIONS_DEFAULT= BLAS EXAMPLES MPICH
ATLAS_USES= blaslapack:atlas
BLAS_USES= blaslapack:openblas
MPICH_USES= mpi:mpich
MPICH_CMAKE_ON= -DMPI_BASE_DIR=${LOCALBASE}
OPENMPI_USES= mpi:openmpi
OPENMPI_CMAKE_ON=-DMPI_BASE_DIR=${LOCALBASE}/mpi/openmpi
.include <bsd.port.pre.mk>
BLAS= ${BLASLIB}
LAPACK= ${LAPACKLIB}
.if ${ARCH} == "amd64"
FPIC= -fPIC
.else
FPIC= -fpic
.endif
CFLAGS+= ${FPIC} ${MPI_CFLAGS}
FFLAGS+= ${FPIC}
LDFLAGS+= ${MPI_LIBS}
SVERSION= 2
.if ${GCC_DEFAULT} >= 10
# workaround for Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
FFLAGS+= -fallow-argument-mismatch
.endif
# USES=fortran already forces FC to a supported fortran compiler;
# assume mpicc points to a compatible compiler and force that, too.
CC= ${MPICC}
post-build:
${RM} -r ${WRKSRC}/CMakeFiles ${WRKSRC}/CMakeCache.txt
(cd ${WRKSRC} && \
${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS:C|BUILD_STATIC_LIBS|BUILD_SHARED_LIBS|} ${CMAKE_SOURCE_PATH})
(cd ${WRKSRC} && ${DO_MAKE_BUILD} ${ALL_TARGET})
post-install:
${INSTALL_LIB} ${WRKSRC}/lib/libscalapack.so ${STAGEDIR}${PREFIX}/lib/libscalapack.so.${SVERSION}
${LN} -sf libscalapack.so.${SVERSION} ${STAGEDIR}${PREFIX}/lib/libscalapack.so
${MKDIR} ${STAGEDIR}${PREFIX}/share/SCALAPACK/TESTING
(cd ${BUILD_WRKSRC}/TESTING/ ;\
${INSTALL_PROGRAM} x* ${STAGEDIR}${PREFIX}/share/SCALAPACK/TESTING ;\
${INSTALL_DATA} *.dat ${STAGEDIR}${PREFIX}/share/SCALAPACK/TESTING)
${INSTALL_DATA} ${FILESDIR}/scalapack.h ${STAGEDIR}${PREFIX}/include
${INSTALL_DATA} ${WRKSRC}/PBLAS/SRC/*.h ${STAGEDIR}${PREFIX}/include
post-install-EXAMPLES-on:
${MKDIR} ${STAGEDIR}${PREFIX}/share/examples/SCALAPACK
${INSTALL_DATA} ${FILESDIR}/Makefile ${STAGEDIR}${PREFIX}/share/examples/SCALAPACK
${INSTALL_DATA} ${FILESDIR}/example1.cc ${STAGEDIR}${PREFIX}/share/examples/SCALAPACK
${INSTALL_DATA} ${FILESDIR}/example1.f ${STAGEDIR}${PREFIX}/share/examples/SCALAPACK
do-test:
(cd ${BUILD_WRKSRC}/TESTING && ${MAKE_CMD} test)
.include <bsd.port.post.mk>