[34218] trunk/dports/lang

Ryan Schmidt ryandesign at macports.org
Mon Feb 18 01:48:00 PST 2008


On Feb 18, 2008, at 03:13, erickt at macports.org wrote:

> Revision: 34218

[snip here and several places below]

> Added: trunk/dports/lang/llvm-gcc42/Portfile

> +patchfiles              patch-gcc_Makefile.in

Patchfile names should end with ".diff"; see output of "port lint"

> +post-destroot {
> +  cd ${destroot}${prefix}

Please don't use the "cd" command. It does not exist in MacPorts  
trunk and will not exist in MacPorts 1.7.0 and later.

> +platform darwin {
> +  post-extract {
> +    system "rm -rf ${workpath}/llvm-gcc${major}-${version}.source/ 
> libstdc++-v3"

Wouldn't "file delete ..." have been sufficient in place of "system  
'rm -rf ...'"?

> +platform powerpc {
> +  set triple powerpc-apple-darwin8
> +
> +  configure.env-append TRIPLE=${triple}
> +  configure.post_args  --build=${triple} --host=${triple} --target= 
> ${triple}
> +}
> +
> +platform x86 {

There is no such thing as "platform x86". If you want to target Intel  
machines, use "platform i386".

> +  set triple i686-apple-darwin8
> +
> +  configure.env-append TRIPLE=${triple} \
> +                       TARGETOPTIONS="--with-arch=nocona --with- 
> tune=generic"
> +  configure.post_args  --build=${triple} --host=${triple} --target= 
> ${triple}
> +}

You may in fact want to use "platform darwin powerpc" and "platform  
darwin i386" since a triple including "apple" is probably only  
appropriate on darwin.

In fact you may also want to factor out common code. Like this  
(untested):


set triple apple-darwin8
platform darwin powerpc {
	set triple powerpc-${triple}
}
platform darwin i386 {
	set triple i686-${triple}
	configure.env-append TARGETOPTIONS="--with-arch=nocona --with- 
tune=generic"
}
platform darwin {
	pre-configure {
		configure.env-append TRIPLE=${triple}
		configure.post_args --build=${triple} --host=${triple} --target=$ 
{triple}
	}
}


Is a triple including "darwin8" appropriate on darwin 7 or darwin 9?  
(I don't know; I'm just asking.)



More information about the macports-dev mailing list