Guest User

mesa.spec - Sailfish OS

a guest
Sep 28th, 2016
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.09 KB | None | 0 0
  1. # Conditional building of X11 related things
  2. %bcond_with X11
  3. %define mesa_version 12.0.1
  4.  
  5. Name: mesa
  6.  
  7. Summary: Mesa graphics libraries
  8. Version: 12.0.1
  9. Release: 1.3.13
  10. Group: System/Libraries
  11. License: MIT
  12. URL: http://www.mesa3d.org/
  13. Source0: %{name}-%{version}.tar.gz
  14. Source1: mesa-rpmlintrc
  15. Patch0: eglplatform_no_x11.patch
  16.  
  17. %if %{with X11}
  18. BuildRequires: pkgconfig(glproto)
  19. BuildRequires: pkgconfig(dri2proto) >= 1.1
  20. BuildRequires: pkgconfig(xproto)
  21. BuildRequires: pkgconfig(xxf86vm)
  22. BuildRequires: pkgconfig(xext)
  23. BuildRequires: pkgconfig(xfixes)
  24. BuildRequires: pkgconfig(xdamage)
  25. BuildRequires: pkgconfig(xi)
  26. BuildRequires: pkgconfig(xmu)
  27. BuildRequires: makedepend
  28. %endif
  29. BuildRequires: pkgconfig(libdrm) >= 2.4.70
  30. BuildRequires: pkgconfig(libxml-2.0)
  31. BuildRequires: pkgconfig(talloc)
  32. BuildRequires: pkgconfig(libudev) >= 160
  33. BuildRequires: pkgconfig(wayland-client)
  34. BuildRequires: pkgconfig(wayland-server)
  35. BuildRequires: pkgconfig autoconf automake
  36. BuildRequires: expat-devel >= 2.0
  37. BuildRequires: python
  38. BuildRequires: libxml2-python
  39. BuildRequires: bison
  40. BuildRequires: flex
  41. BuildRequires: llvm-devel
  42. BuildRequires: gettext
  43.  
  44. %description
  45. Mesa is an open-source implementation of the OpenGL specification -
  46. a system for rendering interactive 3D graphics.
  47.  
  48.  
  49. %package libglapi
  50. Summary: Mesa shared gl api library
  51. Group: System/Libraries
  52. Requires: %{name} = %{version}-%{release}
  53. Requires(post): /sbin/ldconfig
  54. Requires(postun): /sbin/ldconfig
  55.  
  56. %description libglapi
  57. Mesa shared gl api library.
  58.  
  59. %package libGLESv1
  60. Summary: Mesa libGLESv1 runtime libraries
  61. Group: System/Libraries
  62. Requires: %{name} = %{version}-%{release}
  63. Requires(post): /sbin/ldconfig
  64. Requires(postun): /sbin/ldconfig
  65. Provides: libGLESv1 = %{version}-%{release}
  66.  
  67. %description libGLESv1
  68. Mesa libGLESv1 runtime library.
  69.  
  70. %package libGLESv2
  71. Summary: Mesa libGLESv2 runtime libraries
  72. Group: System/Libraries
  73. Requires: %{name} = %{version}-%{release}
  74. Requires(post): /sbin/ldconfig
  75. Requires(postun): /sbin/ldconfig
  76. Provides: libGLESv2 = %{version}-%{release}
  77.  
  78. %description libGLESv2
  79. Mesa libGLESv2 runtime library.
  80.  
  81. %package libGLESv2-compat
  82. Summary: Mesa libGLESv2 runtime compatibility library
  83. Group: System/Libraries
  84. Requires: %{name} = %{version}-%{release}
  85. Requires: libGLESv2.so.2
  86. Requires(post): /sbin/ldconfig
  87. Requires(postun): /sbin/ldconfig
  88. Provides: libGLESv2.so
  89.  
  90. %description libGLESv2-compat
  91. Mesa libGLESv2 runtime compatibility library.
  92.  
  93. %package libEGL
  94. Summary: Mesa libEGL runtime libraries and DRI drivers
  95. Group: System/Libraries
  96. Requires: %{name} = %{version}-%{release}
  97. Requires(post): /sbin/ldconfig
  98. Requires(postun): /sbin/ldconfig
  99. Provides: libEGL = %{version}-%{release}
  100.  
  101. %description libEGL
  102. Mesa libEGL runtime library.
  103.  
  104. %package libEGL-compat
  105. Summary: Mesa libEGL runtime compatibility library
  106. Group: System/Libraries
  107. Requires: %{name} = %{version}-%{release}
  108. Requires: libEGL.so.1
  109. Requires(post): /sbin/ldconfig
  110. Requires(postun): /sbin/ldconfig
  111. Provides: libEGL.so
  112.  
  113. %description libEGL-compat
  114. Mesa libEGL runtime compatibility library.
  115.  
  116. %package libglapi-devel
  117. Summary: Mesa libglapi development package
  118. Group: System/Libraries
  119. Requires: %{name} = %{version}-%{release}
  120. Requires: mesa-libglapi = %{version}-%{release}
  121. Provides: libglapi-devel
  122.  
  123. %description libglapi-devel
  124. Mesa libglapi development package.
  125.  
  126. %package libGLESv1-devel
  127. Summary: Mesa libGLESv1 development package
  128. Group: Development/Libraries
  129. Requires: %{name} = %{version}-%{release}
  130. Requires: mesa-libGLESv1 = %{version}-%{release}
  131. Provides: libGLESv1-devel
  132.  
  133. %description libGLESv1-devel
  134. Mesa libGLESv1 development packages
  135.  
  136. %package libGLESv2-devel
  137. Summary: Mesa libGLESv2 development package
  138. Group: Development/Libraries
  139. Requires: %{name} = %{version}-%{release}
  140. Requires: mesa-libGLESv2 = %{version}-%{release}
  141. Provides: libGLESv2-devel
  142. Obsoletes: mesa-libGLESv2-compat
  143.  
  144. %description libGLESv2-devel
  145. Mesa libGLESv2 development packages
  146.  
  147. %package libEGL-devel
  148. Summary: Mesa libEGL development package
  149. Group: Development/Libraries
  150. Requires: %{name} = %{version}-%{release}
  151. Requires: mesa-libEGL = %{version}-%{release}
  152. Provides: libEGL-devel
  153. Obsoletes: mesa-libEGL-compat
  154.  
  155. %description libEGL-devel
  156. Mesa libEGL development packages
  157.  
  158. %if %{with X11}
  159. %package libGL
  160. Summary: Mesa libGL runtime libraries and DRI drivers
  161. Group: System/Libraries
  162. Requires: %{name} = %{version}-%{release}
  163. Requires(post): /sbin/ldconfig
  164. Requires(postun): /sbin/ldconfig
  165. Provides: libGL = %{version}-%{release}
  166.  
  167. %description libGL
  168. Mesa libGL runtime library.
  169. %endif
  170.  
  171. %package libGL-devel
  172. Summary: Mesa libGL development package
  173. Group: Development/Libraries
  174. Requires: %{name} = %{version}-%{release}
  175. Requires: mesa-libGL = %{version}-%{release}
  176. %if %{with X11}
  177. Requires: libX11-devel
  178. %endif
  179. Provides: libGL-devel
  180.  
  181. %description libGL-devel
  182. Mesa libGL development packages
  183.  
  184. %package dri-drivers-devel
  185. Summary: Mesa-based DRI development files
  186. Group: Development/Libraries
  187. Requires: %{name} = %{version}-%{release}
  188.  
  189. %description dri-drivers-devel
  190. Mesa-based DRI driver development files.
  191.  
  192. %package dri-swrast-driver
  193. Summary: Mesa-based DRI drivers
  194. Group: Graphics/Display and Graphics Adaptation
  195. Requires: %{name} = %{version}-%{release}
  196. Requires(post): /sbin/ldconfig
  197. Requires(postun): /sbin/ldconfig
  198. Provides: mesa-dri-drivers = %{version}-%{release}
  199.  
  200. %description dri-swrast-driver
  201. Mesa-based swrast DRI driver.
  202.  
  203. %package libwayland-egl-devel
  204. Summary: Mesa libwayland-egl development package
  205. Group: Development/Libraries
  206. Requires: %{name} = %{version}-%{release}
  207. Requires: mesa-libwayland-egl = %{version}-%{release}
  208. Provides: libwayland-egl-devel
  209.  
  210. %description libwayland-egl-devel
  211. Mesa libwayland-egl development packages
  212.  
  213. %package libwayland-egl
  214. Summary: Mesa libwayland-egl runtime library
  215. Group: System/Libraries
  216. Requires: %{name} = %{version}-%{release}
  217. Requires(post): /sbin/ldconfig
  218. Requires(postun): /sbin/ldconfig
  219.  
  220. %description libwayland-egl
  221. Mesa libwayland-egl runtime libraries
  222.  
  223.  
  224. %package dri-intel-driver
  225. Summary: Mesa-based DRI drivers
  226. Group: Graphics/Display and Graphics Adaptation
  227. Requires: %{name} = %{version}-%{release}
  228. Requires(post): /sbin/ldconfig
  229. Requires(postun): /sbin/ldconfig
  230. Provides: mesa-dri-drivers = %{version}-%{release}
  231.  
  232. %description dri-intel-driver
  233. Mesa-based intel DRI driver.
  234.  
  235. %package libgbm-devel
  236. Summary: Mesa libgbm development package
  237. Group: Development/Libraries
  238. Requires: %{name} = %{version}-%{release}
  239. Requires: mesa-libwayland-egl = %{version}-%{release}
  240. Provides: libgbm-devel
  241.  
  242. %description libgbm-devel
  243. Mesa libgbm development packages
  244.  
  245. %package libgbm
  246. Summary: Mesa libgbm runtime library
  247. Group: System/Libraries
  248. Requires: %{name} = %{version}-%{release}
  249. Requires(post): /sbin/ldconfig
  250. Requires(postun): /sbin/ldconfig
  251.  
  252. %description libgbm
  253. Mesa libgbm runtime libraries
  254.  
  255.  
  256. %prep
  257. %setup -q -n %{name}-%{version}
  258.  
  259. %if ! %{with X11}
  260. # eglplatform_no_x11.patch
  261. #patch0 -p1
  262. %endif
  263.  
  264. %build
  265. ./configure --disable-static \
  266. --prefix=/usr \
  267. --libdir=/usr/lib \
  268. --enable-dri \
  269. --disable-osmesa \
  270. --with-dri-drivers=i915,i965,swrast \
  271. --with-gallium-drivers="" \
  272. %if %{with X11}
  273. --with-egl-platforms=x11,drm,wayland \
  274. --with-x \
  275. --enable-glx-tls \
  276. --enable-glx=yes \
  277. %else
  278. --with-egl-platforms=drm,wayland \
  279. --disable-glx \
  280. --disable-xlib-glx \
  281. --enable-dri3=no \
  282. %endif
  283. --enable-gbm \
  284. --enable-egl \
  285. --enable-gles1 \
  286. --enable-gles2 \
  287. --enable-shared-glapi
  288.  
  289. make %{?jobs:-j%jobs}
  290.  
  291. %install
  292. rm -rf %{buildroot}
  293. %make_install
  294.  
  295. # strip out undesirable headers
  296. rm -f $RPM_BUILD_ROOT/usr/etc/drirc
  297. pushd $RPM_BUILD_ROOT%{_includedir}/GL
  298. #rm [a-fh-np-wyz]*.h
  299. #rm osmesa.h
  300. popd
  301.  
  302. %post libglapi -p /sbin/ldconfig
  303.  
  304. %postun libglapi -p /sbin/ldconfig
  305.  
  306. %post libGLESv1 -p /sbin/ldconfig
  307.  
  308. %postun libGLESv1 -p /sbin/ldconfig
  309.  
  310. %post libGLESv2 -p /sbin/ldconfig
  311.  
  312. %postun libGLESv2 -p /sbin/ldconfig
  313.  
  314. %post libGLESv2-compat -p /sbin/ldconfig
  315.  
  316. %postun libGLESv2-compat -p /sbin/ldconfig
  317.  
  318. %post libEGL -p /sbin/ldconfig
  319.  
  320. %postun libEGL -p /sbin/ldconfig
  321.  
  322. %post libEGL-compat -p /sbin/ldconfig
  323.  
  324. %postun libEGL-compat -p /sbin/ldconfig
  325.  
  326. %if %{with X11}
  327. %post libGL -p /sbin/ldconfig
  328.  
  329. %postun libGL -p /sbin/ldconfig
  330. %endif
  331.  
  332. %post dri-swrast-driver -p /sbin/ldconfig
  333.  
  334. %postun dri-swrast-driver -p /sbin/ldconfig
  335.  
  336. %post libwayland-egl -p /sbin/ldconfig
  337.  
  338. %postun libwayland-egl -p /sbin/ldconfig
  339.  
  340. %files
  341. %defattr(-,root,root,-)
  342. #%{_libdir}/egl/egl_gallium.so
  343.  
  344. %files libglapi
  345. %defattr(-,root,root,-)
  346. %{_libdir}/libglapi.so.0
  347. %{_libdir}/libglapi.so.0.*
  348.  
  349. %files libGLESv1
  350. %defattr(-,root,root,-)
  351. %{_libdir}/libGLESv1_CM.so.1
  352. %{_libdir}/libGLESv1_CM.so.1.1.0
  353.  
  354. %files libGLESv2
  355. %defattr(-,root,root,-)
  356. %{_libdir}/libGLESv2.so.2
  357. %{_libdir}/libGLESv2.so.2.0.0
  358.  
  359. %files libGLESv2-compat
  360. %defattr(-,root,root,-)
  361. %{_libdir}/libGLESv2.so
  362.  
  363. %files libEGL
  364. %defattr(-,root,root,-)
  365. %{_libdir}/libEGL.so.1
  366. %{_libdir}/libEGL.so.1.0.0
  367.  
  368. %files libEGL-compat
  369. %defattr(-,root,root,-)
  370. %{_libdir}/libEGL.so
  371.  
  372. %files libglapi-devel
  373. %defattr(-,root,root,-)
  374. %{_libdir}/libglapi.so
  375.  
  376. %files libGLESv1-devel
  377. %defattr(-,root,root,-)
  378. %{_libdir}/libGLESv1_CM.so
  379. %{_includedir}/GLES/egl.h
  380. %{_includedir}/GLES/gl.h
  381. %{_includedir}/GLES/glext.h
  382. %{_includedir}/GLES/glplatform.h
  383. %{_libdir}/pkgconfig/glesv1_cm.pc
  384.  
  385. %files libGLESv2-devel
  386. %defattr(-,root,root,-)
  387. %{_libdir}/libGLESv2.so
  388. %{_includedir}/GLES2/gl2.h
  389. %{_includedir}/GLES2/gl2ext.h
  390. %{_includedir}/GLES2/gl2platform.h
  391. %{_includedir}/GLES3/gl3.h
  392. %{_includedir}/GLES3/gl31.h
  393. %{_includedir}/GLES3/gl3ext.h
  394. %{_includedir}/GLES3/gl3platform.h
  395. %{_libdir}/pkgconfig/glesv2.pc
  396.  
  397. %files libEGL-devel
  398. %defattr(-,root,root,-)
  399. %{_libdir}/libEGL.so
  400. %dir %{_includedir}/EGL
  401. %{_includedir}/EGL/egl.h
  402. %{_includedir}/EGL/eglext.h
  403. %{_includedir}/EGL/eglextchromium.h
  404. %{_includedir}/EGL/eglplatform.h
  405. %{_includedir}/EGL/eglmesaext.h
  406. %dir %{_includedir}/KHR
  407. %{_includedir}/KHR/khrplatform.h
  408. %{_libdir}/pkgconfig/egl.pc
  409.  
  410. %if %{with X11}
  411. %files libGL
  412. %defattr(-,root,root,-)
  413. %{_libdir}/libGL.so.*
  414. %endif
  415.  
  416. %files libGL-devel
  417. %defattr(-,root,root,-)
  418. %if %{with X11}
  419. %{_includedir}/GL/gl.h
  420. %{_includedir}/GL/glcorearb.h
  421. %{_includedir}/GL/gl_mangle.h
  422. %{_includedir}/GL/glext.h
  423. %{_includedir}/GL/glx.h
  424. %{_includedir}/GL/glx_mangle.h
  425. %{_includedir}/GL/glxext.h
  426. %{_libdir}/pkgconfig/gl.pc
  427. %{_libdir}/libGL.so
  428. %endif
  429. %dir %{_includedir}/GL/internal
  430. %{_includedir}/GL/internal/dri_interface.h
  431.  
  432. %files dri-drivers-devel
  433. %defattr(-,root,root,-)
  434. #%{_libdir}/libdricore%{mesa_version}.so
  435. %{_libdir}/pkgconfig/dri.pc
  436.  
  437. %files dri-swrast-driver
  438. %defattr(-,root,root,-)
  439. #%{_libdir}/libdricore%{mesa_version}.so.*
  440. %{_libdir}/dri/swrast_dri.so
  441.  
  442. %files dri-intel-driver
  443. %defattr(-,root,root,-)
  444. #%{_libdir}/libdricore%{mesa_version}.so.*
  445. %{_libdir}/dri/i915_dri.so
  446. %{_libdir}/dri/i965_dri.so
  447.  
  448. %files libwayland-egl-devel
  449. %defattr(-,root,root,-)
  450. %{_libdir}/libwayland-egl.so
  451. %{_libdir}/pkgconfig/wayland-egl.pc
  452.  
  453. %files libwayland-egl
  454. %defattr(-,root,root,-)
  455. %{_libdir}/libwayland-egl.so.1
  456. %{_libdir}/libwayland-egl.so.1.*
  457.  
  458. %files libgbm
  459. %defattr(-,root,root,-)
  460. %{_libdir}/libgbm.so.*
  461.  
  462. %files libgbm-devel
  463. %defattr(-,root,root,-)
  464. %{_includedir}/gbm.h
  465. %{_libdir}/libgbm.so
  466. %{_libdir}/pkgconfig/gbm.pc
  467.  
  468. %changelog
  469. * Fri Sep 5 2014 Carsten Munk <[email protected]> - 9.2.5+git2
  470. - [mesa] disable avx support - JB#18552
  471. - [mesa] mesa package doesn't build with bcond X11 due to missing post/postun. Fixes: JB#22690
  472. * Thu Jan 2 2014 Islam Amer <[email protected]> - 9.2.5+git1
  473. - [packaging] import mer packaging
  474. - [packaging] use %%autogen to build from git and fixup for subtree build
  475. * Sat May 4 2013 Carsten Munk <[email protected]> - 9.0.3
  476. - Upgrade to 9.0.3
  477. * Wed Feb 13 2013 Carsten Munk <[email protected]> - 9.0.2
  478. - Upgrade to 9.0.2
  479. - Forcibly disable SSE4.1/AVX usage due to VirtualBox bugginess
  480. * Tue Jan 22 2013 Carsten Munk <[email protected]> - 9.0.1
  481. - Upgrade to 9.0.1
  482. - Add patch to fix wayland-shm roundtrip
  483. * Thu Jan 17 2013 Carsten Munk <[email protected]> - 8.0.3
  484. - Fix e-mail in changelog
  485. - Utilize shared glapi, caused problems without.
  486. * Thu Nov 8 2012 Carsten Munk <[email protected]> - 8.0.3
  487. - Upgrade to 8.0.5, add patches for LLVM 3.1 and Wayland 0.85
  488. * Mon Jul 2 2012 Marko Saukko <[email protected]> - 8.0.3
  489. - Fixes MER#356: update mesa to 8.0.3; obsolete URL, etc.
  490. * Wed Mar 14 2012 Carsten Munk <[email protected]> - 8.0.1
  491. - Fix changelog
  492. - Rename to mesa
  493. * Thu Feb 16 2012 Carsten Munk <[email protected]> - 8.0.1
  494. - Upgrade to Mesa 8.0.1, switch to llvmpipe as default (MER#12)
  495. * Fri Oct 14 2011 Carsten Munk <[email protected]> - 7.11
  496. - Remove timestamp that caused unneeded rebuilds
Advertisement
Add Comment
Please, Sign In to add comment