libglvnd-vl.spec 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. %bcond_without mesa_glvnd_default
  2. Name: libglvnd
  3. Version: 1.3.2
  4. Release: 1%{?_dist_release}
  5. Summary: The GL Vendor-Neutral Dispatch library
  6. Group: system
  7. Distribution: Vine Linux
  8. Vendor: Project Vine
  9. License: MIT
  10. URL: https://github.com/NVIDIA/libglvnd
  11. Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
  12. Source1000: ChangeLog.fedora
  13. Patch0: libglvnd-python3.patch
  14. Patch1: 0001-glx-Add-another-fallback-library-name.patch
  15. BuildRequires: make
  16. BuildRequires: libtool
  17. BuildRequires: gcc
  18. BuildRequires: python3-rpm-macros
  19. BuildRequires: python3-libxml2
  20. BuildRequires: pkgconfig(glproto)
  21. BuildRequires: pkgconfig(x11)
  22. BuildRequires: pkgconfig(xext)
  23. # for tests
  24. BuildRequires: xorg-x11-server-Xvfb
  25. BuildRequires: xorg-x11-xauth
  26. BuildRequires: xorg-x11-xkb-utils
  27. BuildRequires: xkeyboard-config
  28. %if %{without mesa_glvnd_default}
  29. %global _without_mesa_glvnd_default 1
  30. %endif
  31. %{?_without_mesa_glvnd_default:
  32. %global __provides_exclude_from %{_libdir}/%{name}
  33. %global __requires_exclude_from %{_libdir}/%{name}
  34. }
  35. %description
  36. libglvnd is an implementation of the vendor-neutral dispatch layer for
  37. arbitrating OpenGL API calls between multiple vendors on a per-screen basis.
  38. %package devel
  39. Summary: Development files for %{name}
  40. Group: programming
  41. Requires: %{name}%{?_isa} = %{version}-%{release}
  42. Requires: %{name}-opengl%{?_isa} = %{version}-%{release}
  43. Requires: %{name}-gles%{?_isa} = %{version}-%{release}
  44. Requires: %{name}-glx%{?_isa} = %{version}-%{release}
  45. Requires: %{name}-egl%{?_isa} = %{version}-%{release}
  46. Requires: %{name}-core-devel%{?_isa} = %{version}-%{release}
  47. # Required by any glx.h users.
  48. Requires: libX11-devel%{?_isa}
  49. # We might split into more sub-packages
  50. Obsoletes: mesa-libGLES-devel < 21.0.0
  51. Provides: mesa-libGLES-devel = %{version}-%{release}
  52. Provides: mesa-libGLES-devel%{?_isa} = %{version}-%{release}
  53. Provides: mesa-khr-devel = %{version}-%{release}
  54. Provides: mesa-khr-devel%{?_isa} = %{version}-%{release}
  55. Provides: libGLES-devel = %{version}-%{release}
  56. Provides: libGLES-devel%{?_isa} = %{version}-%{release}
  57. %description devel
  58. The %{name}-devel package contains libraries and header files for
  59. developing applications that use %{name}.
  60. %package core-devel
  61. Summary: Core development files for %{name}
  62. Group: programming
  63. %description core-devel
  64. The %{name}-core-devel package is a bootstrap trick for Mesa, which wants
  65. to build against the %{name} headers but does not link against any of
  66. its libraries (and, initially, has file conflicts with them). If you are
  67. not Mesa you almost certainly want %{name}-devel instead.
  68. %package opengl
  69. Summary: OpenGL support for libglvnd
  70. Group: system
  71. Requires: %{name}%{?_isa} = %{version}-%{release}
  72. %description opengl
  73. libOpenGL is the common dispatch interface for the workstation OpenGL API.
  74. %package gles
  75. Summary: GLES support for libglvnd
  76. Group: system
  77. Requires: %{name}%{?_isa} = %{version}-%{release}
  78. %{!?_without_mesa_glvnd_default:
  79. # mesa is the default EGL implementation provider
  80. Requires: mesa-libEGL%{?_isa} > 21.0.0
  81. Obsoletes: mesa-libGLES < 21.0.0
  82. Provides: mesa-libGLES
  83. Provides: mesa-libGLES%{?_isa}
  84. Provides: libGLES
  85. Provides: libGLES%{?_isa}
  86. }
  87. %description gles
  88. libGLESv[12] are the common dispatch interface for the GLES API.
  89. %package egl
  90. Summary: EGL support for libglvnd
  91. Group: system
  92. Requires: %{name}%{?_isa} = %{version}-%{release}
  93. %{!?_without_mesa_glvnd_default:
  94. # mesa is the default EGL implementation provider
  95. Requires: mesa-libEGL%{?_isa} > 21.0.0
  96. Provides: libEGL
  97. Provides: libEGL%{?_isa}
  98. }
  99. %description egl
  100. libEGL are the common dispatch interface for the EGL API.
  101. %package glx
  102. Summary: GLX support for libglvnd
  103. Group: system
  104. Requires: %{name}%{?_isa} = %{version}-%{release}
  105. %{!?_without_mesa_glvnd_default:
  106. # mesa is the default GL implementation provider
  107. Requires: mesa-libGL%{?_isa} > 21.0.0
  108. Provides: libGL
  109. Provides: libGL%{?_isa}
  110. }
  111. %description glx
  112. libGL and libGLX are the common dispatch interface for the GLX API.
  113. %debug_package
  114. %prep
  115. %autosetup -p1 -n %{name}-%{version}
  116. autoreconf -vif
  117. %build
  118. export PYTHON=%{__python3}
  119. #Prefer asm and tls for x86* and ppc64*
  120. #armhfp and aarch64 fallback to asm and tsd
  121. #Others arches fallback to pure-c and tls.
  122. %configure \
  123. --disable-static \
  124. --enable-asm \
  125. --enable-tls
  126. %make_build V=1
  127. %install
  128. %make_install INSTALL="install -p"
  129. find %{buildroot} -name '*.la' -delete
  130. %{?_without_mesa_glvnd_default:
  131. # Avoid conflict with mesa-libGL
  132. mkdir -p %{buildroot}%{_libdir}/%{name}/
  133. for l in libEGL libGL libGLESv1_CM libGLESv2 libGLX; do
  134. mv %{buildroot}%{_libdir}/${l}.so* \
  135. %{buildroot}%{_libdir}/%{name}/
  136. done
  137. }
  138. # Create directory layout
  139. mkdir -p %{buildroot}%{_sysconfdir}/glvnd/egl_vendor.d/
  140. mkdir -p %{buildroot}%{_datadir}/glvnd/egl_vendor.d/
  141. mkdir -p %{buildroot}%{_sysconfdir}/egl/egl_external_platform.d/
  142. mkdir -p %{buildroot}%{_datadir}/egl/egl_external_platform.d/
  143. cp -pf %{SOURCE1000} ./
  144. %check
  145. export DO_X11_TESTS=1
  146. xvfb-run -e xvfb-error.log -s '-screen 0 640x480x24' -d make check V=1 || \
  147. %ifarch s390x ppc64
  148. :
  149. %else
  150. if [ `find . -name test-suite.log | wc --lines` -gt 0 ]; then
  151. (cat `find . -name test-suite.log` ; exit 1)
  152. else
  153. if [ -f xvfb-error.log ]; then
  154. cat xvfb-error.log
  155. else
  156. echo "unknown error occured."
  157. fi
  158. exit 1
  159. fi
  160. %endif
  161. %files
  162. %doc README.md ChangeLog.fedora
  163. %dir %{_sysconfdir}/glvnd/
  164. %dir %{_datadir}/glvnd/
  165. %{_libdir}/libGLdispatch.so.0*
  166. %ldconfig_scriptlets opengl
  167. %files opengl
  168. %{_libdir}/libOpenGL.so.0*
  169. %ldconfig_scriptlets gles
  170. %files gles
  171. %if 0%{?_without_mesa_glvnd_default}
  172. %{_libdir}/%{name}/libGLES*.so.*
  173. %else
  174. %{_libdir}/libGLES*.so.*
  175. %endif
  176. %files glx
  177. %if 0%{?_without_mesa_glvnd_default}
  178. %{_libdir}/%{name}/libGL.so.*
  179. %{_libdir}/%{name}/libGLX.so.*
  180. %else
  181. %{_libdir}/libGL.so.*
  182. %{_libdir}/libGLX.so.*
  183. %endif
  184. %files egl
  185. %dir %{_sysconfdir}/glvnd/egl_vendor.d/
  186. %dir %{_datadir}/glvnd/egl_vendor.d/
  187. %dir %{_sysconfdir}/egl/
  188. %dir %{_sysconfdir}/egl/egl_external_platform.d/
  189. %dir %{_datadir}/egl/
  190. %dir %{_datadir}/egl/egl_external_platform.d/
  191. %if 0%{?_without_mesa_glvnd_default}
  192. %{_libdir}/%{name}/libEGL*.so.*
  193. %else
  194. %{_libdir}/libEGL*.so.*
  195. %endif
  196. %files core-devel
  197. %dir %{_includedir}/glvnd/
  198. %{_includedir}/glvnd/*.h
  199. %{_libdir}/pkgconfig/libglvnd.pc
  200. %files devel
  201. %dir %{_includedir}/EGL/
  202. %dir %{_includedir}/GL/
  203. %dir %{_includedir}/GLES/
  204. %dir %{_includedir}/GLES2/
  205. %dir %{_includedir}/GLES3/
  206. %dir %{_includedir}/KHR/
  207. %{_includedir}/EGL/*.h
  208. %{_includedir}/GL/*.h
  209. %{_includedir}/GLES/*.h
  210. %{_includedir}/GLES2/*.h
  211. %{_includedir}/GLES3/*.h
  212. %{_includedir}/KHR/*.h
  213. %{_libdir}/lib*.so
  214. %if 0%{?_without_mesa_glvnd_default}
  215. %{_libdir}/%{name}/lib*.so
  216. %endif
  217. %{_libdir}/pkgconfig/gl*.pc
  218. %{_libdir}/pkgconfig/egl.pc
  219. %{_libdir}/pkgconfig/opengl.pc
  220. %changelog
  221. * Sat Mar 27 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.3.2-1
  222. - initial build for Vine Linux.
  223. - moved Fedora's %%changelog to ChangeLog.fedora.