|
@@ -1,6 +1,11 @@
|
|
|
# When bootstrapping an arch, omit the -demos subpackage.
|
|
|
+%bcond_with vulkan
|
|
|
+%bcond_with libva
|
|
|
+%bcond_with glvnd
|
|
|
|
|
|
-%define base_drivers nouveau,radeon,r200
|
|
|
+%define _unpackaged_files_terminate_build 1
|
|
|
+
|
|
|
+%define base_drivers swrast,nouveau,radeon,r200
|
|
|
%ifarch %{ix86}
|
|
|
%define ix86_drivers ,i915,i965
|
|
|
%endif
|
|
@@ -10,7 +15,10 @@
|
|
|
%define dri_drivers --with-dri-drivers=%{base_drivers}%{?ix86_drivers}%{?amd64_drivers}
|
|
|
|
|
|
%ifarch %{ix86} x86_64
|
|
|
-%define with_opencl 0
|
|
|
+#define with_opencl 1
|
|
|
+%if %{with vulkan}
|
|
|
+%define vulkan_drivers --with-vulkan-drivers=intel,radeon
|
|
|
+%endif
|
|
|
%endif
|
|
|
|
|
|
%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
|
|
@@ -18,18 +26,30 @@
|
|
|
Summary: Mesa graphics libraries
|
|
|
Summary(ja): Mesa グラフィックスライブラリ
|
|
|
Name: mesa
|
|
|
-Version: 11.2.2
|
|
|
+Version: 17.3.1
|
|
|
Release: 1%{?_dist_release}
|
|
|
License: MIT
|
|
|
Group: System Environment/Libraries
|
|
|
URL: http://www.mesa3d.org
|
|
|
|
|
|
Source0: ftp://ftp.freedesktop.org/pub/mesa/%{version}/%{name}-%{version}.tar.xz
|
|
|
-Source3: make-git-snapshot.sh
|
|
|
-
|
|
|
-Patch1: mesa-10.0-nv50-fix-build.patch
|
|
|
-Patch15: mesa-9.2-hardware-float.patch
|
|
|
-Patch20: mesa-10.2-evergreen-big-endian.patch
|
|
|
+Source1: vl_decoder.c
|
|
|
+Source2: vl_mpeg12_decoder.c
|
|
|
+Source3: Makefile
|
|
|
+# src/gallium/auxiliary/postprocess/pp_mlaa* have an ... interestingly worded license.
|
|
|
+# Source4 contains email correspondence clarifying the license terms.
|
|
|
+# Fedora opts to ignore the optional part of clause 2 and treat that code as 2 clause BSD.
|
|
|
+Source4: Mesa-MLAA-License-Clarification-Email.txt
|
|
|
+
|
|
|
+Patch1: 0001-llvm-SONAME-without-version.patch
|
|
|
+Patch2: 0002-hardware-gloat.patch
|
|
|
+Patch3: 0003-evergreen-big-endian.patch
|
|
|
+Patch4: 0004-bigendian-assert.patch
|
|
|
+
|
|
|
+# glvnd support patches
|
|
|
+# non-upstreamed ones
|
|
|
+Patch10: glvnd-fix-gl-dot-pc.patch
|
|
|
+Patch11: 0001-Fix-linkage-against-shared-glapi.patch
|
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
|
|
BuildRequires: pkgconfig
|
|
@@ -56,6 +76,10 @@ BuildRequires: libxml2-python
|
|
|
BuildRequires: libvdpau-devel >= 1.1
|
|
|
BuildRequires: elfutils-libelf-devel
|
|
|
BuildRequires: zlib-devel
|
|
|
+%if %{with vulkan}
|
|
|
+BuildRequires: vulkan-devel
|
|
|
+%endif
|
|
|
+
|
|
|
%description
|
|
|
Mesa
|
|
|
|
|
@@ -366,14 +390,35 @@ Obsoletes: mesa-libGL < 8.0.4
|
|
|
Mesa-based DRI drivers.
|
|
|
|
|
|
|
|
|
+%if %{with vulkan}
|
|
|
+%package vulkan-drivers
|
|
|
+Summary: Mesa Vulkan drivers
|
|
|
+Requires: vulkan%{_isa}
|
|
|
+
|
|
|
+%description vulkan-drivers
|
|
|
+The drivers with support for the Vulkan API.
|
|
|
+
|
|
|
+%package vulkan-devel
|
|
|
+Summary: Mesa Vulkan development files
|
|
|
+Requires: %{name}-vulkan-drivers%{?_isa} = %{?epoch:%{epoch}}%{version}-%{
|
|
|
+release}
|
|
|
+Requires: vulkan-devel
|
|
|
+
|
|
|
+%description vulkan-devel
|
|
|
+Headers for development with the Vulkan API.
|
|
|
+%endif
|
|
|
+
|
|
|
|
|
|
%prep
|
|
|
-%setup -q
|
|
|
+%autosetup -n %{name}-%{version} -p1
|
|
|
+cp -f %{SOURCE1} src/gallium/auxiliary/vl/vl_decoder.c
|
|
|
+cp -f %{SOURCE2} src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
|
|
|
|
|
|
-%patch1 -p1 -b .nv50rtti
|
|
|
+cp %{SOURCE4} docs/
|
|
|
|
|
|
-%patch15 -p1 -b .hwfloat
|
|
|
-%patch20 -p1 -b .egbe
|
|
|
+# 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
|
|
|
|
|
|
|
|
|
%build
|
|
@@ -382,44 +427,63 @@ Mesa-based DRI drivers.
|
|
|
# XXX please fix upstream
|
|
|
sed -i 's/^default_driver.*$/default_driver="dri"/' configure.ac
|
|
|
|
|
|
-autoreconf -if
|
|
|
+autoreconf -vfi
|
|
|
|
|
|
+# C++ note: we never say "catch" in the source. we do say "typeid" once,
|
|
|
+# in an assert, which is patched out above. LLVM doesn't use RTTI or throw.
|
|
|
+#
|
|
|
+# We do say 'catch' in the clover and d3d1x state trackers, but we're not
|
|
|
+# building those yet.
|
|
|
+export CXXFLAGS="%{?with_opencl:-frtti -fexceptions} %{!?with_opencl:-fno-rtti -fno-exceptions}"
|
|
|
+export LDFLAGS="-static-libstdc++"
|
|
|
%ifarch %{ix86}
|
|
|
-%define common_flags --enable-pic --enable-udev --disable-asm
|
|
|
-%else
|
|
|
-%define common_flags --enable-pic --enable-udev
|
|
|
+# i do not have words for how much the assembly dispatch code infuriates me
|
|
|
+%global asm_flags --disable-asm
|
|
|
%endif
|
|
|
|
|
|
-export CFLAGS="$RPM_OPT_FLAGS"
|
|
|
-export CXXFLAGS="$RPM_OPT_FLAGS"
|
|
|
-
|
|
|
# now build the rest of mesa
|
|
|
%configure \
|
|
|
- %{common_flags} \
|
|
|
+ %{?asm_flags} \
|
|
|
+%if %{with glvnd}
|
|
|
+ --enable-libglvnd \
|
|
|
+%endif
|
|
|
--disable-selinux \
|
|
|
- --enable-osmesa \
|
|
|
- --enable-xcb \
|
|
|
+ --enable-gallium-osmesa \
|
|
|
--with-dri-driverdir=%{_libdir}/dri \
|
|
|
--enable-egl \
|
|
|
--enable-gles1 \
|
|
|
--enable-gles2 \
|
|
|
- --disable-gallium-egl \
|
|
|
--disable-xvmc \
|
|
|
--enable-vdpau \
|
|
|
- --with-egl-platforms=x11,drm \
|
|
|
+%if %{with libva}
|
|
|
+ --enable-va \
|
|
|
+%endif
|
|
|
+ --with-platforms=x11,drm,surfaceless \
|
|
|
--enable-shared-glapi \
|
|
|
--enable-gbm \
|
|
|
- --disable-opencl \
|
|
|
+ %{?with_opencl:--enable-opencl --enable-opencl-icd} %{!?with_opencl:--disable-opencl} \
|
|
|
--enable-glx-tls \
|
|
|
--enable-texture-float=yes \
|
|
|
- --enable-xa \
|
|
|
- --with-gallium-drivers=svga,r300,r600,radeonsi,nouveau,swrast \
|
|
|
+%if %{with vulkan}
|
|
|
+ %{?vulkan_drivers} \
|
|
|
+%endif
|
|
|
--enable-gallium-llvm \
|
|
|
+ --enable-llvm \
|
|
|
--with-llvm-shared-libs \
|
|
|
--enable-dri \
|
|
|
+ --enable-xa \
|
|
|
+ --with-gallium-drivers=svga,r300,r600,radeonsi,nouveau,swrast \
|
|
|
%{?dri_drivers}
|
|
|
|
|
|
-make %{?_smp_mflags} MKDEP=/bin/true
|
|
|
+# libtool refuses to pass through things you ask for in LDFLAGS that it doesn't
|
|
|
+# know about, like -static-libstdc++, so...
|
|
|
+sed -i 's/-fuse-linker-plugin|/-static-lib*|&/' libtool
|
|
|
+sed -i 's/-nostdlib//g' libtool
|
|
|
+sed -i 's/^predep_objects=.*$/#&/' libtool
|
|
|
+sed -i 's/^postdep_objects=.*$/#&/' libtool
|
|
|
+sed -i 's/^postdeps=.*$/#&/' libtool
|
|
|
+
|
|
|
+make %{?_smp_mflags} MKDEP=/bin/true V=1
|
|
|
|
|
|
%install
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
@@ -427,24 +491,33 @@ rm -rf $RPM_BUILD_ROOT
|
|
|
# core libs and headers, but not drivers.
|
|
|
make install DESTDIR=$RPM_BUILD_ROOT DRI_DIRS=
|
|
|
|
|
|
-# not installed by make install, grr
|
|
|
-mkdir -p $RPM_BUILD_ROOT%{_includedir}/KHR
|
|
|
-install -m 0644 include/KHR/*.h $RPM_BUILD_ROOT%{_includedir}/KHR
|
|
|
+# libvdpau opens the versioned name, don't bother including the unversioned
|
|
|
+rm -f %{buildroot}%{_libdir}/vdpau/*.so
|
|
|
+# likewise glvnd
|
|
|
+%if %{with glvnd}
|
|
|
+rm -f %{buildroot}%{_libdir}/libGLX_mesa.so
|
|
|
+rm -f %{buildroot}%{_libdir}/libEGL_mesa.so
|
|
|
+# XXX can we just not build this
|
|
|
+rm -f %{buildroot}%{_libdir}/libGLES*
|
|
|
+
|
|
|
+# 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
|
|
|
+%endif
|
|
|
|
|
|
-# strip out undesirable headers
|
|
|
-pushd $RPM_BUILD_ROOT%{_includedir}/GL
|
|
|
-rm -f [vw]*.h
|
|
|
-popd
|
|
|
+# strip out useless headers
|
|
|
+rm -f %{buildroot}%{_includedir}/GL/w*.h
|
|
|
+
|
|
|
+# these are shipped already in vulkan-devel
|
|
|
+rm -f %{buildroot}/%{_includedir}/vulkan/vk_platform.h
|
|
|
+rm -f %{buildroot}/%{_includedir}/vulkan/vulkan.h
|
|
|
|
|
|
pushd $RPM_BUILD_ROOT%{_libdir}
|
|
|
rm -f xorg/modules/drivers/modesetting_drv.so
|
|
|
popd
|
|
|
|
|
|
-# libvdpau opens the versioned name, don't bother including the unversioned
|
|
|
-rm -f $RPM_BUILD_ROOT%{_libdir}/vdpau/*.so
|
|
|
-
|
|
|
# remove .la files
|
|
|
-find $RPM_BUILD_ROOT -name \*.la | xargs rm -f
|
|
|
+find %{buildroot} -name '*.la' -delete
|
|
|
|
|
|
# Install the source needed to build the X server. The egreps are just
|
|
|
# stripping out unnecessary dirs; only tricky bit is the [^c] to make sure
|
|
@@ -459,13 +532,14 @@ mkdir -p $RPM_BUILD_ROOT/%{mesasourcedir}
|
|
|
(cd $RPM_BUILD_ROOT/%{mesasourcedir} && tar xf -)
|
|
|
|
|
|
# this keeps breaking, check it early. note that the exit from eu-ftr is odd.
|
|
|
-pushd $RPM_BUILD_ROOT%{_libdir}
|
|
|
+pushd %{buildroot}%{_libdir}
|
|
|
for i in libOSMesa*.so libGL.so ; do
|
|
|
eu-findtextrel $i && exit 1
|
|
|
done
|
|
|
+# check that we really didn't link libstdc++ dynamically
|
|
|
+eu-readelf -d mesa_dri_drivers.so | grep -q libstdc && exit 1
|
|
|
popd
|
|
|
|
|
|
-
|
|
|
%clean
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
@@ -539,7 +613,6 @@ rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
%files libEGL
|
|
|
%defattr(-,root,root,-)
|
|
|
-%doc docs/COPYING
|
|
|
%{_libdir}/libEGL.so.1
|
|
|
%{_libdir}/libEGL.so.1.*
|
|
|
|
|
@@ -558,7 +631,6 @@ rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
%files libGLES
|
|
|
%defattr(-,root,root,-)
|
|
|
-%doc docs/COPYING
|
|
|
%{_libdir}/libGLESv1_CM.so.1
|
|
|
%{_libdir}/libGLESv1_CM.so.1.*
|
|
|
%{_libdir}/libGLESv2.so.2
|
|
@@ -582,6 +654,7 @@ rm -rf $RPM_BUILD_ROOT
|
|
|
%{_includedir}/GLES3/gl3.h
|
|
|
%{_includedir}/GLES3/gl3ext.h
|
|
|
%{_includedir}/GLES3/gl31.h
|
|
|
+%{_includedir}/GLES3/gl32.h
|
|
|
%{_libdir}/pkgconfig/glesv1_cm.pc
|
|
|
%{_libdir}/pkgconfig/glesv2.pc
|
|
|
%{_libdir}/libGLESv1_CM.so
|
|
@@ -604,7 +677,6 @@ rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
%files libgbm
|
|
|
%defattr(-,root,root,-)
|
|
|
-%doc docs/COPYING
|
|
|
%{_libdir}/libgbm.so.1
|
|
|
%{_libdir}/libgbm.so.1.*
|
|
|
|
|
@@ -616,7 +688,6 @@ rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
%files libxatracker
|
|
|
%defattr(-,root,root,-)
|
|
|
-%doc docs/COPYING
|
|
|
%{_libdir}/libxatracker.so.2
|
|
|
%{_libdir}/libxatracker.so.2.*
|
|
|
|
|
@@ -633,6 +704,22 @@ rm -rf $RPM_BUILD_ROOT
|
|
|
%defattr(-,root,root,-)
|
|
|
%{mesasourcedir}
|
|
|
|
|
|
+%if %{with vulkan}
|
|
|
+%files vulkan-drivers
|
|
|
+%{_libdir}/libvulkan_intel.so
|
|
|
+%{_libdir}/libvulkan_radeon.so
|
|
|
+%ifarch x86_64
|
|
|
+%{_datadir}/vulkan/icd.d/intel_icd.x86_64.json
|
|
|
+%{_datadir}/vulkan/icd.d/radeon_icd.x86_64.json
|
|
|
+%else
|
|
|
+%{_datadir}/vulkan/icd.d/intel_icd.i686.json
|
|
|
+%{_datadir}/vulkan/icd.d/radeon_icd.i686.json
|
|
|
+%endif
|
|
|
+
|
|
|
+%files vulkan-devel
|
|
|
+%{_includedir}/vulkan/
|
|
|
+%endif
|
|
|
+
|
|
|
# compat32
|
|
|
%if %{build_compat32}
|
|
|
%files -n compat32-%{name}-libGL
|
|
@@ -656,7 +743,6 @@ rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
%files -n compat32-%{name}-libEGL
|
|
|
%defattr(-,root,root,-)
|
|
|
-%doc docs/COPYING
|
|
|
%{_libdir}/libEGL.so.1
|
|
|
%{_libdir}/libEGL.so.1.*
|
|
|
|
|
@@ -666,7 +752,6 @@ rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
%files -n compat32-%{name}-libGLES
|
|
|
%defattr(-,root,root,-)
|
|
|
-%doc docs/COPYING
|
|
|
%{_libdir}/libGLESv1_CM.so.1
|
|
|
%{_libdir}/libGLESv1_CM.so.1.*
|
|
|
%{_libdir}/libGLESv2.so.2
|
|
@@ -702,6 +787,10 @@ rm -rf $RPM_BUILD_ROOT
|
|
|
%endif
|
|
|
|
|
|
%changelog
|
|
|
+* Mon Jan 01 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 17.3.1-1
|
|
|
+- updated to 17.3.1.
|
|
|
+- replaced all patches from rawhide.
|
|
|
+
|
|
|
* Fri Aug 5 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 11.2.2-1
|
|
|
- updated to 11.2.2.
|
|
|
- dropped Patch99: fixed in upstream.
|