jag-0.3.2.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 qt4-r2 games
  5. DESCRIPTION="Arcade 2D Puzzle Game"
  6. HOMEPAGE="http://jag.xlabsoft.com/"
  7. SRC_URI="http://jag.xlabsoft.com/files/${P}-src.zip
  8. http://jag.xlabsoft.com/files/${P}-data.zip"
  9. LICENSE="GPL-3"
  10. SLOT="0"
  11. KEYWORDS="amd64 ppc x86"
  12. IUSE="editor"
  13. RDEPEND="dev-qt/qtcore:4
  14. dev-qt/qtgui:4
  15. dev-qt/qtopengl:4
  16. x11-libs/libXrandr
  17. media-libs/libsdl[sound,video]
  18. media-libs/sdl-mixer"
  19. DEPEND="${RDEPEND}
  20. app-arch/unzip"
  21. S=${WORKDIR}/${P}-src
  22. src_prepare() {
  23. mv "${WORKDIR}"/${P}-data/data "${WORKDIR}"/${P}-src/
  24. sed -i \
  25. -e "s:/usr/local/bin:${GAMES_BINDIR}:g" \
  26. -e "s:/usr/local/games:${GAMES_DATADIR}:g" \
  27. -e "s:LIBS += -lSDLmain:LIBS += -lSDL -lX11:" \
  28. Game.pro main.cpp editor/editor.pro \
  29. || die "sed failed"
  30. }
  31. src_configure() {
  32. qt4-r2_src_configure
  33. if use editor; then
  34. cd editor
  35. eqmake4 editor.pro
  36. fi
  37. }
  38. src_compile() {
  39. qt4-r2_src_compile
  40. if use editor; then
  41. cd editor
  42. qt4-r2_src_compile
  43. fi
  44. }
  45. src_install() {
  46. qt4-r2_src_install
  47. newicon images/logo.png ${PN}.png
  48. make_desktop_entry jag Jag
  49. if use editor; then
  50. cd editor
  51. qt4-r2_src_install
  52. make_desktop_entry jag-editor "Jag Level editor" ${PN}
  53. fi
  54. prepgamesdirs
  55. }