1 |
commit: 342fb1fabd14e1f13fa16ba904804c2bdadb57f8 |
2 |
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun May 27 16:10:16 2018 +0000 |
4 |
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 27 16:14:32 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=342fb1fa |
7 |
|
8 |
games-puzzle/numptyphysics: Add 0.3.4,fix 9999 (#567036 by Samuel BAUER) |
9 |
|
10 |
Package-Manager: Portage-2.3.38, Repoman-2.3.9 |
11 |
|
12 |
games-puzzle/numptyphysics/Manifest | 1 + |
13 |
.../files/numptyphysics-0.3.4-gentoo.patch | 44 ++++++++++++++++++ |
14 |
...sics-9999.ebuild => numptyphysics-0.3.4.ebuild} | 52 ++++++---------------- |
15 |
.../numptyphysics/numptyphysics-9999.ebuild | 36 +++++---------- |
16 |
4 files changed, 69 insertions(+), 64 deletions(-) |
17 |
|
18 |
diff --git a/games-puzzle/numptyphysics/Manifest b/games-puzzle/numptyphysics/Manifest |
19 |
index 5476485a38d..b8b327c51d4 100644 |
20 |
--- a/games-puzzle/numptyphysics/Manifest |
21 |
+++ b/games-puzzle/numptyphysics/Manifest |
22 |
@@ -11,6 +11,7 @@ DIST jhoff80.npz 4612 BLAKE2B 167174fe7e7ed9a765964a4325ac7478d1f60b7e5ea22c55b0 |
23 |
DIST leonet.npz 4885 BLAKE2B 94355b22e995ba91c2c57afa6572d5a669f600d7a21b890a11150c88145727914595d39fb2ee2a8c1d3f21320ed69b06991bf7db521ff68984fae04600b18487 SHA512 789cdde6313b7cc9e8616c7969d86ed44866baa9ae88befa605d7066ca8134f167aac9490afa3918305929dbbc0acaf46708e02be4353f98ebeb3dbe3b0eefa1 |
24 |
DIST melvin.npz 18147 BLAKE2B 285580aa6561e4842aee385f349c77fc8bc05ffb645f623a3fd586ad9737e6248c6a742835c2d17eca4a467f3933b16fc9278315f4d04e98f07b0532762016bf SHA512 391a82b4c42cd2597dd06b299f15cf41302ec593658929d320b66caa69cd73e7cbe3128a18c811017c3b73c435a6f42b763c6e531c8fd193715bc41f85a6b5c2 |
25 |
DIST noodleman.npz 46574 BLAKE2B 408ec52adc0b65965858e54c9b281e418cdfce46fd125d30736719fd181fc0a2543f5bb486868b949db740c4a08d07b3f8abf7f3525daff2348e2eb0d24d7080 SHA512 a088c2c86303985e7d8beec34809f09fcf8e510f7c2af2530620774d1f6579ac1e5ac73989b8e423079c1171a79c92a0cb6e6e01dca950fc519007c91b86ea82 |
26 |
+DIST numptyphysics-0.3.4.tar.gz 1646818 BLAKE2B a78b68437bf446036b227dd9e37bcc3b7e3098f9998aa4a6172e68736b5b840db153538c063a20a02b3a1e7e2d5b0c9b3e976f5ffa8b631a44b8544e9c34bb24 SHA512 2934303737309c058f64ba9dc24a292553e065c7604c8f0964365a9ca2ef68356a68515df5d71b2d3a0f59d115ebcc8b052a17f66ca2cfd5ffa80b68a38ca407 |
27 |
DIST papky.npz 2075 BLAKE2B f638dfae861027a7c89fdfdb305b273cc07aef26ae16e1e2b11bac467d0b13a663d700ca0c6aa1c3630c0b20eb453c27c87b700182e701754f25b0be3b3c16e5 SHA512 69733167ef00f64c19e4f8805e1a881332698e26950f996fc5d41e9e5580f5578b2b9d3f9781bacc9293519e139b7d531891b91f36c45031ac06da6e8e78fbfa |
28 |
DIST perli.npz 15452 BLAKE2B 9c57af22a31eead27a3e48605c362a4018a3bc9e6227ac1e9e813a9ca2f8c3e2f771d6bbfc7fe1f7415989a14852105802ea054d12ddb5c6ce2697b47dadec03 SHA512 cee513ed0e728334f0e60571e38dc68e476681bad8a22497ac01f790c6975bbffba727ede054bfc6f594f289c9bf6346c3e9b3537145707c3ed6f4d6c21136c8 |
29 |
DIST qole.npz 6533 BLAKE2B 35b24ea2a5462c079099ed511abbca8abf6e7362646574726027187166cac817509ff6c1bce3ef0e57d5e086adf9585edf9e00421a0a4954e755a8b056f718da SHA512 dc624c5ffdcb0f9f18c20db7a08d7e9d9d4fa5314e3fabfa730e21bb0a27d4b415432ec66eab64d8252c7fe4793a2cff231e856ca06d85c61558a867bf2fb03b |
30 |
|
31 |
diff --git a/games-puzzle/numptyphysics/files/numptyphysics-0.3.4-gentoo.patch b/games-puzzle/numptyphysics/files/numptyphysics-0.3.4-gentoo.patch |
32 |
new file mode 100644 |
33 |
index 00000000000..e3a7b2ee372 |
34 |
--- /dev/null |
35 |
+++ b/games-puzzle/numptyphysics/files/numptyphysics-0.3.4-gentoo.patch |
36 |
@@ -0,0 +1,44 @@ |
37 |
+diff --git a/external/glaserl/makefile b/external/glaserl/makefile |
38 |
+index 4120459..f49d9e7 100644 |
39 |
+--- a/external/glaserl/makefile |
40 |
++++ b/external/glaserl/makefile |
41 |
+@@ -1,7 +1,5 @@ |
42 |
+ TARGET := libglaserl.a |
43 |
+ |
44 |
+-CFLAGS += -g -O2 |
45 |
+- |
46 |
+ SOURCES := $(wildcard *.c) |
47 |
+ OBJECTS := $(SOURCES:.c=.o) |
48 |
+ |
49 |
+diff --git a/makefile b/makefile |
50 |
+index 0f9a9b6..292b759 100644 |
51 |
+--- a/makefile |
52 |
++++ b/makefile |
53 |
+@@ -1,7 +1,6 @@ |
54 |
+ APP := numptyphysics |
55 |
+ |
56 |
+ SOURCES := $(wildcard src/*.cpp) |
57 |
+-CXXFLAGS += -std=c++11 -Isrc -Wall -Wno-sign-compare |
58 |
+ |
59 |
+ all: app |
60 |
+ |
61 |
+@@ -13,7 +12,7 @@ app: $(TARGET) |
62 |
+ |
63 |
+ $(TARGET): $(OBJECTS) $(LOCAL_LIBS) |
64 |
+ $(SILENTMSG) "\tLD\t$@\n" |
65 |
+- $(SILENTCMD) $(CXX) -o $@ $^ $(LIBS) |
66 |
++ $(SILENTCMD) $(CXX) -o $@ $^ $(LDFLAGS) $(LIBS) |
67 |
+ |
68 |
+ clean: $(ADDITIONAL_CLEAN_TARGETS) |
69 |
+ $(SILENTMSG) "\tCLEAN\n" |
70 |
+diff --git a/src/Os.cpp b/src/Os.cpp |
71 |
+index b5d7fb9..6a0ccf4 100644 |
72 |
+--- a/src/Os.cpp |
73 |
++++ b/src/Os.cpp |
74 |
+@@ -262,5 +262,5 @@ Os::globalDataDir() |
75 |
+ } |
76 |
+ |
77 |
+ // System-wide installation |
78 |
+- return thp::format("%s/../share/%s/data", g_appDir.c_str(), appName().c_str()); |
79 |
++ return "/usr/share/numptyphysics/data"; |
80 |
+ } |
81 |
|
82 |
diff --git a/games-puzzle/numptyphysics/numptyphysics-9999.ebuild b/games-puzzle/numptyphysics/numptyphysics-0.3.4.ebuild |
83 |
similarity index 67% |
84 |
copy from games-puzzle/numptyphysics/numptyphysics-9999.ebuild |
85 |
copy to games-puzzle/numptyphysics/numptyphysics-0.3.4.ebuild |
86 |
index aed85c6e884..7e0ad57dfbe 100644 |
87 |
--- a/games-puzzle/numptyphysics/numptyphysics-9999.ebuild |
88 |
+++ b/games-puzzle/numptyphysics/numptyphysics-0.3.4.ebuild |
89 |
@@ -1,14 +1,15 @@ |
90 |
-# Copyright 1999-2015 Gentoo Foundation |
91 |
+# Copyright 1999-2018 Gentoo Foundation |
92 |
# Distributed under the terms of the GNU General Public License v2 |
93 |
|
94 |
-EAPI=5 |
95 |
-inherit eutils gnome2-utils flag-o-matic git-r3 games |
96 |
+EAPI=6 |
97 |
+inherit eutils gnome2-utils flag-o-matic |
98 |
|
99 |
-DESCRIPTION="Crayon Physics-like drawing puzzle game using the same excellent Box2D engine" |
100 |
+DESCRIPTION="A drawing puzzle game in the spirit of Crayon Physics using the same excellent Box2D engine" |
101 |
HOMEPAGE="http://thp.io/2015/numptyphysics/" |
102 |
|
103 |
# This is only the SRC_URI for the user levels. The code is in git repo. |
104 |
SRC_URI="user-levels? ( |
105 |
+ https://github.com/thp/numptyphysics/archive/0.3.4.tar.gz -> ${P}.tar.gz |
106 |
http://numptyphysics.garage.maemo.org/levels/butelo/butelo.npz |
107 |
http://numptyphysics.garage.maemo.org/levels/catalyst/catalyst.npz |
108 |
http://numptyphysics.garage.maemo.org/levels/christeck/christeck.npz |
109 |
@@ -32,58 +33,33 @@ SRC_URI="user-levels? ( |
110 |
http://numptyphysics.garage.maemo.org/levels/zeez/zeez.npz |
111 |
)" |
112 |
|
113 |
-EGIT_REPO_URI="https://github.com/thp/numptyphysics" |
114 |
- |
115 |
LICENSE="GPL-3" |
116 |
SLOT="0" |
117 |
-KEYWORDS="" |
118 |
+KEYWORDS="~amd64" |
119 |
IUSE="+user-levels" |
120 |
|
121 |
-RDEPEND="media-libs/libsdl2[opengl,video] |
122 |
+RDEPEND=" |
123 |
+ media-libs/libsdl2[opengl,video] |
124 |
media-libs/sdl2-image[png] |
125 |
media-libs/sdl2-ttf |
126 |
virtual/opengl |
127 |
- dev-libs/glib:2" |
128 |
+ dev-libs/glib:2 |
129 |
+" |
130 |
DEPEND="${DEPEND} |
131 |
- virtual/pkgconfig" |
132 |
- |
133 |
-src_unpack() { |
134 |
- git-r3_src_unpack |
135 |
-} |
136 |
+ virtual/pkgconfig |
137 |
+" |
138 |
|
139 |
src_prepare() { |
140 |
+ default |
141 |
append-cxxflags -std=c++11 -Isrc |
142 |
- epatch "${FILESDIR}"/${P}-gentoo.patch |
143 |
- sed -i \ |
144 |
- -e "s^@GENTOO_DATADIR@^${GAMES_DATADIR}/${PN}/data^" \ |
145 |
- src/Os.cpp || die |
146 |
-} |
147 |
- |
148 |
-src_install() { |
149 |
- dogamesbin ${PN} |
150 |
- insinto "${GAMES_DATADIR}/${PN}" |
151 |
- doins -r data |
152 |
- |
153 |
- if use user-levels ; then |
154 |
- local f |
155 |
- |
156 |
- for f in ${A} ; do |
157 |
- [[ ${f} = ${f/.tar.gz/} ]] && doins "${DISTDIR}"/${f} |
158 |
- done |
159 |
- fi |
160 |
- make_desktop_entry ${PN} 'Numpty Physics' |
161 |
- doicon -s 256 platform/freedesktop/numptyphysics.png |
162 |
- doman platform/freedesktop/numptyphysics.6 |
163 |
- prepgamesdirs |
164 |
+ eapply ${FILESDIR}/${P}-gentoo.patch |
165 |
} |
166 |
|
167 |
pkg_preinst() { |
168 |
- games_pkg_preinst |
169 |
gnome2_icon_savelist |
170 |
} |
171 |
|
172 |
pkg_postinst() { |
173 |
- games_pkg_postinst |
174 |
gnome2_icon_cache_update |
175 |
} |
176 |
|
177 |
|
178 |
diff --git a/games-puzzle/numptyphysics/numptyphysics-9999.ebuild b/games-puzzle/numptyphysics/numptyphysics-9999.ebuild |
179 |
index aed85c6e884..01e05708917 100644 |
180 |
--- a/games-puzzle/numptyphysics/numptyphysics-9999.ebuild |
181 |
+++ b/games-puzzle/numptyphysics/numptyphysics-9999.ebuild |
182 |
@@ -1,8 +1,8 @@ |
183 |
-# Copyright 1999-2015 Gentoo Foundation |
184 |
+# Copyright 1999-2018 Gentoo Foundation |
185 |
# Distributed under the terms of the GNU General Public License v2 |
186 |
|
187 |
-EAPI=5 |
188 |
-inherit eutils gnome2-utils flag-o-matic git-r3 games |
189 |
+EAPI=6 |
190 |
+inherit eutils gnome2-utils flag-o-matic git-r3 |
191 |
|
192 |
DESCRIPTION="Crayon Physics-like drawing puzzle game using the same excellent Box2D engine" |
193 |
HOMEPAGE="http://thp.io/2015/numptyphysics/" |
194 |
@@ -53,37 +53,21 @@ src_unpack() { |
195 |
|
196 |
src_prepare() { |
197 |
append-cxxflags -std=c++11 -Isrc |
198 |
- epatch "${FILESDIR}"/${P}-gentoo.patch |
199 |
- sed -i \ |
200 |
- -e "s^@GENTOO_DATADIR@^${GAMES_DATADIR}/${PN}/data^" \ |
201 |
+ sed -i '/-g -O2/d' external/Box2D/Source/Makefile \ |
202 |
+ external/glaserl/makefile || die |
203 |
+ sed -i "/return thp::/s% thp::.*$%\"/usr/share/${PN}/data\";%" \ |
204 |
src/Os.cpp || die |
205 |
-} |
206 |
- |
207 |
-src_install() { |
208 |
- dogamesbin ${PN} |
209 |
- insinto "${GAMES_DATADIR}/${PN}" |
210 |
- doins -r data |
211 |
- |
212 |
- if use user-levels ; then |
213 |
- local f |
214 |
- |
215 |
- for f in ${A} ; do |
216 |
- [[ ${f} = ${f/.tar.gz/} ]] && doins "${DISTDIR}"/${f} |
217 |
- done |
218 |
- fi |
219 |
- make_desktop_entry ${PN} 'Numpty Physics' |
220 |
- doicon -s 256 platform/freedesktop/numptyphysics.png |
221 |
- doman platform/freedesktop/numptyphysics.6 |
222 |
- prepgamesdirs |
223 |
+ sed -e '/CXXFLAGS +=/s/\(CXXFLAGS +=\).*\( -DAPP=.*\)/\1\2/' \ |
224 |
+ -e '/SILENTCMD/s/$(LIBS)$/$(LDFLAGS) $(LIBS)/' \ |
225 |
+ -i makefile || die |
226 |
+ eapply_user |
227 |
} |
228 |
|
229 |
pkg_preinst() { |
230 |
- games_pkg_preinst |
231 |
gnome2_icon_savelist |
232 |
} |
233 |
|
234 |
pkg_postinst() { |
235 |
- games_pkg_postinst |
236 |
gnome2_icon_cache_update |
237 |
} |