SDL2.spec 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. %if 0%{?epel}
  2. %bcond_with wayland
  3. %else
  4. %bcond_without wayland
  5. %endif
  6. Name: SDL2
  7. Version: 2.0.3
  8. Release: 9%{?dist}
  9. Summary: A cross-platform multimedia library
  10. Group: System Environment/Libraries
  11. URL: http://www.libsdl.org/
  12. License: zlib and MIT
  13. Source0: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
  14. Source1: SDL_config.h
  15. Patch0: multilib.patch
  16. # https://hg.libsdl.org/SDL/rev/7e843b8b8301
  17. Patch1: SDL2-2.0.3-oldgcc.patch
  18. BuildRequires: alsa-lib-devel
  19. BuildRequires: audiofile-devel
  20. BuildRequires: mesa-libGL-devel
  21. BuildRequires: mesa-libGLU-devel
  22. BuildRequires: mesa-libEGL-devel
  23. BuildRequires: mesa-libGLES-devel
  24. BuildRequires: libXext-devel
  25. BuildRequires: libX11-devel
  26. BuildRequires: libXi-devel
  27. BuildRequires: libXrandr-devel
  28. BuildRequires: libXrender-devel
  29. BuildRequires: dbus-devel
  30. BuildRequires: libXScrnSaver-devel
  31. BuildRequires: libusb-devel
  32. BuildRequires: pulseaudio-libs-devel
  33. BuildRequires: libXinerama-devel
  34. BuildRequires: libXcursor-devel
  35. BuildRequires: systemd-devel
  36. # Wayland
  37. %if %{with wayland}
  38. BuildRequires: libwayland-client-devel
  39. BuildRequires: libwayland-egl-devel
  40. BuildRequires: libwayland-cursor-devel
  41. %endif
  42. BuildRequires: libxkbcommon-devel
  43. %description
  44. Simple DirectMedia Layer (SDL) is a cross-platform multimedia library designed
  45. to provide fast access to the graphics frame buffer and audio device.
  46. %package devel
  47. Summary: Files needed to develop Simple DirectMedia Layer applications
  48. Group: Development/Libraries
  49. Requires: %{name}%{?_isa} = %{version}-%{release}
  50. Requires: alsa-lib-devel
  51. Requires: mesa-libGL-devel
  52. Requires: mesa-libGLU-devel
  53. Requires: mesa-libEGL-devel
  54. Requires: mesa-libGLES-devel
  55. Requires: libX11-devel
  56. Requires: libXi-devel
  57. Requires: libXext-devel
  58. Requires: libXrandr-devel
  59. Requires: libXrender-devel
  60. Requires: libXScrnSaver-devel
  61. Requires: libXinerama-devel
  62. Requires: libXcursor-devel
  63. Requires: systemd-devel
  64. %if %{with wayland}
  65. # Wayland
  66. Requires: libwayland-client-devel
  67. Requires: libwayland-egl-devel
  68. Requires: libwayland-cursor-devel
  69. %endif
  70. Requires: libxkbcommon-devel
  71. %description devel
  72. Simple DirectMedia Layer (SDL) is a cross-platform multimedia library designed
  73. to provide fast access to the graphics frame buffer and audio device. This
  74. package provides the libraries, include files, and other resources needed for
  75. developing SDL applications.
  76. %prep
  77. %setup -q
  78. %patch0 -p1 -b .multilib
  79. %patch1 -p1 -b .oldgcc
  80. # Compilation without ESD
  81. sed -i -e 's/.*AM_PATH_ESD.*//' configure.in
  82. sed -i -e 's/\r//g' TODO.txt README.txt WhatsNew.txt BUGS.txt COPYING.txt CREDITS.txt README-SDL.txt
  83. %build
  84. %configure \
  85. --enable-sdl-dlopen \
  86. --disable-arts \
  87. --disable-esd \
  88. --disable-nas \
  89. --enable-pulseaudio-shared \
  90. --enable-alsa \
  91. %if %{with wayland}
  92. --enable-video-wayland \
  93. %endif
  94. --disable-rpath
  95. make %{?_smp_mflags}
  96. %install
  97. %make_install
  98. # Rename SDL_config.h to SDL_config-<arch>.h to avoid file conflicts on
  99. # multilib systems and install SDL_config.h wrapper
  100. mv %{buildroot}%{_includedir}/SDL2/SDL_config.h %{buildroot}%{_includedir}/SDL2/SDL_config-%{_arch}.h
  101. install -p -m 644 %{SOURCE1} %{buildroot}%{_includedir}/SDL2/SDL_config.h
  102. # remove libtool .la file
  103. rm -f %{buildroot}%{_libdir}/*.la
  104. # remove static .a file
  105. rm -f %{buildroot}%{_libdir}/*.a
  106. %post -p /sbin/ldconfig
  107. %postun -p /sbin/ldconfig
  108. %files
  109. %doc BUGS.txt CREDITS.txt COPYING.txt README-SDL.txt
  110. %{_libdir}/lib*.so.*
  111. %files devel
  112. %doc README.txt TODO.txt WhatsNew.txt
  113. %{_bindir}/*-config
  114. %{_libdir}/lib*.so
  115. %{_libdir}/pkgconfig/sdl2.pc
  116. %{_includedir}/SDL2
  117. %{_datadir}/aclocal/*
  118. %changelog
  119. * Wed Nov 18 2015 Ding-Yi Chen <dchen@redhat.com> - 2.0.3-9
  120. - Use bcond instead
  121. * Tue Aug 11 2015 Ding-Yi Chen <dchen@redhat.com> - 2.0.3-8
  122. - Remove wayland support for Requires.
  123. * Thu Aug 06 2015 Ding-Yi Chen <dchen@redhat.com> - 2.0.3-7
  124. - Remove wayland support.
  125. * Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.3-6
  126. - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
  127. * Tue Jun 2 2015 Tom Callaway <spot@fedoraproject.org> - 2.0.3-5
  128. - remove code preventing builds with ancient gcc
  129. * Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.3-4
  130. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
  131. * Wed Jun 11 2014 Karsten Hopp <karsten@redhat.com> 2.0.3-3
  132. - fix filename of SDL_config.h for ppc64le
  133. * Fri Jun 06 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.3-2
  134. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
  135. * Wed Mar 19 2014 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.0.3-1
  136. - 2.0.3 upstream release
  137. * Sat Mar 08 2014 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.0.2-1
  138. - 2.0.2 upstream release
  139. - Enable wayland backend
  140. * Tue Dec 10 2013 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.0.1-2
  141. - Add libXinerama, libudev, libXcursor support (RHBZ #1039702)
  142. * Thu Oct 24 2013 Tom Callaway <spot@fedoraproject.org> - 2.0.1-1
  143. - update to 2.0.1
  144. * Sat Aug 24 2013 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.0.0-3
  145. - Fix multilib issues
  146. * Tue Aug 13 2013 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.0.0-2
  147. - SDL2 is released. Announce:
  148. - http://lists.libsdl.org/pipermail/sdl-libsdl.org/2013-August/089854.html
  149. * Sat Aug 10 2013 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.0.0-1.rc4
  150. - Update to latest SDL2 (08.08.2013)
  151. * Tue Jul 30 2013 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.0.0-1.rc3
  152. - Fix Licenses
  153. - some cleanups in spec
  154. * Tue Jul 30 2013 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.0.0-1.rc2
  155. - Delete -static package
  156. - Fix License tag
  157. - Fix end-of-line in documents
  158. - Remove all spike-nails EL-specify (if someone will want to do - 'patches are welcome')
  159. - Change Release tag to .rcX%%{?dist} (maintainer has changed released tarballs)
  160. * Mon Jul 29 2013 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.0.0-1.rc1
  161. - Some fixes in spec and cleanup
  162. * Mon Jul 29 2013 Jon Ciesla <limburgher@gmail.com> - 2.0.0-1
  163. - Ported from SDL 1.2.15-10