Difference between revisions of "Xorg7/MesaLib"

From CBLFS
Jump to navigationJump to search
m (32Bit)
(64Bit: Mesa Demos)
 
(73 intermediate revisions by 20 users not shown)
Line 1: Line 1:
 
{| style="text-align: left; background-color: AliceBlue;"
 
{| style="text-align: left; background-color: AliceBlue;"
|-
+
|-valign="top"
 
!Download Source:
 
!Download Source:
|-
+
|-valign="top"
| http://prdownloads.sourceforge.net/mesa3d/MesaLib-6.5.tar.bz2
+
| ftp://ftp.freedesktop.org/pub/mesa/7.9/MesaLib-{{Mesa-Version}}.tar.gz
|-
+
|-valign="top"
| http://prdownloads.sourceforge.net/mesa3d/MesaDemos-6.5.tar.bz2
+
| ftp://ftp.freedesktop.org/pub/mesa/7.9/MesaGLUT-{{Mesa-Version}}.tar.bz2
|-
 
| http://prdownloads.sourceforge.net/mesa3d/MesaGLUT-6.5.tar.bz2
 
|-
 
!Download Patch:
 
|-
 
| http://svn.cross-lfs.org/svn/repos/patches/Mesa/mesa-6.5-drop_static_inline.patch
 
|-
 
 
|}
 
|}
  
 
Back to [[Xorg7/libdrm|libdrm]]
 
Back to [[Xorg7/libdrm|libdrm]]
  
=MesaLib=
+
== 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.
  
 
* MesaLib - the main Mesa library source code, drivers and documentation.
 
* 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.
 
* MesaGLUT - provides a working libglut.
  
If you're not interested in running the demos, you'll only need the first package.  However, if you choose to install the demos, extract all three tarballs from the same toplevel directory. All three will extract to the Mesa-6.5 directory.
+
You'll often only need the first package.  However, there are a few packages that can use a GLUT library (such as [[LibTIFF]]), so you may wish to install MesaGLUT as well. If you choose to install MesaGLUT, extract all two tarballs from the same toplevel directory. All two will extract to the Mesa-{{Mesa-Version}} directory.
  
==Dependencies==
+
<b>Homepage:</b> http://www.mesa3d.org/
  
===Required===
+
== Dependencies ==
  
 +
=== Required ===
 
* Xorg [[Xorg7/Protocol_Headers|Protocol Headers]] glproto >=1.4.5
 
* Xorg [[Xorg7/Protocol_Headers|Protocol Headers]] glproto >=1.4.5
* Xorg [[Xorg7/Libraries|Libraries]]
+
* Xorg [[Xorg7/Libraries|Libraries]] (including the Xdamage protocol)
 
* Xorg [[Xorg7/Utilities|Utilities]]
 
* Xorg [[Xorg7/Utilities|Utilities]]
* [[Xorg7/libdrm|libdrm]] >= 2.0.1
+
* [[Xorg7/libdrm|libdrm]]
 +
* [[talloc]]
  
    Note: Don't remove the source after building MesaLib.  It is needed by the
+
=== Optional ===
    Xorg Xserver build.  You need to pass the path to the MesaLib source when
+
* [[SELinux]]
    building xorg-server, so take note of it.
+
* [[XCB]]
  
==Non-Multilib==
+
== Configuration Information ==
  
Apply the patch and correct some hardcoded paths.
+
{|
 +
|-
 +
|''--enable-xcb:'' enables the use of the optional dependency XCB.
 +
|}
  
patch -Np1 -i ../mesa-6.5-drop_static_inline.patch &&
+
== Non-Multilib ==
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:
+
Configure the package:
  
  sed -i 's%>& /dev/null%>/dev/null%' src/mesa/drivers/dri/Makefile.template
+
  ./configure $XORG_CONFIG
  
 
Compile the package:
 
Compile the package:
  
  make linux-dri
+
  make  
  
Install the binaries and modules.
+
Install the package:
  
  bin/installmesa ${XORG_PREFIX} &&
+
  make install
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.
+
== Multilib == ""NEEDS UPDATING""
  
sed -i 's@-l$(GLUT_LIB)@@g' configs/default &&
+
=== 32Bit ===
cd progs/xdemos &&
 
