For the newer sys-libs/ss and sys-fs/e2fsprogs, just a simple addition to the 'echo "GROUP ...' lines in the src_unpack section to prefix a '${SYSROOT}' to the '/usr/...' so that cross-compile builds will work. Reproducible: Always
SYSROOT is not a valid variable *** This bug has been marked as a duplicate of bug 210145 ***
When you wish to be able to build a cross-compiled full file system that then may be NFS rooted (like a diskless workstation), the typical method to do so is to place the target system into a separate subdirectory (usually then identified using the environment variable SYSROOT). The /usr/lib subdirectory is correct (or /usr/$(get_libdir) in this case), but one would obviously not wish to place the cross-compiled libraries in the normal path (overwriting them with versions that could not be executed) as suggested in the former ticket. The solution that was asked for before, and with this ticket again, is simply to place the standard prefix of ${SYSROOT} in the unpack section. Then the cross-compiler (which uses the SYSROOT variable in the linking, as do many of the cross development tools) may find the correct versions which it needs. Therefore standard paths and cross-compiled paths can exist on the same machine without interference.