higan-purify-03.ebuild 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils multilib toolchain-funcs qmake-utils
  5. MY_P=purify_v${PV}-source
  6. DESCRIPTION="Rom purifier for higan"
  7. HOMEPAGE="http://byuu.org/higan/"
  8. SRC_URI="https://higan.googlecode.com/files/${MY_P}.tar.xz"
  9. LICENSE="GPL-3"
  10. SLOT="0"
  11. KEYWORDS="amd64 x86"
  12. IUSE="qt4"
  13. RDEPEND="
  14. dev-games/higan-ananke
  15. x11-libs/libX11
  16. !qt4? ( x11-libs/gtk+:2 )
  17. qt4? ( >=dev-qt/qtgui-4.5:4 )"
  18. DEPEND="${RDEPEND}
  19. virtual/pkgconfig"
  20. S=${WORKDIR}/${MY_P}/purify
  21. pkg_pretend() {
  22. if [[ ${MERGE_TYPE} != binary ]]; then
  23. if [[ $(gcc-major-version) == 4 && $(gcc-minor-version) -lt 7 || $(gcc-major-version) -lt 4 ]] ; then
  24. eerror "You need at least sys-devel/gcc-4.7.0"
  25. die "You need at least sys-devel/gcc-4.7.0"
  26. fi
  27. fi
  28. }
  29. src_prepare() {
  30. epatch "${FILESDIR}"/${P}-QA.patch
  31. sed -i \
  32. -e "/handle/s#/usr/local/lib#/usr/$(get_libdir)#" \
  33. nall/dl.hpp || die
  34. # regenerate .moc if needed
  35. if use qt4; then
  36. cd phoenix/qt || die
  37. "$(qt4_get_bindir)"/moc -i -I. -o platform.moc platform.moc.hpp || die
  38. fi
  39. }
  40. src_compile() {
  41. if use qt4; then
  42. mytoolkit="qt"
  43. else
  44. mytoolkit="gtk"
  45. fi
  46. emake \
  47. platform="x" \
  48. compiler="$(tc-getCXX)" \
  49. phoenix="${mytoolkit}"
  50. }
  51. src_install() {
  52. dobin purify
  53. }