freesynd-0.7.1.ebuild 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils cmake-utils gnome2-utils games
  5. DESCRIPTION="A cross-platform reimplementation of engine for the classic Bullfrog game, Syndicate"
  6. HOMEPAGE="http://freesynd.sourceforge.net/"
  7. SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
  8. LICENSE="GPL-3"
  9. SLOT="0"
  10. KEYWORDS="amd64 x86"
  11. IUSE="debug devtools"
  12. RDEPEND="media-libs/libogg
  13. media-libs/libpng:0
  14. media-libs/libsdl[X,sound,video]
  15. media-libs/libvorbis
  16. media-libs/sdl-mixer[mp3,vorbis]
  17. media-libs/sdl-image[png]"
  18. DEPEND=${RDEPEND}
  19. CMAKE_IN_SOURCE_BUILD=1
  20. src_prepare() {
  21. epatch "${FILESDIR}"/${P}-cmake.patch
  22. sed \
  23. -e "s:#freesynd_data_dir = /usr/share/freesynd/data:freesynd_data_dir = ${GAMES_DATADIR}/${PN}/data:" \
  24. -i ${PN}.ini || die
  25. }
  26. src_configure() {
  27. local mycmakeargs=(
  28. $(cmake-utils_use_with debug DEBUG)
  29. $(cmake-utils_use_build devtools DEV_TOOLS)
  30. )
  31. cmake-utils_src_configure
  32. }
  33. src_compile() {
  34. cmake-utils_src_compile
  35. }
  36. src_install() {
  37. dogamesbin src/${PN}
  38. use devtools && newgamesbin src/dump ${PN}-dump
  39. insinto "${GAMES_DATADIR}"/${PN}
  40. doins -r data
  41. newicon -s 128 icon/sword.png ${PN}.png
  42. make_desktop_entry ${PN}
  43. dodoc NEWS README INSTALL AUTHORS
  44. prepgamesdirs
  45. }
  46. pkg_preinst() {
  47. games_pkg_preinst
  48. gnome2_icon_savelist
  49. }
  50. pkg_postinst() {
  51. elog "You have to set \"data_dir = /my/path/to/synd-data\""
  52. elog "in \"~/.${PN}/${PN}.ini\"."
  53. if use debug ; then
  54. ewarn "Debug build is not meant for regular playing,"
  55. ewarn "game speed is higher."
  56. fi
  57. games_pkg_postinst
  58. gnome2_icon_cache_update
  59. }
  60. pkg_postrm() {
  61. gnome2_icon_cache_update
  62. }