|
%if "%distro_section" == "tainted" |
|
|
%global build_plf 1 |
|
|
%else |
|
|
%global build_plf 0 |
|
|
%endif |
|
|
|
|
1 |
# (cg) Cheater... |
# (cg) Cheater... |
2 |
%define Werror_cflags %nil |
%define Werror_cflags %nil |
3 |
|
|
6 |
|
|
7 |
# https://cgit.freedesktop.org/mesa/mesa/commit/?h=13.0&id=3bb0415ab96f74183f7aa58c1a543448653ccb3e |
# https://cgit.freedesktop.org/mesa/mesa/commit/?h=13.0&id=3bb0415ab96f74183f7aa58c1a543448653ccb3e |
8 |
%define git 0 |
%define git 0 |
9 |
%define git_branch 17.3 |
%define git_branch 18.0 |
10 |
|
|
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 17.3.0 |
%define main_version 18.3.0 |
15 |
%define relc 4 |
%define relc 1 |
16 |
%define rel 2 |
%define rel 1 |
17 |
|
|
18 |
%define release %mkrel %{?relc:0.rc%{relc}.}%{rel} |
%define release %mkrel %{?relc:0.rc%{relc}.}%{rel} |
19 |
|
|
84 |
|
|
85 |
%define mesasrcdir %{_prefix}/src/Mesa/ |
%define mesasrcdir %{_prefix}/src/Mesa/ |
86 |
|
|
87 |
|
%define with_vaapi 1 |
88 |
|
|
89 |
# (akien) Not adding on arm as it would break the build there |
# (akien) Not adding on arm as it would break the build there |
90 |
%define enable_vulkan 0 |
%define enable_vulkan 0 |
91 |
%ifarch %{ix86} x86_64 |
%ifarch %{ix86} x86_64 |
92 |
%define enable_vulkan 1 |
%define enable_vulkan 1 |
93 |
%endif |
%endif |
94 |
|
|
95 |
|
|
96 |
|
%ifarch %{arm} aarch64 |
97 |
|
%define with_etnaviv 1 |
98 |
|
%define with_freedreno 1 |
99 |
|
%define with_vc4 1 |
100 |
|
%endif |
101 |
|
|
102 |
%define base_drivers swrast,nouveau,radeon,r200 |
%define base_drivers swrast,nouveau,radeon,r200 |
103 |
%ifarch %{ix86} x86_64 |
%ifarch %{ix86} x86_64 |
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 |
127 |
BuildRequires: pkgconfig(expat) >= 2.0.1 |
BuildRequires: pkgconfig(expat) >= 2.0.1 |
128 |
BuildRequires: gccmakedep |
BuildRequires: gccmakedep |
129 |
BuildRequires: x11-proto-devel >= 7.3 |
BuildRequires: x11-proto-devel >= 7.3 |
130 |
BuildRequires: pkgconfig(libdrm) >= 2.4.60 |
BuildRequires: pkgconfig(libdrm) >= 2.4.91 |
131 |
BuildRequires: pkgconfig(xcb-dri3) |
BuildRequires: pkgconfig(xcb-dri3) |
132 |
BuildRequires: pkgconfig(xcb-present) >= 1.11 |
BuildRequires: pkgconfig(xcb-present) >= 1.11 |
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: libxml2-python |
BuildRequires: python2-libxml2 |
139 |
BuildRequires: python-mako |
BuildRequires: python2-mako |
140 |
|
BuildRequires: python3-libxml2 |
141 |
|
BuildRequires: python3-mako |
142 |
BuildRequires: makedepend |
BuildRequires: makedepend |
143 |
BuildRequires: bison |
BuildRequires: bison |
144 |
BuildRequires: flex |
BuildRequires: flex |
145 |
BuildRequires: pkgconfig(libelf) |
BuildRequires: pkgconfig(libelf) |
146 |
BuildRequires: llvm-devel >= 3.9.1-5 |
BuildRequires: llvm-devel >= 3.9.1-5 |
147 |
BuildRequires: pkgconfig(libudev) |
BuildRequires: pkgconfig(libudev) |
148 |
|
%if 0%{?with_vaapi} |
149 |
BuildRequires: pkgconfig(libva) |
BuildRequires: pkgconfig(libva) |
150 |
|
%endif |
151 |
BuildRequires: pkgconfig(vdpau) |
BuildRequires: pkgconfig(vdpau) |
152 |
BuildRequires: wayland-devel |
BuildRequires: pkgconfig(wayland-client) |
153 |
|
BuildRequires: pkgconfig(wayland-server) |
154 |
|
BuildRequires: pkgconfig(wayland-protocols) |
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 |
|
# 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-/' |
|
|
|
|
|
# from mesa master: https://cgit.freedesktop.org/mesa/mesa/commit/?id=c591b1e59454db2e8854e36852e0d413ce38b2f2 |
|
|
Patch100: i965-expose-SRGB-visuals-and-turn-on-EGL_KHR_gl-colorspace.patch |
|
|
|
|
|
# Cherry picks |
|
|
# git format-patch --start-number 200 mesa_7_5_branch..mdv-cherry-picks |
|
|
|
|
|
# Patches "liberated" from Fedora: |
|
|
# http://pkgs.fedoraproject.org/cgit/rpms/mesa.git/ |
|
|
# git format-patch --start-number 300 mdv-cherry-picks..mdv-redhat |
|
|
|
|
|
# https://cgit.freedesktop.org/~ajax/mesa/log/?h=mesa-17.2-s3tc |
|
171 |
|
|
172 |
# Patches from ChromiumOS |
# mesa master branch from 101 |
|
# http://git.chromium.org/gitweb/?p=chromiumos/overlays/chromiumos-overlay.git;a=tree;f=media-libs/mesa/files;hb=HEAD |
|
173 |
|
|
|
# Mageia/Mandriva patches |
|
|
# git format-patch --start-number 900 mdv-redhat..mdv-patches |
|
174 |
|
|
175 |
#------------------------------------------------------------------------------ |
#------------------------------------------------------------------------------ |
176 |
|
|
306 |
Provides: lib%{gbmname}-devel |
Provides: lib%{gbmname}-devel |
307 |
Provides: %{gbmname}-devel |
Provides: %{gbmname}-devel |
308 |
|
|
309 |
|
%if %{?with_wayland_egl} |
310 |
%package -n %{libwaylandeglname} |
%package -n %{libwaylandeglname} |
311 |
Summary: Files for Mesa (Wayland EGL libs) |
Summary: Files for Mesa (Wayland EGL libs) |
312 |
Group: System/Libraries |
Group: System/Libraries |
318 |
Requires: %{libwaylandeglname} = %{version}-%{release} |
Requires: %{libwaylandeglname} = %{version}-%{release} |
319 |
Provides: lib%{waylandeglname}-devel |
Provides: lib%{waylandeglname}-devel |
320 |
Provides: %{waylandeglname}-devel |
Provides: %{waylandeglname}-devel |
321 |
|
%endif |
322 |
|
|
323 |
%package -n %{_lib}vdpau-driver-nouveau |
%package -n %{_lib}vdpau-driver-nouveau |
324 |
Summary: VDPAU plugin for nouveau driver |
Summary: VDPAU plugin for nouveau driver |
462 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
463 |
GBM (Graphics Buffer Manager) development parts. |
GBM (Graphics Buffer Manager) development parts. |
464 |
|
|
465 |
|
%if %{?with_wayland_egl} |
466 |
%description -n %{libwaylandeglname} |
%description -n %{libwaylandeglname} |
467 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
468 |
Wayland EGL platform parts. |
Wayland EGL platform parts. |
470 |
%description -n %{libwaylandeglname}-devel |
%description -n %{libwaylandeglname}-devel |
471 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
472 |
Wayland EGL platform development parts. |
Wayland EGL platform development parts. |
473 |
|
%endif |
474 |
|
|
475 |
%description -n %{libxaname} |
%description -n %{libxaname} |
476 |
This packages provides the xa shared library used by gallium. |
This packages provides the xa shared library used by gallium. |
510 |
%prep |
%prep |
511 |
%autosetup -n %{name}-%{version}%{?relc:-rc%{relc}} -p1 |
%autosetup -n %{name}-%{version}%{?relc:-rc%{relc}} -p1 |
512 |
|
|
|
# this is a hack for S3TC support. r200_screen.c is symlinked to |
|
|
# radeon_screen.c in git, but is its own file in the tarball. |
|
|
cp -f src/mesa/drivers/dri/{radeon,r200}/radeon_screen.c |
|
|
|
|
513 |
%build |
%build |
514 |
# (re)generate auto* generated files using our autotools and libtoolize |
# (re)generate auto* generated files using our autotools and libtoolize |
515 |
autoreconf -vfi |
autoreconf -vfi |
528 |
--enable-gles2 \ |
--enable-gles2 \ |
529 |
--disable-xvmc \ |
--disable-xvmc \ |
530 |
--enable-vdpau \ |
--enable-vdpau \ |
531 |
--enable-va \ |
%{?with_vaapi:--enable-va} \ |
532 |
--with-platforms=x11,wayland,drm \ |
--with-platforms=x11,drm,surfaceless,wayland \ |
533 |
--enable-shared-glapi \ |
--enable-shared-glapi \ |
534 |
--enable-gbm \ |
--enable-gbm \ |
535 |
--enable-glx \ |
--enable-glx \ |
539 |
--enable-dri \ |
--enable-dri \ |
540 |
--enable-xa \ |
--enable-xa \ |
541 |
--enable-nine \ |
--enable-nine \ |
542 |
--with-gallium-drivers=r300,r600,radeonsi,nouveau,swrast,virgl%{?gallium_platform_drivers} \ |
--with-gallium-drivers=r300,r600,radeonsi,nouveau,swrast,%{?with_freedreno:freedreno,}%{?with_etnaviv:etnaviv,imx,}%{?with_vc4:vc4,}virgl%{?gallium_platform_drivers} \ |
543 |
%{?dri_drivers} |
%{?dri_drivers} |
544 |
# end of configure options |
# end of configure options |
545 |
|
|
570 |
# remove .la files |
# remove .la files |
571 |
find %{buildroot} -name '*.la' -delete |
find %{buildroot} -name '*.la' -delete |
572 |
|
|
573 |
|
# remove libwayland-egl on F28+ where it's built as part of wayland source package |
574 |
|
%if !%{?with_wayland_egl} |
575 |
|
rm -f %{buildroot}%{_libdir}/libwayland-egl.so* |
576 |
|
rm -f %{buildroot}%{_libdir}/pkgconfig/wayland-egl.pc |
577 |
|
%endif |
578 |
|
|
579 |
#------------------------------------------------------------------------------ |
#------------------------------------------------------------------------------ |
580 |
|
|
581 |
%files |
%files |
582 |
%config(noreplace) %{_sysconfdir}/drirc |
/usr/share/drirc.d/ |
583 |
|
|
584 |
%files -n %{dridrivers} |
%files -n %{dridrivers} |
585 |
%dir %{_libdir}/dri |
%dir %{_libdir}/dri |
613 |
%{_libdir}/libgbm.so.%{gbmmajor} |
%{_libdir}/libgbm.so.%{gbmmajor} |
614 |
%{_libdir}/libgbm.so.%{gbmmajor}.* |
%{_libdir}/libgbm.so.%{gbmmajor}.* |
615 |
|
|
616 |
|
%if %{?with_wayland_egl} |
617 |
%files -n %{libwaylandeglname} |
%files -n %{libwaylandeglname} |
618 |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor} |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor} |
619 |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor}.* |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor}.* |
620 |
|
%endif |
621 |
|
|
622 |
%files -n %{libxaname} |
%files -n %{libxaname} |
623 |
%{_libdir}/libxatracker.so.%{xamajor}{,.*} |
%{_libdir}/libxatracker.so.%{xamajor}{,.*} |
675 |
%{_includedir}/gbm.h |
%{_includedir}/gbm.h |
676 |
%{_libdir}/pkgconfig/gbm.pc |
%{_libdir}/pkgconfig/gbm.pc |
677 |
|
|
678 |
|
%if %{?with_wayland_egl} |
679 |
%files -n %{libwaylandeglname}-devel |
%files -n %{libwaylandeglname}-devel |
680 |
%{_libdir}/libwayland-egl.so |
%{_libdir}/libwayland-egl.so |
681 |
%{_libdir}/pkgconfig/wayland-egl.pc |
%{_libdir}/pkgconfig/wayland-egl.pc |
682 |
|
%endif |
683 |
|
|
684 |
%files -n %{libxaname}-devel |
%files -n %{libxaname}-devel |
685 |
%{_libdir}/libxatracker.so |
%{_libdir}/libxatracker.so |