Sisyphus repository
Last update: 15 october 2018 | SRPMs: 18651 | Visits: 12367620
en ru br
ALT Linux repos
S:18.1.3-alt1.S1
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.1.3
Release: alt1%ubt
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(pre): rpm-build-ubt
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
BuildRequires: python-module-libxml2 libudev-devel libXdmcp-devel libffi-devel libelf-devel
BuildRequires: libva-devel libvdpau-devel libXvMC-devel xorg-proto-devel libxshmfence-devel libnettle-devel
BuildRequires: libelf-devel python-module-mako python-module-argparse zlib-devel
BuildRequires: libwayland-client-devel libwayland-server-devel wayland-protocols
%ifarch %ix86 x86_64
BuildRequires: libllvm-devel-static
%endif

%description
Mesa is an OpenGL compatible 3D graphics library

%package -n libGL
Summary: OpenGL 1.3 compatible 3D graphics library for X Window server
Group: System/Libraries
Requires(post): coreutils

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

%package -n libGL-devel
Summary: Development files for Mesa Library
Group: Development/C
Requires: libGL = %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
Summary: Mesa EGL library
Group: System/Libraries
Requires: libGL = %epoch:%version-%release

%description -n libEGL
Mesa EGL library

%package -n libEGL-devel
Summary: Mesa libEGL development package
Group: Development/C
Requires: libEGL = %epoch:%version-%release

%description -n libEGL-devel
Mesa libEGL development package

%package -n libGLES
Summary: Mesa OpenGL ES library
Group: System/Libraries

%description -n libGLES
Mesa OpenGL ES library

%package -n libGLES-devel
Summary: Mesa libGLES development package
Group: Development/C
Requires: libGLES = %epoch:%version-%release
Requires: libEGL-devel = %epoch:%version-%release

%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
Requires: libgbm = %epoch:%version-%release

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

%package -n libxatracker
Summary: Mesa XA state tracker
Group: System/Libraries
Requires: libxatracker = %epoch:%version-%release

%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 xorg-dri-swrast
Summary: Mesa software rendering libraries
Group: System/X11
Requires: libGL = %epoch:%version-%release
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
Requires: libGL = %epoch:%version-%release

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

%package -n xorg-dri-radeon
Summary: ATI RADEON DRI driver
Group: System/X11
Requires: libGL = %epoch:%version-%release
%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
Requires: libGL = %epoch:%version-%release
%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
Requires: libGL = %epoch:%version-%release

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

%package -n glxinfo
Summary: display info about a GLX extension and OpenGL renderer
Group: System/X11
Requires: libGL = %epoch:%version-%release

%description -n glxinfo
glxinfo lists information about the GLX extension, OpenGL capable visu-
als, and the OpenGL renderer on an X server. The GLX and renderer  info
includes  the  version  and extension attributes. The visual info lists
the GLX visual attributes available  for  each  OpenGL  capable  visual
(e.g.  whether  the  visual is double buffered, the component sizes, Z-
buffering depth, etc)

%package -n glxgears
Summary: GLX version of the infamous "gears" GL demo
Group: System/X11
Requires: libGL = %epoch:%version-%release

%description -n glxgears
glxgears  is a GLX demo that draws three rotating gears, and prints out
framerate information to stdout

%set_verify_elf_method unresolved=relaxed

%prep
%setup -q
%patch -p1

%build
%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
--disable-llvm-shared-libs \
--enable-vdpau \
--enable-xvmc \
--enable-dri3 \
%ifarch x86_64
--with-vulkan-drivers=intel,radeon \
%endif
--enable-texture-float \
--enable-shared-glapi \
%{subst_enable egl} \
%{subst_enable gles2} \
--disable-gles1 \
--enable-texture-float \
--enable-glx-tls \
--enable-selinux \
--with-platforms=x11,wayland,drm \
--with-dri-driverdir=%_libdir/X11/modules/dri \
%{subst_enable xa}
#

%make_build

%install
%make DESTDIR=%buildroot install

m=%buildroot%_libdir/X11/modules/dri
%ifarch %ix86 x86_64
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
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
%endif

