1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-13 03:03:15 +00:00
freebsd-ports/net/charm/Makefile
Yuri Victorovich 5f341a2ffb Change 20 ports from net/mpich2 to net/mpich
mpich2 is the obsolete version 2.x, mpich is at the current version 3.x

Ports:
math/scalapack science/nwchem science/quantum-espresso science/qmcpack science/madness
science/qbox science/openmx science/jdftx science/fleur science/libgridxc
science/mdynamix science/lm science/dftbplus science/py-gpaw devel/ga
math/elpa net/charm science/gromacs math/pari math/arpack-ng-mpich
2018-09-22 16:36:38 +00:00

73 lines
2.7 KiB
Makefile

# $FreeBSD$
PORTNAME= charm
DISTVERSION= 6.8.2
PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://charm.cs.illinois.edu/distrib/
PKGNAMESUFFIX= -uiuc
DIST_SUBDIR= ${PORTNAME}${PKGNAMESUFFIX}
MAINTAINER= yuri@FreeBSD.org
COMMENT= Message-passing parallel language and runtime system
LICENSE= CHARMPP_CONVERSE_LICENSE
LICENSE_NAME= Charm++/Converse License
LICENSE_FILE= ${WRKSRC}/LICENSE
LICENSE_PERMS= none # No redistribution is allowed, no commercial use: commercial use requires a commercial license
ONLY_FOR_ARCHS= amd64 i386
ONLY_FOR_ARCHS_REASON= Not clear if it can be built on other architectures
FETCH_DEPENDS= git:devel/git
BUILD_DEPENDS= bash:shells/bash
USES= fortran gmake localbase:ldflags shebangfix
SHEBANG_GLOB= *.sh
SHEBANG_FILES= src/scripts/*
USE_LDCONFIG= yes
#ARCH_STR= linux${ARCH:S/amd64/64/:S/i386/32/}
WRKSRC= ${WRKDIR}/${PORTNAME}-v${DISTVERSION}
INSTALL_WRKSRC= ${WRKSRC}/${VERSION}-${ARCH_STR}-gfortran-clang/tmp
BINARY_ALIAS= gfortran=gfortran${GCC_DEFAULT}
OPTIONS_SINGLE= MULTIPROCESSING
OPTIONS_SINGLE_MULTIPROCESSING= MULTICORE ETHERNET MPI
OPTIONS_DEFAULT= MULTICORE
MULTIPROCESSING_DESC= Multiprocessing
OPTIONS_SUB= yes
MULTICORE_DESC= Single-node multicore version
MULTICORE_VARS= VERSION=multicore ARCH_STR=linux${ARCH:S/amd64/64/:S/i386/32/}
ETHERNET_DESC= Ethernet version
ETHERNET_VARS= VERSION=netlrts ARCH_STR=linux${ARCH:S/amd64/-x86_64/:S/i386//}
MPI_VARS= VERSION=mpi ARCH_STR=linux${ARCH:S/amd64/-x86_64/:S/i386//}
MPI_LDFLAGS= -lmpich
MPI_LIB_DEPENDS= libmpich.so:net/mpich
post-patch:
@${REINPLACE_CMD} 's|which gfortran |which gfortran${GCC_DEFAULT} |' ${WRKSRC}/src/arch/common/conv-mach-gfortran.sh
@${FIND} ${WRKSRC} -name conv-mach.h | ${XARGS} ${REINPLACE_CMD} 's|CMK_THREADS_ARE_WIN32_FIBERS *1|CMK_THREADS_ARE_WIN32_FIBERS 0|'
@${FIND} ${WRKSRC} -name "*.c" -o -name "*.C" -o -name "*.h" -o -name "configure" | \
${XARGS} ${REINPLACE_CMD} -i '' 's|include <malloc\.h>|include <stdlib.h>|; s|include "malloc\.h"|include <stdlib.h>|'
@${REINPLACE_CMD} -E 's|(CMK_CC)="(.*)"|\1="\2 ${CFLAGS} "|' ${WRKSRC}/src/arch/common/cc-clang.sh
@${REINPLACE_CMD} -E 's|(CMK_CXX)="(.*)"|\1="\2 ${CXXFLAGS} "|' ${WRKSRC}/src/arch/common/cc-clang.sh
@${REINPLACE_CMD} -E 's|(CMK_LD)="(.*)"|\1="\2 ${LDFLAGS} "|' ${WRKSRC}/src/arch/common/cc-clang.sh
@${REINPLACE_CMD} -E 's|-shared -o libqt\.so|-shared -o libqt.so -Wl,-soname,libqt.so|' ${WRKSRC}/src/QuickThreads/mkfiles/*
do-build:
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ./build charm++ ${VERSION}-${ARCH_STR} clang gfortran --build-shared -j${MAKE_JOBS_NUMBER} ${CFLAGS}
post-install:
.for d in bin include lib
@cd ${STAGEDIR} && ${MV} ${d}/* ./${PREFIX}/${d} && ${RMDIR} $d
.endfor
@cd ${STAGEDIR} && ${MV} lib_so/* ./${PREFIX}/lib && ${RMDIR} lib_so
.include <bsd.port.mk>