# (cg) Cheater... %define Werror_cflags %nil # (aco) Needed for the dri drivers %define _disable_ld_no_undefined 1 # https://cgit.freedesktop.org/mesa/mesa/commit/?h=13.0&id=3bb0415ab96f74183f7aa58c1a543448653ccb3e %define git 0 %define git_branch 18.0 %define opengl_ver 4.5 # define version, RC & release %define main_version 18.3.1 #define relc 1 %define rel 3 %define release %mkrel %{?relc:0.rc%{relc}.}%{rel} %if %{git} %if %{?relc:1}%{!?relc:0} %define release %mkrel 1~rc%{relc}.1.git%{git}.%{rel} %else %define release 1.git%{git}.%{rel} %endif %endif %define makedepend %{_bindir}/gccmakedep %define d3dname d3d %define eglname mesaegl %define glname mesagl %define glwname mesaglw %define glesv1name mesaglesv1 %define glesv2name mesaglesv2 %define glapiname glapi %define gbmname gbm %define waylandeglname wayland-egl %define xaname xatracker %define vulkanname mesavulkan %define d3dmajor 1 %define eglmajor 1 %define glmajor 1 %define glwmajor 1 %define glesv1major 1 %define glesv2major 2 %define glapimajor 0 %define gbmmajor 1 %define waylandeglmajor 1 %define osmesamajor 8 %define xamajor 2 %define libd3dname %mklibname %{d3dname} %{d3dmajor} %define libeglname %mklibname %{eglname} %{eglmajor} %define libglname %mklibname %{glname} %{glmajor} %define libglwname %mklibname %{glwname} %{glwmajor} %define libglesv1name %mklibname %{glesv1name}_ %{glesv1major} %define libglesv2name %mklibname %{glesv2name}_ %{glesv2major} %define libglapiname %mklibname %{glapiname} %{glapimajor} %define libgbmname %mklibname %{gbmname} %{gbmmajor} %define libwaylandeglname %mklibname %{waylandeglname} %{waylandeglmajor} %define libosmesaname %mklibname osmesa %{osmesamajor} %define libxaname %mklibname %{xaname} %{xamajor} %define dridrivers %mklibname dri-drivers %define vulkandrivers %mklibname %{vulkanname}-drivers %define vulkandevel %mklibname %{vulkanname} -d %define khrdevel %mklibname mesakhr -d %define osmesadevel %mklibname osmesa -d # Architecture-independent Virtual provides: %define libd3dname_virt lib%{d3dname} %define libeglname_virt lib%{eglname} %define libglname_virt lib%{glname} %define libglwname_virt lib%{glwname} %define libglesv1name_virt lib%{glesv1name} %define libglesv2name_virt lib%{glesv2name} %define libglapiname_virt lib%{glapiname} %define libgbmname_virt lib%{gbmname} %define libwaylandeglname_virt lib%{waylandeglname} %define libxaname_virt lib%{xaname} %define mesasrcdir %{_prefix}/src/Mesa/ %define with_vaapi 1 %ifarch %{ix86} x86_64 %define vulkan_drivers --with-vulkan-drivers=intel,radeon %else %define vulkan_drivers --with-vulkan-drivers=radeon %endif %ifarch %{arm} aarch64 %define with_etnaviv 1 %define with_freedreno 1 %define with_vc4 1 %endif %define base_drivers swrast,nouveau,radeon,r200 %ifarch %{ix86} x86_64 %define platform_drivers ,i915,i965 %define gallium_platform_drivers ,svga %endif %define with_wayland_egl 0 %define dri_drivers --with-dri-drivers=%{?base_drivers}%{?platform_drivers} Name: mesa Version: %{main_version} Release: %{release} Summary: OpenGL %{opengl_ver} compatible 3D graphics library Group: System/Libraries # temp force new gcc BuildRequires: gcc >= 5.4.0-2 BuildRequires: pkgconfig(xfixes) >= 4.0.3 BuildRequires: pkgconfig(xshmfence) 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(expat) >= 2.0.1 BuildRequires: gccmakedep BuildRequires: x11-proto-devel >= 7.3 BuildRequires: pkgconfig(libdrm) >= 2.4.91 BuildRequires: pkgconfig(xcb-dri3) BuildRequires: pkgconfig(xcb-present) >= 1.11 BuildRequires: pkgconfig(xext) >= 1.1.1 BuildRequires: pkgconfig(xxf86vm) >= 1.1.0 BuildRequires: pkgconfig(xi) >= 1.3 BuildRequires: pkgconfig(xrandr) BuildRequires: pkgconfig(talloc) BuildRequires: python2-libxml2 BuildRequires: python2-mako BuildRequires: python3-libxml2 BuildRequires: python3-mako BuildRequires: makedepend BuildRequires: bison BuildRequires: flex BuildRequires: pkgconfig(libelf) BuildRequires: llvm-devel >= 3.9.1-5 BuildRequires: pkgconfig(libudev) %if 0%{?with_vaapi} BuildRequires: pkgconfig(libva) %endif BuildRequires: pkgconfig(vdpau) BuildRequires: pkgconfig(wayland-client) BuildRequires: pkgconfig(wayland-server) BuildRequires: pkgconfig(wayland-protocols) BuildRequires: libgcrypt-devel BuildRequires: pkgconfig(wayland-protocols) >= 1.8 URL: http://www.mesa3d.org %if %{git} #Source0: %{name}-%{git}.tar.bz2 # (blino) snapshot of 13.0 branch Source0: %{name}-%{git_branch}-%{git}.tar.xz %else Source0: https://mesa.freedesktop.org/archive/mesa-%{main_version}%{?relc:-rc%{relc}}.tar.xz %endif Source3: make-git-snapshot.sh Patch000: fix-linking.patch # mesa staging/18.3 branch from 1 Patch001: 0001-docs-add-sha256-checksums-for-18.3.1.patch #Patch002: 0002-bin-get-pick-list.sh-rework-handing-of-sha-nominatio.patch #Patch003: 0003-bin-get-pick-list.sh-warn-when-commit-lists-invalid-.patch Patch004: 0004-freedreno-drm-fix-memory-leak.patch Patch005: 0005-v3d-Fix-a-leak-of-the-transfer-helper-on-screen-dest.patch Patch006: 0006-vc4-Fix-a-leak-of-the-transfer-helper-on-screen-dest.patch Patch007: 0007-v3d-Fix-a-leak-of-the-disassembled-instruction-strin.patch Patch008: 0008-loader-free-error-state-when-checking-the-drawable-t.patch Patch009: 0009-mesa-st-nir-fix-missing-nir_compact_varyings.patch #Patch010: 0010-cherry-ignore-meson-libfreedreno-depends-upon-libdrm.patch Patch011: 0011-radv-switch-on-EOP-when-primitive-restart-is-enabled.patch Patch012: 0012-virgl-wrap-vertex-element-state-in-a-struct.patch Patch013: 0013-virgl-work-around-bad-assumptions-in-virglrenderer.patch Patch014: 0014-glx-mandate-xf86vidmode-only-for-drm-dri-platforms.patch Patch015: 0015-radv-xfb-fix-counter-buffer-bounds-checks.patch Patch016: 0016-pci_ids-add-new-vega10-pci-ids.patch Patch017: 0017-pci_ids-add-new-vega20-pci-id.patch Patch018: 0018-v3d-Make-sure-that-a-thrsw-doesn-t-split-a-multop-fr.patch Patch019: 0019-v3d-Add-missing-flagging-of-SYNCB-as-a-TSY-op.patch Patch020: 0020-clover-Fix-build-after-clang-r348827.patch Patch021: 0021-nir-constant_folding-Fix-source-bit-size-logic.patch Patch022: 0022-radv-don-t-set-surf_index-for-stencil-only-images.patch Patch023: 0023-i965-vec4-dce-Don-t-narrow-the-write-mask-if-the-fla.patch Patch024: 0024-meson-Fix-ppc64-little-endian-detection.patch Patch025: 0025-meson-Add-support-for-gnu-hurd.patch Patch026: 0026-meson-Add-toggle-for-glx-direct.patch Patch027: 0027-Revert-nir-lower_indirect-Bail-early-if-modes-0.patch Patch028: 0028-meson-Fix-typo.patch Patch029: 0029-meson-Fix-libsensors-detection.patch Patch030: 0030-nir-properly-clear-the-entry-sources-in-copy_prop_va.patch Patch031: 0031-nir-properly-find-the-entry-to-keep-in-copy_prop_var.patch Patch032: 0032-meson-don-t-require-glx-egl-gbm-with-gallium-drivers.patch Patch033: 0033-pipe-loader-meson-reference-correct-library.patch Patch034: 0034-TODO-glx-meson-build-dri-based-glx-tests-only-with-D.patch Patch035: 0035-glx-meson-drop-includes-from-a-link-only-library.patch Patch036: 0036-glx-meson-wire-up-the-dispatch-index-check-test.patch Patch037: 0037-glx-test-meson-assorted-include-fixes.patch Patch038: 0038-pci_ids-add-new-VegaM-pci-id.patch Patch039: 0039-st-nine-Fix-volumetexture-dtor-on-ctor-failure.patch Patch040: 0040-st-nine-Bind-src-not-dst-in-nine_context_box_upload.patch Patch041: 0041-st-nine-Add-src-reference-to-nine_context_range_uplo.patch Patch042: 0042-anv-don-t-do-partial-resolve-on-layer-0.patch Patch043: 0043-gallium-ttn-Fix-setup-of-outputs_written.patch Patch044: 0044-virgl-vtest-fix-front-buffer-flush-with-protocol-ver.patch Patch045: 0045-meson-Override-C-standard-to-gnu-11-when-building-wi.patch Patch046: 0046-radv-Do-a-cache-flush-if-needed-before-reading-predi.patch Patch047: 0047-tgsi-scan-fix-loop-exit-point-in-tgsi_scan_tess_ctrl.patch Patch048: 0048-tgsi-scan-correctly-walk-instructions-in-tgsi_scan_t.patch Patch049: 0049-egl-haiku-Fix-reference-to-disp-vs-dpy.patch Patch050: 0050-meson-Error-out-if-building-nouveau-and-using-LLVM-w.patch Patch051: 0051-i965-include-draw_params-derived_draw_params-for-VF-.patch Patch052: 0052-i965-add-CS-stall-on-VF-invalidation-workaround.patch Patch053: 0053-nir-remove-dead-code-from-copy_prop_vars.patch Patch054: 0054-intel-blorp-Be-more-conservative-about-copying-clear.patch Patch055: 0055-radv-Implement-buffer-stores-with-less-than-4-compon.patch Patch056: 0056-anv-android-Do-not-reject-storage-images.patch Patch057: 0057-glsl-correct-typo-in-GLSL-compilation-error-message.patch Patch058: 0058-radv-Fix-rasterization-precision-bits.patch Patch059: 0059-spirv-Fix-matrix-parameters-in-function-calls.patch Patch060: 0060-spirv-Handle-any-bit-size-in-vector_insert-extract.patch Patch061: 0061-anv-apply_pipeline_layout-Set-the-cursor-in-lower_re.patch Patch062: 0062-spirv-Sign-extend-array-indices.patch Patch063: 0063-anv-explictly-specify-format-for-blorp-ccs-mcs-op.patch Patch064: 0064-anv-flush-fast-clear-colors-into-compressed-surfaces.patch Patch065: 0065-autotools-Remove-tegra-vdpau-driver.patch Patch066: 0066-ac-nir-radv-radeonsi-nir-use-correct-indices-for-int.patch Patch067: 0067-radeonsi-Fix-use-of-1-or-2-component-GL_DOUBLE-vbo-s.patch Patch068: 0068-st-mesa-don-t-leak-pipe_surface-if-pipe_context-is-n.patch Patch069: 0069-intel-fs-Handle-source-modifiers-in-lower_integer_mu.patch Patch070: 0070-intel-fs-Implement-quad-swizzles-on-ICL.patch Patch071: 0071-intel-fs-Fix-bug-in-lower_simd_width-while-splitting.patch Patch072: 0072-intel-eu-gen7-Fix-brw_MOV-with-DF-destination-and-st.patch Patch073: 0073-intel-fs-Respect-CHV-BXT-regioning-restrictions-in-c.patch Patch074: 0074-glsl-linker-specify-proper-direction-in-location-ali.patch Patch075: 0075-intel-peephole_ffma-Fix-swizzle-propagation.patch Patch076: 0076-nv50-ir-fix-use-after-free-in-ConstantFolding-visit.patch Patch077: 0077-meson-link-LLVM-native-component-when-LLVM-is-availa.patch Patch078: 0078-ac-split-16-bit-ssbo-loads-that-may-not-be-dword-ali.patch # mesa master branch from 201 #------------------------------------------------------------------------------ # package mesa License: MIT Requires: %{libglname} = %{version}-%{release} Provides: hackMesa = %{version} Obsoletes: hackMesa <= %{version} Provides: Mesa = %{version} Obsoletes: Mesa < %{version} %package -n %{libglname} Summary: Files for Mesa (GL and GLX libs) Group: System/Libraries Provides: %{libglname_virt} = %{version}-%{release} Requires: %{dridrivers} >= %{version}-%{release} # (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 %package -n %{dridrivers} Summary: Mesa DRI drivers Group: System/Libraries # do not require exact release to avoid conflicts when having # x86_64 dri drivers from tainted and i586 dri drivers from core Requires: mesa = %{version} Conflicts: %{_lib}MesaGL1 < 7.7-5 Obsoletes: %{_lib}dri-drivers-experimental < 7.11.2-4 Provides: %{_lib}dri-drivers-experimental = %{version}-%{release} %package -n %{libd3dname} Summary: Mesa Direct3D9 state tracker Group: System/Libraries Provides: %{libd3dname_virt} = %{version}-%{release} %package -n %{libd3dname}-devel Summary: Development files for Mesa Direct3D9 state tracker Group: Development/C Requires: %{libd3dname} = %{version}-%{release} Provides: lib%{d3dname}-devel Provides: %{d3dname}-devel Provides: libd3d-devel %package -n %{libglname}-devel Summary: Development files for Mesa (OpenGL compatible 3D lib) Group: Development/C Requires: %{libglname} = %{version}-%{release} Requires: %{khrdevel} = %{version}-%{release} Provides: lib%{glname}-devel = %{version}-%{release} Provides: %{glname}-devel = %{version}-%{release} Provides: GL-devel Provides: libMesaGL-devel = %{version}-%{release} Provides: MesaGL-devel = %{version}-%{release} Provides: libgl-devel %package -n %{libeglname} Summary: Files for Mesa (EGL libs) Group: System/Libraries Provides: %{libeglname_virt} = %{version}-%{release} %package -n %{libeglname}-devel Summary: Development files for Mesa (EGL libs) Group: Development/C Requires: %{libeglname} = %{version}-%{release} Requires: %{khrdevel} = %{version}-%{release} Provides: EGL-devel Provides: lib%{eglname}-devel Provides: %{eglname}-devel Provides: libegl-devel %package -n %{khrdevel} Summary: Mesa Khronos development headers Group: Development/C Provides: mesakhr-devel = %{version}-%{release} %package -n %{libosmesaname} Summary: Mesa offscreen rendering library Group: System/Libraries %package -n %{osmesadevel} Summary: Development files for libosmesa Group: Development/C Requires: %{libosmesaname} = %{version}-%{release} Provides: osmesa-devel = %{version}-%{release} Conflicts: MesaGL-devel < 8.1.0-0.git20120727.3 %package -n %{libglapiname} Summary: Files for mesa (glapi libs) Group: System/Libraries Provides: %{libglapiname_virt} = %{version}-%{release} %package -n %{libglapiname}-devel Summary: Development files for glapi libs Group: Development/C Requires: %{libglapiname_virt} = %{version}-%{release} Provides: lib%{glapiname}-devel Provides: %{libglapiname}-devel %package -n %{libglesv1name} Summary: Files for Mesa (glesv1 libs) Group: System/Libraries Provides: %{libglesv1name_virt} = %{version}-%{release} %package -n %{libglesv1name}-devel Summary: Development files for glesv1 libs Group: Development/C Requires: %{libglesv1name} = %{version}-%{release} Requires: %{khrdevel} = %{version}-%{release} Provides: lib%{glesv1name}-devel Provides: %{glesv1name}-devel Provides: libglesv1-devel %package -n %{libglesv2name} Summary: Files for Mesa (glesv2 libs) Group: System/Libraries Provides: %{libglesv2name_virt} = %{version}-%{release} %package -n %{libglesv2name}-devel Summary: Development files for glesv2 libs Group: Development/C Requires: %{libglesv2name} = %{version}-%{release} Requires: %{khrdevel} = %{version}-%{release} Provides: lib%{glesv2name}-devel Provides: %{glesv2name}-devel Provides: libglesv2-devel %package -n %{libgbmname} Summary: Files for Mesa (gbm libs) Group: System/Libraries Provides: %{libgbmname_virt} = %{version}-%{release} %package -n %{libgbmname}-devel Summary: Development files for Mesa (gbm libs) Group: Development/C Requires: %{libgbmname} = %{version}-%{release} Provides: lib%{gbmname}-devel Provides: %{gbmname}-devel %if %{?with_wayland_egl} %package -n %{libwaylandeglname} Summary: Files for Mesa (Wayland EGL libs) Group: System/Libraries Provides: %{libwaylandeglname_virt} = %{version}-%{release} %package -n %{libwaylandeglname}-devel Summary: Development files for Mesa (Wayland EGL libs) Group: Development/C Requires: %{libwaylandeglname} = %{version}-%{release} Provides: lib%{waylandeglname}-devel Provides: %{waylandeglname}-devel %endif %package -n %{_lib}vdpau-driver-nouveau Summary: VDPAU plugin for nouveau driver Group: System/Libraries # temporary: %rename vdpau-driver-nouveau %package -n %{_lib}vdpau-driver-r300 Summary: VDPAU plugin for r300 driver Group: System/Libraries # temporary: %rename vdpau-driver-r300 %package -n %{_lib}vdpau-driver-r600 Summary: VDPAU plugin for r600 driver Group: System/Libraries # temporary: %rename vdpau-driver-r600 %package -n %{_lib}vdpau-driver-radeonsi Summary: VDPAU plugin for radeonsi driver Group: System/Libraries # temporary: %rename vdpau-driver-radeonsi %package -n %{libxaname} Summary: Files for Mesa XA state tracker Group: System/Libraries Provides: %{libxaname_virt} = %{version}-%{release} %package -n %{libxaname}-devel Summary: Development files for XA libs Group: Development/C Requires: %{libxaname_virt} = %{version}-%{release} Provides: lib%{xaname}-devel Provides: %{libxaname}-devel %package -n %{vulkandrivers} Summary: Mesa Vulkan driver for Intel and Radeon GPUs Group: System/Libraries %ifarch %{ix86} x86_64 Obsoletes: %{_lib}vulkan_intel < 18.3.0-4 Provides: %{_lib}vulkan_intel = %{version}-%{release} %endif Obsoletes: %{_lib}vulkan_radeon < 18.3.0-4 Provides: %{_lib}vulkan_radeon = %{version}-%{release} %package -n %{vulkandevel} Summary: Mesa's Vulkan development files for Intel and Radeon drivers Group: Development/C Requires: %{vulkandrivers} = %{version}-%{release} Obsoletes: %{_lib}vulkan-devel < 0:18.3.0-4 Provides: %{vulkanname}-devel = %{version}-%{release} %package common-devel Summary: Meta package for mesa devel Group: Development/C Provides: Mesa-common-devel = %{version}-%{release} Provides: hackMesa-common-devel = %{version} Obsoletes: Mesa-common-devel < %{version} Obsoletes: hackMesa-common-devel < %{version} Requires: %{libglname}-devel = %{version} Requires: mesaglu-devel Requires: freeglut-devel Requires: %{libeglname}-devel = %{version} Requires: %{libglesv1name}-devel = %{version} Requires: %{libglesv2name}-devel = %{version} #------------------------------------------------------------------------------ %description Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. %description common-devel Mesa common metapackage devel %description -n %{libeglname} Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. EGL parts. %description -n %{libeglname}-devel Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. EGL development parts. %description -n %{libglname} Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. GL and GLX parts. %description -n %{dridrivers} Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. DRI drivers. %description -n %{libglname}-devel Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. This package contains the headers needed to compile Mesa programs. %description -n %{libglesv1name} OpenGL ES is a low-level, lightweight API for advanced embedded graphics using well-defined subset profiles of OpenGL. This package provides the OpenGL ES library version 1. %description -n %{khrdevel} Mesa Khronos development headers. %description -n %{libosmesaname} Mesa offscreen rendering libraries for rendering OpenGL into application-allocated blocks of memory. %description -n %{osmesadevel} This package contains the headers needed to compile programs against the Mesa offscreen rendering library. %description -n %{libglapiname} This packages provides the glapi shared library used by gallium. %description -n %{libglapiname}-devel This package contains the headers needed to compile programes against glapi shared library. %description -n %{libglesv1name}-devel This package contains the headers needed to compile OpenGL ES 1 programs. %description -n %{libd3dname} Mesa Direct3D9 state tracker. %description -n %{libd3dname}-devel Mesa Direct3D9 state tracker development package. %description -n %{libglesv2name} OpenGL ES is a low-level, lightweight API for advanced embedded graphics using well-defined subset profiles of OpenGL. This package provides the OpenGL ES library version 2. %description -n %{libglesv2name}-devel This package contains the headers needed to compile OpenGL ES 2 programs. %description -n %{libgbmname} Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. GBM (Graphics Buffer Manager) parts. %description -n %{libgbmname}-devel Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. GBM (Graphics Buffer Manager) development parts. %if %{?with_wayland_egl} %description -n %{libwaylandeglname} Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. Wayland EGL platform parts. %description -n %{libwaylandeglname}-devel Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. Wayland EGL platform development parts. %endif %description -n %{libxaname} This packages provides the xa shared library used by gallium. %description -n %{libxaname}-devel This package contains the headers needed to compile programes against xa shared library. %description -n %{_lib}vdpau-driver-nouveau This packages provides a VPDAU plugin to enable video acceleration with the nouveau driver. %description -n %{_lib}vdpau-driver-r300 This packages provides a VPDAU plugin to enable video acceleration with the r300 driver. %description -n %{_lib}vdpau-driver-r600 This packages provides a VPDAU plugin to enable video acceleration with the r600 driver. %description -n %{_lib}vdpau-driver-radeonsi This packages provides a VPDAU plugin to enable video acceleration with the radeonsi driver. %description -n %{vulkandrivers} This package contains the Vulkan parts for Mesa's Intel and Radeon drivers. %description -n %{vulkandevel} This package contains the development files for Mesa's Vulkan implementation. #------------------------------------------------------------------------------ %prep %autosetup -n %{name}-%{version}%{?relc:-rc%{relc}} -p1 %build # (re)generate auto* generated files using our autotools and libtoolize autoreconf -vfi # for bin/test-driver: automake --add-missing %configure2_5x \ --enable-gallium-osmesa \ --with-dri-driverdir=%{_libdir}/dri \ --enable-egl \ --enable-gles1 \ --enable-gles2 \ --disable-xvmc \ --enable-vdpau \ %{?with_vaapi:--enable-va} \ --with-platforms=x11,drm,surfaceless,wayland \ --enable-shared-glapi \ --enable-gbm \ --enable-glx \ --enable-glx-tls \ --enable-texture-float=yes \ --enable-llvm \ --enable-dri \ --enable-xa \ --enable-nine \ --with-gallium-drivers=r300,r600,radeonsi,nouveau,swrast,%{?with_freedreno:freedreno,}%{?with_etnaviv:etnaviv,imx,}%{?with_vc4:vc4,}virgl%{?gallium_platform_drivers} \ %{?vulkan_drivers} \ %{?dri_drivers} # end of configure options %make %install %make_install # FIXME: strip will likely break the hardlink # (blino) hardlink libGL files in %{_libdir}/mesa # to prevent proprietary driver installers from removing them mkdir -p $RPM_BUILD_ROOT%{_libdir}/mesa pushd $RPM_BUILD_ROOT%{_libdir}/mesa for l in ../libGL.so.*; do cp -a $l .; done popd %ifarch %{x86_64} mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/dri %endif # libvdpau opens the versioned name, don't bother including the unversioned rm -f %{buildroot}%{_libdir}/vdpau/*.so # strip out useless headers rm -f %{buildroot}%{_includedir}/GL/w*.h # remove .la files find %{buildroot} -name '*.la' -delete # remove libwayland-egl on F28+ where it's built as part of wayland source package %if !%{?with_wayland_egl} rm -f %{buildroot}%{_libdir}/libwayland-egl.so* rm -f %{buildroot}%{_libdir}/pkgconfig/wayland-egl.pc %endif %ifnarch %{ix86} x86_64 # To have something to package for mesavulkan-devel on arm/aarch64 for now mkdir %{buildroot}%{_includedir}/vulkan %endif #------------------------------------------------------------------------------ %files /usr/share/drirc.d/ %files -n %{dridrivers} %dir %{_libdir}/dri %{_libdir}/dri/*_dri.so %{_libdir}/dri/*_drv*.so %files -n %{libglname} %{_libdir}/libGL.so.* %dir %{_libdir}/mesa %{_libdir}/mesa/libGL.so.%{glmajor}{,.*} %files -n %{libeglname} %{_libdir}/libEGL.so.%{eglmajor}{,.*} %files -n %{libosmesaname} %{_libdir}/libOSMesa.so.%{osmesamajor}{,.*} %files -n %{libglapiname} %{_libdir}/libglapi.so.%{glapimajor}{,.*} %files -n %{libglesv1name} %{_libdir}/libGLESv1_CM.so.%{glesv1major}{,.*} %files -n %{libd3dname} %{_libdir}/d3d/*.so.* %files -n %{libglesv2name} %{_libdir}/libGLESv2.so.%{glesv2major}{,.*} %files -n %{libgbmname} %{_libdir}/libgbm.so.%{gbmmajor} %{_libdir}/libgbm.so.%{gbmmajor}.* %if %{?with_wayland_egl} %files -n %{libwaylandeglname} %{_libdir}/libwayland-egl.so.%{waylandeglmajor} %{_libdir}/libwayland-egl.so.%{waylandeglmajor}.* %endif %files -n %{libxaname} %{_libdir}/libxatracker.so.%{xamajor}{,.*} %files -n %{libglname}-devel %dir %{_includedir}/GL %{_includedir}/GL/gl.h %{_includedir}/GL/gl_mangle.h %{_includedir}/GL/glext.h %{_includedir}/GL/glx.h %{_includedir}/GL/glx_mangle.h %{_includedir}/GL/glxext.h %{_includedir}/GL/glcorearb.h %dir %{_includedir}/GL/internal %{_includedir}/GL/internal/dri_interface.h %{_libdir}/pkgconfig/dri.pc %{_libdir}/libGL.so %{_libdir}/pkgconfig/gl.pc %files common-devel %files -n %{libeglname}-devel %{_includedir}/EGL %{_libdir}/libEGL.so %{_libdir}/pkgconfig/egl.pc %files -n %{khrdevel} %{_includedir}/KHR %files -n %{osmesadevel} %dir %{_includedir}/GL %{_includedir}/GL/osmesa.h %{_libdir}/libOSMesa.so %{_libdir}/pkgconfig/osmesa.pc %files -n %{libglapiname}-devel %{_libdir}/libglapi.so %files -n %{libglesv1name}-devel %{_includedir}/GLES %{_libdir}/libGLESv1_CM.so %{_libdir}/pkgconfig/glesv1_cm.pc %files -n %{libglesv2name}-devel %{_includedir}/GLES2 %{_includedir}/GLES3 %{_libdir}/libGLESv2.so %{_libdir}/pkgconfig/glesv2.pc %files -n %{libd3dname}-devel %{_includedir}/d3dadapter %{_libdir}/d3d/*.so %{_libdir}/pkgconfig/d3d.pc %files -n %{libgbmname}-devel %{_libdir}/libgbm.so %{_includedir}/gbm.h %{_libdir}/pkgconfig/gbm.pc %if %{?with_wayland_egl} %files -n %{libwaylandeglname}-devel %{_libdir}/libwayland-egl.so %{_libdir}/pkgconfig/wayland-egl.pc %endif %files -n %{libxaname}-devel %{_libdir}/libxatracker.so %{_includedir}/xa_tracker.h %{_includedir}/xa_composite.h %{_includedir}/xa_context.h %{_libdir}/pkgconfig/xatracker.pc %files -n %{_lib}vdpau-driver-nouveau %{_libdir}/vdpau/libvdpau_nouveau.so.* %files -n %{_lib}vdpau-driver-r300 %{_libdir}/vdpau/libvdpau_r300.so.* %files -n %{_lib}vdpau-driver-r600 %{_libdir}/vdpau/libvdpau_r600.so.* %files -n %{_lib}vdpau-driver-radeonsi %{_libdir}/vdpau/libvdpau_radeonsi.so.* %files -n %{vulkandrivers} %dir %{_datadir}/vulkan %dir %{_datadir}/vulkan/icd.d %ifarch %{ix86} x86_64 %{_datadir}/vulkan/icd.d/intel_icd*.json %{_libdir}/libvulkan_intel.so %endif %{_datadir}/vulkan/icd.d/radeon_icd*.json %{_libdir}/libvulkan_radeon.so %files -n %{vulkandevel} %dir %{_includedir}/vulkan %ifarch %{ix86} x86_64 %{_includedir}/vulkan/vulkan_intel.h %endif