mesa/mesa.spec

1063 lines
31 KiB
RPMSpec
Raw Normal View History

# (cg) Cheater...
%define Werror_cflags %nil
2012-02-01 14:34:40 +04:00
# (aco) Needed for the dri drivers
%define _disable_ld_no_undefined 1
%define build_plf 0
%define with_hardware 1
# To enable radeonsi building: WARNING it needs glamor
%define with_radeonsi 0
# To enable opencl
%define with_osmesa 1
# To disable the nouveau driver when broken
%define with_nouveau 1
# To enable experimental performance features
%define r600g_perfexperimental 1
# do a fine grained the test
%define r600g_useVRAM 1
%define r600g_discardRange 1
# This does not apply
%define r600g_htile 0
# This does not apply
%define r600g_dropVGT 0
# This does not apply
%define r600g_newflush 0
%define git 0
%define git_branch 9.0
2012-02-01 17:55:06 +04:00
%define with_hardware 1
2012-02-01 14:34:40 +04:00
%define OpenGL_supported_ver 3.1
%define opengl_ver 3.0
%define relc 0
2012-02-01 14:34:40 +04:00
%bcond_without vdpau
%bcond_with va
%bcond_with opencl
%bcond_without wayland
2012-02-01 14:34:40 +04:00
%if %{relc}
%define vsuffix -rc%{relc}
%else
%define vsuffix %nil
%endif
# New defines from Cooker
# EGL is needed by GLESv1/2, OpenVG and gbm
%define eglmajor 1
%define eglname egl
%define libeglname %mklibname %{eglname} %{eglmajor}
%define develegl %mklibname %{eglname} -d
%define gbmmajor 1
%define gbmname gbm
%define libgbmname %mklibname %{gbmname} %{gbmmajor}
%define develgbm %mklibname %{gbmname} -d
%define glesv1major 1
%define glesv1name glesv1
%define libglesv1name %mklibname %{glesv1name}_ %{glesv1major}
%define develglesv1 %mklibname %{glesv1name} -d
%define glesv2major 2
%define glesv2name glesv2
%define libglesv2name %mklibname %{glesv2name}_ %{glesv2major}
%define develglesv2 %mklibname %{glesv2name} -d
%define openvgmajor 1
%define openvgname openvg
%define libopenvgname %mklibname %{openvgname} %{openvgmajor}
%define developenvg %mklibname %{openvgname} -d
%define glmajor 1
%define glname gl
%define libglname %mklibname %{glname} %{glmajor}
%define develgl %mklibname %{glname} -d
%define dricoremajor 1
%define dricorename dricore
%define libdricorename %mklibname %{dricorename} %{dricoremajor}
%define develdricore %mklibname %{dricorename} -d
%define glapimajor 0
%define glapiname glapi
%define libglapiname %mklibname %{glapiname} %{glapimajor}
%define develglapi %mklibname %{glapiname} -d
%define vdpaumajor 1
%define vdpauname vdpau
%define libvdpauname %mklibname %{vdpauname} %{vdpaumajor}
%define xamajor 1
%define xaname xatracker
%define libxaname %mklibname %{xaname} %{xamajor}
%define develxatracker %mklibname %{xaname} -d
%define xvmcmajor 1
%define xvmcname xvmc
%define libxvmcname %mklibname %{xvmcname} %{xvmcmajor}
# Mesa >= 8.0 removed many old dri1 drivers (i810, mach64, mga, r128, savage, sis, tdfx, and unichrome)
# before the build list (dri_drivers_i386) was:
# "i810,i915,i965,mga,mach64,nouveau,r128,r200,r300,r600,radeon,savage,sis,unichrome,tdfx,swrast"
%if %{with_nouveau}
%define dri_drivers_i386 "i915,i965,nouveau,r200,radeon,swrast"
%else
%define dri_drivers_i386 "i915,i965,r200,radeon,swrast"
%endif
%define dri_drivers_x86_64 %{dri_drivers_i386}
%define dri_drivers_ppc "r200,radeon,swrast"
%define dri_drivers_ppc64 ""
%define dri_drivers_ia64 "i915,i965,r200,radeon,swrast"
%define dri_drivers_alpha "r200,radeon,swrast"
%define dri_drivers_sparc "ffb,radeon,swrast"
%define dri_drivers_mipsel "r200,radeon"
%define dri_drivers_arm "swrast"
%ifarch %{arm}
%define dri_drivers %{expand:%{dri_drivers_arm}}
%else
%define dri_drivers %{expand:%{dri_drivers_%{_arch}}}
%endif
# To select what gallium drivers to build, Mesa >= 7.11 uses a driver list
# as for the dri drivers: so providing one.
%if %{with_nouveau}
%define gallium_drivers "i915,r300,r600,nouveau,svga,swrast"
%if %{with_radeonsi}
%define gallium_drivers "i915,r300,r600,radeonsi,nouveau,svga,swrast"
%endif
%else
%define gallium_drivers "i915,r300,r600,svga,swrast"
%endif
%if %{with wayland}
%define waylandeglmajor 1
%define waylandeglname wayland-egl
%define libwaylandeglname %mklibname %{waylandeglname} %{waylandeglmajor}
%define develwaylandegl %mklibname %{waylandeglname} -d
%endif
2012-02-01 14:34:40 +04:00
%if %{with_osmesa}
%define osmesamajor 8
%define osmesaname osmesa
%define libosmesaname %mklibname %{osmesaname} %{osmesamajor}
%define develosmesa %mklibname %{osmesaname} -d
%endif
%define dridrivers %mklibname dri-drivers
%define libvdpaudrivers %mklibname vdpau-drivers
%define mesasrcdir %{_prefix}/src/Mesa/
%define driver_dir %{_libdir}/dri
2012-11-17 15:07:43 +04:00
%define short_ver 9.0.1
Name: mesa
2012-11-17 15:07:43 +04:00
Version: 9.0.1
%if %relc
%if %git
Release: 0.rc%relc.0.%git.1
%else
Release: 0.rc%relc.1
%endif
%else
%if %git
2012-09-20 13:56:20 +00:00
Release: 0.%git.6.1
%else
Release: 3
%endif
%endif
Summary: OpenGL 3.0 compatible 3D graphics library
Group: System/Libraries
License: MIT
2012-02-01 14:34:40 +04:00
URL: http://www.mesa3d.org
%if %{git}
# (cg) Current commit ref: origin/mesa_7_5_branch
Source0: %{name}-%{git_branch}-%{git}.tar.bz2
2012-02-01 14:34:40 +04:00
%else
Source0: ftp://ftp.freedesktop.org/pub/mesa/%{version}/MesaLib-%{short_ver}%{vsuffix}.tar.bz2
2012-02-01 14:34:40 +04:00
%endif
Source3: make-git-snapshot.sh
Source5: mesa-driver-install
2012-02-01 14:34:40 +04:00
Source6: XvMCConfig
Source7: README.xvmc
2012-02-01 14:34:40 +04:00
# Instructions to setup your repository clone
# git://git.freedesktop.org/git/mesa/mesa
# git checkout mesa_7_5_branch
# git branch mdv-cherry-picks
# git am ../02??-*.patch
# git branch mdv-redhat
# git am ../03??-*.patch
# git branch mdv-patches
# git am ../09??-*.patch
# In order to update to the branch via patches, issue this command:
# git format-patch --start-number 100 mesa_7_5_1..mesa_7_5_branch | sed 's/^0\([0-9]\+\)-/Patch\1: 0\1-/'
# Cherry picks
# git format-patch --start-number 200 mesa_7_5_branch..mdv-cherry-picks
# Mandriva & Mageia patches
Patch900: 0900-Mips-support.patch
# (blino) llvmpipe test programs link fails when ld --as-needed option is used, reported as fdo #52167
Patch901: 0901-gallium-only-link-static-archives-between-ld-start-e.patch
# Experimental performance patches for r600g
Patch1100: r600-fix-performance-in-Reaction-Quake.patch
Patch1101: r600-reenable-discard_range-handling.patch
Patch1102: r600g-rework-flushing-and-synchronization-pattern.patch
Patch1103: r600g-add-htile-support-v11.patch
Patch1104: r600g-convert-the-remnants-of-VGT-state-into-immedia.patch
# Cherry picks
# git format-patch --start-number 200 mesa_7_11_branch..mdv-cherry-picks
#Patch201: 0201-revert-fix-glxinitializevisualconfigfromtags-handling.patch
#Patch202: 0202-fix-includes-for-latest-libdrm.patch
#Patch203: nv50-nvc0-use-screen-instead-of-context-for-flush-notifier.patch
Patch201: 0201-revert-fix-glxinitializevisualconfigfromtags-handling.patch
#Patch202: mesa-9.0-dont-call-TexImage-hooks-for-zero-sized-images.patch
#Patch203: mesa-9.0-fix-error-check-for-zero-sized-compressed-text.patch
Patch204: mesa-9.1-fix-makefile-order.patch
# fix https://bugs.freedesktop.org/show_bug.cgi?id=56416
Patch8888: 8888-Fix-GPU-hangs-when-a-blorp-batch-is-the-first-thing-to-execute.patch
2012-09-17 17:47:09 +04:00
BuildRequires: flex
BuildRequires: bison
BuildRequires: llvm-devel
BuildRequires: expat-devel >= 2.0.1
BuildRequires: gccmakedep
BuildRequires: makedepend
BuildRequires: x11-proto-devel >= 7.3
BuildRequires: libxml2-python
BuildRequires: pkgconfig(libdrm) >= 2.4.21
BuildRequires: pkgconfig(libudev) >= 186
BuildRequires: pkgconfig(talloc)
BuildRequires: pkgconfig(xfixes) >= 4.0.3
BuildRequires: pkgconfig(xt) >= 1.0.5
BuildRequires: pkgconfig(xmu) >= 1.0.3
BuildRequires: pkgconfig(x11) >= 1.3.3
BuildRequires: pkgconfig(xdamage) >= 1.1.1
BuildRequires: pkgconfig(xext) >= 1.1.1
BuildRequires: pkgconfig(xxf86vm) >= 1.1.0
BuildRequires: pkgconfig(xi) >= 1.3
BuildRequires: pkgconfig(xorg-server) >= 1.11.0
BuildRequires: pkgconfig(xvmc)
%if %{with vdpau}
BuildRequires: pkgconfig(vdpau) >= 0.4.1
%endif
%if %{with va}
BuildRequires: pkgconfig(libva) >= 0.31.0
%endif
%if %{with wayland}
BuildRequires: wayland-devel
%endif
2012-02-01 14:34:40 +04:00
# package mesa
Requires: %{libglname} = %{version}-%{release}
#------------------------------------------------------------------------------
# Mesa packages
%package -n %{dridrivers}
Summary: Mesa DRI drivers
Group: System/Libraries
Requires: mesa = %{version}
Requires: %{libdricorename} = %{version}
%rename %{_lib}dri-drivers-experimental
Conflicts: %{_lib}MesaGL1 < 7.7-5
2012-02-01 14:34:40 +04:00
%package -n %{libdricorename}
Summary: Shared library for DRI drivers
2012-02-01 14:34:40 +04:00
Group: System/Libraries
Provides: lib%{dricorename} = %{version}-%{release}
%package -n %{develdricore}
Summary: Development files for DRI core
Group: Development/C
Requires: %{libdricorename} = %{version}-%{release}
Provides: lib%{dricorename}-devel = %{version}-%{release}
Provides: %{dricorename}-devel = %{version}-%{release}
#package -n %%{libvdpaudrivers}
#Summary: Plugins for video decondig acceleration using VDPAU
#Group: System/Libraries
#Requires: %%{libglname} = %%{version}-%%{release}
# The above implies the below
#Requires: %%{dridrivers} = %%{version}-%%{release}
#Requires: %%{libdricorename} = %%{version}-%%{release}
2012-02-01 14:34:40 +04:00
2012-02-01 17:55:06 +04:00
%package -n %{libglname}
Summary: Files for Mesa (GL and GLX libs)
2012-02-01 14:34:40 +04:00
Group: System/Libraries
2012-02-01 17:55:06 +04:00
Requires: %{dridrivers} >= %{version}-%{release}
Provides: lib%{glname} = %{version}-%{release}
Provides: libmesa%{glname} = %{version}-%{release}
Provides: %{_lib}mesagl1 = %{version}-%{release}
2012-09-20 13:56:20 +00:00
Obsoletes: %{_lib}mesagl1 < %{version}-%{release}
Suggests: %mklibname txc-dxtn
# (anssi) Forces the upgrade of x11-server-common to happen before
# alternatives removal, which allows x11-server-common to grab the symlink.
Conflicts: x11-server-common < 1.3.0.0-17
2012-02-01 14:34:40 +04:00
%package -n %{develgl}
Summary: Development files for Mesa (OpenGL compatible 3D lib)
Group: Development/C
Requires: %{libglname} = %{version}-%{release}
Provides: libgl-devel = %{version}-%{release}
Provides: mesa%{glname}-devel = %{version}-%{release}
Provides: GL-devel = %{version}-%{release}
Provides: libMesaGL-devel = %{version}-%{release}
Provides: libmesagl-devel = %{version}-%{release}
Provides: MesaGL-devel = %{version}-%{release}
Provides: %{_lib}mesagl1-devel = %{version}-%{release}
Obsoletes: %{_lib}mesagl1-devel < %{version}-%{release}
2012-02-01 14:34:40 +04:00
%package -n %{libeglname}
Summary: Files for Mesa (EGL libs)
Group: System/Libraries
Provides: lib%{eglname} = %{version}-%{release}
Provides: %{_lib}mesaegl1 = %{version}-%{release}
Obsoletes: %{_lib}mesaegl1 < %{version}-%{release}
2012-02-01 14:34:40 +04:00
%package -n %{develegl}
2012-02-01 14:34:40 +04:00
Summary: Development files for Mesa (EGL libs)
Group: Development/C
Requires: %{libeglname} = %{version}-%{release}
Provides: EGL-devel = %{version}-%{release}
Provides: lib%{eglname}-devel = %{version}-%{release}
Provides: %{eglname}-devel = %{version}-%{release}
Provides: libegl-devel = %{version}-%{release}
Provides: %{_lib}mesaegl1-devel = %{version}-%{release}
Obsoletes: %{_lib}mesaegl1-devel < %{version}-%{release}
%package -n %{libgbmname}
Summary: Files for Mesa (gbm libs)
Group: System/Libraries
%package -n %{develgbm}
Summary: Development files for Mesa (gbm libs)
Group: Development/C
Requires: %{libgbmname} = %{version}-%{release}
Provides: lib%{gbmname}-devel = %{version}-%{release}
Provides: %{gbmname}-devel = %{version}-%{release}
2012-02-01 14:34:40 +04:00
%package -n %{libglesv1name}
2012-02-01 14:34:40 +04:00
Summary: Files for Mesa (glesv1 libs)
Group: System/Libraries
Requires: lib%{eglname} = %{version}
Provides: lib%{glesv1name} = %{version}-%{release}
Provides: %{_lib}mesaglesv1_1 = %{version}-%{release}
Obsoletes: %{_lib}mesaglesv1_1 < %{version}-%{release}
2012-02-01 14:34:40 +04:00
%package -n %{develglesv1}
2012-02-01 14:34:40 +04:00
Summary: Development files for glesv1 libs
Group: Development/C
Requires: %{libglesv1name} = %{version}-%{release}
Provides: %{develglesv1} = %{version}-%{release}
Provides: lib%{glesv1name}-devel = %{version}-%{release}
Provides: %{glesv1name}-devel = %{version}-%{release}
Provides: %{_lib}mesaglesv1_1-devel = %{version}-%{release}
Obsoletes: %{_lib}mesaglesv1_1-devel < %{version}-%{release}
2012-02-01 14:34:40 +04:00
%package -n %{libglesv2name}
2012-02-01 14:34:40 +04:00
Summary: Files for Mesa (glesv2 libs)
Group: System/Libraries
Requires: lib%{eglname} = %{version}
Provides: lib%{glesv2name} = %{version}-%{release}
Provides: %{_lib}mesaglesv2_2 = %{version}-%{release}
Obsoletes: %{_lib}mesaglesv2_2 < %{version}-%{release}
2012-02-01 14:34:40 +04:00
%package -n %{develglesv2}
2012-02-01 14:34:40 +04:00
Summary: Development files for glesv2 libs
Group: Development/C
Requires: %{libglesv2name} = %{version}-%{release}
Requires: %{develegl} = %{version}-%{release}
Provides: %{develglesv2} = %{version}-%{release}
Provides: lib%{glesv2name}-devel = %{version}-%{release}
Provides: %{glesv2name}-devel = %{version}-%{release}
Provides: %{_lib}mesaglesv2_2-devel = %{version}-%{release}
Obsoletes: %{_lib}mesaglesv2_2-devel < %{version}-%{release}
2012-02-01 14:34:40 +04:00
%package -n %{libopenvgname}
2012-02-01 14:34:40 +04:00
Summary: Files for MESA (OpenVG libs)
Group: System/Libraries
Provides: lib%{openvgname} = %{version}-%{release}
Provides: %{_lib}mesaopenvg1 = %{version}-%{release}
Obsoletes: %{_lib}mesaopenvg1 < %{version}-%{release}
2012-02-01 14:34:40 +04:00
%package -n %{developenvg}
Summary: Development files for OpenVG libs
2012-02-01 14:34:40 +04:00
Group: Development/C
Requires: %{libopenvgname} = %{version}-%{release}
Provides: lib%{openvgname}-devel = %{version}-%{release}
Provides: %{openvgname}-devel = %{version}-%{release}
Provides: %{_lib}mesaopenvg1-devel = %{version}-%{release}
Obsoletes: %{_lib}mesaopenvg1-devel < %{version}-%{release}
%package -n %{libglapiname}
Summary: Files for Mesa (glapi libs)
Group: System/Libraries
Provides: lib%{glapiname} = %{version}-%{release}
%package -n %{develglapi}
Summary: Development files for glapi libs
Group: Development/C
Requires: %{libglapiname} = %{version}-%{release}
Provides: lib%{glapiname}-devel = %{version}-%{release}
Provides: %{glapiname}-devel = %{version}-%{release}
Provides: %{_lib}glapi0-devel = %{version}-%{release}
Obsoletes: %{_lib}glapi0-devel < %{version}-%{release}
%package -n %{libxaname}
Summary: Files for Mesa (xa state tracker)
Group: System/Libraries
Requires: %{libglname} = %{version}-%{release}
Provides: lib%{xaname} = %{version}-%{release}
%package -n %{develxatracker}
Summary: Development files for xa state tracker
Group: Development/C
Requires: %{libxaname} = %{version}-%{release}
Provides: lib%{xaname}-devel = %{version}-%{release}
Provides: %{xaname}-devel = %{version}-%{release}
%if %{with_osmesa}
%package -n %{libosmesaname}
Summary: Mesa offscreen rendering libraries
Group: System/Libraries
Provides: lib%{osmesaname} = %{version}-%{release}
%package -n %{develosmesa}
Summary: Mesa offscreen rendering development package
Group: Development/C
Requires: %{libosmesaname} = %{version}-%{release}
Provides: lib%{osmesaname}-devel = %{version}-%{release}
Provides: %{osmesaname}-devel = %{version}-%{release}
%endif
%if %{with wayland}
%package -n %{libwaylandeglname}
Summary: Files for Mesa (Wayland EGL libs)
Group: System/Libraries
Requires: %{libgbmname} = %{version}-%{release}
Requires: %{libeglname} = %{version}-%{release}
%package -n %{develwaylandegl}
Summary: Development files for Mesa (Wayland EGL libs)
Group: Development/C
Requires: %{libwaylandeglname} = %{version}-%{release}
Provides: lib%{waylandeglname}-devel = %{version}-%{release}
Provides: %{waylandeglname}-devel = %{version}-%{release}
%endif
2012-02-01 14:34:40 +04:00
%package common-devel
Summary: Meta package for Mesa development files
2012-02-01 14:34:40 +04:00
Group: Development/C
Requires: %{develgl} = %{version}
Requires: %{develdricore} = %{version}
Requires: %{develxatracker} = %{version}
Requires: %{develegl} = %{version}
Requires: %{develglapi} = %{version}
Requires: %{develgbm} = %{version}
Requires: %{develglesv1} = %{version}
Requires: %{develglesv2} = %{version}
Requires: %{developenvg} = %{version}
%if %{with wayland}
Requires: %{develwaylandegl} = %{version}
%endif
%if %{with_osmesa}
Requires: %{develosmesa} = %{version}
%endif
2012-09-19 23:02:06 +00:00
Requires: pkgconfig(glu)
Requires: pkgconfig(glut)
2012-02-01 14:34:40 +04:00
#------------------------------------------------------------------------------
# Package descriptions
2012-02-01 14:34:40 +04:00
%description
Mesa is an OpenGL %{OpenGL_supported_ver} compatible 3D graphics library.
%description -n %{dridrivers}
Mesa is an OpenGL %{OpenGL_supported_ver} compatible 3D graphics library. This
package contains the DRI drivers and also the experimental back-ends for the
vdpau and xvmc state trackers.
%description -n %{libdricorename}
Mesa is an OpenGL %{OpenGL_supported_ver} compatible 3D graphics library. This
package contains the DRI core library, needed from all DRI drivers.
%description -n %{develdricore}
Mesa is an OpenGL %{OpenGL_supported_ver} compatible 3D graphics library. This
package contains the headers needed to compile DRI drivers.
#description -n %%{libvdpaudrivers}
#Mesa is an OpenGL %%{OpenGL_supported_ver} compatible 3D graphics library.
#This packages provides the VPDAU plugins to enable video deconding
#acceleration with the some gallium drivers.
2012-02-01 14:34:40 +04:00
%description common-devel
Mesa common meta-package for development files.
2012-02-01 14:34:40 +04:00
%description -n %{libglname}
Mesa is an OpenGL %{OpenGL_supported_ver} compatible 3D graphics library: GL
and GLX parts.
2012-02-01 14:34:40 +04:00
%description -n %{develgl}
Mesa is an OpenGL %{OpenGL_supported_ver} compatible 3D graphics library. This
package contains the headers needed to compile Mesa programs.
2012-02-01 14:34:40 +04:00
%description -n %{libglapiname}
Mesa is an OpenGL %{OpenGL_supported_ver} compatible 3D graphics library. This
packages provides the glapi shared library used by gallium drivers.
2012-02-01 14:34:40 +04:00
%description -n %{develglapi}
Mesa is an OpenGL %{OpenGL_supported_ver} compatible 3D graphics library. This
package contains the headers needed to compile programs against glapi shared
library.
2012-02-01 17:55:06 +04:00
%description -n %{libeglname}
Mesa is an OpenGL %{OpenGL_supported_ver} compatible 3D graphics library: EGL
parts.
2012-09-13 04:12:28 +00:00
%description -n %{develegl}
Mesa is an OpenGL %{OpenGL_supported_ver} compatible 3D graphics library. This
package contains the headers needed to compile Mesa programs based on EGL.
2012-02-01 14:34:40 +04:00
%description -n %{libgbmname}
Mesa is an OpenGL %{OpenGL_supported_ver} compatible 3D graphics library: GBM
(Graphics Buffer Manager) parts.
2012-02-01 14:34:40 +04:00
%description -n %{develgbm}
Mesa is an OpenGL %{OpenGL_supported_ver} compatible 3D graphics library. This
package contains the headers needed to compile Mesa programs based on GBM
(Graphics Buffer Manager).
2012-02-01 14:34:40 +04:00
%description -n %{libglesv1name}
Mesa is an OpenGL %{OpenGL_supported_ver} compatible 3D graphics library:
OpenGL ES library version 1 parts. OpenGL ES is a low-level, lightweight API
for advanced embedded graphics using well-defined subset profiles of OpenGL.
%description -n %{develglesv1}
Mesa is an OpenGL %{OpenGL_supported_ver} compatible 3D graphics library. This
package contains the headers needed to compile OpenGL ES 1 programs.
%description -n %{libglesv2name}
Mesa is an OpenGL %{OpenGL_supported_ver} compatible 3D graphics library:
OpenGL ES library version 2 parts. OpenGL ES is a low-level, lightweight API
for advanced embedded graphics using well-defined subset profiles of OpenGL.
%description -n %{develglesv2}
Mesa is an OpenGL %{OpenGL_supported_ver} compatible 3D graphics library. This
package contains the headers needed to compile OpenGL ES 2 programs.
%description -n %{libopenvgname}
Mesa is an OpenGL %{OpenGL_supported_ver} compatible 3D graphics library:
OpenVG parts. OpenVG is a royalty-free, cross-platform API that provides a
low-level hardware acceleration interface for vector graphics libraries such
as Flash and SVG.
%description -n %{developenvg}
Mesa is an OpenGL %{OpenGL_supported_ver} compatible 3D graphics library.
Development files for the OpenVG library.
%if %{with wayland}
%description -n %{libwaylandeglname}
Mesa is an OpenGL %{OpenGL_supported_ver} compatible 3D graphics library:
Wayland EGL platform parts.
%description -n %{develwaylandegl}
Mesa is an OpenGL %{OpenGL_supported_ver} compatible 3D graphics library. This
package contains the headers needed to compile Mesa programs based on Wayland
EGL platform.
%endif
%description -n %{libxaname}
Mesa is an OpenGL %{OpenGL_supported_ver} compatible 3D graphics library: Mesa
back-end for the xa state tracker.
%description -n %{develxatracker}
Mesa is an OpenGL %{OpenGL_supported_ver} compatible 3D graphics library. This
package contains the headers needed to compile programs against the xa state
tracker.
%if %{with_osmesa}
%description -n %{libosmesaname}
Mesa is an OpenGL %{OpenGL_supported_ver} compatible 3D graphics library: Mesa
off-screen rendering library.
%description -n %{develosmesa}
Mesa is an OpenGL %{OpenGL_supported_ver} compatible 3D graphics library. This
package contains the Mesa off-screen rendering development files.
%endif
2012-02-01 14:34:40 +04:00
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
2012-02-01 14:34:40 +04:00
%prep
%if %{git}
%setup -q -n mesa-%{gitdate}
2012-02-01 14:34:40 +04:00
%else
%setup -q -n Mesa-%{version}%{vsuffix}
2012-02-01 14:34:40 +04:00
%endif
#patch001 -p1
#patch002 -p1
#patch102 -p1
%patch201 -p1
#patch202 -p1
#patch203 -p1
%patch204 -p1
#patch300 -p1 -b .shmget
#patch301 -p1 -b .nouveau
#patch302 -p1 -b .16bpp
#patch303 -p1 -b .fixglpc
#patch304 -p1
%patch900 -p1
%patch901 -p1
#patch902 -p1
#patch903 -p1
#patch904 -p1
%if %{r600g_perfexperimental}
%if %{r600g_useVRAM}
%patch1100 -p1
%endif
%if %{r600g_discardRange}
%patch1101 -p1
%endif
%if %{r600g_newflush}
%patch1102 -p1
%endif
%if %{r600g_htile}
%patch1103 -p1
%endif
%if %{r600g_dropVGT}
%patch1104 -p1
%endif
%endif
%patch8888 -p1
%if %{with_osmesa}
# OSMesa cannot be built at the same time with the whole of Mesa:
# doing that causes OSMesa to miss the OpenGL symbols, see e.g.
# https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1066599
# So we duplicate the source tree and do a double build (Anssi 12/2012)
all=$(ls)
mkdir -p build-osmesa
cp -al $all build-osmesa
%endif
#sed -i 's/CFLAGS="$CFLAGS -Werror=implicit-function-declaration"//g' configure.ac
#sed -i 's/CFLAGS="$CFLAGS -Werror=missing-prototypes"//g' configure.ac
# From FEDORA: default to dri (not xlib) for libGL on all arches
# XXX please fix upstream
sed -i 's/^default_driver.*$/default_driver="dri"/' configure.ac
2012-02-01 14:34:40 +04:00
%build
# Always (re)generate auto* generated files using our autotools and libtoolize
autoreconf -vfi
# Taken from Mageia: fix build
# TODO: should this be fixed in llvm somehow, or maybe the library
# symlinks should be moved to %%{_libdir}? (Anssi 08/2012)
export LDFLAGS="-L%{_libdir}/llvm"
# 1. Do configure for the "normal" tree, without OSMesa
# Enable gallium test?
# --enable-gallium-tests
# Also adds this one?
# --with-egl-driver-dir=%%{egldriver_dir} \
# This breaks nvidia-current closed drivers,
# **but it is needed for enabling glamor support**
# --enable-glx-tls
# Removed:
# --enable-xorg (deprecated and useless ATM)
# --enable-gallium-nouveau (useless)
# --enable-xvmc (deprecated and useless now)
# --enable-xcb (now unrecognized, starting from 02/01/2012)
# --enable-shared-dricore (unrecognized)
# --enable/disable-va (no more present)
%configure2_5x --enable-dri \
--enable-glx \
--enable-xa \
--enable-vdpau \
%if %{with opencl}
--enable-opencl \
--with-libclc-path=[/path/to/libclc/] \
--enable-r600-llvm-compiler \
%else
--disable-opencl \
%endif
--enable-gallium-g3dvl \
--with-dri-driverdir=%{driver_dir} \
--with-dri-drivers="%{dri_drivers}" \
--with-gallium-drivers="%{gallium_drivers}" \
--enable-gallium-llvm \
--with-llvm-shared-libs \
--enable-egl \
--enable-gallium-egl \
--enable-gbm \
--enable-gallium-gbm \
--enable-gles1 \
--enable-gles2 \
--enable-openvg \
--enable-shared-glapi \
%if %{with wayland}
--with-egl-platforms=x11,drm,wayland \
%else
--with-egl-platforms=x11,drm \
%endif
%if %{with_radeonsi}
--enable-glx-tls \
2012-02-01 17:55:06 +04:00
%else
--disable-glx-tls \
%endif
--enable-texture-float
# 2. Build only OSMesa separately, since we want to build OSMesa without shared-glapi.
%if %{with_osmesa}
pushd build-osmesa
autoreconf -vfi
%configure2_5x \
--enable-osmesa \
--disable-dri \
--disable-glx \
--disable-egl \
--disable-shared-glapi \
--without-gallium-drivers
popd
2012-02-01 14:34:40 +04:00
%endif
# 3. Do a double make, one for each tree and workaround a build error
# for OSMesa
# Build the regular tree
2012-02-01 14:34:40 +04:00
%make
%if %{with_osmesa}
# Built the OSMesa one
%make -C build-osmesa || %make -C build-osmesa/src/mesa/program libprogram.la
%make -C build-osmesa
%endif
2012-02-01 14:34:40 +04:00
%install
# Do a double install:
# 1. install OSMesa
%makeinstall_std -C build-osmesa
# 2. install the regular Mesa
2012-02-01 14:34:40 +04:00
%makeinstall_std
# Somehow this fails on i686 (as 25/09/2012)
#ifarch %%{x86_64}
#if %%{with_osmesa}
# From Fedora: it seems to have to do with osmesa install
# This keeps breaking, check it early.
# Note that the exit from eu-ftr is odd.
#pushd %%{buildroot}%%{_libdir}
#for i in libOSMesa*.so libGL.so ; do
# eu-findtextrel $i && exit 1
#done
#popd
#endif
#endif
# FIXME: strip will likely break the hardlink
# (blino) hardlink libGL files in %%{_libdir}/mesa
2012-02-01 14:34:40 +04:00
# to prevent proprietary driver installers from removing them
2012-02-01 17:55:06 +04:00
mkdir -p %{buildroot}%{_libdir}/mesa
pushd %{buildroot}%{_libdir}/mesa
2012-02-01 14:34:40 +04:00
for l in ../libGL.so.*; do cp -a $l .; done
popd
%ifarch %{x86_64}
2012-02-01 17:55:06 +04:00
mkdir -p %{buildroot}%{_prefix}/lib/dri
2012-02-01 14:34:40 +04:00
%endif
rm -f %{buildroot}/%{_includedir}/GL/glut.h
rm -f %{buildroot}/%{_includedir}/GL/glutf90.h
# .so files are not needed by vdpau: there is not devel package
rm -f %{buildroot}%{_libdir}/vdpau/libvdpau_*.so
# Use swrastg if built (Anssi 12/2011)
2012-02-01 17:55:06 +04:00
[ -e %{buildroot}%{_libdir}/dri/swrastg_dri.so ] && mv %{buildroot}%{_libdir}/dri/swrast{g,}_dri.so
2012-02-01 14:34:40 +04:00
# Remove .la libraires
#rm -f %%{buildroot}%%{_libdir}/dri/*.la
find %{buildroot} -name '*.la' -exec rm {} \;
# Install the config file needed for XvMC support,
# move it to /etc/X11 and symlink it from /etc
mkdir -p %{buildroot}%{_sysconfdir}/X11
install -m 0644 %{SOURCE6} %{buildroot}%{_sysconfdir}/X11/XvMCConfig
ln -s -t %{buildroot}%{_sysconfdir}/ %{_sysconfdir}/X11/XvMCConfig
# Tell the user about the need to adjust the config file according the actual HW
mkdir -p %{buildroot}%{_docdir}/%{dridrivers}/
install -m 0644 %{SOURCE7} %{buildroot}%{_docdir}/%{dridrivers}/
2012-02-01 14:34:40 +04:00
%files
%doc docs/COPYING docs/README.*
%config(noreplace) %{_sysconfdir}/XvMCConfig
%config(noreplace) %{_sysconfdir}/X11/XvMCConfig
%config(noreplace) %{_sysconfdir}/drirc
2012-02-01 14:34:40 +04:00
%files -n %{dridrivers}
%doc docs/COPYING
2012-02-01 14:34:40 +04:00
%ifnarch ppc64
%dir %{_libdir}/dri
# (blino) new mesa 9.x build system seems to use a static libglsl
#%%{_libdir}/dri/libglsl.so
2012-02-01 14:34:40 +04:00
%{_libdir}/dri/*_dri.so
# xvmc state tracker backends
%if %{with_nouveau}
%{_libdir}/libXvMCnouveau.so.*
%endif
%{_libdir}/libXvMCr300.so.*
%{_libdir}/libXvMCr600.so.*
%{_libdir}/libXvMCsoftpipe.so.*
# vdpau state tracker backends
%if %{with_nouveau}
%{_libdir}/vdpau/libvdpau_nouveau.so.*
%endif
%{_libdir}/vdpau/libvdpau_r300.so.*
%{_libdir}/vdpau/libvdpau_r600.so.*
%{_libdir}/vdpau/libvdpau_softpipe.so.*
# xorg state tracker backends (deprecated: added with --enable-xorg)
#%%{_libdir}/xorg/modules/drivers/nouveau2_drv.so
#%%{_libdir}/xorg/modules/drivers/r300_drv.so
#%%{_libdir}/xorg/modules/drivers/r600g_drv.so
#%%{_libdir}/xorg/modules/drivers/radeonsi_drv.so
%endif
%files -n %{libdricorename}
%doc docs/COPYING
#{_libdir}/libdricore%%{version}.so.%%{dricoremajor}
%{_libdir}/libdricore%{version}.so.%{dricoremajor}*
#files -n %%{libvdpaudrivers}
#doc docs/COPYING
# vdpau state tracker backends
#if %%{with_nouveau}
#%%{_libdir}/vdpau/libvdpau_nouveau.so.*
#endif
#%%{_libdir}/vdpau/libvdpau_r300.so.*
#%%{_libdir}/vdpau/libvdpau_r600.so.*
#%%{_libdir}/vdpau/libvdpau_softpipe.so.*
2012-02-01 14:34:40 +04:00
%files -n %{libglname}
%doc docs/COPYING
2012-02-01 14:34:40 +04:00
%{_libdir}/libGL.so.*
%dir %{_libdir}/mesa
%{_libdir}/mesa/libGL.so.%{glmajor}*
%files -n %{libeglname}
%doc docs/COPYING
2012-02-01 14:34:40 +04:00
%{_libdir}/libEGL.so.%{eglmajor}*
%dir %{_libdir}/egl
# Built only when shared-glapi is not enabled
#{_libdir}/egl/st_GL.so
2012-02-01 17:55:06 +04:00
%{_libdir}/egl/egl_gallium.so
%files -n %{libgbmname}
%doc docs/COPYING
#{_libdir}/libgbm.so.%%{gbmmajor}
%{_libdir}/libgbm.so.%{gbmmajor}*
%{_libdir}/gbm/gbm_*.so
%{_libdir}/gbm/pipe_*.so
2012-02-01 14:34:40 +04:00
%files -n %{libglesv1name}
%doc docs/COPYING
2012-02-01 14:34:40 +04:00
%{_libdir}/libGLESv1_CM.so.%{glesv1major}*
#{_libdir}/libGLESv1_CM.la
2012-02-01 14:34:40 +04:00
%files -n %{libglesv2name}
%doc docs/COPYING
2012-02-01 14:34:40 +04:00
%{_libdir}/libGLESv2.so.%{glesv2major}*
#{_libdir}/libGLESv2.la
2012-02-01 14:34:40 +04:00
%files -n %{libopenvgname}
%doc docs/COPYING
2012-02-01 14:34:40 +04:00
%{_libdir}/libOpenVG.so.%{openvgmajor}*
#{_libdir}/libOpenVG.la
%files -n %{libglapiname}
%doc docs/COPYING
%{_libdir}/libglapi.so.%{glapimajor}*
%files -n %{libxaname}
%doc docs/COPYING
%{_libdir}/libxatracker.so.%{xamajor}*
2012-02-01 14:34:40 +04:00
%if %{with_osmesa}
%files -n %{libosmesaname}
%doc docs/COPYING
%{_libdir}/libOSMesa.so.%{osmesamajor}*
%endif
%if %{with wayland}
%files -n %{libwaylandeglname}
%doc docs/COPYING
#{_libdir}/libwayland-egl.so.%%{waylandeglmajor}
%{_libdir}/libwayland-egl.so.%{waylandeglmajor}*
%endif
%files -n %{develdricore}
%doc docs/COPYING
%{_libdir}/libdricore%{version}.so
#{_libdir}/libdricore%%{version}.la
#{_libdir}/libdricore9.1.0.so
#{_libdir}/libdricore9.1.0.la
%files -n %{develgl}
%doc docs/COPYING
2012-02-01 14:34:40 +04:00
%{_includedir}/GL/gl.h
%{_includedir}/GL/gl_mangle.h
%{_includedir}/GL/glext.h
2012-02-01 14:34:40 +04:00
%{_includedir}/GL/glx.h
%{_includedir}/GL/glxext.h
%{_includedir}/GL/glx_mangle.h
%if !%{with_osmesa}
%{_includedir}/GL/osmesa.h
%endif
%{_includedir}/GL/wglext.h
2012-02-01 14:34:40 +04:00
%{_libdir}/libGL.so
%{_libdir}/libXvMC*.so
2012-02-01 14:34:40 +04:00
%{_libdir}/pkgconfig/gl.pc
%{_libdir}/pkgconfig/dri.pc
#FIXME: check those headers
# Apparently absent in mesa >= 7.12
#{_includedir}/GL/glfbdev.h
2012-02-01 14:34:40 +04:00
%{_includedir}/GL/vms_x_fix.h
%{_includedir}/GL/wmesa.h
%dir %{_includedir}/GL/internal
%{_includedir}/GL/internal/dri_interface.h
%files -n %{develegl}
%doc docs/COPYING
2012-02-01 14:34:40 +04:00
%{_includedir}/EGL
%{_includedir}/KHR
%{_libdir}/libEGL.so
%{_libdir}/pkgconfig/egl.pc
2012-09-13 04:12:28 +00:00
%files -n %{develgbm}
%doc docs/COPYING
%{_includedir}/gbm.h
%{_libdir}/libgbm.so
%{_libdir}/pkgconfig/gbm.pc
%files -n %{develglesv1}
%doc docs/COPYING
2012-02-01 14:34:40 +04:00
%{_includedir}/GLES
%{_libdir}/libGLESv1_CM.so
%{_libdir}/pkgconfig/glesv1_cm.pc
%files -n %{develglesv2}
%doc docs/COPYING
2012-02-01 14:34:40 +04:00
%{_includedir}/GLES2
%{_libdir}/libGLESv2.so
%{_libdir}/pkgconfig/glesv2.pc
%files -n %{developenvg}
%doc docs/COPYING
2012-02-01 14:34:40 +04:00
%{_includedir}/VG
%{_libdir}/libOpenVG.so
%{_libdir}/pkgconfig/vg.pc
%files -n %{develglapi}
%doc docs/COPYING
%{_libdir}/libglapi.so
%files -n %{develxatracker}
%doc docs/COPYING
%{_includedir}/xa_*.h
%{_libdir}/libxatracker.so
%{_libdir}/pkgconfig/xatracker.pc
%if %{with wayland}
%files -n %{develwaylandegl}
%doc docs/COPYING
%{_libdir}/libwayland-egl.so
%{_libdir}/pkgconfig/wayland-egl.pc
%endif
%if %{with_osmesa}
%files -n %{develosmesa}
%doc docs/COPYING
%dir %{_includedir}/GL
%{_includedir}/GL/osmesa.h
%{_libdir}/libOSMesa.so
#{_libdir}/libOSMesa.la
%{_libdir}/pkgconfig/osmesa.pc
%endif
%files common-devel
# This is the meta pacakge for development