freedroidrpg-0.16-r1.ebuild 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. PYTHON_COMPAT=( python2_7 )
  5. inherit autotools eutils gnome2-utils python-any-r1
  6. DESCRIPTION="A modification of the classical Freedroid engine into an RPG"
  7. HOMEPAGE="http://freedroid.sourceforge.net/"
  8. SRC_URI="ftp://ftp.osuosl.org/pub/freedroid/freedroidRPG-${PV}//freedroidRPG-${PV}.tar.gz"
  9. LICENSE="GPL-2+"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~ppc ~x86"
  12. IUSE="nls opengl sound"
  13. RDEPEND="
  14. virtual/jpeg:0
  15. media-libs/libpng:0
  16. media-libs/libsdl[opengl?,sound?,video]
  17. >=media-libs/sdl-gfx-2.0.21
  18. media-libs/sdl-image[jpeg,png]
  19. nls? ( virtual/libintl )
  20. opengl? ( virtual/opengl )
  21. sound? (
  22. media-libs/libogg
  23. media-libs/libvorbis
  24. media-libs/sdl-mixer[vorbis] )
  25. x11-libs/libX11"
  26. DEPEND="${RDEPEND}
  27. ${PYTHON_DEPS}
  28. nls? ( sys-devel/gettext )"
  29. pkg_setup() {
  30. python-any-r1_pkg_setup
  31. }
  32. src_prepare() {
  33. default
  34. sed -i \
  35. -e '/^dist_doc_DATA/d' \
  36. -e '/-pipe/d' \
  37. -e '/^SUBDIRS/s/pkgs//' \
  38. Makefile.am || die
  39. python_fix_shebang src sound
  40. eautoreconf
  41. }
  42. src_configure() {
  43. econf \
  44. --disable-fastmath \
  45. --with-embedded-lua \
  46. --localedir=/usr/share/locale \
  47. $(use_enable nls) \
  48. $(use_enable opengl) \
  49. $(use_enable sound)
  50. }
  51. src_install() {
  52. local i
  53. default
  54. for i in 48 64 96 128
  55. do
  56. doicon -s ${i} pkgs/freedesktop/icons/hicolor/${i}x${i}/apps/freedroidRPG.png
  57. done
  58. doicon -s scalable pkgs/freedesktop/icons/hicolor/scalable/apps/freedroidRPG.svg
  59. make_desktop_entry freedroidRPG "Freedroid RPG" freedroidRPG
  60. }
  61. pkg_preinst() {
  62. gnome2_icon_savelist
  63. }
  64. pkg_postinst() {
  65. gnome2_icon_cache_update
  66. echo
  67. ewarn "${P} is not compatible with old save games."
  68. ewarn "Please start a new character."
  69. echo
  70. }
  71. pkg_postrm() {
  72. gnome2_icon_cache_update
  73. }