Difference between revisions of "Xorg7/MesaLib"
(I added a note about LibTIFF to the package description.) |
|||
Line 16: | Line 16: | ||
Back to [[Xorg7/libdrm|libdrm]] | Back to [[Xorg7/libdrm|libdrm]] | ||
− | = Introduction to Mesa = | + | == Introduction to Mesa == |
Mesa is an OpenGL compatible 3D library. Three packages are available. | Mesa is an OpenGL compatible 3D library. Three packages are available. | ||
Line 28: | Line 28: | ||
<b>Homepage:</b> http://www.mesa3d.org/ | <b>Homepage:</b> http://www.mesa3d.org/ | ||
− | = Dependencies = | + | == Dependencies == |
− | == Required == | + | === Required === |
* Xorg [[Xorg7/Protocol_Headers|Protocol Headers]] glproto >=1.4.5 | * Xorg [[Xorg7/Protocol_Headers|Protocol Headers]] glproto >=1.4.5 | ||
Line 48: | Line 48: | ||
32-bit or pure 64-bit system | 32-bit or pure 64-bit system | ||
− | = Non-Multilib = | + | == Non-Multilib == |
Apply the patch and correct some hardcoded paths. | Apply the patch and correct some hardcoded paths. | ||
Line 80: | Line 80: | ||
Install the demo programs. | Install the demo programs. | ||
− | + | install -m755 glxinfo glxgears ${XORG_PREFIX}/bin | |
− | = Multilib = | + | == Multilib == |
− | == 32Bit == | + | === 32Bit === |
Apply the patch and correct some hardcoded paths. | Apply the patch and correct some hardcoded paths. | ||
Line 91: | Line 91: | ||
patch -Np1 -i ../mesa-{{Mesa-Version}}-drop_static_inline.patch && | patch -Np1 -i ../mesa-{{Mesa-Version}}-drop_static_inline.patch && | ||
sed -i configs/linux-dri* \ | sed -i configs/linux-dri* \ | ||
− | + | -e "s@/usr/X11R6@$XORG_PREFIX@g" \ | |
− | + | -e "s/-DHAVE_ALIAS/& -DGLX_USE_TLS/" && | |
sed -i "s@/usr/local@$XORG_PREFIX@g" bin/installmesa && | sed -i "s@/usr/local@$XORG_PREFIX@g" bin/installmesa && | ||
sed -i 's@lib/modules@lib/X11/modules@' src/glx/x11/dri_glx.c && | sed -i 's@lib/modules@lib/X11/modules@' src/glx/x11/dri_glx.c && | ||
Line 123: | Line 123: | ||
install -m755 glxinfo glxgears ${XORG_PREFIX}/bin | install -m755 glxinfo glxgears ${XORG_PREFIX}/bin | ||
− | == N32 == | + | === N32 === |
Apply the patch and correct some hardcoded paths. | Apply the patch and correct some hardcoded paths. | ||
Line 130: | Line 130: | ||
patch -Np1 -i ../mesa-{{Mesa-Version}}-drop_static_inline.patch && | patch -Np1 -i ../mesa-{{Mesa-Version}}-drop_static_inline.patch && | ||
sed -i configs/linux-dri* \ | sed -i configs/linux-dri* \ | ||
− | + | -e "s@/usr/X11R6@${XORG_PREFIX}@g" \ | |
− | + | -e "s/-DHAVE_ALIAS/& -DGLX_USE_TLS/" && | |
sed -i bin/installmesa \ | sed -i bin/installmesa \ | ||
− | + | -e 's@LIB_DIR=$1/lib@&32@' \ | |
− | + | -e 's@LIB_DIR="/usr/local/lib@&32@' \ | |
− | + | -e "s@/usr/local@${XORG_PREFIX}@g" | |
Fix an error with output redirection if /bin/sh is not the Bash shell on your system: | Fix an error with output redirection if /bin/sh is not the Bash shell on your system: | ||
Line 163: | Line 163: | ||
install -m755 glxinfo glxgears ${XORG_PREFIX}/bin | install -m755 glxinfo glxgears ${XORG_PREFIX}/bin | ||
− | == 64Bit == | + | === 64Bit === |
+ | |||
Apply the patch and correct some hardcoded paths. | Apply the patch and correct some hardcoded paths. | ||
Line 169: | Line 170: | ||
patch -Np1 -i ../mesa-{{Mesa-Version}}-drop_static_inline.patch && | patch -Np1 -i ../mesa-{{Mesa-Version}}-drop_static_inline.patch && | ||
sed -i configs/linux-dri* \ | sed -i configs/linux-dri* \ | ||
− | + | -e "s@/usr/X11R6@${XORG_PREFIX}@g" \ | |
− | + | -e "s/-DHAVE_ALIAS/& -DGLX_USE_TLS/" && | |
sed -i bin/installmesa \ | sed -i bin/installmesa \ | ||
− | + | -e 's@LIB_DIR=$1/lib@&64@' \ | |
− | + | -e 's@LIB_DIR="/usr/local/lib@&64@' \ | |
− | + | -e "s@/usr/local@${XORG_PREFIX}@g" | |
Fix an error with output redirection if /bin/sh is not the Bash shell on your system: | Fix an error with output redirection if /bin/sh is not the Bash shell on your system: | ||
Line 204: | Line 205: | ||
Forward to [[Xorg7/xbitmaps|xbitmaps]] | Forward to [[Xorg7/xbitmaps|xbitmaps]] | ||
− | = Contents = | + | == Contents == |
− | == Short Description == | + | === Short Description === |
Revision as of 13:38, 3 January 2007
Back to libdrm
Contents
Introduction to Mesa
Mesa is an OpenGL compatible 3D library. Three packages are available.
- MesaLib - the main Mesa library source code, drivers and documentation.
- MesaDemos - OpenGL demonstration and test programs. Most of the programs require GLUT.
- MesaGLUT - provides a working libglut.
If you're not interested in running the demos, you'll only need the first package. However, there are a few other packages that can use a GLUT library (such as LibTIFF), so you may wish to install MesaGLUT as well. If you choose to install the demos, extract all three tarballs from the same toplevel directory. All three will extract to the Mesa-7.9 directory.
Homepage: http://www.mesa3d.org/
Dependencies
Required
- Xorg Protocol Headers glproto >=1.4.5
- Xorg Libraries
- Xorg Utilities
- libdrm
Note: Don't remove the source after building MesaLib. It is needed by the Xorg Xserver build. You need to pass the path to the MesaLib source when building xorg-server, so take note of it.
Note: Executing 'make' in the top of the source tree will provide a list of supported targets. Several of these are 64-bit targets. Do not use these on a pure 64-bit system. The config files for these targets look in $XORG_PREFIX/lib64 for dependencies. They are really for multilib use and the regular linux or linux-dri target are appropriate for either the pure 32-bit or pure 64-bit system
Non-Multilib
Apply the patch and correct some hardcoded paths.
patch -Np1 -i ../mesa-7.9-drop_static_inline.patch && sed -i "s@/usr/X11R6@$XORG_PREFIX@g" $(grep -lr /usr/X11R6 *) && sed -i 's@lib/modules@lib/X11/modules@' src/glx/x11/dri_glx.c && sed -i 's@lib/modules@lib/X11/modules@' src/mesa/drivers/dri/Makefile.template
Fix an error with output redirection if /bin/sh is not the Bash shell on your system:
sed -i 's%>& /dev/null%>/dev/null%' src/mesa/drivers/dri/Makefile.template
Compile the package:
make realclean make linux-dri
Install the binaries and modules.
bin/installmesa ${XORG_PREFIX} && install -d ${XORG_PREFIX}/lib/X11/modules/dri && install -m755 lib/*dri* ${XORG_PREFIX}/lib/X11/modules/dri
If you chose to download and extract the demos, compile them now.
sed -i 's@-l$(GLUT_LIB)@@g' configs/default && cd progs/xdemos && make PROGS='glxinfo glxgears'
Install the demo programs.
install -m755 glxinfo glxgears ${XORG_PREFIX}/bin
Multilib
32Bit
Apply the patch and correct some hardcoded paths.
mv Mesa-7.9 Mesa-7.9-32 patch -Np1 -i ../mesa-7.9-drop_static_inline.patch && sed -i configs/linux-dri* \ -e "s@/usr/X11R6@$XORG_PREFIX@g" \ -e "s/-DHAVE_ALIAS/& -DGLX_USE_TLS/" && sed -i "s@/usr/local@$XORG_PREFIX@g" bin/installmesa && sed -i 's@lib/modules@lib/X11/modules@' src/glx/x11/dri_glx.c && sed -i 's@lib/modules@lib/X11/modules@' src/mesa/drivers/dri/Makefile.template
Fix an error with output redirection if /bin/sh is not the Bash shell on your system:
sed -i 's%>& /dev/null%>/dev/null%' src/mesa/drivers/dri/Makefile.template
Compile the package:
PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \ make CC="gcc ${BUILD32}" OPT_FLAGS="${BUILD32}" linux-dri
Install the binaries and modules.
bin/installmesa ${XORG_PREFIX} && install -d ${XORG_PREFIX}/lib/X11/modules/dri && install -m755 lib/*dri* ${XORG_PREFIX}/lib/X11/modules/dri
DEMOS: Only 1 Installation needed! If you chose to download and extract the demos, compile them now.
sed -i 's@-l$(GLUT_LIB)@@g' configs/default && cd progs/xdemos && make PROGS='glxinfo glxgears'
Install the demo programs.
install -m755 glxinfo glxgears ${XORG_PREFIX}/bin
N32
Apply the patch and correct some hardcoded paths.
mv Mesa-7.9 Mesa-7.9-32 patch -Np1 -i ../mesa-7.9-drop_static_inline.patch && sed -i configs/linux-dri* \ -e "s@/usr/X11R6@${XORG_PREFIX}@g" \ -e "s/-DHAVE_ALIAS/& -DGLX_USE_TLS/" && sed -i bin/installmesa \ -e 's@LIB_DIR=$1/lib@&32@' \ -e 's@LIB_DIR="/usr/local/lib@&32@' \ -e "s@/usr/local@${XORG_PREFIX}@g"
Fix an error with output redirection if /bin/sh is not the Bash shell on your system:
sed -i 's%>& /dev/null%>/dev/null%' src/mesa/drivers/dri/Makefile.template
Compile the package:
PKG_CONFIG_PATH="${PKG_CONFIG_PATHN32}" \ make CC="gcc ${BUILDN32}" OPT_FLAGS="${BUILDN32}" linux-dri
Install the binaries and modules.
bin/installmesa ${XORG_PREFIX} && install -d ${XORG_PREFIX}/lib32/X11/modules/dri && install -m755 lib32/*dri* ${XORG_PREFIX}/lib32/X11/modules/dri
DEMOS: Only 1 Installation Needed! If you chose to download and extract the demos, compile them now.
sed -i 's@-l$(GLUT_LIB)@@g' configs/default && cd progs/xdemos && make PROGS='glxinfo glxgears'
Install the demo programs.
install -m755 glxinfo glxgears ${XORG_PREFIX}/bin
64Bit
Apply the patch and correct some hardcoded paths.
mv Mesa-7.9 Mesa-7.9-64 patch -Np1 -i ../mesa-7.9-drop_static_inline.patch && sed -i configs/linux-dri* \ -e "s@/usr/X11R6@${XORG_PREFIX}@g" \ -e "s/-DHAVE_ALIAS/& -DGLX_USE_TLS/" && sed -i bin/installmesa \ -e 's@LIB_DIR=$1/lib@&64@' \ -e 's@LIB_DIR="/usr/local/lib@&64@' \ -e "s@/usr/local@${XORG_PREFIX}@g"
Fix an error with output redirection if /bin/sh is not the Bash shell on your system:
sed -i 's%>& /dev/null%>/dev/null%' src/mesa/drivers/dri/Makefile.template
Compile the package:
PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \ make CC="gcc ${BUILD64}" OPT_FLAGS="${BUILD64}" linux-dri-x86-64
Install the binaries and modules.
bin/installmesa ${XORG_PREFIX} && install -d ${XORG_PREFIX}/lib64/X11/modules/dri && install -m755 lib64/*dri* ${XORG_PREFIX}/lib64/X11/modules/dri
DEMOS: Only 1 Installation Needed! If you chose to download and extract the demos, compile them now.
sed -i 's@-l$(GLUT_LIB)@@g' configs/default && cd progs/xdemos && make PROGS='glxinfo glxgears'
Install the demo programs.
install -m755 glxinfo glxgears ${XORG_PREFIX}/bin
Forward to xbitmaps