cdogs-sdl-0.4-r1.ebuild 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils flag-o-matic games
  5. CDOGS_DATA="cdogs-data-2007-07-06"
  6. DESCRIPTION="A port of the old DOS arcade game C-Dogs"
  7. HOMEPAGE="http://lumaki.com/code/cdogs"
  8. SRC_URI="http://icculus.org/cdogs-sdl/files/src/${P}.tar.bz2
  9. http://icculus.org/cdogs-sdl/files/data/${CDOGS_DATA}.tar.bz2"
  10. LICENSE="GPL-2+"
  11. SLOT="0"
  12. KEYWORDS="amd64 x86"
  13. IUSE=""
  14. DEPEND="media-libs/libsdl[video]
  15. media-libs/sdl-mixer"
  16. RDEPEND=${DEPEND}
  17. S=${WORKDIR}/${P}/src
  18. src_unpack() {
  19. unpack ${A}
  20. mv ${CDOGS_DATA} ${P}/data || die
  21. }
  22. src_prepare() {
  23. sed -i \
  24. -e "/^CF_OPT/d" \
  25. -e "/^CC/d" \
  26. Makefile || die
  27. sed -i -e "/\bopen(/s/)/, 0666)/" files.c || die
  28. epatch "${FILESDIR}"/${P}-64bit.patch
  29. append-cflags -std=gnu89 # build with gcc5 (bug #571112)
  30. }
  31. src_compile() {
  32. emake I_AM_CONFIGURED=yes \
  33. SYSTEM="\"linux\"" \
  34. STRIP=true \
  35. DATADIR="${GAMES_DATADIR}/${PN}" \
  36. cdogs
  37. }
  38. src_install() {
  39. dogamesbin cdogs
  40. insinto "${GAMES_DATADIR}/${PN}"
  41. doins -r ../data/*
  42. newicon ../data/cdogs_icon.png ${PN}.png
  43. dodoc ../doc/{README,AUTHORS,ChangeLog,README_DATA,TODO,original_readme.txt}
  44. make_desktop_entry "cdogs -fullscreen" C-Dogs
  45. prepgamesdirs
  46. }