Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- home:sndirsch:branches:X11:XOrg.spec
- +++ home:X0F:HSF.spec
- @@ -17,6 +17,7 @@
- #!BuildIgnore: Mesa-dri
- +%define __builder ninja
- %global flavor @BUILD_FLAVOR@%{nil}
- %if "%{flavor}" == "drivers"
- @@ -45,15 +46,32 @@
- %define _version 23.1.1
- %define with_opencl 0
- %define with_rusticl 0
- +# those maniacs have added rust version of their semi-abandoned OpenCL library, gallium-rusticl
- +# so you could have a dependency on crappy llvm fork while also having a dependency on regular llvm
- %define with_vulkan 0
- %define with_llvm 0
- +%define use_clang 1
- +%define use_lld 1
- +%ifarch %ix86 %arm
- +%define use_lto 1
- +%else
- +%define use_lto 1
- +%endif
- +
- +# advanced visualization support, requires perfetto dependency
- +%define with_perfetto 0
- +
- +# required for drivers
- +%define have_gallium 1
- +
- %ifarch %{ix86} x86_64 %{arm} aarch64 ppc64 ppc64le riscv64
- %define gallium_loader 1
- %else
- %define gallium_loader 0
- %endif
- +%define omx_support 0
- %define vdpau_nouveau 0
- %define vdpau_radeon 0
- %define vdpau_virtio_gpu 0
- @@ -72,11 +90,11 @@
- %define with_opencl 1
- %ifarch %{ix86} x86_64
- %define with_vulkan 1
- - %define vulkan_drivers swrast,amd,intel,intel_hasvk
- + %define vulkan_drivers swrast,virtio-experimental,amd,intel,intel_hasvk,imagination-experimental,microsoft-experimental
- %endif
- %ifarch %{arm} aarch64
- %define with_vulkan 1
- - %define vulkan_drivers swrast,amd,broadcom,freedreno
- + %define vulkan_drivers swrast,virtio-experimental,amd,broadcom,freedreno,panfrost
- %endif
- %ifarch riscv64
- %define with_vulkan 1
- @@ -88,16 +106,10 @@
- %define with_llvm 1
- %endif
- -%if 0%{with_opencl}
- -%define have_gallium 1
- -%else
- -%define have_gallium 0
- -%endif
- -
- %if "%{flavor}" == "drivers"
- %define glamor 0
- %if 0%{?suse_version} > 1550 && 0%{with_opencl}
- - %define with_rusticl 1
- + %define with_rusticl 0
- %endif
- %else
- # No llvm dependencies
- @@ -131,7 +143,7 @@
- URL: https://www.mesa3d.org
- #Git-Clone: git://anongit.freedesktop.org/mesa/mesa
- Source: https://mesa.freedesktop.org/archive/%{_name_archive}-%{_version}.tar.xz
- -Source1: https://mesa.freedesktop.org/archive/%{_name_archive}-%{_version}.tar.xz.sig
- +#Source1: https://mesa.freedesktop.org/archive/%{_name_archive}-%{_version}.tar.xz.sig
- Source2: baselibs.conf
- Source3: README.updates
- Source4: manual-pages.tar.bz2
- @@ -141,35 +153,51 @@
- # never to be upstreamed
- Patch54: n_drirc-disable-rgb10-for-chromium-on-amd.patch
- Patch58: u_dep_xcb.patch
- -Patch100: U_fix-mpeg1_2-decode-mesa-20.2.patch
- Patch200: u_fix-build-on-ppc64le.patch
- -Patch300: n_no-sse2-on-ix86-except-for-intel-drivers.patch
- -Patch400: n_stop-iris-flicker.patch
- Patch600: U_glx-Remove-pointless-GLX_INTEL_swap_event-paranoia.patch
- +
- +# this naively parrots Nvidia's numbers; crash is triggered by mpv
- +#Patch900: Mesa-crankup_RADV_ComputeWorkGroup.patch
- +# no change is observed
- +#Patch901: Mesa-crankup_RADV_3Dcompute.patch
- +# needs rebasing
- +#Patch902: Mesa-crankup_core_limits.patch
- +
- %ifarch %{ix86} x86_64
- -BuildRequires: DirectX-Headers
- +BuildRequires: pkgconfig(DirectX-Headers)
- +# for libvulkan_microsoft/dzn
- +BuildRequires: dxc-libdxcompiler-devel
- %endif
- BuildRequires: bison
- BuildRequires: cmake
- BuildRequires: fdupes
- BuildRequires: flex
- -%if 0%{?sle_version} >= 150400
- -BuildRequires: gcc12-c++
- -%else
- +BuildRequires: glibc-devel
- +BuildRequires: ninja
- +%if 0%{?use_clang}
- +BuildRequires: clang-devel
- +#BuildRequires: npth-devel
- +%if 0%{?use_lld}
- +BuildRequires: lld
- +%else
- +BuildRequires: binutils-gold
- +BuildRequires: llvm-gold
- +%endif
- +%else
- +BuildRequires: binutils-gold
- BuildRequires: gcc-c++
- %endif
- BuildRequires: glslang-devel
- BuildRequires: imake
- +BuildRequires: libpciaccess-devel
- +BuildRequires: libsensors4-devel
- BuildRequires: libtool
- BuildRequires: memory-constraints
- BuildRequires: meson
- BuildRequires: pkgconfig
- BuildRequires: python3-base
- -%if 0%{?suse_version} > 1320
- BuildRequires: python3-mako
- -%else
- -BuildRequires: python3-Mako
- -%endif
- +BuildRequires: python3-ply
- BuildRequires: python3-xml
- BuildRequires: pkgconfig(dri2proto)
- BuildRequires: pkgconfig(dri3proto)
- @@ -180,8 +208,17 @@
- BuildRequires: pkgconfig(libdrm_nouveau) >= 2.4.66
- BuildRequires: pkgconfig(libdrm_radeon) >= 2.4.71
- BuildRequires: pkgconfig(libglvnd) >= 0.1.0
- +BuildRequires: pkgconfig(libunwind)
- %ifarch aarch64 %{ix86} x86_64 ppc64le s390x
- BuildRequires: pkgconfig(valgrind)
- +%endif
- +%if 0%{omx_support}
- +# needs bellagio replaced with tizonia
- +#BuildRequires: pkgconfig(libomxil-bellagio)
- +BuildRequires: pkgconfig(libtizcore)
- +%endif
- +%if 0%{with_perfetto}
- +BuildRequires: pkgconfig(perfetto)
- %endif
- BuildRequires: pkgconfig(libva)
- BuildRequires: pkgconfig(presentproto)
- @@ -191,6 +228,7 @@
- BuildRequires: pkgconfig(vulkan)
- %endif
- %endif
- +BuildRequires: pkgconfig(libzstd)
- BuildRequires: pkgconfig(x11)
- BuildRequires: pkgconfig(x11-xcb)
- BuildRequires: pkgconfig(xcb-dri2)
- @@ -228,18 +266,16 @@
- BuildRequires: pkgconfig(libelf)
- %endif
- %ifarch x86_64 %{ix86}
- -BuildRequires: libelf-devel
- BuildRequires: pkgconfig(libdrm_intel) >= 2.4.75
- -%else
- -%if 0%{with_opencl}
- -BuildRequires: libelf-devel
- -%endif
- +BuildRequires: pkgconfig(libelf)
- %endif
- # Requirements for wayland bumped up from 17.0
- BuildRequires: pkgconfig(wayland-client) >= 1.11
- BuildRequires: pkgconfig(wayland-protocols) >= 1.8
- BuildRequires: pkgconfig(wayland-server) >= 1.11
- -%if 0%{with_llvm}
- +
- +%if 0%{with_llvm} || 0%{?use_clang}
- +BuildRequires: clang-devel
- %if 0%{?suse_version} >= 1550
- BuildRequires: llvm-devel
- %else
- @@ -257,6 +293,12 @@
- %endif
- %endif
- %endif
- +%endif
- +
- +%if 0%{?with_vulkan}
- +BuildRequires: pkgconfig(LLVMSPIRVLib)
- +BuildRequires: pkgconfig(SPIRV-Tools)
- +BuildRequires: pkgconfig(vulkan)
- %endif
- %if 0%{with_opencl}
- @@ -290,10 +332,9 @@
- Requires: Mesa-libGL1 = %{version}
- Requires: libglvnd >= 0.1.0
- -# This dependency on Mesa-dri and Mesa-gallium is here to make sure users that
- +# This dependency on Mesa-gallium is here to make sure users that
- # do not install recommends on their system still get working Mesa. It is
- # ignored in obs when Mesa is installed as build dependency.
- -Requires: Mesa-dri = %{version}
- %if 0%{have_gallium}
- Requires: Mesa-gallium = %{version}
- %endif
- @@ -336,6 +377,9 @@
- Obsoletes: s2tc-devel < %{version}
- Provides: libtxc_dxtn-devel = %{version}
- Obsoletes: libtxc_dxtn-devel < %{version}
- +%if 0%{with_opencl}
- +Requires: opencl-headers >= 1.2
- +%endif
- %description devel
- Mesa is a 3-D graphics library with an API which is very similar to
- @@ -362,12 +406,11 @@
- This package contains the EGL native platform graphics interface
- library. EGL provides a platform-agnostic mechanism for creating
- rendering surfaces for use with other graphics libraries, such as
- -OpenGL|ES and OpenVG.
- +OpenGL|ES.
- This package contains modules to interface with the existing system
- GLX or DRI2 drivers to provide OpenGL via EGL. The Mesa main package
- -provides drivers to provide hardware-accelerated OpenGL|ES and OpenVG
- -support.
- +provides drivers to provide hardware-accelerated OpenGL|ES support.
- %package libEGL-devel
- Summary: Development files for the EGL API
- @@ -383,7 +426,7 @@
- compiling programs against EGL native platform graphics interface
- library. EGL provides a platform-agnostic mechanism for creating
- rendering surfaces for use with other graphics libraries, such as
- -OpenGL|ES and OpenVG.
- +OpenGL|ES.
- This package provides the development environment for compiling
- programs against the EGL library.
- @@ -521,15 +564,6 @@
- dispatching all the gl* functions. It is intended to be mainly used by
- the Mesa-libGLES* packages.
- -%package -n Mesa-dri
- -Summary: DRI plug-ins for 3D acceleration
- -Group: System/Libraries
- -Requires: Mesa = %{version}
- -Supplements: Mesa
- -
- -%description -n Mesa-dri
- -This package contains Mesa DRI drivers for 3D acceleration.
- -
- %package dri-devel
- Summary: Development files for the DRI API
- Group: Development/Libraries/C and C++
- @@ -539,30 +573,12 @@
- This package contains the development environment required for
- compiling programs and libraries using the DRI API.
- -%package -n Mesa-dri-nouveau
- -Summary: Mesa DRI plug-in for 3D acceleration via Nouveau
- -Group: System/Libraries
- -Requires: Mesa = %{version}
- -
- -%description -n Mesa-dri-nouveau
- -This package contains nouveau_dri.so, which is necessary for
- -Nouveau's 3D acceleration to work. It is packaged separately
- -since it is still experimental.
- -
- -%package -n Mesa-dri-vc4
- -Summary: Mesa DRI plug-in for 3D acceleration on Raspberry Pi
- -Group: System/Libraries
- -Requires: Mesa = %{version}
- -
- -%description -n Mesa-dri-vc4
- -This package contains vc4_dri.so, which is necessary for 3D
- -acceleration on the Raspberry Pi to work. It is packaged separately
- -since it is still experimental.
- -
- %package -n Mesa-gallium
- Summary: Mesa Gallium GPU drivers
- Group: System/Libraries
- Requires: Mesa = %{version}
- +Provides: Mesa-dri = %{version}
- +Obsoletes: Mesa-dri < %{version}
- Supplements: Mesa
- %description -n Mesa-gallium
- @@ -626,14 +642,6 @@
- %description -n libvdpau_nouveau
- This package contains the VDPAU state tracker for Nouveau.
- -%package -n libvdpau_r300
- -Summary: VDPAU state tracker for R300
- -Group: System/Libraries
- -Supplements: modalias(pci:v00001002d*sv*sd*bc03sc*i*)
- -
- -%description -n libvdpau_r300
- -This package contains the VDPAU state tracker for R300.
- -
- %package -n libvdpau_r600
- Summary: VDPAU state tracker for R600
- Group: System/Libraries
- @@ -650,6 +658,16 @@
- %description -n libvdpau_radeonsi
- This package contains the VDPAU state tracker for radeonsi.
- +%package -n libvdpau_d3d12
- +Summary: VDPAU state tracker for d3d12
- +Group: System/Libraries
- +Supplements: qemu-x86
- +Supplements: wine
- +Supplements: wine:staging
- +
- +%description -n libvdpau_d3d12
- +This package contains the VDPAU state tracker for radeonsi.
- +
- %package -n libvdpau_virtio_gpu
- Summary: VDPAU state tracker for VirtIO GPU
- Group: System/Libraries
- @@ -657,6 +675,20 @@
- %description -n libvdpau_virtio_gpu
- This package contains the VDPAU state tracker for VirtIO GPU.
- +%if 0%{omx_support}
- +%package -n libomx_mesa
- +Summary: Omx state tracker
- +Group: System/Libraries
- +Provides: libomx_nouveau
- +Provides: libomx_r600
- +Provides: libomx_radeonsi
- +Supplements: xf86-video-ati
- +#Requires: libomxil-bellagio
- +
- +%description -n libomx_mesa
- +This package contains the oxm state tracker
- +%endif
- +
- %package -n Mesa-libOpenCL
- Summary: Mesa OpenCL implementation (Clover)
- Group: System/Libraries
- @@ -665,6 +697,9 @@
- %else
- Requires: libclc
- %endif
- +# for CLover kernel compilation that can be tuned at runtime with CLOVER_EXTRA_COMPILE_OPTIONS CLOVER_EXTRA_LINK_OPTIONS
- +#Requires: clang
- +#Requires: lld
- %description -n Mesa-libOpenCL
- This package contains the Mesa OpenCL implementation or GalliumCompute.
- @@ -694,34 +729,73 @@
- Group: System/Libraries
- Supplements: modalias(pci:v00008086d*sv*sd*bc03sc*i*)
- Requires: Mesa-vulkan-device-select
- +Recommends: Mesa-vulkan-intel-nullhw
- +Recommends: Mesa-vulkan-overlay
- +
- +%description -n libvulkan_intel
- +This package contains the Vulkan parts for Mesa.
- +
- +%package -n libvulkan_imagination
- +Summary: Mesa vulkan driver for MTT GPU
- +Group: System/Libraries
- +Supplements: modalias(pci:v00001ed5d*sv*sd*bc03sc*i*)
- +Requires: Mesa-vulkan-device-select
- +Recommends: Mesa-vulkan-overlay
- +
- +%description -n libvulkan_imagination
- +This package contains the Vulkan parts for Mesa.
- +
- +%package -n libvulkan_microsoft
- +Summary: Mesa vulkan driver for Microsoft VirtGPU
- +Group: System/Libraries
- +Supplements: modalias(pci:v00001414d*sv*sd*bc03sc*i*)
- +Requires: Mesa-vulkan-device-select
- +Recommends: Mesa-vulkan-overlay
- +
- +%description -n libvulkan_microsoft
- +This package contains the Vulkan parts for Mesa.
- +
- +%package -n libvulkan_radeon
- +Summary: Mesa vulkan driver for AMD GPU
- +Group: System/Libraries
- +Supplements: modalias(pci:v00001002d*sv*sd*bc03sc*i*)
- +Requires: Mesa-vulkan-device-select
- +Recommends: Mesa-vulkan-intel-nullhw
- +Recommends: Mesa-vulkan-overlay
- +
- +%description -n libvulkan_radeon
- +This package contains the Vulkan parts for Mesa.
- +
- +%package -n libvulkan_lvp
- +Summary: Mesa vulkan driver for LVP
- +Group: System/Libraries
- # get rid of this package, which is no longer neeeded at all
- Provides: Mesa-libVulkan-devel = 22.0.0
- Obsoletes: Mesa-libVulkan-devel < 22.0.0
- -
- -%description -n libvulkan_intel
- +Requires: Mesa-vulkan-device-select
- +Recommends: Mesa-vulkan-intel-nullhw
- +Recommends: Mesa-vulkan-overlay
- +
- +%description -n libvulkan_lvp
- This package contains the Vulkan parts for Mesa.
- -%package -n libvulkan_radeon
- -Summary: Mesa vulkan driver for AMD GPU
- -Group: System/Libraries
- -Supplements: modalias(pci:v00001002d*sv*sd*bc03sc*i*)
- +%package -n libvulkan_virtio
- +Summary: Mesa vulkan driver for VirtIO
- +Group: System/Libraries
- Requires: Mesa-vulkan-device-select
- -
- -%description -n libvulkan_radeon
- -This package contains the Vulkan parts for Mesa.
- -
- -%package -n libvulkan_lvp
- -Summary: Mesa vulkan driver for LVP
- -Group: System/Libraries
- -Requires: Mesa-vulkan-device-select
- -
- -%description -n libvulkan_lvp
- +Recommends: Mesa-vulkan-intel-nullhw
- +Recommends: Mesa-vulkan-overlay
- +
- +%description -n libvulkan_virtio
- This package contains the Vulkan parts for Mesa.
- %ifarch %{arm} aarch64
- %package -n libvulkan_broadcom
- Summary: Mesa vulkan driver for Broadcom
- Group: System/Libraries
- +Requires: Mesa-vulkan-device-select
- +Recommends: Mesa-vulkan-intel-nullhw
- +Recommends: Mesa-vulkan-overlay
- %description -n libvulkan_broadcom
- This package contains the Vulkan parts for Mesa.
- @@ -729,11 +803,22 @@
- %package -n libvulkan_freedreno
- Summary: Mesa vulkan driver for Freedreno
- Group: System/Libraries
- +Requires: Mesa-vulkan-device-select
- +Recommends: Mesa-vulkan-intel-nullhw
- +Recommends: Mesa-vulkan-overlay
- %description -n libvulkan_freedreno
- This package contains the Vulkan parts for Mesa.
- %endif
- +%package -n Mesa-vulkan-intel-nullhw
- +Summary: Mesa Vulkan null layer
- +Group: System/Libraries
- +
- +%description -n Mesa-vulkan-intel-nullhw
- +This package contains the VK_LAYER_INTEL_nullhw Vulkan layer
- +used to disable all rendering/compute commands
- +
- %package -n Mesa-vulkan-device-select
- Summary: Vulkan layer to select Vulkan devices provided by Mesa
- Group: System/Libraries
- @@ -749,7 +834,6 @@
- This package contains the VK_MESA_Overlay Vulkan layer
- %package -n libxatracker2
- -Version: 1.0.0
- Summary: XA state tracker
- Group: System/Libraries
- @@ -760,7 +844,6 @@
- video driver.
- %package -n libxatracker-devel
- -Version: 1.0.0
- Summary: Development files for the XA API
- Group: Development/Libraries/C and C++
- Requires: libxatracker2 = %{version}
- @@ -784,15 +867,14 @@
- %if 0%{?suse_version} < 1550
- %patch54 -p1
- %endif
- -%patch58 -p1
- -%patch100 -p1
- +%patch58 -p1 -F2
- %patch200 -p1
- -%ifarch %{ix86}
- -%patch300 -p1
- -%endif
- -%patch400 -p1
- # reverse apply to fix a regression (boo#1209005)
- -%patch600 -p1 -R
- +#patch600 -p1 -R
- +
- +#patch900 -p1 -F3
- +#patch901 -p1 -F3
- +#patch902 -p1 -F3
- # Remove requires to vulkan libs from baselibs.conf on platforms
- # where vulkan build is disabled; ugly ...
- @@ -801,25 +883,106 @@
- mv "%{_sourcedir}/temp" "%{_sourcedir}/baselibs.conf"
- %endif
- +# it's not Intel without shipping ugly broken hacks
- +sed -i -e "s:opencl-c.h:$(find %{_libdir}/clang/ -name opencl-c.h | tail -1):" src/intel/vulkan/grl/meson.build
- +
- %build
- +# this macro needs 'BuildRequires: memory-constraints'
- +#limit_build -m 3072
- # try to avoid OOM on ppc64 (boo#1194739)
- %ifarch ppc64 ppc64le
- %limit_build -m 1024
- %endif
- -%if 0%{?sle_version} >= 150400
- -export CC=gcc-12
- -export CXX=g++-12
- -%endif
- +ulimit -Sn 4000
- +export SUSE_ASNEEDED=0
- +export SUSE_ZNOW=0
- +
- +export UCFLAGS="-w -fPIC -O3"
- +#UCFLAGS="${UCFLAGS} -I%{_includedir} -I%{_includedir}/wayland"
- +%ifarch x86_64
- +export UCFLAGS="${UCFLAGS} -march=x86-64 -mtune=generic -mssse3 -msse4 -msse4.1 -msse4.2 -mavx -maes -mpclmul"
- +%else
- +%ifarch %ix86
- +export UCFLAGS="${UCFLAGS} -march=x86-64 -mtune=i586 -mssse3 -msse4 -msse4.1 -msse4.2 -mavx -maes -mpclmul"
- +%endif
- +%endif
- +export ULDFLAGS="${ULDFLAGS} -fPIC -Wl,-O1"
- +export ULDFLAGS="${ULDFLAGS} -Wl,--gc-sections -Wl,--icf=safe"
- +%if 0%{?use_lld}
- +export ULDFLAGS="${ULDFLAGS} -fuse-ld=lld"
- +%ifarch %ix86 %arm
- +#export ULDFLAGS="${ULDFLAGS} -Wl,-z,notext"
- +%endif
- +export LD="lld"
- +alias ld=ld.lld
- +%else
- +export ULDFLAGS="${ULDFLAGS} -fuse-ld=gold -Wl,--sort-common"
- +export LD=ld.gold
- +alias ld=gold
- +%endif
- +%if 0%{?use_clang}
- +export CC=clang
- +export CXX=clang++
- +export CPP='clang -E' AR=llvm-ar AS=llvm-as NM=llvm-nm OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump OBJSIZE=llvm-size STRIP=llvm-strip RANLIB=llvm-ranlib
- +export UCFLAGS="${UCFLAGS} -v"
- +#export UCFLAGS="${UCFLAGS} -std=gnu17 -D_GNU_SOURCE -fexceptions -relocatable-pch -faligned-allocation"
- +export UCXXFLAGS="${UCFLAGS}"
- +#export UCXXFLAGS="${UCFLAGS} -std=gnu++17 -fpermissive -fcxx-exceptions"
- +export HOST="$(${CC} -print-target-triple)"
- +%if 0%{?use_lto}
- +%ifarch x86_64
- +export UCFLAGS="${UCFLAGS} -fglobal-isel"
- +%endif
- +%if 0%{?use_lld}
- +%global _lto_cflags -flto=thin -Wl,--plugin-opt=O3 %{?jobs:-Wl,--threads=%{jobs}}
- +%global _lto_ldlags -flto=thin -Wl,--plugin-opt=O3 %{?jobs:-Wl,--threads=%{jobs}}
- +%else
- +%global _lto_cflags -flto=thin
- +%global _lto_ldlags -flto=thin
- +%endif
- +%else
- +%global _lto_cflags %nil
- +%global _lto_ldlags %nil
- +%endif
- +%else
- +export CC=gcc
- +export CXX=g++
- +export UCFLAGS="${UCFLAGS} -ftree-parallelize-loops=16 -ftree-vectorize -fvect-cost-model=cheap -fsimd-cost-model=cheap -fpredictive-commoning"
- +%ifarch %ix86
- +export UCFLAGS="${UCFLAGS} -pthread -fopenmp -lgomp"
- +export ULDFLAGS="${ULDFLAGS} -pthread -fopenmp -lgomp"
- +%endif
- +export UCXXFLAGS="${UCFLAGS} -fpermissive"
- +export HOST="%{_target_platform}"
- +%if 0%{?use_lto}
- +%global _lto_cflags -fuse-linker-plugin %_lto_cflags -ffat-lto-objects -flto-odr-type-merging
- +%global _lto_ldlags -fuse-linker-plugin -flto=%{?jobs:%{jobs}}
- +%else
- +%global _lto_cflags %nil
- +%global _lto_ldlags %nil
- +%endif
- +%endif
- +export TARGET="${HOST}"
- +export UCFLAGS="${UCFLAGS} %_lto_cflags"
- +export UCXXFLAGS="${UCXXFLAGS} %_lto_cflags"
- +export ULDFLAGS="${ULDFLAGS} %_lto_cflags %_lto_ldlags"
- +# override OBS defaults ?
- +export CFLAGS="${UCFLAGS}"
- +export CXXFLAGS="${UCXXFLAGS}"
- +export LDFLAGS="${ULDFLAGS}"
- egl_platforms=x11,wayland
- +# dri drivers are not built without egl=enabled and
- +# consequences of building them with anything but glx=dri are unknown
- %meson \
- --auto-features=disabled \
- + -Dzstd=enabled \
- %if "%{flavor}" == "drivers"
- -Dgles1=disabled \
- -Dgles2=disabled \
- -Degl=enabled \
- - -Dglx=disabled \
- + -Dglx=dri \
- -Dosmesa=false \
- -Dxmlconfig=enabled \
- %else
- @@ -827,14 +990,16 @@
- -Dgles1=enabled \
- -Dgles2=enabled \
- -Degl=enabled \
- + -Dglx=dri \
- -Dosmesa=true \
- - -Dglx=auto \
- -Dllvm=disabled \
- -Dvulkan-drivers= \
- %endif
- -Dplatforms=$egl_platforms \
- -Ddri3=enabled \
- -Dshared-glapi=enabled \
- + -Dlmsensors=enabled \
- + -Dlibunwind=enabled \
- %if 0%{?with_nine}
- -Dgallium-nine=true \
- %endif
- @@ -842,6 +1007,7 @@
- -Dgbm=enabled \
- %endif
- %if 0%{with_opencl}
- + -Dopencl-spirv=true \
- -Dgallium-opencl=icd \
- %if 0%{?suse_version} >= 1550
- --sysconfdir=%{_datadir} \
- @@ -861,23 +1027,46 @@
- -Dvideo-codecs=h264dec,h264enc,h265dec,h265enc,vc1dec \
- %endif
- %if %{gallium_loader}
- +%if 0%{omx_support}
- + -Dgallium-omx=tizonia \
- +%endif
- + -Dvideo-codecs=h264dec,h264enc,h265dec,h265enc,vc1dec \
- + -Dgallium-d3d12-video=enabled \
- -Dgallium-vdpau=enabled \
- -Dgallium-va=enabled \
- -Dgallium-xa=enabled \
- + -Dgallium-extra-hud=true \
- +%if 0%{with_perfetto}
- + -Dperfetto=true \
- +%endif
- %endif
- %if 0%{with_vulkan}
- - -Dvulkan-drivers=%{?vulkan_drivers} \
- - -Dvulkan-layers=device-select,overlay \
- + -Dspirv-to-dxil=true \
- + -Dvulkan-beta=true \
- + -Dvulkan-drivers=%{vulkan_drivers} \
- + -Dvulkan-layers=device-select,intel-nullhw,overlay \
- + %ifarch %{ix86} x86_64
- + -Dintel-clc=enabled \
- + -Dimagination-srv=true \
- + -Dmicrosoft-clc=disabled \
- + %else
- + %endif
- %else
- -Dvulkan-drivers= \
- %endif
- + -Dmin-windows-version=7 \
- + -Dshader-cache=enabled \
- %ifarch %{ix86} x86_64
- + -Dvmware-mks-stats=true \
- + -Dintel-xe-kmd=enabled \
- -Dgallium-drivers=r300,r600,radeonsi,nouveau,swrast,svga,virgl,iris,crocus,i915,d3d12,zink \
- %else
- %ifarch %{arm} aarch64
- - -Dgallium-drivers=r300,r600,radeonsi,nouveau,swrast,virgl,freedreno,vc4,etnaviv,lima,panfrost,v3d,svga,tegra \
- + -Dfreedreno-kmds=msm,kgsl,virtio \
- + -Dgallium-drivers=r300,r600,radeonsi,nouveau,swrast,virgl,freedreno,vc4,etnaviv,lima,panfrost,v3d,svga,tegra,asahi,kmsro \
- %else
- %ifarch ppc64 ppc64le riscv64
- + -Dpower8=enabled \
- -Dgallium-drivers=r300,r600,radeonsi,nouveau,swrast,virgl \
- %else
- -Dgallium-drivers=swrast \
- @@ -891,73 +1080,76 @@
- -Dvalgrind=enabled \
- %endif
- -Db_ndebug=true \
- - -Dc_args="%{optflags}" \
- -%ifarch %ix86
- - -Dcpp_args="$(echo %{optflags}|sed 's/-flto=auto//')"
- -%else
- - -Dcpp_args="%{optflags}"
- -%endif
- -
- -%meson_build
- + -Dc_args="${CFLAGS} ${LDFLAGS}" \
- + -Dcpp_args="${CXXFLAGS} ${LDFLAGS}" \
- + -Db_pch=false \
- + -Db_pie=true \
- + -Dstrip=false \
- + || (cat */meson-logs/meson-log.txt; exit 1)
- +
- +%meson_build || (cat */meson-logs/meson-log.txt; exit 1)
- %install
- +ulimit -Sn 4000
- %meson_install
- -find %{buildroot} -type f -name "*.la" -delete -print
- +find %{buildroot} -type f -name "*.la" -delete -print || echo ignored
- +find %{buildroot} -type f -name "*.a" -delete -print || echo ignored
- +
- +if [ -f "%{buildroot}/%{_bindir}/mesa-overlay-control.py" ]; then
- + sed -i -e 's:env ::' "%{buildroot}/%{_bindir}/mesa-overlay-control.py"
- +fi
- # libwayland-egl is provided by wayland itself
- -rm -f %{buildroot}/%{_libdir}/libwayland-egl.so*
- -rm -f %{buildroot}/%{_libdir}/pkgconfig/wayland-egl.pc
- +rm -fv %{buildroot}/%{_libdir}/libwayland-egl.so* || echo ignored
- +rm -fv %{buildroot}/%{_libdir}/pkgconfig/wayland-egl.pc || echo ignored
- %if "%{flavor}" == "drivers"
- # Delete things that we do not package in the Mesa-drivers variant, but can
- # not disable from buildling and installing.
- -rm -f %{buildroot}/%{_libdir}/libEGL.so*
- -# in Mesa-libEGL-devel
- -rm %{buildroot}/%{_includedir}/EGL/egl.h
- -rm %{buildroot}/%{_includedir}/EGL/eglext.h
- -rm %{buildroot}/%{_includedir}/EGL/eglext_angle.h
- -rm %{buildroot}/%{_includedir}/EGL/eglmesaext.h
- -rm %{buildroot}/%{_includedir}/EGL/eglplatform.h
- -rm %{buildroot}/%{_libdir}/pkgconfig/egl.pc
- +rm -fv %{buildroot}/%{_libdir}/libGL.so* || echo ignored
- +rm -fv %{buildroot}/%{_libdir}/libEGL.so* || echo ignored
- +# in Mesa-lib[E]GL-devel
- +find %{buildroot}/%{_includedir}/EGL -delete -print || echo ignored
- +find %{buildroot}/%{_libdir} -name "gl.pc" -delete -print || echo ignored
- +find %{buildroot}/%{_libdir} -name "egl.pc" -delete -print || echo ignored
- # in Mesa-libGL-devel
- -rm -rf %{buildroot}/%{_includedir}/GL
- +#rm -rf %{buildroot}/%{_includedir}/GL
- +find %{buildroot}/%{_includedir}/GL/* -not -name "osmesa.h" -delete -print || echo ignored
- # in Mesa-libglapi0
- -rm %{buildroot}/%{_libdir}/libglapi.so*
- +rm -v %{buildroot}/%{_libdir}/libglapi.so* || echo ignored
- # in libwayland-egl1
- -rm -f %{buildroot}/%{_libdir}/libwayland-egl.so*
- -rm -f %{buildroot}/%{_libdir}/pkgconfig/wayland-egl.pc
- +find %{buildroot}/%{_libdir} -name "*wayland-egl.*" -delete -print || echo ignored
- # in Mesa-dri-devel
- -rm %{buildroot}/%{_libdir}/pkgconfig/dri.pc
- +find %{buildroot}/%{_libdir} -name "dri.pc" -delete -print || echo ignored
- # in libgbm-devel
- -rm %{buildroot}/%{_includedir}/gbm.h
- -rm %{buildroot}/%{_libdir}/libgbm.so*
- -rm %{buildroot}/%{_libdir}/pkgconfig/gbm.pc
- +find %{buildroot}/%{_includedir} -name "gbm*" -delete -print || echo ignored
- +find %{buildroot}/%{_libdir} -name "*gbm.*" -delete -print || echo ignored
- # in KHR-devel
- -rm -rf %{buildroot}/%{_includedir}/KHR
- +rm -rfv %{buildroot}/%{_includedir}/KHR || echo ignored
- # workaround needed since Mesa 19.0.2
- -rm -f %{buildroot}/%{_libdir}/vdpau/libvdpau_gallium.so
- -
- -%else
- -# package in Mesa-dri
- -rm -rf %{buildroot}/%{_datadir}/drirc.d
- -
- -rm -f %{buildroot}/%{_libdir}/dri/*_dri.so
- -
- -rm -f %{buildroot}%{_libdir}/libGLES*
- +rm -fv %{buildroot}/%{_libdir}/vdpau/libvdpau_gallium.so || echo ignored
- +# all dri drivers are hard links of libgallium_dri.so which is not installed
- +%fdupes -s %{buildroot}/%{_libdir}/dri
- +
- +%else
- +# package in Mesa-gallium
- +find %{buildroot}/%{_libdir}/dri/ -name "*_dri.so" -delete -print || echo ignored
- +find %{buildroot}%{_libdir} -name "libGLES*" -delete -print || echo ignored
- +
- # glvnd needs a default provider for indirect rendering where it cannot
- # determine the vendor
- ln -s %{_libdir}/libGLX_mesa.so.0 %{buildroot}%{_libdir}/libGLX_indirect.so.0
- # pickup pkgconfig files from libglvnd build
- -rm -f %{buildroot}/%{_libdir}/pkgconfig/{gl,egl,glesv1_cm,glesv2}.pc
- +rm -fv %{buildroot}/%{_libdir}/pkgconfig/{gl,egl,glesv1_cm,glesv2}.pc || echo ignored
- install -m 0644 /usr/share/doc/packages/libglvnd/pkgconfig/{gl,egl,glesv1_cm,glesv2}.pc \
- %{buildroot}/%{_libdir}/pkgconfig/
- @@ -970,11 +1162,13 @@
- done
- %endif
- -%fdupes -s %{buildroot}/%{_mandir}
- +if [ -d "%{buildroot}/%{_mandir}" ];then
- + %fdupes -s %{buildroot}/%{_mandir}
- +fi
- %if "%{flavor}" != "drivers"
- # Use dummy README file that can be included in both Mesa and Mesa-32bit. This way Mesa-32bit will be build (otherwise it would be skipped as empty) and it can be used by the other *-32bit packages.
- -echo "The \"Mesa\" package does not have the ability to render, but is supplemented by \"Mesa-dri\" and \"Mesa-gallium\" which contain the drivers for rendering" > docs/README.package.%{_arch}
- +echo "The \"Mesa\" package does not have the ability to render, but is supplemented by \"Mesa-gallium\" which contain the drivers for rendering" > docs/README.package.%{_arch}
- %endif
- %post -p /sbin/ldconfig
- @@ -1049,15 +1243,6 @@
- %files libGLESv3-devel
- %{_includedir}/GLES3
- -%files -n libOSMesa8
- -%{_libdir}/libOSMesa.so.8.0.0
- -%{_libdir}/libOSMesa.so.8
- -
- -%files -n libOSMesa-devel
- -%{_includedir}/GL/osmesa.h
- -%{_libdir}/libOSMesa.so
- -%{_libdir}/pkgconfig/osmesa.pc
- -
- %files -n libgbm1
- %{_libdir}/libgbm.so.1*
- @@ -1078,43 +1263,39 @@
- %{_libdir}/pkgconfig/xatracker.pc
- %endif
- +%if %{omx_support}
- +%files -n libomx_mesa
- +%defattr(-,root,root)
- +%_libdir/bellagio/libomx_mesa*
- +%endif
- +
- %if %{vdpau_nouveau}
- %files -n libvdpau_nouveau
- -%{_libdir}/vdpau/libvdpau_nouveau.so
- -%{_libdir}/vdpau/libvdpau_nouveau.so.1
- -%{_libdir}/vdpau/libvdpau_nouveau.so.1.0
- -%{_libdir}/vdpau/libvdpau_nouveau.so.1.0.0
- +%defattr(-,root,root)
- +%{_libdir}/vdpau/libvdpau_nouveau.so*
- %endif
- %if %{vdpau_radeon}
- -%files -n libvdpau_r300
- -%{_libdir}/vdpau/libvdpau_r300.so
- -%{_libdir}/vdpau/libvdpau_r300.so.1
- -%{_libdir}/vdpau/libvdpau_r300.so.1.0
- -%{_libdir}/vdpau/libvdpau_r300.so.1.0.0
- -
- %files -n libvdpau_r600
- -%{_libdir}/vdpau/libvdpau_r600.so
- -%{_libdir}/vdpau/libvdpau_r600.so.1
- -%{_libdir}/vdpau/libvdpau_r600.so.1.0
- -%{_libdir}/vdpau/libvdpau_r600.so.1.0.0
- +%defattr(-,root,root)
- +%{_libdir}/vdpau/libvdpau_r600.so*
- %endif
- %ifarch %{ix86} x86_64 ppc64 ppc64le %{arm} aarch64 riscv64
- %files -n libvdpau_radeonsi
- -%{_libdir}/vdpau/libvdpau_radeonsi.so
- -%{_libdir}/vdpau/libvdpau_radeonsi.so.1
- -%{_libdir}/vdpau/libvdpau_radeonsi.so.1.0
- -%{_libdir}/vdpau/libvdpau_radeonsi.so.1.0.0
- -%endif
- -%endif
- +%defattr(-,root,root)
- +%{_libdir}/vdpau/libvdpau_radeonsi.so*
- +%endif
- +
- +%files -n libvdpau_d3d12
- +%defattr(-,root,root)
- +%{_libdir}/vdpau/libvdpau_d3d12.so*
- %if %{vdpau_virtio_gpu}
- %files -n libvdpau_virtio_gpu
- -%{_libdir}/vdpau/libvdpau_virtio_gpu.so
- -%{_libdir}/vdpau/libvdpau_virtio_gpu.so.1
- -%{_libdir}/vdpau/libvdpau_virtio_gpu.so.1.0
- -%{_libdir}/vdpau/libvdpau_virtio_gpu.so.1.0.0
- +%defattr(-,root,root)
- +%{_libdir}/vdpau/libvdpau_virtio*.so*
- +%endif
- %endif
- %if "%{flavor}" != "drivers"
- @@ -1123,37 +1304,27 @@
- %files libglapi-devel
- %{_libdir}/libglapi.so
- +
- +%files -n libOSMesa8
- +%defattr(-,root,root)
- +%{_libdir}/libOSMesa.so.*
- +
- +%files -n libOSMesa-devel
- +%defattr(-,root,root)
- +%{_includedir}/GL/osmesa.h
- +%{_libdir}/libOSMesa.so
- +%{_libdir}/pkgconfig/osmesa.pc
- %endif
- %if "%{flavor}" == "drivers"
- -%files -n Mesa-dri
- +
- +%files -n Mesa-gallium
- %dir %{_datadir}/drirc.d
- %config %{_datadir}/drirc.d/*
- -%dir %{_libdir}/dri
- +%dir %{_libdir}/dri/
- %{_libdir}/dri/*_dri.so
- -%ifarch %{ix86} x86_64 aarch64 %{arm} ppc64 ppc64le riscv64
- -%exclude %{_libdir}/dri/nouveau_dri.so
- -%endif
- -%ifarch %{arm} aarch64
- -%exclude %{_libdir}/dri/vc4_dri.so
- -%endif
- -
- -%if 0%{with_opencl}
- -# only built with opencl
- -%files -n Mesa-gallium
- %dir %{_libdir}/gallium-pipe/
- %{_libdir}/gallium-pipe/pipe_*.so
- -%endif
- -
- -%ifarch %{ix86} x86_64 aarch64 %{arm} ppc64 ppc64le riscv64
- -%files -n Mesa-dri-nouveau
- -%{_libdir}/dri/nouveau_dri.so
- -%endif
- -
- -%ifarch aarch64 %{arm}
- -%files -n Mesa-dri-vc4
- -%{_libdir}/dri/vc4_dri.so
- -%endif
- # drivers
- %endif
- @@ -1211,6 +1382,7 @@
- %if "%{flavor}" == "drivers"
- %ifarch %{ix86} x86_64 aarch64 %{arm} ppc64 ppc64le riscv64
- %files -n Mesa-libva
- +%dir %{_libdir}/dri
- %{_libdir}/dri/*_drv_video.so
- %endif
- %endif
- @@ -1224,6 +1396,19 @@
- %{_libdir}/libvulkan_intel.so
- %{_datadir}/vulkan/icd.d/intel_hasvk_icd.*.json
- %{_libdir}/libvulkan_intel_hasvk.so
- +
- +%files -n libvulkan_imagination
- +%dir %{_datadir}/vulkan
- +%dir %{_datadir}/vulkan/icd.d
- +%{_datadir}/vulkan/icd.d/powervr_*icd.*.json
- +%{_libdir}/libvulkan_powervr*.so
- +%{_libdir}/libpowervr*.so
- +
- +%files -n libvulkan_microsoft
- +%dir %{_datadir}/vulkan
- +%dir %{_datadir}/vulkan/icd.d
- +%{_datadir}/vulkan/icd.d/dzn_*icd.*.json
- +%{_libdir}/libvulkan_dzn.so
- %endif
- %files -n libvulkan_radeon
- @@ -1237,6 +1422,12 @@
- %dir %{_datadir}/vulkan
- %dir %{_datadir}/vulkan/icd.d
- %{_datadir}/vulkan/icd.d/lvp_icd.*.json
- +
- +%files -n libvulkan_virtio
- +%{_libdir}/libvulkan_virtio.so
- +%dir %{_datadir}/vulkan
- +%dir %{_datadir}/vulkan/icd.d
- +%{_datadir}/vulkan/icd.d/virtio_icd.*.json
- %ifarch %{arm} aarch64
- %files -n libvulkan_broadcom
- @@ -1252,15 +1443,21 @@
- %{_datadir}/vulkan/icd.d/freedreno_icd.*.json
- %endif
- +%files -n Mesa-vulkan-intel-nullhw
- +%{_libdir}/libVkLayer_INTEL_nullhw.so
- +%dir %{_datadir}/vulkan/implicit_layer.d
- +%{_datadir}/vulkan/explicit_layer.d/VkLayer_INTEL_nullhw.json
- +
- %files -n Mesa-vulkan-device-select
- %{_libdir}/libVkLayer_MESA_device_select.so
- -%dir %{_datadir}/vulkan
- %dir %{_datadir}/vulkan/implicit_layer.d
- %{_datadir}/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json
- %files -n Mesa-vulkan-overlay
- +%{_bindir}/spirv2dxil
- %{_bindir}/mesa-overlay-control.py
- %{_libdir}/libVkLayer_MESA_overlay.so
- +%{_libdir}/libspirv_to_dxil.*
- %dir %{_datadir}/vulkan
- %dir %{_datadir}/vulkan/explicit_layer.d
- %{_datadir}/vulkan/explicit_layer.d/VkLayer_MESA_overlay.json
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement