dont-starve-2.ebuild 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils games
  5. DESCRIPTION="Wilderness survival game full of science and magic"
  6. HOMEPAGE="http://www.dontstarvegame.com/"
  7. SRC_URI="amd64? ( dontstarve_x64_july21.tar.gz )
  8. x86? ( dontstarve_x32_july21.tar.gz )"
  9. LICENSE="all-rights-reserved"
  10. SLOT="0"
  11. KEYWORDS="amd64 x86"
  12. IUSE=""
  13. RESTRICT="fetch bindist splitdebug"
  14. MYGAMEDIR=${GAMES_PREFIX_OPT}/${PN}
  15. QA_PREBUILT="${MYGAMEDIR#/}/bin/dontstarve"
  16. if [[ $ARCH == amd64 ]] ; then
  17. QA_PREBUILT="${QA_PREBUILT}
  18. ${MYGAMEDIR#/}/bin/lib64/*"
  19. elif [[ ${ARCH} == x86 ]] ; then
  20. QA_PREBUILT="${QA_PREBUILT}
  21. ${MYGAMEDIR#/}/bin/lib32/*"
  22. fi
  23. RDEPEND="net-misc/curl
  24. virtual/opengl"
  25. S=${WORKDIR}/dontstarve
  26. pkg_nofetch() {
  27. einfo
  28. einfo "Please buy & download \"${SRC_URI}\" from:"
  29. einfo " ${HOMEPAGE}"
  30. einfo "and move/link it to \"${DISTDIR}\""
  31. einfo
  32. }
  33. src_install() {
  34. local libdir=lib$(usex amd64 "64" "32")
  35. insinto "${MYGAMEDIR}"
  36. doins -r data mods
  37. exeinto "${MYGAMEDIR}"/bin
  38. doexe bin/dontstarve
  39. exeinto "${MYGAMEDIR}"/bin/${libdir}
  40. doexe bin/${libdir}/libfmod*
  41. # unbundling libsdl2 breaks the menu, so you cannot start the game
  42. doexe bin/${libdir}/libSDL2*
  43. games_make_wrapper ${PN} "./dontstarve" "${MYGAMEDIR}/bin" "${MYGAMEDIR}/bin/${libdir}"
  44. make_desktop_entry ${PN}
  45. doicon dontstarve.xpm
  46. prepgamesdirs
  47. }