First create a directory to put all souces it, for example say ~/software/graphics/
# mkdir ~/software/graphics/
# cd ~/software/graphics/
I hope that step is obivous to you anyway, if now please refer to $CONSOLE_USER_GUIDE
Also make sure you have 'git' installed,
On ubuntu systems its in 'git-core' package
# sudo apt-get install git-core
Now install latest libdrm. First download it using git:
# git clone git://anongit.freedesktop.org/git/mesa/drm
This will create a directory named 'drm' in our current directory.
So enter it
# cd drm
note that I won't be repeating the last step as you should understand that by now for reasons I stated above
Now configure it:
#./autogen.sh --enable-nouveau-experimental-api --disable-intel --disable-radeon --prefix=/usr/local
The --enable-nouveau-experimental-api ensures nouveau bits are compiled it and --disable-intel --disable-radeon are optional
just to cut down compile time.
The --prefix= is just a caution, it should have /usr/local value by default
Now compile it:
# make -j2
-j2 says it to use 2 compile jobs and thus faster on dual core CPUs. If you have 4 core or more substitute as you wish.
Note that this setting is purly optional.
And install it:
# sudo make install
That will install the library into special directory /usr/local that exists for the purpose of overrinding distro's packages saftly.
If you ever need to remove the installed files just go into that directory and remove files from it.
Its not that easy, but knowing that it _only_ holds files you compiled its usually small enough to find and remove everything you don't want
Now lets do the same with mesa.
Once again enter the main directory (~/software/graphics/)
Download mesa:
# git clone git://git.freedesktop.org/git/mesa/mesa
Configure it:
./autogen.sh \
\
--prefix=/usr/local/lib/mesa/ \
--with-dri-driverdir=/usr/local/lib/mesa/ \
--enable-debug \
--enable-texture-float \
\
--with-gallium-drivers="nouveau" \
\
--with-dri-drivers="" \
--disable-egl \
--disable-glu \
--disable-gallium-llvm \
--disable-glw \
--disable-glut \
The backslashes mean continuation of a line or in other words logicly all of the above
is logically one line, but bash allows to write commands down nicely this way
TODO: better explanation.
Settings after and including '--with-dri-drivers=""' are optional, and just cut down compile time.
Now compile it in same way and install:
# make -j2
# sudo make install