make PROGS='glxinfo glxgears'
 
  
Install the demo programs.
+
The Mesa source is needed to build [[Xorg7/Xserver]], save the Mesa source tree for use with the build.
  
  install -m755 glxinfo glxgears ${XORG_PREFIX}/bin
+
mv Mesa-{{Mesa-Version}}{,-32} &&
 +
cd Mesa-{{Mesa-Version}}-32
  
==Multilib==
+
Compile the package:
  
=== 32Bit ===
+
PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \
 +
    ./configure $XORG_CONFIG32 --enable-32-bit && \
 +
PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \
 +
    make CC="gcc ${BUILD32} -I$XORG_PREFIX/include" \
 +
    CXX="g++ ${BUILD32} -I$XORG_PREFIX/include"
 +
 +
Install the package:
  
Apply the patch and correct some hardcoded paths.
+
make install
  
patch -Np1 -i ../mesa-6.5-drop_static_inline.patch &&
+
=== N32 ===
sed -i "s@/usr/X11R6@$XORG_PREFIX@g" $(grep -lr /usr/X11R6 *) &&
 
sed -i configs/linux-dri* \ &&
 
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:
+
The Mesa source is needed to build [[Xorg7/Xserver]], save the Mesa source tree for use with the build.
  
  sed -i 's%>& /dev/null%>/dev/null%' src/mesa/drivers/dri/Makefile.template
+
  mv Mesa-{{Mesa-Version}}{,-n32} &&
 +
cd Mesa-{{Mesa-Version}}-n32
  
 
Compile the package:
 
Compile the package:
  
  PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \
+
  PKG_CONFIG_PATH="${PKG_CONFIG_PATHN32}" \
  make CC="gcc ${BUILD32}" OPT_FLAGS="${BUILD32}" linux-dri
+
    ./configure $XORG_CONFIGN32 --enable-32-bit && \
 +
  PKG_CONFIG_PATH="${PKG_CONFIG_PATHN32}" \
 +
    make CC="gcc ${BUILDN32} -I$XORG_PREFIX/include" \
 +
    CXX="g++ ${BUILDN32} -I$XORG_PREFIX/include"
 +
 +
Install the package:
 +
 
 +
make install
 +
 
 +
=== 64Bit ===
  
Install the binaries and modules.
+
The Mesa source is needed to build [[Xorg7/Xserver]], save the Mesa source tree for use with the build.
  
  bin/installmesa ${XORG_PREFIX} &&
+
  mv Mesa-{{Mesa-Version}}{,-64} &&
