muniversal copy to ${worksrcpath}-${arch}

Bradley Giesbrecht pixilla at macports.org
Wed Jul 6 11:53:01 PDT 2011


On Jul 6, 2011, at 11:20 AM, Daniel J. Luke wrote:

> On Jul 6, 2011, at 12:47 PM, Bradley Giesbrecht wrote:
>> 
>> I want to use the muniversal PortGroup and I need to copy a file to ${worksrcpath}-${arch} before configure. The muniversal PortGroup creates ${worksrcpath}-${arch} during the port configure phase.
> 
> same file to all $arch or a different file per $arch?
> 
> Looks like muniversal does "copy ${worksrcpath} ${worksrcpath}-${arch}", so if it's the same file (or if you can make it be the same file), you could put it into $worksrcpath in pre-configure
> 
>> What would be a good way to implement this?
>> 
>> Possibly make the configure.cmd something like "cp ${workpath}/${distname}/LocalConfig-${arch} ${worksrcpath}/LocalConfig && ./configure"?
> 
> looks like it's maybe a different file per arch, though

The files need to be named the same but I had wanted to have the content variable dependent on arch.

> I believe tcl's file copy will just merge stuff into a directory, though. So you can copy your file into place in ${worksrcpath}-${arch}  in pre-configure (although then you'll have to duplicate code to figure out which ${worksrcpath}-${arch} directories to use), and you'll need to remove any file in $worksrcpath that would conflict with the file (since copy runs 'file copy' without -force).
> 
> Maybe the configure.cmd hack you propose is better? 

Thanks for the file/copy/merge tip Daniel.

I think I may be ok with a single LocalConfig file. I'm trying "set merger_configure_args(x86_64)" and I should be able to use configure_env($arch), if needed, to set some vars in LocalConfig.


Regards,
Bradley Giesbrecht (pixilla)




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20110706/25e9fc6e/attachment.html>


More information about the macports-dev mailing list