EAPI="5" inherit eutils git-r3 DESCRIPTION="Numpty Physics is a drawing puzzle game in the spirit of Crayon Physics using the same excellent Box2D engine" HOMEPAGE="http://thp.io/2015/numptyphysics/" # This is only the SRC_URI for the user levels. The code is in git repo. SRC_URI="user-levels? ( http://numptyphysics.garage.maemo.org/levels/butelo/butelo.npz http://numptyphysics.garage.maemo.org/levels/catalyst/catalyst.npz http://numptyphysics.garage.maemo.org/levels/christeck/christeck.npz http://numptyphysics.garage.maemo.org/levels/dneary/dneary.npz http://numptyphysics.garage.maemo.org/levels/gnuton/gnuton.npz http://numptyphysics.garage.maemo.org/levels/gudger/gudger.npz http://numptyphysics.garage.maemo.org/levels/guile/guile.npz http://numptyphysics.garage.maemo.org/levels/hurd/hurd.npz http://numptyphysics.garage.maemo.org/levels/ioan/ioan.npz http://numptyphysics.garage.maemo.org/levels/jhoff80/jhoff80.npz http://numptyphysics.garage.maemo.org/levels/leonet/leonet.npz http://numptyphysics.garage.maemo.org/levels/melvin/melvin.npz http://numptyphysics.garage.maemo.org/levels/noodleman/noodleman.npz http://numptyphysics.garage.maemo.org/levels/papky/papky.npz http://numptyphysics.garage.maemo.org/levels/perli/perli.npz http://numptyphysics.garage.maemo.org/levels/qole/qole.npz http://numptyphysics.garage.maemo.org/levels/siminz/siminz.npz http://numptyphysics.garage.maemo.org/levels/szymanowski/szymanowski.npz http://numptyphysics.garage.maemo.org/levels/therealbubba/therealbubba.npz http://numptyphysics.garage.maemo.org/levels/werre/werre.npz http://numptyphysics.garage.maemo.org/levels/zeez/zeez.npz )" EGIT_REPO_URI="https://github.com/thp/numptyphysics" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="+user-levels" RDEPEND="media-libs/sdl2-ttf media-libs/sdl2-image" DEPEND="${RDEPEND} sys-devel/automake" src_prepare() { sed -i "/CXXFLAGS/s/$/ ${CXXFLAGS}/" makefile || die sed -i "s:-g -O2:${CXXFLAGS}:" external/Box2D/Source/Makefile || die sed -i "s:-g -O2:${CFLAGS}:" external/glaserl/makefile || die sed -i "s/USE_OPENGL_ES/USE_OPENGL_ES ${CXXFLAGS}/" platform/sdl2/platform.* || die sed -i 's/add_pkgconfig(\([^)]\+\))/$(eval $(call add_pkgconfig,\1))/' platform/gl/gl.mk || die } src_compile() { CFLAGS="" emake || die } src_install() { emake DESTDIR="${D}" install || die "Install failed" insinto /usr/share/"${PN}" for f in ${A} ; do [ "${f}" = "${f/.tar.gz/}" ] && doins "${DISTDIR}"/${f} done }