wrogue-0.8.0b.ebuild 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils games
  5. DESCRIPTION="Gothic science fantasy roguelike game"
  6. HOMEPAGE="https://freecode.com/projects/wrogue"
  7. SRC_URI="mirror://gentoo/${P}.zip"
  8. LICENSE="GPL-3"
  9. SLOT="0"
  10. KEYWORDS="amd64 x86"
  11. IUSE=""
  12. RDEPEND="media-libs/libsdl[video]"
  13. DEPEND="${RDEPEND}
  14. app-arch/unzip"
  15. src_prepare() {
  16. sed -i \
  17. -e "/AppData\[0\]/ s:AppData.*:strcpy(AppData, \"${GAMES_DATADIR}/${PN}/\");:" \
  18. src/lib/appdir.c \
  19. || die "sed failed"
  20. epatch "${FILESDIR}"/${P}-ldflags.patch
  21. }
  22. src_compile() {
  23. local myCPPFLAGS="-std=c99 -Iinclude -Ilib -Iui -Igenerate"
  24. local myCFLAGS="$(sdl-config --cflags) ${CFLAGS}"
  25. emake -C src -f linux.mak STRIP_BINARY=NO \
  26. CFLAGS="${myCPPFLAGS} ${myCFLAGS}" release
  27. }
  28. src_install() {
  29. dogamesbin ${PN}
  30. insinto "${GAMES_DATADIR}/${PN}"
  31. doins -r data
  32. dodoc changes.txt
  33. newicon data/ui/icon.bmp ${PN}.bmp
  34. make_desktop_entry ${PN} "Warp Rogue" /usr/share/pixmaps/${PN}.bmp
  35. prepgamesdirs
  36. }