libglvnd-vl.spec 7.5 KB

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