We currently use the ATI FireGL accelerated GL libraries, the Mesa 3.4.2 glut libraries and the SGI GLU libraries. While testing, I needed to quickly be able to flip back and forth between Mesa GL/ATI GL and Mesa GLU/SGI GLU. Hence, this quick little hack.
This was a quick (20 minute) hack and doesn't have any niceties like keeping RPM databases up to date. It was simply meant for quick library flipping on test machines.
The variables that require modification in the script are:
In the above example, the GL libraries will be from the ATI-1.9.20 tree in the current directory, the GLU libraries will be from the oss-opengl-glu-20000925-1 tree in the current directory and they will be placed in the standard place... the root filesystem.
The library trees are just that... simply trees that get copied to the appropriate places for each library type. The structure of the tree is specific. Each tree must exist as a subdirectory of the library type.
In the above example:
Simply populate the trees appropriately using rpm2cpio from RPM archives, cp from a source tree or whatever method you prefer. Headers should be included in the appropriate trees if you plan on compiling any programs.
To give you an idea of what these trees look like, click here for a graphical representation of the trees for our RedHat 7.2 machines.
These trees contain:
If you care, libflip-tree.tgz, is a gzipped, tar archive of the above trees... you won't be able to use the ATI GL libraries, but you'll get the idea of the structure.
One thing to note is that the script needs to properly clean out all traces of the old libraries. This includes anything that might be in /usr/X11R6/lib/modules/dri or /usr/X11R6/lib/modules/drivers. If you have accelerated drivers for, say, and NVidia card, you will need to modify the clean_GL and clean_GLU subroutines to take care of this.
Once you've populated the source library trees, you should simply need to edit the %lib variable to point to the appropriate libraries and run libflip.
Just a note: We don't actually use this script anymore.
We now create RPM packages for the appropriate libraries and use them to
install and update. They, basically, mimic what this script does in
a bit cleaner fashion.
Last modified: Fri Jun 14 15:00:13 2002