I would like to have the possibility to choose the destination directory for KDE. Now KDE goes into /usr/kde/3 which doesn't look like a good solution. I would like to see KDE installed in /opt/kde. My idea's to add another variable to make.conf. If the variable's missing, KDE gets installed into /usr/kde/3 as usual. If it's there, KDE would be installed into that specified directory. Dan, please say "Yes, that's an interesting proposal"... :-)
the variable exists already ... KDEDIR try putting it into /etc/make.globals
No, that didn't help. I had to patch the file kde-functions.eclass in /usr/portage/eclass. Does the file get overwritten during an emerge rsync?
It is actually supposed to be KDE3DIR and KDE3LIBSDIR that get defined, and it does work. Yes, rsync will wipe out your changes.
That doesn't help. KDE was compiled with the prefix /opt/kde, but emerge installed it in /usr/kde/3. I had to patch the file kde-functions.eclass. The paths are hardcoded in there. They should be changed to use the environment variable.
In the newest kde-functions.eclass file, Dan has introduced a check against the $KDEPREFIX variable, which can be defined in profile.env. If the variable exists, it will override the standard of installing into /usr/kde/3.
For anyone stumbling across this bug in the future: the KDE3DIR/KDEPREFIX/whatever options aren't well documented. The latest logic should always be described in comments in the function ste-kdedir() in kde-functions.eclass. All ebuilds are provided with $KDEDIR (location of kdeilbs) and $PREFIX (place to install to) and should take them into account where needed (e.g. kdebase with its sed'ding of startkde).