libglvnd-vl.spec 7.5 KB

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