Some notes on ROOT: * The idea behind ROOT is that one can build a system with ROOT=/somewhere and then chroot into it or tar up /somewhere as a system image. It is not designed to allow the user to run /somewhere/usr/bin/foo. * ROOT can't be used correctly in src_*, since ROOT might be different when merging a binary package. For example, a binary package might be built with ROOT=/ and then installed onto a system using ROOT=/somewhere. * ROOT isn't used for library dependencies. When building, libraries, headers etc. on / have to be used. Cross-compiling etc is done by configuring the toolchain correctly, not by hacking ebuilds in a way that breaks binary packages. See also the discussion on bug #167285 for more info.
The only use of ${ROOT} in compiz is for the following: ln -s "${ROOT}"/usr/share/aclocal/gconf-2.m4 acinclude.m4 The only reason this is being done is because the acinclude.m4 in compiz was causing issues. As we're linking to a macro file, how are we abusing ${ROOT}?
ROOT is used to influence where stuff is being installed (into a different root), but has no relation to where stuff is, when the package is being built. all build time dependencies have to be (and are) met by whatever is installed in /. in the case of x11-wm/compiz, you would simply remove the ROOT variable. you would for example use the ROOT variable, if you want to warn the user of an old and obsoleted config file, which you find to be present (in pkg_postinst()).
Thilo, thanks for the explanation. I've removed ${ROOT} from the ebuild.
I've fixed this on compiz-0.8.2 that I just added to the tree.