|
%bcond_with wayland |
|
|
|
|
1 |
# (cg) Cheater... |
# (cg) Cheater... |
2 |
%define Werror_cflags %nil |
%define Werror_cflags %nil |
3 |
|
|
11 |
%define opengl_ver 4.5 |
%define opengl_ver 4.5 |
12 |
|
|
13 |
# define version, RC & release |
# define version, RC & release |
14 |
%define main_version 18.0.0 |
%define main_version 18.2.0 |
15 |
#define relc 5 |
#define relc 6 |
16 |
%define rel 6 |
%define rel 3 |
17 |
|
|
18 |
%define release %mkrel %{?relc:0.rc%{relc}.}%{rel} |
%define release %mkrel %{?relc:0.rc%{relc}.}%{rel} |
19 |
|
|
104 |
%define platform_drivers ,i915,i965 |
%define platform_drivers ,i915,i965 |
105 |
%define gallium_platform_drivers ,svga |
%define gallium_platform_drivers ,svga |
106 |
%endif |
%endif |
107 |
|
|
108 |
|
%define with_wayland_egl 0 |
109 |
|
|
110 |
%define dri_drivers --with-dri-drivers=%{?base_drivers}%{?platform_drivers} |
%define dri_drivers --with-dri-drivers=%{?base_drivers}%{?platform_drivers} |
111 |
|
|
112 |
Name: mesa |
Name: mesa |
133 |
BuildRequires: pkgconfig(xext) >= 1.1.1 |
BuildRequires: pkgconfig(xext) >= 1.1.1 |
134 |
BuildRequires: pkgconfig(xxf86vm) >= 1.1.0 |
BuildRequires: pkgconfig(xxf86vm) >= 1.1.0 |
135 |
BuildRequires: pkgconfig(xi) >= 1.3 |
BuildRequires: pkgconfig(xi) >= 1.3 |
136 |
|
BuildRequires: pkgconfig(xrandr) |
137 |
BuildRequires: pkgconfig(talloc) |
BuildRequires: pkgconfig(talloc) |
138 |
|
BuildRequires: python2-libxml2 |
139 |
|
BuildRequires: python2-mako |
140 |
BuildRequires: python3-libxml2 |
BuildRequires: python3-libxml2 |
141 |
BuildRequires: python3-mako |
BuildRequires: python3-mako |
142 |
BuildRequires: makedepend |
BuildRequires: makedepend |
149 |
BuildRequires: pkgconfig(libva) |
BuildRequires: pkgconfig(libva) |
150 |
%endif |
%endif |
151 |
BuildRequires: pkgconfig(vdpau) |
BuildRequires: pkgconfig(vdpau) |
|
%if %{with wayland} |
|
152 |
BuildRequires: pkgconfig(wayland-client) |
BuildRequires: pkgconfig(wayland-client) |
153 |
BuildRequires: pkgconfig(wayland-server) |
BuildRequires: pkgconfig(wayland-server) |
154 |
BuildRequires: pkgconfig(wayland-protocols) |
BuildRequires: pkgconfig(wayland-protocols) |
|
%endif |
|
155 |
%if %{enable_vulkan} |
%if %{enable_vulkan} |
156 |
BuildRequires: libgcrypt-devel |
BuildRequires: libgcrypt-devel |
157 |
%endif |
%endif |
167 |
%endif |
%endif |
168 |
Source3: make-git-snapshot.sh |
Source3: make-git-snapshot.sh |
169 |
|
|
170 |
# Instructions to setup your repository clone |
# mesa staging/18.2 branch from 1 |
171 |
# git://git.freedesktop.org/git/mesa/mesa |
Patch001: 0001-docs-add-sha256-checksums-for-18.2.0.patch |
172 |
# git checkout mesa_7_5_branch |
Patch002: 0002-winsys-virgl-correct-resource-and-handle-allocation-.patch |
173 |
# git branch mdv-cherry-picks |
Patch003: 0003-meson-Print-a-message-about-why-a-libdrm-version-was.patch |
174 |
# git am ../02??-*.patch |
Patch004: 0004-anv-pipeline-Only-consider-double-elements-which-act.patch |
175 |
# git branch mdv-redhat |
Patch005: 0005-tnl-Fix-green-gun-regression-in-xonotic.patch |
176 |
# git am ../03??-*.patch |
Patch006: 0006-apple-glx-log-added-missing-va_end-after-va_copy.patch |
177 |
# git branch mdv-patches |
Patch007: 0007-mesa-util-don-t-use-the-same-va_list-instance-twice.patch |
178 |
# git am ../09??-*.patch |
Patch008: 0008-mesa-util-don-t-ignore-NULL-returned-from-malloc.patch |
179 |
# In order to update to the branch via patches, issue this command: |
Patch009: 0009-mesa-util-add-missing-va_end-after-va_copy.patch |
180 |
# git format-patch --start-number 100 mesa_7_5_1..mesa_7_5_branch | sed 's/^0\([0-9]\+\)-/Patch\1: 0\1-/' |
Patch010: 0010-glsl-fixer-lexer-for-unreachable-defines.patch |
181 |
|
Patch011: 0011-Revert-Revert-glsl-skip-stringification-in-preproces.patch |
182 |
# Cherry picks |
#Patch012: 0012-cherry-ignore-i965-tools-32bit-compilation-with-meso.patch |
183 |
# git format-patch --start-number 200 mesa_7_5_branch..mdv-cherry-picks |
#Patch013: 0013-intel-compiler-option-msse2-and-mstackrealign.patch |
184 |
|
Patch014: 0014-v3d-Fix-SRC_ALPHA_SATURATE-blending-for-RTs-without-.patch |
185 |
# Patches "liberated" from Fedora: |
Patch015: 0015-i965-Workaround-the-gen9-hw-astc5x5-sampler-bug.patch |
186 |
# http://pkgs.fedoraproject.org/cgit/rpms/mesa.git/ |
Patch016: 0016-anv-Re-emit-vertex-buffers-when-the-pipeline-changes.patch |
187 |
# git format-patch --start-number 300 mdv-cherry-picks..mdv-redhat |
Patch017: 0017-anv-Disable-the-vertex-cache-when-tessellating-on-SK.patch |
188 |
|
Patch018: 0018-i965-tools-32bit-compilation-with-meson.patch |
189 |
|
Patch019: 0019-v3d-Fix-setup-of-the-VCM-cache-size.patch |
190 |
|
Patch020: 0020-anv-Clamp-scissors-to-the-framebuffer-boundary.patch |
191 |
|
|
192 |
# https://cgit.freedesktop.org/~ajax/mesa/log/?h=mesa-17.2-s3tc |
# mesa master branch from 101 |
193 |
|
Patch101: 0101-mesa-enable-ARB_vertex_buffer_object-in-core-profile.patch |
194 |
|
|
|
# Patches from ChromiumOS |
|
|
# http://git.chromium.org/gitweb/?p=chromiumos/overlays/chromiumos-overlay.git;a=tree;f=media-libs/mesa/files;hb=HEAD |
|
|
|
|
|
# Mageia/Mandriva patches |
|
|
# git format-patch --start-number 900 mdv-redhat..mdv-patches |
|
195 |
|
|
196 |
#------------------------------------------------------------------------------ |
#------------------------------------------------------------------------------ |
197 |
|
|
327 |
Provides: lib%{gbmname}-devel |
Provides: lib%{gbmname}-devel |
328 |
Provides: %{gbmname}-devel |
Provides: %{gbmname}-devel |
329 |
|
|
330 |
%if %{with wayland} |
%if %{?with_wayland_egl} |
331 |
%package -n %{libwaylandeglname} |
%package -n %{libwaylandeglname} |
332 |
Summary: Files for Mesa (Wayland EGL libs) |
Summary: Files for Mesa (Wayland EGL libs) |
333 |
Group: System/Libraries |
Group: System/Libraries |
483 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
484 |
GBM (Graphics Buffer Manager) development parts. |
GBM (Graphics Buffer Manager) development parts. |
485 |
|
|
486 |
%if %{with wayland} |
%if %{?with_wayland_egl} |
487 |
%description -n %{libwaylandeglname} |
%description -n %{libwaylandeglname} |
488 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
489 |
Wayland EGL platform parts. |
Wayland EGL platform parts. |
550 |
--disable-xvmc \ |
--disable-xvmc \ |
551 |
--enable-vdpau \ |
--enable-vdpau \ |
552 |
%{?with_vaapi:--enable-va} \ |
%{?with_vaapi:--enable-va} \ |
553 |
--with-platforms=x11,drm,surfaceless%{?with_wayland:,wayland} \ |
--with-platforms=x11,drm,surfaceless,wayland \ |
554 |
--enable-shared-glapi \ |
--enable-shared-glapi \ |
555 |
--enable-gbm \ |
--enable-gbm \ |
556 |
--enable-glx \ |
--enable-glx \ |
591 |
# remove .la files |
# remove .la files |
592 |
find %{buildroot} -name '*.la' -delete |
find %{buildroot} -name '*.la' -delete |
593 |
|
|
594 |
|
# remove libwayland-egl on F28+ where it's built as part of wayland source package |
595 |
|
%if !%{?with_wayland_egl} |
596 |
|
rm -f %{buildroot}%{_libdir}/libwayland-egl.so* |
597 |
|
rm -f %{buildroot}%{_libdir}/pkgconfig/wayland-egl.pc |
598 |
|
%endif |
599 |
|
|
600 |
#------------------------------------------------------------------------------ |
#------------------------------------------------------------------------------ |
601 |
|
|
602 |
%files |
%files |
634 |
%{_libdir}/libgbm.so.%{gbmmajor} |
%{_libdir}/libgbm.so.%{gbmmajor} |
635 |
%{_libdir}/libgbm.so.%{gbmmajor}.* |
%{_libdir}/libgbm.so.%{gbmmajor}.* |
636 |
|
|
637 |
%if %{with wayland} |
%if %{?with_wayland_egl} |
638 |
%files -n %{libwaylandeglname} |
%files -n %{libwaylandeglname} |
639 |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor} |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor} |
640 |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor}.* |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor}.* |
696 |
%{_includedir}/gbm.h |
%{_includedir}/gbm.h |
697 |
%{_libdir}/pkgconfig/gbm.pc |
%{_libdir}/pkgconfig/gbm.pc |
698 |
|
|
699 |
%if %{with wayland} |
%if %{?with_wayland_egl} |
700 |
%files -n %{libwaylandeglname}-devel |
%files -n %{libwaylandeglname}-devel |
701 |
%{_libdir}/libwayland-egl.so |
%{_libdir}/libwayland-egl.so |
702 |
%{_libdir}/pkgconfig/wayland-egl.pc |
%{_libdir}/pkgconfig/wayland-egl.pc |