micropolis-1.0.ebuild 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils games
  5. DESCRIPTION="Free version of the well-known city building simulation"
  6. HOMEPAGE="http://www.donhopkins.com/home/micropolis/"
  7. SRC_URI="http://www.donhopkins.com/home/micropolis/${PN}-activity-source.tgz
  8. http://rmdir.de/~michael/${PN}_git.patch"
  9. LICENSE="GPL-3"
  10. SLOT="0"
  11. KEYWORDS="amd64 x86"
  12. IUSE=""
  13. RDEPEND="x11-libs/libX11
  14. x11-libs/libXpm
  15. media-libs/libsdl
  16. media-libs/sdl-mixer"
  17. DEPEND="${RDEPEND}
  18. sys-devel/bison"
  19. S=${WORKDIR}/${PN}-activity/
  20. src_unpack() {
  21. unpack ${PN}-activity-source.tgz
  22. }
  23. src_prepare() {
  24. epatch "${DISTDIR}"/${PN}_git.patch
  25. sed -i -e "s:-O3:${CFLAGS}:" \
  26. src/tclx/config.mk src/{sim,tcl,tk}/makefile || die
  27. sed -i -e "s:XLDFLAGS=:&${LDFLAGS}:" \
  28. src/tclx/config.mk || die
  29. }
  30. src_compile() {
  31. emake -C src LDFLAGS="${LDFLAGS}"
  32. }
  33. src_install() {
  34. local dir=${GAMES_DATADIR}/${PN}
  35. exeinto "${dir}/res"
  36. doexe src/sim/sim
  37. insinto "${dir}"
  38. doins -r activity cities images manual res
  39. games_make_wrapper micropolis res/sim "${dir}"
  40. doicon Micropolis.png
  41. make_desktop_entry micropolis "Micropolis" Micropolis
  42. prepgamesdirs
  43. }