How to upgrade to Xorg's modular release on Gentoo

From ArticleWorld


Traditionally, Xorg has been a monolithic package. This meant a large tarball of sources that had to be decompressed and then compiled. Not only did compilation take ages while building parts that were not required, but the entire source tree was hard to manage. With the 7.0 release, the Xorg team has switched to a modular distribution. Here is how to upgrade to it.

Procedure

1. Unmask Xorg 7.0. Note that, if you are extremely concerned with stability and do not like the idea of running bleeding-edge software, it may be a better option for you not to upgrade to Xorg 7.0.

To unmask Xorg 7,0:

  • Open /usr/portage/profiles/package.mask and paste the entire Modularized X section to /etc/portage/package.unmask and /etc/portage/package.keywords.
  • At the end of /etc/portage/package.unmask and /etc/portage/package.keywords, add the following:
sys-apps/portage 
sys-apps/man 
app-admin/eselect-opengl 
app-admin/eselect 
media-video/nvidia-kernel 
media-video/nvidia-glx

2. Uninstall the old Xorg installation.

To do this, exit any running X session and run:

emerge -Ca xorg-x11 
rm -rf /usr/lib/modules 
rm -rf /usr/lib/opengl/xorg-x11 
rm -rf /usr/lib/libGL*

3. At this point, create the file /usr/X11R6 as a symlink to /usr. If it already is, then everything is fine. If not, you will have to delete it and create it as a symbolic link.

4. Set the VIDEO_CARDS and INPUT_DEVICES flags in make.conf. This largely depends on your configuration, so you should refer to Gentoo's make.conf flags-related documentation for details.

5. Emerge X.org 7.0 with the command:

emerge -av xorg-x11

6. Run etc-update as root. Emerge the ati-drivers if you have an ATI card.