Sisyphus repository
Last update: 15 december 2018 | SRPMs: 18644 | Visits: 12710650
en ru br
ALT Linux repos
S:18.3.1-alt1
5.0: 7.4.1-alt2
4.1: 7.0.4-alt9.M41.1
4.0: 7.0.3-alt2.M40.2
+updates:7.0.2-alt1.M40.1
3.0: 6.2.1-alt2

Group :: System/Libraries
RPM: Mesa

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%def_enable egl
%def_enable gles2
%def_enable xa

Name: Mesa
Version: 18.3.1
Release: alt1
Epoch: 4
License: MIT
Summary: OpenGL compatible 3D graphics library
Group: System/Libraries
Url: http://www.mesa3d.org

Packager: Valery Inozemtsev <shrek at altlinux.ru>

Source: %name-%version.tar
Patch: %name-%version.patch

BuildPreReq: /proc
BuildRequires: gcc-c++ indent flex libXdamage-devel libXext-devel libXft-devel libXmu-devel libXi-devel libXrender-devel libXxf86vm-devel
BuildRequires: libdrm-devel libexpat-devel python-modules libselinux-devel libxcb-devel libSM-devel libtinfo-devel libudev-devel
BuildRequires: libXdmcp-devel libffi-devel libelf-devel libva-devel libvdpau-devel libXvMC-devel xorg-proto-devel libxshmfence-devel
BuildRequires: libXrandr-devel libnettle-devel libelf-devel zlib-devel libwayland-client-devel libwayland-server-devel
BuildRequires: libwayland-egl-devel python-module-libxml2 python-module-mako python-module-argparse wayland-protocols
BuildRequires: llvm-devel llvm-devel-static clang-devel clang-devel-static libclc-devel lld libglvnd-devel >= 0.2.0

%description
Mesa is an OpenGL compatible 3D graphics library

%package -n libGLX-mesa
Summary: OpenGL 1.3 compatible 3D graphics library for X Window server
Group: System/Libraries

%description -n libGLX-mesa
Mesa is an OpenGL compatible 3D graphics library

%package -n libGL-devel
Summary: Development files for Mesa Library
Group: Development/C
Requires: libglvnd-devel >= 0.2.0 libGLX-mesa = %epoch:%version-%release

%description -n libGL-devel
libGL-devel contains the libraries and header files needed to
develop programs which make use of Mesa

%package -n libEGL-mesa
Summary: Mesa EGL library
Group: System/Libraries

%description -n libEGL-mesa
Mesa EGL library

%package -n libEGL-devel
Summary: Mesa libEGL development package
Group: Development/C
Requires: libglvnd-devel >= 0.2.0

%description -n libEGL-devel
Mesa libEGL development package

%package -n libGLES-devel
Summary: Mesa libGLES development package
Group: Development/C
Requires: libglvnd-devel >= 0.2.0

%description -n libGLES-devel
Mesa libGLES development package

%package -n libgbm
Summary: GBM buffer management library
Group: System/Libraries

%description -n libgbm
GBM buffer management library

%package -n libgbm-devel
Summary: GBM buffer management development package
Group: Development/C

%description -n libgbm-devel
GBM buffer management development package

%package -n libxatracker
Summary: Mesa XA state tracker
Group: System/Libraries

%description -n libxatracker
Xorg Gallium3D acceleration library

%package -n libxatracker-devel
Summary: Mesa XA state tracker development package
Group: Development/C

%description -n libxatracker-devel
Xorg Gallium3D acceleration development package

%package -n libMesaOpenCL
Summary: Mesa OpenCL runtime library
Group: System/Libraries
Requires: ocl-icd libclc

%description -n libMesaOpenCL
This package contains the mesa implementation of the OpenCL (Open Compute
Language) library, which is intended for use with an ICD loader. OpenCL
provides a standardized interface for computational analysis on graphical
processing units.

%package -n xorg-dri-swrast
Summary: Mesa software rendering libraries
Group: System/X11
Provides: xorg-dri-virgl
Obsoletes: xorg-dri-virgl < %epoch:%version-%release

%description -n xorg-dri-swrast
Mesa software rendering libraries

