stella-4.7.2.ebuild 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # Copyright 1999-2016 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.xz"
  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. DOCS="Announce.txt Changes.txt Copyright.txt README-SDL.txt Readme.txt Todo.txt" \
  39. default
  40. for i in 16 22 24 32 48 64 128 ; do
  41. newicon -s ${i} src/common/stella-${i}x${i}.png stella.png
  42. done
  43. domenu src/unix/stella.desktop
  44. dohtml -r docs/*
  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. }