Bad Method 1: ACCEPT_KEYWORDS
One dubious approach is:
# ACCEPT_KEYWORDS="~x86" emerge foo.
- It will merge unstable versions of all missing dependencies--not just the unstable version of foo.
- It will be forgotten immediately. The next time you run emerge -u world, portage will attempt to downgrade foo to the highest version that is stable. Portage will undo your changes, because you have told it to temporarily emerge an unstable version.
- Messages about all other packages that might be incompatible are not displayed.
- There's a bug in emerge that results in an ugly error message.
Bad Method 2: emerge /path/to/ebuild
Another poor workaround is emerge /path/to/foo.ebuild. This has the annoying side effect of functioning as --oneshot. Portage will not add foo to your /var/lib/portage/world file. Unless foo happened to be in the world file beforehand, foo package will never be upgraded again unless you force it manually. emerge -u world will miss it.
Good method
Using the file /etc/portage/package.keywords is very simple. Just create the directory /etc/portage if it doesn't exist and touch package.keywords. So...
# mkdir /etc/portage
# cd /etc/portage
# touch package.keywords
Then you only have to add the package you want to add followed by the ~arch flag, for instance this is my file.
Contents of File /etc/portage/package.keywords :
dev-libs/libcoyotl ~x86