Virtuals

Virtuals are merely packages that are in the category of virtual. They use their dependency string to specify the providers for the virtual and should not install any files. Since they are regular ebuilds, there can be several versions of a virtual (which can be helpful when a package may be provided by another in some versions, and not others see the perl virtuals for an example of this). One other difference (besides not installing any files) is that a virtual does not define HOMEPAGE and LICENSE variables. Since it installs no files, it really does not have a license.

Before adding a new virtual, it should be discussed on gentoo-dev.

An example of a virtual: EAPI=4 DESCRIPTION="Virtual for C++ tr1 <type_traits>" SLOT="0" KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 sparc x86 ~x86-fbsd" RDEPEND="|| ( >=sys-devel/gcc-4.1 dev-libs/boost )" Looks familar...right? It should since its going to look just like a regular ebuild.

The so-called old-style or PROVIDE type virtuals have been banned from the Gentoo repository.
KEYWORDS in virtual packages

Since virtual packages do not install any files, they do not follow the regular arch testing procedure. Instead, the developer can immediately set the KEYWORDS of a virtual to the union of KEYWORDS of its providers. In particular, if a new virtual is created for a stable package, the virtual is committed straight to stable.

For example, if you have two packages: dev-libs/liblinux with KEYWORDS="amd64 ~x86" and dev-libs/libbsd with KEYWORDS="~amd64-fbsd ~x86-fbsd", the resulting virtual will have:

KEYWORDS="amd64 ~x86 ~amd64-fbsd ~x86-fbsd" RDEPEND="|| ( dev-libs/liblinux dev-libs/libbsd )"