micropolis-1.0-r1.ebuild 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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="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="
  14. media-libs/libsdl
  15. media-libs/sdl-mixer
  16. x11-libs/libX11
  17. x11-libs/libXpm"
  18. DEPEND="${RDEPEND}
  19. sys-devel/bison"
  20. S=${WORKDIR}/${PN}-activity/
  21. PATCHES=(
  22. "${DISTDIR}"/${PN}_git.patch
  23. )
  24. src_unpack() {
  25. unpack ${PN}-activity-source.tgz
  26. }
  27. src_prepare() {
  28. default
  29. sed -i -e "s:-O3:${CFLAGS}:" \
  30. src/tclx/config.mk src/{sim,tcl,tk}/makefile || die
  31. sed -i -e "s:XLDFLAGS=:&${LDFLAGS}:" \
  32. src/tclx/config.mk || die
  33. }
  34. src_compile() {
  35. emake -C src LDFLAGS="${LDFLAGS}"
  36. }
  37. src_install() {
  38. local dir=/usr/share/${PN}
  39. exeinto "${dir}/res"
  40. doexe src/sim/sim
  41. insinto "${dir}"
  42. doins -r activity cities images manual res
  43. make_wrapper micropolis res/sim "${dir}"
  44. doicon Micropolis.png
  45. make_desktop_entry micropolis "Micropolis" Micropolis
  46. }