mupen64plus-video-glide64mk2-2.0-r1.ebuild 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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="hires cpu_flags_x86_sse"
  13. RDEPEND=">=games-emulation/mupen64plus-core-2.0-r1:0=
  14. media-libs/libpng:0=
  15. media-libs/libsdl:0=
  16. sys-libs/zlib:0=
  17. virtual/opengl:0=
  18. hires? ( dev-libs/boost:0= )"
  19. DEPEND="${RDEPEND}
  20. virtual/pkgconfig"
  21. S=${WORKDIR}/${MY_P}
  22. src_prepare() {
  23. epatch_user
  24. # avoid implicitly appending CPU flags
  25. sed -i -e 's:-mmmx::g' -e 's:-msse::g' projects/unix/Makefile || die
  26. }
  27. src_compile() {
  28. MAKEARGS=(
  29. # Note: please keep this in sync in all of mupen64plus-* packages
  30. -C projects/unix
  31. # this basically means: GNU userspace
  32. UNAME=Linux
  33. # verbose output
  34. V=1
  35. CROSS_COMPILE="${CHOST}-"
  36. CC="$(tc-getCC)"
  37. CXX="$(tc-getCXX)"
  38. PKG_CONFIG="$(tc-getPKG_CONFIG)"
  39. # usual CFLAGS, CXXFLAGS and LDFLAGS are respected
  40. # so we can leave OPTFLAGS empty
  41. OPTFLAGS=
  42. # paths, some of them are used at compile time
  43. PREFIX=/usr
  44. LIBDIR=/usr/$(get_libdir)
  45. # disable unwanted magic
  46. LDCONFIG=:
  47. INSTALL_STRIP_FLAG=
  48. # Package-specific stuff
  49. # CROSS_COMPILE causes it to look for ${CHOST}-sdl-config...
  50. SDL_CFLAGS="$($(tc-getPKG_CONFIG) --cflags sdl)"
  51. SDL_LDLIBS="$($(tc-getPKG_CONFIG) --libs sdl)"
  52. NO_ASM=$(usex cpu_flags_x86_sse 0 1)
  53. HIRES=$(usex hires 1 0)
  54. )
  55. use amd64 && MAKEARGS+=( HOST_CPU=x86_64 )
  56. use x86 && MAKEARGS+=( HOST_CPU=i386 )
  57. emake "${MAKEARGS[@]}" all
  58. }
  59. src_install() {
  60. emake "${MAKEARGS[@]}" DESTDIR="${D}" install
  61. einstalldocs
  62. }