Multilib/Tips & tricks

This page aims to collect advices on handling different build systems when doing multilib

Binary Package Dependencies
When writing an ebuild for a binary package of the alternative ABI, the gx86-multilib dependencies should be specified in RDEPEND the same way that a regular dependency atom would, except for the addition of the USE dep for the particular ABI that is required. Since the binary package requires a particular lib SONAME, the version or slot needs to be as specific as possible so that the installed lib matches the requirements of the binary; specifying the entire SLOT/SUBSLOT is recommended, however a lower-bound and upper-bound $PV will also suffice.

Please note that while the app-emulation/emul-linux-x86-* packages are still in the portage tree, if an emul-* package can also provide the necessary lib then it should also be allowed to satisfy the dependency:

32-bit Binary Ebuild Real-World Example

Pre-built gtk-doc documentation
Some packages (especially GNOME) include pre-built gtk-doc HTML docs in the source tarball. The gtk-doc Makefile doesn't handle out-of-source builds well, and enabling those cause the pre-built docs not to be installed, or to be generated again.

This issue can be solved via placing a symlink to pre-generated docs inside the build-dir, like:

Installing pre-built gtk-doc docs with out-of-source-build