wrogue-0.8.0b-r1.ebuild 1019 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit eutils
  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. PATCHES=(
  16. "${FILESDIR}"/${P}-ldflags.patch
  17. )
  18. src_prepare() {
  19. default
  20. sed -i \
  21. -e "/AppData\[0\]/ s:AppData.*:strcpy(AppData, \"/usr/share/${PN}/\");:" \
  22. src/lib/appdir.c \
  23. || die "sed failed"
  24. }
  25. src_compile() {
  26. local myCPPFLAGS="-std=c99 -Iinclude -Ilib -Iui -Igenerate"
  27. local myCFLAGS="$(sdl-config --cflags) ${CFLAGS}"
  28. emake -C src -f linux.mak STRIP_BINARY=NO \
  29. CFLAGS="${myCPPFLAGS} ${myCFLAGS}" release
  30. }
  31. src_install() {
  32. dobin ${PN}
  33. insinto /usr/share/${PN}
  34. doins -r data
  35. dodoc changes.txt
  36. newicon data/ui/icon.bmp ${PN}.bmp
  37. make_desktop_entry ${PN} "Warp Rogue" /usr/share/pixmaps/${PN}.bmp
  38. }