smpeg-0.4.4-r10.ebuild 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils toolchain-funcs autotools flag-o-matic multilib-minimal
  5. DESCRIPTION="SDL MPEG Player Library"
  6. HOMEPAGE="http://icculus.org/smpeg/"
  7. SRC_URI="ftp://ftp.lokigames.com/pub/open-source/smpeg/${P}.tar.gz
  8. mirror://gentoo/${P}-gtkm4.patch.bz2"
  9. LICENSE="LGPL-2"
  10. SLOT="0"
  11. KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris"
  12. IUSE="X debug cpu_flags_x86_mmx opengl static-libs"
  13. RDEPEND="
  14. abi_x86_32? (
  15. !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
  16. !<=app-emulation/emul-linux-x86-sdl-20140406
  17. )
  18. >=media-libs/libsdl-1.2.15-r4[${MULTILIB_USEDEP}]
  19. opengl? (
  20. >=virtual/glu-9.0-r1[${MULTILIB_USEDEP}]
  21. >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
  22. )
  23. X? (
  24. >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
  25. >=x11-libs/libXi-1.7.2[${MULTILIB_USEDEP}]
  26. >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
  27. )"
  28. DEPEND="${RDEPEND}"
  29. DOCS=( CHANGES README README.SDL_mixer TODO )
  30. src_prepare() {
  31. epatch "${FILESDIR}"/${P}-m4.patch \
  32. "${FILESDIR}"/${P}-gnu-stack.patch \
  33. "${FILESDIR}"/${P}-config.patch \
  34. "${FILESDIR}"/${P}-PIC.patch \
  35. "${FILESDIR}"/${P}-gcc41.patch \
  36. "${FILESDIR}"/${P}-flags.patch \
  37. "${FILESDIR}"/${P}-automake.patch \
  38. "${FILESDIR}"/${P}-mmx.patch \
  39. "${FILESDIR}"/${P}-malloc.patch \
  40. "${FILESDIR}"/${P}-format.patch \
  41. "${FILESDIR}"/${P}-missing-init.patch \
  42. "${FILESDIR}"/${P}-gcc6.patch
  43. cd "${WORKDIR}"
  44. epatch "${DISTDIR}"/${P}-gtkm4.patch.bz2
  45. rm "${S}/acinclude.m4"
  46. cd "${S}"
  47. mv configure.in configure.ac || die
  48. AT_M4DIR="${S}/m4" eautoreconf
  49. }
  50. multilib_src_configure() {
  51. [[ ${CHOST} == *-solaris* ]] && append-libs -lnsl -lsocket
  52. # the debug option is bogus ... all it does is add extra
  53. # optimizations if you pass --disable-debug
  54. ECONF_SOURCE="${S}" econf \
  55. --enable-debug \
  56. --disable-gtk-player \
  57. $(use_enable static-libs static) \
  58. $(use_enable debug assertions) \
  59. $(use_with X x) \
  60. $(use_enable opengl opengl-player) \
  61. $(use_enable cpu_flags_x86_mmx mmx)
  62. }
  63. multilib_src_install_all() {
  64. use static-libs || prune_libtool_files
  65. }