Change prefix path

Arno Hautala arno at alum.wpi.edu
Sat Apr 30 09:58:28 PDT 2011


On Sat, Apr 30, 2011 at 11:58, Ryan Schmidt <ryandesign at macports.org> wrote:
>
> As Daniel said, yes, you can change the prefix -- but not by editing macports.conf. (Thus I'm not sure why the prefix is even listed in macports.conf.) To change the prefix, you must build MacPorts from source and pass your desired prefix to the ./configure script.
>
> https://trac.macports.org/wiki/InstallingMacPorts#InstallMacPortsfromsourcetoanypathexceptusrlocal
>
> e.g.
>
> ./configure --prefix=/opt/mymacports --enable-readline
> make
> sudo make install

Note, that if you're doing this to have multiple installations of
MacPorts, you'll probably want to pass other "prefix" changes as well.
I used something along the lines of:
--prefix=.../macports/development/macports/
--with-tclpackage=.../macports/development/tcl/
--with-applications-dir=.../macports/development/Applications/
--with-frameworks-dir=.../macports/development/Frameworks/
--with-ports-dir=.../macports/development/ports/

And you'll still have to contend with things like launchd plists that
want to install under /Library

Or, you may be content with just using "--prefix".

MacPorts should be the only thing writing to /opt/local anyway, why
exactly do you want to install to a different prefix? I ask because
there may be a better solution to your problem.

-- 
arno  s  hautala    /-|   arno at alum.wpi.edu

pgp b2c9d448


More information about the macports-users mailing list