mkdir -p %buildroot%_sysconfdir/X11/%_lib
# moved libGL
mv %buildroot%_libdir/libGL.so.1.2.0 %buildroot%_libdir/X11/libGL.so.1.2
ln -sf ../../..%_libdir/X11/libGL.so.1.2 %buildroot%_sysconfdir/X11/%_lib/libGL.so.1
ln -sf ../..%_sysconfdir/X11/%_lib/libGL.so.1 %buildroot%_libdir/
ln -sf X11/libGL.so.1.2 %buildroot%_libdir/libGL.so
# moved libEGL
%if_enabled egl
mv %buildroot%_libdir/libEGL.so.1.0.0 %buildroot%_libdir/X11/libEGL.so.1.0.0
ln -sf ../../..%_libdir/X11/libEGL.so.1.0.0 %buildroot%_sysconfdir/X11/%_lib/libEGL.so.1
ln -sf ../..%_sysconfdir/X11/%_lib/libEGL.so.1 %buildroot%_libdir/
ln -sf X11/libEGL.so.1.0.0 %buildroot%_libdir/libEGL.so
%endif
# moved libGLESv2
%if_enabled gles2
mv %buildroot%_libdir/libGLESv2.so.2.0.0 %buildroot%_libdir/X11/libGLESv2.so.2.0.0
ln -sf ../../..%_libdir/X11/libGLESv2.so.2.0.0 %buildroot%_sysconfdir/X11/%_lib/libGLESv2.so.2
ln -sf ../..%_sysconfdir/X11/%_lib/libGLESv2.so.2 %buildroot%_libdir/
ln -sf X11/libGLESv2.so.2.0.0 %buildroot%_libdir/libGLESv2.so
%endif
#
/sbin/ldconfig -Nn %buildroot%_libdir/X11/

%post -n libGL
[ -r %_sysconfdir/X11/%_lib/libGL.so.1 ] || \
ln -sf ../../..%_libdir/X11/libGL.so.1.2 %_sysconfdir/X11/%_lib/libGL.so.1
ln -sf ../..%_sysconfdir/X11/%_lib/libGL.so.1 %_libdir/

%if_enabled egl
%post -n libEGL
[ -r %_sysconfdir/X11/%_lib/libEGL.so.1 ] || \
ln -sf ../../..%_libdir/X11/libEGL.so.1.0.0 %_sysconfdir/X11/%_lib/libEGL.so.1
ln -sf ../..%_sysconfdir/X11/%_lib/libEGL.so.1 %_libdir/
%endif

%if_enabled gles2
%post -n libGLES
[ -r %_sysconfdir/X11/%_lib/libGLESv2.so.2 ] || \
ln -sf ../../..%_libdir/X11/libGLESv2.so.2.0.0 %_sysconfdir/X11/%_lib/libGLESv2.so.2
ln -sf ../..%_sysconfdir/X11/%_lib/libGLESv2.so.2 %_libdir/
%endif

%files -n libGL
%doc docs/relnotes/%version.html
%dir %_sysconfdir/X11/%_lib
%ghost %_sysconfdir/X11/%_lib/libGL.so.1
%_libdir/libGL.so.*
%_libdir/libglapi.so.*
%dir %_libdir/X11
%_libdir/X11/libGL.so.*
%dir %_libdir/X11/modules
%dir %_libdir/X11/modules/dri

%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/libGL.so
%_libdir/libglapi.so
%_pkgconfigdir/gl.pc
%_pkgconfigdir/dri.pc

%if_enabled egl
%files -n libEGL
%dir %_sysconfdir/X11/%_lib
%ghost %_sysconfdir/X11/%_lib/libEGL.so.1
%_libdir/libEGL.so.*
%_libdir/X11/libEGL.so.*

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

%if_enabled gles2
%files -n libGLES
%dir %_sysconfdir/X11/%_lib
%ghost %_sysconfdir/X11/%_lib/libGLESv2.so.2
%_libdir/libGLESv2.so.*
%_libdir/X11/libGLESv2.so.*

%files -n libGLES-devel
%_includedir/GLES2
%_includedir/GLES3
%_libdir/libGLESv2.so
%_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

%files -n xorg-dri-swrast
%_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 %ix86 x86_64
%_libdir/dri/gallium_drv_video.so
%_libdir/vdpau/libvdpau_gallium.so.1
%endif
%endif

%ifarch %ix86 x86_64
%files -n xorg-dri-intel
%config(noreplace) %_sysconfdir/drirc
%_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.*

%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.*
%_libdir/libXvMCgallium.so.*
%ifarch x86_64
%_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

%files -n glxinfo
%_bindir/glxinfo

%files -n glxgears
%_bindir/glxgears

%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