install -d ${XORG_PREFIX}/lib/X11/modules/dri &&
+
  cd Mesa-{{Mesa-Version}}-64
  install -m755 lib/*dri* ${XORG_PREFIX}/lib/X11/modules/dri
 
  
=== N32 ===
+
Compile the package:
  
=== 64Bit ===
+
PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \
Apply the patch and correct some hardcoded paths.
+
    ./configure $XORG_CONFIG64 --enable-64-bit && \
 +
PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \
 +
    make CC="gcc ${BUILD64} -I$XORG_PREFIX/include" \
 +
    CXX="g++ ${BUILD64} -I$XORG_PREFIX/include"
  
patch -Np1 -i ../mesa-6.5-drop_static_inline.patch &&
+
Install the package:
sed -i "s@/usr/X11R6@/$XORG_PREFIX@g" $(grep -lr /usr/X11R6 *) &&
 
sed -i configs/linux-dri* -e "s/-DHAVE_ALIAS/& -DGLX_USr_TLS/" &&
 
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:
+
make install
  
sed -i 's%>& /dev/null%>/dev/null%' src/mesa/drivers/dri/Makefile.template
+
== For older Mesa Packages only ==
 +
The Mesa Demos are in an own package now - needs to be configured and made seperately
  
Compile the package:
+
If you would like to build and install glxinfo and glxgears execute the following command:
  
 
  PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \
 
  PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \
  make CC="gcc ${BUILD64}" OPT_FLAGS="${BUILD64}" linux-dri
+
  make CC="gcc ${BUILD64}" -C progs/xdemos glxinfo glxgears &&
 +
install -m755 -v progs/xdemos/{glxinfo,glxgears} /usr/bin
  
Install the binaries and modules.
+
Forward to [[Xorg7/xbitmaps|xbitmaps]]
  
bin/installmesa ${XORG_PREFIX} &&
+
== Contents ==
install -d ${XORG_PREFIX}/lib64/X11/modules/dri &&
 
install -m755 lib/*dri* ${XORG_PREFIX}/lib64/X11/modules/dri
 
  
Forward to [[Xorg7/xbitmaps|xbitmaps]]
+
{|style="text-align: left"
 +
|-valign="top"
 +
!Installed Directories:
 +
|/usr/include/GLES
 +
|-valign="top"
 +
!Installed Programs:
 +
|None
 +
|-valign="top"
 +
!Installed Libraries:
 +
|libGL.so, libGLU.so, libGLw.so, libOSMesa.so, libglut.so
 +
|}
 +
 
 +
=== Short Description ===

Latest revision as of 14:42, 10 January 2012

Download Source:
ftp://ftp.freedesktop.org/pub/mesa/7.9/MesaLib-7.9.tar.gz
ftp://ftp.freedesktop.org/pub/mesa/7.9/MesaGLUT-7.9.tar.bz2

Back to libdrm

Introduction to Mesa

Mesa is an OpenGL compatible 3D library. Three packages are available.

  • MesaLib - the main Mesa library source code, drivers and documentation.
  • MesaGLUT - provides a working libglut.

You'll often only need the first package. However, there are a few packages that can use a GLUT library (such as LibTIFF), so you may wish to install MesaGLUT as well. If you choose to install MesaGLUT, extract all two tarballs from the same toplevel directory. All two will extract to the Mesa-7.9 directory.

Homepage: http://www.mesa3d.org/

Dependencies

Required

Optional

Configuration Information

--enable-xcb: enables the use of the optional dependency XCB.

Non-Multilib

Configure the package:

./configure $XORG_CONFIG

Compile the package:

make 

Install the package:

make install

== Multilib == ""NEEDS UPDATING""

32Bit

The Mesa source is needed to build Xorg7/Xserver, save the Mesa source tree for use with the build.

mv Mesa-7.9{,-32} &&
cd Mesa-7.9-32

Compile the package:

PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \
    ./configure $XORG_CONFIG32 --enable-32-bit && \
PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \
    make CC="gcc ${BUILD32} -I$XORG_PREFIX/include" \
    CXX="g++ ${BUILD32} -I$XORG_PREFIX/include"

Install the package:

make install

N32

The Mesa source is needed to build Xorg7/Xserver, save the Mesa source tree for use with the build.

mv Mesa-7.9{,-n32} &&
cd Mesa-7.9-n32

Compile the package:

PKG_CONFIG_PATH="${PKG_CONFIG_PATHN32}" \
    ./configure $XORG_CONFIGN32 --enable-32-bit && \
PKG_CONFIG_PATH="${PKG_CONFIG_PATHN32}" \
    make CC="gcc ${BUILDN32} -I$XORG_PREFIX/include" \
    CXX="g++ ${BUILDN32} -I$XORG_PREFIX/include"

Install the package:

make install

64Bit

The Mesa source is needed to build Xorg7/Xserver, save the Mesa source tree for use with the build.

mv Mesa-7.9{,-64} &&
cd Mesa-7.9-64

Compile the package:

PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \
    ./configure $XORG_CONFIG64 --enable-64-bit && \
PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \
    make CC="gcc ${BUILD64} -I$XORG_PREFIX/include" \
    CXX="g++ ${BUILD64} -I$XORG_PREFIX/include"

Install the package:

make install

For older Mesa Packages only

The Mesa Demos are in an own package now - needs to be configured and made seperately

If you would like to build and install glxinfo and glxgears execute the following command:

PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \
make CC="gcc ${BUILD64}" -C progs/xdemos glxinfo glxgears &&
install -m755 -v progs/xdemos/{glxinfo,glxgears} /usr/bin

Forward to xbitmaps

Contents

Installed Directories: /usr/include/GLES
Installed Programs: None
Installed Libraries: libGL.so, libGLU.so, libGLw.so, libOSMesa.so, libglut.so

Short Description