%package -n xorg-dri-intel
Summary: Intel DRI driver
Group: System/X11

%description -n xorg-dri-intel
DRI driver for Intel i8xx, i9xx

%package -n xorg-dri-radeon
Summary: ATI RADEON DRI driver
Group: System/X11
%ifarch %ix86 x86_64
Requires: libvdpau
%endif

%description -n xorg-dri-radeon
DRI driver for ATI R100, R200, R300, R400, R500

%package -n xorg-dri-nouveau
Summary: nVidia DRI driver
Group: System/X11
%ifarch %ix86 x86_64
Requires: libvdpau
%endif

%description -n xorg-dri-nouveau
DRI driver for nVidia

%package -n xorg-dri-armsoc
Summary: SoC DRI drivers
Group: System/X11

%description -n xorg-dri-armsoc
DRI drivers for various SoCs

%set_verify_elf_method unresolved=relaxed

%prep
%setup -q
%patch -p1

mkdir -p $(pwd)/bin
%ifarch x86_64
ln -s %_bindir/ld.lld $(pwd)/bin/ld
%endif

%build
export PATH=$(pwd)/bin:$PATH
%autoreconf
%configure \
%ifarch %ix86 x86_64
--with-dri-drivers=r200,radeon,i915,i965,nouveau \
--with-gallium-drivers=swrast,r300,r600,nouveau,radeonsi,virgl \
%endif
%ifarch %arm
--with-dri-drivers=no \
--with-gallium-drivers=swrast,vc4,imx,etnaviv,freedreno \
%endif
%ifarch aarch64
--with-dri-drivers=r200,radeon,nouveau \
--with-gallium-drivers=swrast,r300,r600,nouveau,virgl,vc4,imx,etnaviv,freedreno \
%endif
--enable-vdpau \
--enable-xvmc \
--enable-dri3 \
%ifarch x86_64
--disable-llvm-shared-libs \
--enable-opencl \
--enable-opencl-icd \
--with-vulkan-drivers=intel,radeon \
%endif
--enable-shared-glapi \
%{subst_enable egl} \
%{subst_enable gles2} \
--disable-gles1 \
--enable-glx-tls \
--enable-selinux \
--enable-libglvnd \
--with-platforms=x11,wayland,drm \
--with-dri-driverdir=%_libdir/X11/modules/dri \
%{subst_enable xa}
#

%make_build V=1

%install
export PATH=$(pwd)/bin:$PATH
%make DESTDIR=%buildroot install

rm -f %buildroot%_libdir/gallium-pipe/*.la

m=%buildroot%_libdir/X11/modules/dri
%ifarch %ix86 x86_64 aarch64
m="$m %buildroot%_libdir/dri"
%endif
for d in $m; do
for f in $d/*.so; do
[ ! -L "$f" ] || continue
n="${f##*/}"
s="$(objdump -p "$f" | awk '/SONAME/ {print $2}')"
[ -n "$s" ]
[ "$n" != "$s" ] || continue
t="$d/$s"
[ -f "$t" ] || mv "$f" "$t"
ln -v -snf "${t##*/}" "$f"
done
done
%ifarch %ix86 x86_64 aarch64
d=%buildroot%_libdir/vdpau
for f in $d/*.so.1.0.0; do
               [ ! -L "$f" ] || continue
               n="${f##*/}"
               s="$(objdump -p "$f" | awk '/SONAME/ {print $2}')"
               [ -n "$s" ]
               [ "$n" != "$s" ] || continue
               t="$d/$s"
               [ -f "$t" ] || mv "$f" "$t"
               ln -v -snf "${t##*/}" "$f"
       done
rm -f %buildroot%_libdir/libXvMCgallium.so.*
d=%buildroot%_libdir
for f in $d/libXvMC*.so.1.0.0; do
               [ ! -L "$f" ] || continue
               n="${f##*/}"
               s="$(objdump -p "$f" | awk '/SONAME/ {print $2}')"
               [ -n "$s" ]
               [ "$n" != "$s" ] || continue
               t="$d/$s"
               [ -f "$t" ] || mv "$f" "$t"
               ln -v -snf "${t##*/}" "$f"
       done
%endif

