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

Daniel J. Luke dluke at geeklair.net
Wed Jul 6 11:20:47 PDT 2011


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.

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? 

--
Daniel J. Luke
dluke at us.ntt.net





More information about the macports-dev mailing list