libglvnd-vl.spec 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. %bcond_without mesa_glvnd_default
  2. Name: libglvnd
  3. Version: 1.3.2
  4. Release: 2%{?_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 = 21.0.0
  83. Provides: mesa-libGLES%{?_isa} = 21.0.0
  84. Provides: libGLES
  85. Provides: libGLES%{?_isa}
  86. # workaround for "apt-get dist-upgrade"
  87. Requires: mesa-libglapi%{?_isa} > 21.0.0
  88. }
  89. %description gles
  90. libGLESv[12] are the common dispatch interface for the GLES API.
  91. %package egl
  92. Summary: EGL support for libglvnd
  93. Group: system
  94. Requires: %{name}%{?_isa} = %{version}-%{release}
  95. %{!?_without_mesa_glvnd_default:
  96. # mesa is the default EGL implementation provider
  97. Requires: mesa-libEGL%{?_isa} > 21.0.0
  98. Provides: libEGL
  99. Provides: libEGL%{?_isa}
  100. }
  101. %description egl
  102. libEGL are the common dispatch interface for the EGL API.
  103. %package glx
  104. Summary: GLX support for libglvnd
  105. Group: system
  106. Requires: %{name}%{?_isa} = %{version}-%{release}
  107. %{!?_without_mesa_glvnd_default:
  108. # mesa is the default GL implementation provider
  109. Requires: mesa-libGL%{?_isa} > 21.0.0
  110. Provides: libGL
  111. Provides: libGL%{?_isa}
  112. }
  113. %description glx
  114. libGL and libGLX are the common dispatch interface for the GLX API.
  115. %debug_package
  116. %prep
  117. %autosetup -p1 -n %{name}-%{version}
  118. autoreconf -vif
  119. %build
  120. export PYTHON=%{__python3}
  121. #Prefer asm and tls for x86* and ppc64*
  122. #armhfp and aarch64 fallback to asm and tsd
  123. #Others arches fallback to pure-c and tls.
  124. %configure \
  125. --disable-static \
  126. --enable-asm \
  127. --enable-tls
  128. %make_build V=1
  129. %install
  130. %make_install INSTALL="install -p"
  131. find %{buildroot} -name '*.la' -delete
  132. %{?_without_mesa_glvnd_default:
  133. # Avoid conflict with mesa-libGL
  134. mkdir -p %{buildroot}%{_libdir}/%{name}/
  135. for l in libEGL libGL libGLESv1_CM libGLESv2 libGLX; do
  136. mv %{buildroot}%{_libdir}/${l}.so* \
  137. %{buildroot}%{_libdir}/%{name}/
  138. done
  139. }
  140. # Create directory layout
  141. mkdir -p %{buildroot}%{_sysconfdir}/glvnd/egl_vendor.d/
  142. mkdir -p %{buildroot}%{_datadir}/glvnd/egl_vendor.d/
  143. mkdir -p %{buildroot}%{_sysconfdir}/egl/egl_external_platform.d/
  144. mkdir -p %{buildroot}%{_datadir}/egl/egl_external_platform.d/
  145. cp -pf %{SOURCE1000} ./
  146. %check
  147. export DO_X11_TESTS=1
  148. xvfb-run -e xvfb-error.log -s '-screen 0 640x480x24' -d make check V=1 || \
  149. %ifarch s390x ppc64
  150. :
  151. %else
  152. if [ `find . -name test-suite.log | wc --lines` -gt 0 ]; then
  153. (cat `find . -name test-suite.log` ; exit 1)
  154. else
  155. if [ -f xvfb-error.log ]; then
  156. cat xvfb-error.log
  157. else
  158. echo "unknown error occured."
  159. fi
  160. exit 1
  161. fi
  162. %endif
  163. %files
  164. %doc README.md ChangeLog.fedora
  165. %dir %{_sysconfdir}/glvnd/
  166. %dir %{_datadir}/glvnd/
  167. %{_libdir}/libGLdispatch.so.0*
  168. %ldconfig_scriptlets opengl
  169. %files opengl
  170. %{_libdir}/libOpenGL.so.0*
  171. %ldconfig_scriptlets gles
  172. %files gles
  173. %if 0%{?_without_mesa_glvnd_default}
  174. %{_libdir}/%{name}/libGLES*.so.*
  175. %else
  176. %{_libdir}/libGLES*.so.*
  177. %endif
  178. %files glx
  179. %if 0%{?_without_mesa_glvnd_default}
  180. %{_libdir}/%{name}/libGL.so.*
  181. %{_libdir}/%{name}/libGLX.so.*
  182. %else
  183. %{_libdir}/libGL.so.*
  184. %{_libdir}/libGLX.so.*
  185. %endif
  186. %files egl
  187. %dir %{_sysconfdir}/glvnd/egl_vendor.d/
  188. %dir %{_datadir}/glvnd/egl_vendor.d/
  189. %dir %{_sysconfdir}/egl/
  190. %dir %{_sysconfdir}/egl/egl_external_platform.d/
  191. %dir %{_datadir}/egl/
  192. %dir %{_datadir}/egl/egl_external_platform.d/
  193. %if 0%{?_without_mesa_glvnd_default}
  194. %{_libdir}/%{name}/libEGL*.so.*
  195. %else
  196. %{_libdir}/libEGL*.so.*
  197. %endif
  198. %files core-devel
  199. %dir %{_includedir}/glvnd/
  200. %{_includedir}/glvnd/*.h
  201. %{_libdir}/pkgconfig/libglvnd.pc
  202. %files devel
  203. %dir %{_includedir}/EGL/
  204. %dir %{_includedir}/GL/
  205. %dir %{_includedir}/GLES/
  206. %dir %{_includedir}/GLES2/
  207. %dir %{_includedir}/GLES3/
  208. %dir %{_includedir}/KHR/
  209. %{_includedir}/EGL/*.h
  210. %{_includedir}/GL/*.h
  211. %{_includedir}/GLES/*.h
  212. %{_includedir}/GLES2/*.h
  213. %{_includedir}/GLES3/*.h
  214. %{_includedir}/KHR/*.h
  215. %{_libdir}/lib*.so
  216. %if 0%{?_without_mesa_glvnd_default}
  217. %{_libdir}/%{name}/lib*.so
  218. %endif
  219. %{_libdir}/pkgconfig/gl*.pc
  220. %{_libdir}/pkgconfig/egl.pc
  221. %{_libdir}/pkgconfig/opengl.pc
  222. %changelog
  223. * Sun Nov 21 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.3.2-2
  224. - fixed dependency.
  225. * Sat Mar 27 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.3.2-1
  226. - initial build for Vine Linux.
  227. - moved Fedora's %%changelog to ChangeLog.fedora.