%files -n libGLX-mesa
%doc docs/relnotes/%version.html
%_libdir/libGLX_mesa.so.*
%_libdir/libglapi.so.*

%files -n libGL-devel
%dir %_includedir/GL
%_includedir/GL/internal
%_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
%_libdir/libGLX_mesa.so
%_libdir/libglapi.so
%_pkgconfigdir/gl.pc
%_pkgconfigdir/dri.pc

%if_enabled egl
%files -n libEGL-mesa
%_libdir/libEGL_mesa.so.*
%_datadir/glvnd/egl_vendor.d/50_mesa.json

%files -n libEGL-devel
%_includedir/EGL
%_includedir/KHR
%_libdir/libEGL_mesa.so
%_pkgconfigdir/egl.pc
%endif

%if_enabled gles2
%files -n libGLES-devel
%_includedir/GLES2
%_includedir/GLES3
%_pkgconfigdir/glesv2.pc
%endif

%files -n libgbm
%_libdir/libgbm.so.*

%files -n libgbm-devel
%_includedir/gbm.h
%_libdir/libgbm.so
%_pkgconfigdir/gbm.pc

%if_enabled xa
%files -n libxatracker
%_libdir/libxatracker.so.*

%files -n libxatracker-devel
%_includedir/xa_*.h
%_libdir/libxatracker.so
%_pkgconfigdir/xatracker.pc
%endif

%ifarch x86_64
%files -n libMesaOpenCL
%dir %_sysconfdir/OpenCL
%dir %_sysconfdir/OpenCL/vendors
%_sysconfdir/OpenCL/vendors/mesa.icd
%_libdir/libMesaOpenCL.so.*
%endif

%files -n xorg-dri-swrast
%_datadir/drirc.d
%_libdir/X11/modules/dri/*swrast*_dri.so
%_libdir/X11/modules/dri/gallium_dri.so
%ifarch %ix86 x86_64 aarch64
%_libdir/X11/modules/dri/mesa_dri_drivers.so
%_libdir/X11/modules/dri/virtio_gpu_dri.so
%ifarch x86_64
%dir %_libdir/gallium-pipe
%_libdir/gallium-pipe/pipe_swrast.so
%endif
%ifarch %ix86 x86_64 aarch64
%_libdir/libXvMCgallium.so.*
%_libdir/dri/gallium_drv_video.so
%_libdir/vdpau/libvdpau_gallium.so.1
%endif
%endif

%ifarch %ix86 x86_64
%files -n xorg-dri-intel
%_libdir/X11/modules/dri/i9?5_dri.so
%ifarch x86_64
%_libdir/libvulkan_intel.so
%dir %_datadir/vulkan
%dir %_datadir/vulkan/icd.d
%_datadir/vulkan/icd.d/intel_icd*
%endif
%endif

%ifarch %ix86 x86_64 aarch64
%files -n xorg-dri-nouveau
%_libdir/X11/modules/dri/nouveau_*dri.so
%_libdir/dri/nouveau_drv_video.so
%_libdir/vdpau/libvdpau_nouveau.so*
%_libdir/libXvMCnouveau.so.*
%ifarch x86_64
%_libdir/gallium-pipe/pipe_nouveau.so
%endif

%files -n xorg-dri-radeon
%_libdir/X11/modules/dri/radeon*_dri.so
%_libdir/X11/modules/dri/r?00_dri.so
%_libdir/vdpau/libvdpau_r*.so*
%_libdir/dri/r*_drv_video.so
%_libdir/libXvMCr*.so.*
%ifarch x86_64
%_libdir/gallium-pipe/pipe_r*.so
%_libdir/libvulkan_radeon.so
%dir %_datadir/vulkan
%dir %_datadir/vulkan/icd.d
%_datadir/vulkan/icd.d/radeon_icd*
%endif
%endif

%ifarch %arm aarch64
%files -n xorg-dri-armsoc
%_libdir/X11/modules/dri/etnaviv_dri.so
%_libdir/X11/modules/dri/imx-drm_dri.so
%_libdir/X11/modules/dri/kgsl_dri.so
%_libdir/X11/modules/dri/msm_dri.so
%_libdir/X11/modules/dri/vc4_dri.so
%endif

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin