how do ports install into ${destroot} instead of into ${prefix} directly?

Michael Dickens michaelld at
Thu Dec 11 10:01:34 PST 2014

On Thu, Dec 11, 2014, at 12:38 PM, René J.V. Bertin wrote:
> On Thursday December 11 2014 11:53:00 Michael Dickens wrote:
> > Hi René - If the Makefile is hand-written, it probably does not contain
> > a way to set DESTROOT or some other variable to direct where to install
> > stuff outside of PREFIX -- you'll need to read through the Makefile to
> No, it doesn't. I figured I had to edit it, but how?

Here's what I do:
cd `port dir qtchooser`
sudo port extract qtchooser
pushd work
sudo chmod -R a+rw .
cd qtchooser*
git init
git add .[a-zA-Z0-9]* *
git commit -a -m "init"
Then, open the file of interest (e.g., "Makefile") in your preferred
editor and go wild. When you're done, you can use "git diff" to retrieve
a -p1 patchfile. You can then edit the -p1 patchfile to be -p0, or just
use -p1 if possible (all patches much be of the same patch level).

> Alternatively, couldn't I change the destroot command so that it executes make with an appropriate set of options?

Yes, if the Makefile supports a way to do this. Having not seen the
Makefile, I can't say for sure. - MLD

More information about the macports-users mailing list