On Thu, 2009-04-30 at 21:09 +0200, Justin wrote: > Frank Peters wrote: > > Is there a way, aside from writing a custom ebuild script, of changing > > the install prefix for a package? What I want to do is install some > > packages under /usr/local or /opt rather than the default of /usr. > > Unless I am mistaken, there does not seem to be a way of doing this > > with either portage variables or with portage profiles. > > > > Using the ROOT variable is not feasible because the resulting > > emerge will create an independent tree of packages. I just want > > to shift some packages out of /usr without losing any dependency > > or linking information. > > > > Linux is a flexible system in that it will allow libraries, include > > files, and configure information to be stored in a variety of places > > without losing any interaction. Modification of PATH, PKG_CONFIG_PATH, > > CPPFLAGS, LDFLAGS, and other variables as well as the /etc/ld.so.conf > > file will keep a system integrated no matter where things are stored. > > Yet, unless I am missing something, Gentoo does not seem to embody this > > same flexibility, at least not in a simple manner. All packages have > > to go under /usr only. > > > > Is this actually the case or is there a way to change the installation > > prefix? > > > > Frank Peters > > > perhaps you like to go with a prefixed portage: > http://www.gentoo.org/proj/en/gentoo-alt/prefix/ > >From http://linuxreviews.org/gentoo/ebuilds/
Make a folder where you will store your own ebuilds mkdir -p /usr/local/portage and set that folder in /etc/make.conf: PORTDIR_OVERLAY=/usr/local/portage The folder structure in your overlay folder should be the same as found in /usr/portage.