Fix non-glvnd build

el9
leigh123linux 8 years ago
parent 37851596a2
commit 0ee3df7539

@ -159,11 +159,11 @@ which is generated during the build of main package.
%package libs %package libs
Summary: Libraries for %{name} Summary: Libraries for %{name}
Requires: libvdpau%{?_isa} >= 0.5 Requires: libvdpau%{?_isa} >= 0.5
%if 0%{?fedora} >= 25
Requires: libglvnd-egl%{?_isa} >= 0.2 Requires: libglvnd-egl%{?_isa} >= 0.2
Requires: libglvnd-gles%{?_isa} >= 0.2 Requires: libglvnd-gles%{?_isa} >= 0.2
Requires: libglvnd-glx%{?_isa} >= 0.2 Requires: libglvnd-glx%{?_isa} >= 0.2
Requires: libglvnd-opengl%{?_isa} >= 0.2 Requires: libglvnd-opengl%{?_isa} >= 0.2
%if 0%{?fedora} >= 25
Requires: egl-wayland%{?_isa} >= 1.0.0 Requires: egl-wayland%{?_isa} >= 1.0.0
Requires: mesa-libEGL%{?_isa} >= 13.0.3-3 Requires: mesa-libEGL%{?_isa} >= 13.0.3-3
Requires: mesa-libGL%{?_isa} >= 13.0.3-3 Requires: mesa-libGL%{?_isa} >= 13.0.3-3
@ -227,6 +227,16 @@ cp -a \
libnvidia-ptxjitcompiler.so.%{version} \ libnvidia-ptxjitcompiler.so.%{version} \
%{buildroot}%{_libdir}/ %{buildroot}%{_libdir}/
%if 0%{?rhel} || 0%{?fedora} == 24
mkdir -p %{buildroot}%{_nvidia_libdir}
cp -a \
libEGL.so.%{version} \
libGL.so.%{version} \
libGLdispatch.so.0 \
%{buildroot}%{_nvidia_libdir}/
ldconfig -vn %{buildroot}%{_nvidia_libdir}/
%endif
# Use the correct TLS implementation for x86_64/i686, already ok on ARM # Use the correct TLS implementation for x86_64/i686, already ok on ARM
# OpenCL is only available on x86_64/i686. # OpenCL is only available on x86_64/i686.
%ifarch x86_64 i686 %ifarch x86_64 i686
@ -259,7 +269,7 @@ ln -s %{_libdir}/libGLX_mesa.so.0 %{buildroot}%{_libdir}/libGLX_indirect.so.0
ln -s libGLX_nvidia.so.%{version} %{buildroot}%{_libdir}/libGLX_indirect.so.0 ln -s libGLX_nvidia.so.%{version} %{buildroot}%{_libdir}/libGLX_indirect.so.0
# ld.so.conf.d file # ld.so.conf.d file
install -m 0755 -d %{buildroot}%{_sysconfdir}/ld.so.conf.d/ install -m 0755 -d %{buildroot}%{_sysconfdir}/ld.so.conf.d/
echo -e "%{_nvidia_libdir} \n%{_glvnd_libdir} \n" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/nvidia-%{_lib}.conf echo -e "%{_nvidia_libdir} \n" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/nvidia-%{_lib}.conf
%endif %endif
# X DDX driver and GLX extension # X DDX driver and GLX extension
@ -342,7 +352,7 @@ install -pm 0644 %{SOURCE5} %{buildroot}%{_datadir}/X11/xorg.conf.d
sed -i -e 's|@LIBDIR@|%{_libdir}|g' %{buildroot}%{_datadir}/X11/xorg.conf.d/99-nvidia.conf sed -i -e 's|@LIBDIR@|%{_libdir}|g' %{buildroot}%{_datadir}/X11/xorg.conf.d/99-nvidia.conf
touch -r %{SOURCE4} %{buildroot}%{_datadir}/X11/xorg.conf.d/99-nvidia.conf touch -r %{SOURCE4} %{buildroot}%{_datadir}/X11/xorg.conf.d/99-nvidia.conf
# back to non-glvnd version for vulkan # back to non-glvnd version for vulkan
#sed -i -e 's|libGLX_nvidia.so.0|libGL.so.1|' %{buildroot}%{_datadir}/vulkan/icd.d/nvidia_icd.%{_target_cpu}.json sed -i -e 's|libGLX_nvidia.so.0|libGL.so.1|' %{buildroot}%{_datadir}/vulkan/icd.d/nvidia_icd.%{_target_cpu}.json
touch -r nvidia_icd.json %{buildroot}%{_datadir}/vulkan/icd.d/nvidia_icd.%{_target_cpu}.json touch -r nvidia_icd.json %{buildroot}%{_datadir}/vulkan/icd.d/nvidia_icd.%{_target_cpu}.json
%endif %endif
#Ghost Xorg nvidia.conf files #Ghost Xorg nvidia.conf files
@ -526,6 +536,11 @@ fi ||:
%files libs %files libs
%if 0%{?rhel} || 0%{?fedora} == 24 %if 0%{?rhel} || 0%{?fedora} == 24
%config %{_sysconfdir}/ld.so.conf.d/nvidia-%{_lib}.conf %config %{_sysconfdir}/ld.so.conf.d/nvidia-%{_lib}.conf
%{_nvidia_libdir}/libEGL.so.1
%{_nvidia_libdir}/libEGL.so.%{version}
%{_nvidia_libdir}/libGL.so.1
%{_nvidia_libdir}/libGL.so.%{version}
%{_nvidia_libdir}/libGLdispatch.so.0
%endif %endif
%ifarch x86_64 i686 %ifarch x86_64 i686
%{_datadir}/vulkan/icd.d/nvidia_icd.%{_target_cpu}.json %{_datadir}/vulkan/icd.d/nvidia_icd.%{_target_cpu}.json

Loading…
Cancel
Save