enigma-1.21-r2.ebuild 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit autotools eutils gnome2-utils games
  5. DESCRIPTION="puzzle game similar to Oxyd"
  6. HOMEPAGE="http://www.nongnu.org/enigma/"
  7. SRC_URI="mirror://sourceforge/enigma-game/${P}.tar.gz"
  8. LICENSE="GPL-2+"
  9. SLOT="0"
  10. KEYWORDS="amd64 ppc x86"
  11. IUSE="nls"
  12. COMMON_DEPS="media-libs/sdl-ttf
  13. media-libs/libsdl[video]
  14. media-libs/sdl-mixer
  15. media-libs/sdl-image[jpeg,png]
  16. media-libs/libpng:0=
  17. sys-libs/zlib
  18. net-misc/curl
  19. || ( >=dev-libs/xerces-c-3[icu] >=dev-libs/xerces-c-3[-icu,-iconv] )
  20. net-libs/enet:=
  21. nls? ( virtual/libintl )"
  22. DEPEND="${COMMON_DEPS}
  23. sys-devel/gettext"
  24. RDEPEND="${COMMON_DEPS}
  25. media-fonts/dejavu
  26. x11-misc/xdg-utils"
  27. src_prepare() {
  28. cp /usr/share/gettext/config.rpath .
  29. epatch "${FILESDIR}"/${P}-build.patch
  30. sed -i \
  31. -e "s:DOCDIR:\"/usr/share/doc/${P}/html\":" \
  32. src/main.cc || die
  33. eautoreconf
  34. }
  35. src_configure() {
  36. egamesconf \
  37. --with-system-enet \
  38. $(use_enable nls)
  39. }
  40. src_install() {
  41. DOCS="ACKNOWLEDGEMENTS AUTHORS CHANGES README doc/HACKING" \
  42. default
  43. dosym \
  44. /usr/share/fonts/dejavu/DejaVuSansCondensed.ttf \
  45. "${GAMES_DATADIR}"/${PN}/fonts/DejaVuSansCondensed.ttf
  46. dosym \
  47. /usr/share/fonts/dejavu/DejaVuSans.ttf \
  48. "${GAMES_DATADIR}"/${PN}/fonts/vera_sans.ttf
  49. dohtml -r doc/*
  50. doman doc/enigma.6
  51. prepgamesdirs
  52. }
  53. pkg_preinst() {
  54. games_pkg_preinst
  55. gnome2_icon_savelist
  56. }
  57. pkg_postinst() {
  58. games_pkg_postinst
  59. gnome2_icon_cache_update
  60. }
  61. pkg_postrm() {
  62. gnome2_icon_cache_update
  63. }