Skip to content

Commit

Permalink
mesa: SPEC adjusted to build on armv5 - now with older llvm
Browse files Browse the repository at this point in the history
  • Loading branch information
jaccol committed Apr 1, 2019
1 parent 7cd1007 commit 4a5cd11
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 31 deletions.
65 changes: 43 additions & 22 deletions mesa/0001-SPEC-adjusted-to-build-on-armv5.patch
@@ -1,14 +1,14 @@
From 9f89ba25cc4d004677d7a4c14765f6b7f8200da6 Mon Sep 17 00:00:00 2001
From 5189dee29aa86888874f7bbf2f7c313abfb06126 Mon Sep 17 00:00:00 2001
From: Jacco Ligthart <jacco@redsleeve.org>
Date: Sat, 2 Feb 2019 14:11:49 +0100
Subject: [PATCH] SPEC adjusted to build on armv5

---
SPECS/mesa.spec | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
SPECS/mesa.spec | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/SPECS/mesa.spec b/SPECS/mesa.spec
index 40c88d9..c6cdc81 100644
index 40c88d9..4e3eab4 100644
--- a/SPECS/mesa.spec
+++ b/SPECS/mesa.spec
@@ -7,7 +7,7 @@
Expand All @@ -20,21 +20,12 @@ index 40c88d9..c6cdc81 100644
%define with_radeonsi 1
%endif

@@ -18,7 +18,7 @@
# S390 doesn't have video cards, but we need swrast for xserver's GLX
# llvm (and thus llvmpipe) doesn't actually work on ppc32 or s390

-%ifnarch s390 ppc
+%ifnarch s390 ppc %{arm}
%define with_llvm 1
%endif

@@ -61,7 +61,7 @@
Summary: Mesa graphics libraries
Name: mesa
Version: 18.0.5
-Release: 4%{?dist}
+Release: 4%{?dist}.redsleeve
+Release: 4%{?dist}.redsleeve.1
License: MIT
Group: System Environment/Libraries
URL: http://www.mesa3d.org
Expand All @@ -48,16 +39,46 @@ index 40c88d9..c6cdc81 100644
%else
BuildRequires: llvm-devel >= 3.0
%endif
@@ -537,8 +538,8 @@ rm -rf $RPM_BUILD_ROOT
# exist on s390x where swrast is llvmpipe, but does exist on s390 where
# swrast is classic mesa. this seems like a bug? in that it probably
# means the gallium drivers are linking dricore statically? fixme.
-%{_libdir}/dri/swrast_dri.so
%if 0%{?with_llvm}
+%{_libdir}/dri/swrast_dri.so
%{_libdir}/dri/kms_swrast_dri.so
@@ -341,8 +342,8 @@ grep -q ^/ src/gallium/auxiliary/vl/vl_decoder.c && exit 1
%patch21 -p1 -b .glpc

%if 0%{with_private_llvm}
-sed -i 's/\[llvm-config\]/\[llvm-private-config-%{__isa_bits}\]/g' configure.ac
-sed -i 's/`$LLVM_CONFIG --version`/$LLVM_VERSION_MAJOR.$LLVM_VERSION_MINOR-rhel/' configure.ac
+sed -i 's/\[llvm-config\]/\[mesa-private-llvm-config-%{__isa_bits}\]/g' configure.ac
+sed -i 's/`$LLVM_CONFIG --version`/$LLVM_VERSION_MAJOR.$LLVM_VERSION_MINOR-mesa/' configure.ac
%endif

# need to use libdrm_nouveau2 on F17
@@ -394,7 +395,7 @@ export CXXFLAGS="$RPM_OPT_FLAGS -fno-rtti -fno-exceptions"
--enable-dri \
%if %{with_hardware}
%{?with_vmware:--enable-xa} \
- --with-gallium-drivers=%{?with_vmware:svga,}%{?with_radeonsi:radeonsi,}%{?with_llvm:swrast,r600,r300,}%{?with_freedreno:freedreno,}nouveau,virgl \
+ --with-gallium-drivers=%{?with_vmware:svga,}%{?with_radeonsi:radeonsi,}%{?with_llvm:swrast,r300,}%{?with_freedreno:freedreno,}nouveau,virgl \
%else
--with-gallium-drivers=%{?with_llvm:swrast} \
%endif
@@ -514,7 +515,7 @@ rm -rf $RPM_BUILD_ROOT
%endif
%if 0%{?with_llvm}
%{_libdir}/dri/r300_dri.so
-%{_libdir}/dri/r600_dri.so
+#%{_libdir}/dri/r600_dri.so
%if 0%{?with_radeonsi}
%{_libdir}/dri/radeonsi_dri.so
%endif
@@ -548,8 +549,8 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root,-)
%{_libdir}/vdpau/libvdpau_nouveau.so.1*
%if 0%{?with_llvm}
-%{_libdir}/vdpau/libvdpau_r600.so.1*
-%{_libdir}/vdpau/libvdpau_radeonsi.so.1*
+#%{_libdir}/vdpau/libvdpau_r600.so.1*
+#%{_libdir}/vdpau/libvdpau_radeonsi.so.1*
%endif
%endif
%endif
@@ -664,6 +665,9 @@ rm -rf $RPM_BUILD_ROOT
%endif

