stella-4.0.ebuild 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils gnome2-utils games
  5. DESCRIPTION="Stella Atari 2600 VCS Emulator"
  6. HOMEPAGE="http://stella.sourceforge.net/"
  7. SRC_URI="mirror://sourceforge/stella/${P}-src.tar.gz"
  8. LICENSE="GPL-2 BSD"
  9. SLOT="0"
  10. KEYWORDS="amd64 x86"
  11. IUSE="joystick"
  12. DEPEND="media-libs/libsdl2[joystick?,opengl,video]
  13. media-libs/libpng:0
  14. sys-libs/zlib"
  15. RDEPEND=${DEPEND}
  16. src_prepare() {
  17. sed -i \
  18. -e '/INSTALL/s/-s //' \
  19. -e '/STRIP/d' \
  20. -e "/icons/d" \
  21. -e '/INSTALL.*DOCDIR/d' \
  22. -e '/INSTALL.*\/applications/d' \
  23. -e '/CXXFLAGS+=/s/-fomit-frame-pointer//' \
  24. Makefile || die
  25. }
  26. src_configure() {
  27. # not an autoconf script
  28. ./configure \
  29. --prefix="/usr" \
  30. --bindir="${GAMES_BINDIR}" \
  31. --docdir="/usr/share/doc/${PF}" \
  32. --datadir="${GAMES_DATADIR}" \
  33. $(use_enable joystick) \
  34. || die
  35. }
  36. src_install() {
  37. local i
  38. for i in 16 22 24 32 48 64 128 ; do
  39. newicon -s ${i} src/common/stella-${i}x${i}.png stella.png
  40. done
  41. emake DESTDIR="${D}" install
  42. domenu src/unix/stella.desktop
  43. dohtml -r docs/*
  44. dodoc Announce.txt Changes.txt Copyright.txt README-SDL.txt Readme.txt Todo.txt
  45. prepgamesdirs
  46. }
  47. pkg_preinst() {
  48. games_pkg_preinst
  49. gnome2_icon_savelist
  50. }
  51. pkg_postinst() {
  52. games_pkg_postinst
  53. gnome2_icon_cache_update
  54. }
  55. pkg_postrm() {
  56. gnome2_icon_cache_update
  57. }