openxcom-9999.ebuild 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit eutils cmake-utils gnome2-utils git-r3
  5. DESCRIPTION="An open-source reimplementation of the popular UFO: Enemy Unknown"
  6. HOMEPAGE="http://openxcom.org/"
  7. EGIT_REPO_URI="https://github.com/SupSuper/OpenXcom.git"
  8. LICENSE="GPL-3+ CC-BY-SA-4.0"
  9. SLOT="0"
  10. KEYWORDS=""
  11. IUSE="doc"
  12. RDEPEND=">=dev-cpp/yaml-cpp-0.5.1
  13. media-libs/libsdl[opengl,video]
  14. media-libs/sdl-gfx
  15. media-libs/sdl-image[png]
  16. media-libs/sdl-mixer[flac,mikmod,vorbis]"
  17. DEPEND="${RDEPEND}
  18. doc? ( app-doc/doxygen )"
  19. src_unpack() {
  20. git-r3_src_unpack
  21. }
  22. src_prepare() {
  23. cmake-utils_src_prepare
  24. sed -i -e '/\/res\//d' CMakeLists.txt || die
  25. }
  26. src_configure() {
  27. cmake-utils_src_configure
  28. }
  29. src_compile() {
  30. use doc && cmake-utils_src_compile doxygen
  31. cmake-utils_src_compile
  32. }
  33. src_install() {
  34. DOCS="README.md" \
  35. cmake-utils_src_install
  36. use doc && dodoc -r "${CMAKE_BUILD_DIR}"/docs/html/*
  37. doicon -s scalable res/linux/icons/openxcom.svg
  38. newicon -s 48 res/linux/icons/openxcom_48x48.png openxcom.png
  39. newicon -s 128 res/linux/icons/openxcom_128x128.png openxcom.png
  40. domenu res/linux/openxcom.desktop
  41. }
  42. pkg_preinst() {
  43. gnome2_icon_savelist
  44. }
  45. pkg_postinst() {
  46. gnome2_icon_cache_update
  47. echo
  48. elog "In order to play you need copy GEODATA, GEOGRAPH, MAPS, ROUTES, SOUND,"
  49. elog "TERRAIN, UFOGRAPH, UFOINTRO, UNITS folders from original X-COM game to"
  50. elog "/usr/share/${PN}/UFO"
  51. echo
  52. elog "If you want to play the TFTD mod, you need to copy ANIMS, FLOP_INT,"
  53. elog "GEODATA, GEOGRAPH, MAPS, ROUTES, SOUND, TERRAIN, UFOGRAPH, UNITS folders"
  54. elog "from the original Terror from the Deep game to"
  55. elog "/usr/share/${PN}/TFTD"
  56. echo
  57. elog "If you need or want text in some language other than english, download:"
  58. elog "http://openxcom.org/translations/latest.zip and uncompress it in"
  59. elog "/usr/share/${PN}/common/Language"
  60. }
  61. pkg_postrm() {
  62. gnome2_icon_cache_update
  63. }