Expand Down
18 changes: 9 additions & 9 deletions mesa/SPECS/mesa.spec
Expand Up @@ -18,7 +18,7 @@
# S390 doesn't have video cards, but we need swrast for xserver's GLX
# llvm (and thus llvmpipe) doesn't actually work on ppc32 or s390

%ifnarch s390 ppc %{arm}
%ifnarch s390 ppc
%define with_llvm 1
%endif

Expand Down Expand Up @@ -61,7 +61,7 @@
Summary: Mesa graphics libraries
Name: mesa
Version: 18.0.5
Release: 4%{?dist}.redsleeve
Release: 4%{?dist}.redsleeve.1
License: MIT
Group: System Environment/Libraries
URL: http://www.mesa3d.org
Expand Down Expand Up @@ -342,8 +342,8 @@ grep -q ^/ src/gallium/auxiliary/vl/vl_decoder.c && exit 1
%patch21 -p1 -b .glpc

%if 0%{with_private_llvm}
sed -i 's/\[llvm-config\]/\[llvm-private-config-%{__isa_bits}\]/g' configure.ac
sed -i 's/`$LLVM_CONFIG --version`/$LLVM_VERSION_MAJOR.$LLVM_VERSION_MINOR-rhel/' configure.ac
sed -i 's/\[llvm-config\]/\[mesa-private-llvm-config-%{__isa_bits}\]/g' configure.ac
sed -i 's/`$LLVM_CONFIG --version`/$LLVM_VERSION_MAJOR.$LLVM_VERSION_MINOR-mesa/' configure.ac
%endif

# need to use libdrm_nouveau2 on F17
Expand Down Expand Up @@ -395,7 +395,7 @@ export CXXFLAGS="$RPM_OPT_FLAGS -fno-rtti -fno-exceptions"
--enable-dri \
%if %{with_hardware}
%{?with_vmware:--enable-xa} \
--with-gallium-drivers=%{?with_vmware:svga,}%{?with_radeonsi:radeonsi,}%{?with_llvm:swrast,r600,r300,}%{?with_freedreno:freedreno,}nouveau,virgl \
--with-gallium-drivers=%{?with_vmware:svga,}%{?with_radeonsi:radeonsi,}%{?with_llvm:swrast,r300,}%{?with_freedreno:freedreno,}nouveau,virgl \
%else
--with-gallium-drivers=%{?with_llvm:swrast} \
%endif
Expand Down Expand Up @@ -515,7 +515,7 @@ rm -rf $RPM_BUILD_ROOT
%endif
%if 0%{?with_llvm}
%{_libdir}/dri/r300_dri.so
%{_libdir}/dri/r600_dri.so
#%{_libdir}/dri/r600_dri.so
%if 0%{?with_radeonsi}
%{_libdir}/dri/radeonsi_dri.so
%endif
Expand All @@ -538,8 +538,8 @@ rm -rf $RPM_BUILD_ROOT
# exist on s390x where swrast is llvmpipe, but does exist on s390 where
# swrast is classic mesa. this seems like a bug? in that it probably
# means the gallium drivers are linking dricore statically? fixme.
%if 0%{?with_llvm}
%{_libdir}/dri/swrast_dri.so
%if 0%{?with_llvm}
%{_libdir}/dri/kms_swrast_dri.so
%endif

Expand All @@ -549,8 +549,8 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root,-)
%{_libdir}/vdpau/libvdpau_nouveau.so.1*
%if 0%{?with_llvm}
%{_libdir}/vdpau/libvdpau_r600.so.1*
%{_libdir}/vdpau/libvdpau_radeonsi.so.1*
#%{_libdir}/vdpau/libvdpau_r600.so.1*
#%{_libdir}/vdpau/libvdpau_radeonsi.so.1*
%endif
%endif
%endif
Expand Down

0 comments on commit 4a5cd11

Please sign in to comment.