Combined build and destroot

Ryan Schmidt ryandesign at macports.org
Sat Dec 19 08:20:05 PST 2009


On Dec 19, 2009, at 03:56, Dan Ports wrote:

> I'm working on packaging MacFUSE 2.0 (ref: ticket #18671). This process
> is made rather painful by the fact that MacFUSE includes its own
> (surprisingly complicated) build script.
> 
> One complication is that the script essentially does the build and
> destroot phases together (because it's trying to create a .pkg).
> 
> The easiest way to get it working would be to patch the build script to
> install into ${destpath}. But then it would populate ${destpath} during
> the build phase rather than destroot -- how egregious of an offense is
> this?

Not an offense, I think. Most autoconf software is simply designed to build in the source directory and then install to a final directory, so MacPorts mirrors this method by default.

Note that the destroot directory doesn't exist until the destroot phase begins, so if you wanted to install into it during the build phase, you'd have to create the destroot directory yourself. I'm not sure if this will impede MacPorts' own attempts to create the destroot directory (and the dozens of other directories inside it) but it might work ok, and I'd give it a try.

> (Alternatively we could do both the compilation and installation
> during destroot, but that doesn't seem a lot better)

Yeah, that's probably worse.

> Properly separating the build and destroot phases would require a
> fairly intrusive patch to macfuse's build script, which I would like to
> avoid.

Agreed.

> Another option is to have the build phase stage everything
> somewhere in ${workpath} and then copy all of its contents directly to
> ${destpath} during destroot, but that feels a little silly.


Yes, this would probably just serve to introduce extra delays for the user while things are copied.



More information about the macports-dev mailing list