mupen64plus-video-glide64mk2-2.5.ebuild 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. MY_P=${PN}-src-${PV}
  5. inherit eutils multilib toolchain-funcs
  6. DESCRIPTION="A fork of Mupen64 Nintendo 64 emulator, glide64mk2 video plugin"
  7. HOMEPAGE="http://www.mupen64plus.org/"
  8. SRC_URI="https://github.com/mupen64plus/${PN}/releases/download/${PV}/${MY_P}.tar.gz"
  9. LICENSE="GPL-2 LGPL-2.1"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~x86"
  12. IUSE="gles2 hires cpu_flags_x86_sse"
  13. RDEPEND=">=games-emulation/mupen64plus-core-2.5:0=[gles2=]
  14. media-libs/libpng:0=
  15. media-libs/libsdl2:0=
  16. media-libs/libtxc_dxtn
  17. sys-libs/zlib:0=
  18. virtual/opengl:0=
  19. hires? ( dev-libs/boost:0= )"
  20. DEPEND="${RDEPEND}
  21. virtual/pkgconfig"
  22. S=${WORKDIR}/${MY_P}
  23. src_prepare() {
  24. epatch_user
  25. # avoid implicitly appending CPU flags
  26. sed -i -e 's:-mmmx::g' -e 's:-msse::g' projects/unix/Makefile || die
  27. }
  28. src_compile() {
  29. MAKEARGS=(
  30. # Note: please keep this in sync in all of mupen64plus-* packages
  31. -C projects/unix
  32. # this basically means: GNU userspace
  33. UNAME=Linux
  34. # verbose output
  35. V=1
  36. CROSS_COMPILE="${CHOST}-"
  37. CC="$(tc-getCC)"
  38. CXX="$(tc-getCXX)"
  39. PKG_CONFIG="$(tc-getPKG_CONFIG)"
  40. # usual CFLAGS, CXXFLAGS and LDFLAGS are respected
  41. # so we can leave OPTFLAGS empty
  42. OPTFLAGS=
  43. # paths, some of them are used at compile time
  44. PREFIX=/usr
  45. LIBDIR=/usr/$(get_libdir)
  46. # disable unwanted magic
  47. LDCONFIG=:
  48. INSTALL_STRIP_FLAG=
  49. # Package-specific stuff
  50. # CROSS_COMPILE causes it to look for ${CHOST}-sdl2-config...
  51. SDL_CFLAGS="$($(tc-getPKG_CONFIG) --cflags sdl2)"
  52. SDL_LDLIBS="$($(tc-getPKG_CONFIG) --libs sdl2)"
  53. NOSSE=$(usex cpu_flags_x86_sse 0 1)
  54. HIRES=$(usex hires 1 0)
  55. USE_FRAMESKIPPER=1
  56. USE_GLES=$(usex gles2 1 0)
  57. # use external lib
  58. TXCDXTN=1
  59. )
  60. use amd64 && MAKEARGS+=( HOST_CPU=x86_64 )
  61. use x86 && MAKEARGS+=( HOST_CPU=i386 )
  62. emake "${MAKEARGS[@]}" all
  63. }
  64. src_install() {
  65. emake "${MAKEARGS[@]}" DESTDIR="${D}" install
  66. einstalldocs
  67. }