# $Id: Portfile,v 1.2 2006/03/11 09:07:21 mww Exp $

PortSystem 1.0

name			upcc
version			2.2.2
categories		lang parallel science
platforms		darwin
maintainers		mww@opendarwin.org
description		extension of C for high performance parallel computing
long_description	\
Unified Parallel C (UPC) is an extension of the C programming language \
designed for high performance computing on large-scale parallel machines. The \
language provides a uniform programming model for both shared and distributed \
memory hardware. The programmer is presented with a single shared, partitioned \
address space, where variables may be directly read and written by any \
processor, but each variable is physically associated with a single processor. \
UPC uses a Single Program Multiple Data (SPMD) model of computation in which \
the amount of parallelism is fixed at program startup time, typically with a \
single thread of execution per processor.

homepage		http://upc.nersc.gov/
master_sites	http://upc.nersc.gov/download/release/
distname		berkeley_upc-${version}
checksums		sha1 829233ea2a8586f45a8035c1d0ae01b74c1e5706

depends_build	bin:flex:flex
depends_lib		port:openmpi

configure.args	--mandir=${prefix}/share/man \
				--includedir=${prefix}/include/${name} \
				--sysconfdir=${prefix}/etc/${name} \
				--enable-pthreads --enable-udp --enable-smp --enable-mpi
configure.env	MPI_CC=${prefix}/lib/openmpi/bin/mpicc \
				MPIRUN_CMD=${prefix}/lib/openmpi/bin/mpirun \
				MPI_CFLAGS=-I${prefix}/include/openmpi \
				MPI_LIBS=-L${prefix}/lib

build.type		gnu

platform darwin 8 {
	configure.args-append --with-host-cc=/usr/bin/gcc-4.0 \
			--with-gcc=/usr/bin/gcc-4.0
	configure.env-append CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 \
			CXX=/usr/bin/g++-4.0
}

