Revision: 81280 http://trac.macports.org/changeset/81280 Author: takeshi@macports.org Date: 2011-07-28 14:50:17 -0700 (Thu, 28 Jul 2011) Log Message: ----------- chapel: modified to ensure UsingTheRightCompiler, to respect build_arch and support +universal. closing #30376 Modified Paths: -------------- trunk/dports/lang/chapel/Portfile Modified: trunk/dports/lang/chapel/Portfile =================================================================== --- trunk/dports/lang/chapel/Portfile 2011-07-28 21:48:54 UTC (rev 81279) +++ trunk/dports/lang/chapel/Portfile 2011-07-28 21:50:17 UTC (rev 81280) @@ -5,9 +5,10 @@ name chapel version 1.3.0 +revision 1 categories lang parallel science platforms darwin -maintainers takeshi +maintainers takeshi openmaintainer description parallel programming language long_description \ Chapel is a new parallel programming language \ @@ -22,9 +23,40 @@ rmd160 94e0bbd99b291b681adddbd574529eaed952ffda worksrcdir ${distname}/${name} + use_configure no use_parallel_build no +# chapel builds with llvm-gcc by removing -use-gold-plugin +# in ${worksrcpath}/make/compiler/Makefile.llvm-gcc and +# chpl can be made to work by setting CHPL_TARGET_COMPILER +# but gives warnings on linking different triples. +# +# chapel does not build with clang. +if {![string match *-gcc-* ${configure.compiler}]} { + pre-configure { + ui_error "${name} requires configure.compiler=*-gcc-*." + return -code error + } +} +configure.compiler gcc-4.2 + +configure.optflags -O3 +if {[variant_isset universal]} { + set archflags "${configure.universal_ldflags}" +} else { + set archflags "${configure.cc_archflags}" +} +build.env CHPL_HOST_COMPILER=gnu \ + CHPL_TARGET_COMPILER=gnu \ + LDFLAGS="${archflags}" +post-configure { + reinplace "s|CXX = g++|CXX = ${configure.cxx}|" ${worksrcpath}/make/compiler/Makefile.gnu + reinplace "s|CC = gcc|CC = ${configure.cc}|" ${worksrcpath}/make/compiler/Makefile.gnu + reinplace "s|-O3|${configure.optflags} ${archflags}|" ${worksrcpath}/make/compiler/Makefile.gnu + reinplace "s|\$(ARCH)|${archflags}|g" ${worksrcpath}/make/compiler/Makefile.gnu +} + destroot { xinstall -m 755 ${worksrcpath}/bin/darwin/chpl ${destroot}${prefix}/bin xinstall -m 644 ${worksrcpath}/man/man1/chpl.1 ${destroot}${prefix}/share/man/man1 @@ -34,6 +66,8 @@ } } +variant universal {} + notes \ " set CHPL_HOME to ${prefix}/lib/${name}\n\ set CHPL_HOST_PLATFORM to darwin"
participants (1)
-
takeshi@macports.org