# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 # $Id$ PortSystem 1.0 name berkeley_upc version 2.18.0 categories lang science parallel maintainers takeshi description Unified Parallel C runtime license BSD LGPL GPL-3 long_description \ This is the runtime component of the Berkeley UPC compiler. \ It also contains the 'upcc' front end to the UPC compilation system. homepage http://upc.lbl.gov/ platforms darwin master_sites ${homepage}/download/release/ checksums md5 12afd1c1fef2831b6071ac83ef570866 \ sha1 60d7b73637bf522daeba53778160b52323bfe2e4 \ rmd160 90e0a1ad142ba877f153c07e8e8579c4336b8430 depends_lib port:upc \ bin:perl:perl5 use_parallel_build yes universal_variant no post-patch { reinplace "s|/usr/local/upc/bin/upc|${prefix}/lib/upc/bin/upc|" ${worksrcpath}/multiconf.conf.in reinplace "s|\$opt{'gccupc'}|1|g" ${worksrcpath}/multiconf.conf.in } configure.cc ${prefix}/lib/upc/bin/gcc configure.cxx ${prefix}/lib/upc/bin/g++ configure.env MPI_CFLAGS="-O3" \ GCCUPC_TRANS=${prefix}/lib/upc/bin/upc configure.args-append \ --prefix=${prefix}/lib/${name} \ --mandir=${prefix}/share/man \ --disable-elan \ --disable-gm \ --disable-lapi \ --disable-vapi \ --disable-ibv \ --disable-shmem \ --disable-portals \ --disable-dcmf \ --disable-sci \ --disable-mpi \ --enable-udp \ --enable-smp \ --disable-pshm \ --enable-sptr-packed \ --disable-aligned-segments \ --with-multiconf=dbg_gccupc,opt_gccupc if {[variant_isset openmpi] || [variant_isset mpich]} { configure.args-delete --disable-mpi configure.args-append --enable-mpi } post-configure { reinplace "s|-L\$(top_builddir) -lgasnet_tools-seq|\$(top_builddir)/libgasnet_tools-seq.a|" ${worksrcpath}/dbg_gupc/gasnet/other/amudp/Makefile reinplace "s|-L. -lamudp|./libamudp.a|g" ${worksrcpath}/dbg_gupc/gasnet/other/amudp/Makefile } post-destroot { xinstall -m 755 -d ${destroot}${prefix}/share/${name} file copy ${worksrcpath}/upc-examples ${destroot}${prefix}/share/${name}/ file copy ${worksrcpath}/upc-tests ${destroot}${prefix}/share/${name}/ file delete -force ${destroot}${prefix}/lib/${name}/man ln -s ${prefix}/lib/${name}/bin/upcc ${destroot}${prefix}/bin/upcc foreach f "upc_trace upcdecl upcrun" { ln -s ${prefix}/lib/${name}/opt_gupc/bin/${f} ${destroot}${prefix}/bin/${f} } } variant openmpi description {build with openmpi} conflicts mpich { depends_lib-append port:openmpi configure.env-append MPI_CC=${prefix}/lib/openmpi/bin/mpicc } variant mpich description {build with openmpi} conflicts openmpi { depends_lib-append path:bin/mpicc-mp:mpich-default configure.env-append MPI_CC=${prefix}/bin/mpicc-mp } notes "Choose openmpi or mpich to use MPI" livecheck.type regex livecheck.url ${homepage} livecheck.regex {Berkeley UPC version ([0-9]+\.[0-9]+\.[0-9]+)}