kde-frameworks/kimageformats: x86 stable wrt bug #724346
[gentoo.git] / games-puzzle / numptyphysics / numptyphysics-9999.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 inherit eutils gnome2-utils flag-o-matic git-r3
6
7 DESCRIPTION="Crayon Physics-like drawing puzzle game using the same excellent Box2D engine"
8 HOMEPAGE="http://thp.io/2015/numptyphysics/"
9
10 # This is only the SRC_URI for the user levels. The code is in git repo.
11 SRC_URI="user-levels? (
12         http://numptyphysics.garage.maemo.org/levels/butelo/butelo.npz
13         http://numptyphysics.garage.maemo.org/levels/catalyst/catalyst.npz
14         http://numptyphysics.garage.maemo.org/levels/christeck/christeck.npz
15         http://numptyphysics.garage.maemo.org/levels/dneary/dneary.npz
16         http://numptyphysics.garage.maemo.org/levels/gnuton/gnuton.npz
17         http://numptyphysics.garage.maemo.org/levels/gudger/gudger.npz
18         http://numptyphysics.garage.maemo.org/levels/guile/guile.npz
19         http://numptyphysics.garage.maemo.org/levels/hurd/hurd.npz
20         http://numptyphysics.garage.maemo.org/levels/ioan/ioan.npz
21         http://numptyphysics.garage.maemo.org/levels/jhoff80/jhoff80.npz
22         http://numptyphysics.garage.maemo.org/levels/leonet/leonet.npz
23         http://numptyphysics.garage.maemo.org/levels/melvin/melvin.npz
24         http://numptyphysics.garage.maemo.org/levels/noodleman/noodleman.npz
25         http://numptyphysics.garage.maemo.org/levels/papky/papky.npz
26         http://numptyphysics.garage.maemo.org/levels/perli/perli.npz
27         http://numptyphysics.garage.maemo.org/levels/qole/qole.npz
28         http://numptyphysics.garage.maemo.org/levels/siminz/siminz.npz
29         http://numptyphysics.garage.maemo.org/levels/szymanowski/szymanowski.npz
30         http://numptyphysics.garage.maemo.org/levels/therealbubba/therealbubba.npz
31         http://numptyphysics.garage.maemo.org/levels/werre/werre.npz
32         http://numptyphysics.garage.maemo.org/levels/zeez/zeez.npz
33 )"
34
35 EGIT_REPO_URI="https://github.com/thp/numptyphysics"
36
37 LICENSE="GPL-3"
38 SLOT="0"
39 KEYWORDS=""
40 IUSE="+user-levels"
41
42 RDEPEND="media-libs/libsdl2[opengl,video]
43         media-libs/sdl2-image[png]
44         media-libs/sdl2-ttf
45         virtual/opengl
46         dev-libs/glib:2"
47 DEPEND="${DEPEND}
48         virtual/pkgconfig"
49
50 src_unpack() {
51         git-r3_src_unpack
52 }
53
54 src_prepare() {
55         append-cxxflags -std=c++11 -Isrc
56         sed -i '/-g -O2/d' external/Box2D/Source/Makefile \
57                 external/glaserl/makefile || die
58         sed -i "/return thp::/s% thp::.*$%\"/usr/share/${PN}/data\";%" \
59                 src/Os.cpp || die
60         sed -e '/CXXFLAGS +=/s/\(CXXFLAGS +=\).*\( -DAPP=.*\)/\1\2/' \
61                 -e '/SILENTCMD/s/$(LIBS)$/$(LDFLAGS) $(LIBS)/' \
62                 -i makefile || die
63         eapply_user
64 }
65
66 pkg_preinst() {
67         gnome2_icon_savelist
68 }
69
70 pkg_postinst() {
71         gnome2_icon_cache_update
72 }
73
74 pkg_postrm() {
75         gnome2_icon_cache_update
76 }