1 |
commit: 4cd9668d2edded13bd33aef9d9a15c46385b9ed2 |
2 |
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jul 16 23:33:57 2021 +0000 |
4 |
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jul 17 07:58:47 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4cd9668d |
7 |
|
8 |
games-puzzle/numptyphysics: add 0.3.8 |
9 |
|
10 |
ebuild fixes: |
11 |
* -user-levels was broken due to main SRC_URI being behind user-levels? |
12 |
* +user-levels was pointless due to main tarball already including |
13 |
them in the required new format -- and downloaded levels weren't |
14 |
being installed either way |
15 |
* tc-export AR RANLIB also needed, and new patch adds PKG_CONFIG |
16 |
* fix icon cache (gnome2_icon_cache_update called in EAPI-7) |
17 |
|
18 |
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> |
19 |
|
20 |
games-puzzle/numptyphysics/Manifest | 1 + |
21 |
.../files/numptyphysics-0.3.8-empty-tr.patch | 10 ++++++ |
22 |
.../files/numptyphysics-0.3.8-respect-flags.patch | 30 ++++++++++++++++ |
23 |
.../numptyphysics/numptyphysics-0.3.8.ebuild | 40 ++++++++++++++++++++++ |
24 |
4 files changed, 81 insertions(+) |
25 |
|
26 |
diff --git a/games-puzzle/numptyphysics/Manifest b/games-puzzle/numptyphysics/Manifest |
27 |
index ce3a6fe46ba..815ed487b84 100644 |
28 |
--- a/games-puzzle/numptyphysics/Manifest |
29 |
+++ b/games-puzzle/numptyphysics/Manifest |
30 |
@@ -12,6 +12,7 @@ DIST leonet.npz 4885 BLAKE2B 94355b22e995ba91c2c57afa6572d5a669f600d7a21b890a111 |
31 |
DIST melvin.npz 18147 BLAKE2B 285580aa6561e4842aee385f349c77fc8bc05ffb645f623a3fd586ad9737e6248c6a742835c2d17eca4a467f3933b16fc9278315f4d04e98f07b0532762016bf SHA512 391a82b4c42cd2597dd06b299f15cf41302ec593658929d320b66caa69cd73e7cbe3128a18c811017c3b73c435a6f42b763c6e531c8fd193715bc41f85a6b5c2 |
32 |
DIST noodleman.npz 46574 BLAKE2B 408ec52adc0b65965858e54c9b281e418cdfce46fd125d30736719fd181fc0a2543f5bb486868b949db740c4a08d07b3f8abf7f3525daff2348e2eb0d24d7080 SHA512 a088c2c86303985e7d8beec34809f09fcf8e510f7c2af2530620774d1f6579ac1e5ac73989b8e423079c1171a79c92a0cb6e6e01dca950fc519007c91b86ea82 |
33 |
DIST numptyphysics-0.3.5.tar.gz 1647220 BLAKE2B 90a82f05b7a725a88ddf40b7369341319ce999f6a167a1c817e53614a9cc57bbd15d4ea6a251e5d389c4e9516d319ccee046bbb5a78606be4263ffd5223372e6 SHA512 d80eb929fc5af7b4a241169e833858f1436ec86818f6c6d8d9280254a4c5f113ec9123adda319b22410a4ac259732e95ca1af057b542bc3e9d6b784668435fd0 |
34 |
+DIST numptyphysics-0.3.8.tar.gz 1647661 BLAKE2B 07cd5fa77e48517bf7cd2b11d8bcd4a0878cf02860f4165d29a562191e529babcf9637b293d3670bd37f8dfb9db4423546f6eede405fa0ecf97187e0f408dbae SHA512 6f5c7783e9e09efda19ff00d369dca76e0dc8f574b1e8c9268459accf83e48a29f7caec7a4ec3a28da4fac3007d2137f0bf5426494118927cd7b944646c7c24e |
35 |
DIST papky.npz 2075 BLAKE2B f638dfae861027a7c89fdfdb305b273cc07aef26ae16e1e2b11bac467d0b13a663d700ca0c6aa1c3630c0b20eb453c27c87b700182e701754f25b0be3b3c16e5 SHA512 69733167ef00f64c19e4f8805e1a881332698e26950f996fc5d41e9e5580f5578b2b9d3f9781bacc9293519e139b7d531891b91f36c45031ac06da6e8e78fbfa |
36 |
DIST perli.npz 15452 BLAKE2B 9c57af22a31eead27a3e48605c362a4018a3bc9e6227ac1e9e813a9ca2f8c3e2f771d6bbfc7fe1f7415989a14852105802ea054d12ddb5c6ce2697b47dadec03 SHA512 cee513ed0e728334f0e60571e38dc68e476681bad8a22497ac01f790c6975bbffba727ede054bfc6f594f289c9bf6346c3e9b3537145707c3ed6f4d6c21136c8 |
37 |
DIST qole.npz 6533 BLAKE2B 35b24ea2a5462c079099ed511abbca8abf6e7362646574726027187166cac817509ff6c1bce3ef0e57d5e086adf9585edf9e00421a0a4954e755a8b056f718da SHA512 dc624c5ffdcb0f9f18c20db7a08d7e9d9d4fa5314e3fabfa730e21bb0a27d4b415432ec66eab64d8252c7fe4793a2cff231e856ca06d85c61558a867bf2fb03b |
38 |
|
39 |
diff --git a/games-puzzle/numptyphysics/files/numptyphysics-0.3.8-empty-tr.patch b/games-puzzle/numptyphysics/files/numptyphysics-0.3.8-empty-tr.patch |
40 |
new file mode 100644 |
41 |
index 00000000000..847092190d3 |
42 |
--- /dev/null |
43 |
+++ b/games-puzzle/numptyphysics/files/numptyphysics-0.3.8-empty-tr.patch |
44 |
@@ -0,0 +1,10 @@ |
45 |
+On unrecognized LC_MESSAGES (e.g. C.utf8) the .empty() check |
46 |
+fails and loads empty translations leading to constant: |
47 |
+[ 1536ms] [I18n.cpp:34 WARNING] Untranslated: 'Gameplay paused' |
48 |
+--- a/src/Os.cpp |
49 |
++++ b/src/Os.cpp |
50 |
+@@ -279,3 +279,3 @@ |
51 |
+ auto fn = thp::format("i18n/%s", lang); |
52 |
+- if (!Config::readFile(fn).empty()) { |
53 |
++ if (!access(Config::findFile(fn).c_str(),F_OK)) { |
54 |
+ Tr::load(fn); |
55 |
|
56 |
diff --git a/games-puzzle/numptyphysics/files/numptyphysics-0.3.8-respect-flags.patch b/games-puzzle/numptyphysics/files/numptyphysics-0.3.8-respect-flags.patch |
57 |
new file mode 100644 |
58 |
index 00000000000..09b54e6ac73 |
59 |
--- /dev/null |
60 |
+++ b/games-puzzle/numptyphysics/files/numptyphysics-0.3.8-respect-flags.patch |
61 |
@@ -0,0 +1,30 @@ |
62 |
+diff '--color=auto' -NarU 2 a/external/Box2D/Source/Makefile b/external/Box2D/Source/Makefile |
63 |
+--- a/external/Box2D/Source/Makefile 2021-06-18 07:19:06.000000000 -0400 |
64 |
++++ b/external/Box2D/Source/Makefile 2021-07-16 17:01:57.254825075 -0400 |
65 |
+@@ -7,5 +7,5 @@ |
66 |
+ endif |
67 |
+ |
68 |
+-CXXFLAGS= -g -O2 |
69 |
++CXXFLAGS ?= -g -O2 |
70 |
+ |
71 |
+ SOURCES = \ |
72 |
+diff '--color=auto' -NarU 2 a/makefile b/makefile |
73 |
+--- a/makefile 2021-06-18 07:19:06.000000000 -0400 |
74 |
++++ b/makefile 2021-07-16 17:00:51.421009113 -0400 |
75 |
+@@ -38,5 +38,5 @@ |
76 |
+ $(TARGET): $(OBJECTS) $(LOCAL_LIBS) |
77 |
+ $(SILENTMSG) "\tLD\t$@\n" |
78 |
+- $(SILENTCMD) $(CXX) -o $@ $^ $(LIBS) |
79 |
++ $(SILENTCMD) $(CXX) -o $@ $^ $(LDFLAGS) $(LIBS) |
80 |
+ |
81 |
+ clean: $(ADDITIONAL_CLEAN_TARGETS) |
82 |
+diff '--color=auto' -NarU 2 a/mk/pkgs.mk b/mk/pkgs.mk |
83 |
+--- a/mk/pkgs.mk 2021-06-18 07:19:06.000000000 -0400 |
84 |
++++ b/mk/pkgs.mk 2021-07-16 17:10:28.636268435 -0400 |
85 |
+@@ -1,4 +1,4 @@ |
86 |
+ ifneq ($(PKGS),) |
87 |
+-CXXFLAGS += $(shell $(CROSS_COMPILE)pkg-config --cflags $(PKGS)) |
88 |
+-LIBS += $(shell $(CROSS_COMPILE)pkg-config --libs $(PKGS)) |
89 |
++CXXFLAGS += $(shell $(PKG_CONFIG) --cflags $(PKGS)) |
90 |
++LIBS += $(shell $(PKG_CONFIG) --libs $(PKGS)) |
91 |
+ endif |
92 |
|
93 |
diff --git a/games-puzzle/numptyphysics/numptyphysics-0.3.8.ebuild b/games-puzzle/numptyphysics/numptyphysics-0.3.8.ebuild |
94 |
new file mode 100644 |
95 |
index 00000000000..9ff5318033c |
96 |
--- /dev/null |
97 |
+++ b/games-puzzle/numptyphysics/numptyphysics-0.3.8.ebuild |
98 |
@@ -0,0 +1,40 @@ |
99 |
+# Copyright 1999-2021 Gentoo Authors |
100 |
+# Distributed under the terms of the GNU General Public License v2 |
101 |
+ |
102 |
+EAPI=7 |
103 |
+ |
104 |
+inherit toolchain-funcs xdg |
105 |
+ |
106 |
+DESCRIPTION="Crayon Physics-like drawing puzzle game using the same excellent Box2D engine" |
107 |
+HOMEPAGE="https://github.com/thp/numptyphysics" |
108 |
+ |
109 |
+if [[ ${PV} == 9999 ]]; then |
110 |
+ inherit git-r3 |
111 |
+ EGIT_REPO_URI="https://github.com/thp/numptyphysics.git" |
112 |
+else |
113 |
+ SRC_URI="https://github.com/thp/numptyphysics/archive/${PV}.tar.gz -> ${P}.tar.gz" |
114 |
+ KEYWORDS="~amd64" |
115 |
+fi |
116 |
+ |
117 |
+LICENSE="BSD GPL-3+ ZLIB" |
118 |
+SLOT="0" |
119 |
+ |
120 |
+RDEPEND=" |
121 |
+ dev-libs/glib:2 |
122 |
+ media-libs/libsdl2[opengl,video] |
123 |
+ media-libs/sdl2-image[png] |
124 |
+ media-libs/sdl2-ttf |
125 |
+ virtual/opengl" |
126 |
+DEPEND="${RDEPEND}" |
127 |
+BDEPEND="virtual/pkgconfig" |
128 |
+ |
129 |
+PATCHES=( |
130 |
+ "${FILESDIR}"/${P}-empty-tr.patch |
131 |
+ "${FILESDIR}"/${P}-respect-flags.patch |
132 |
+) |
133 |
+ |
134 |
+src_compile() { |
135 |
+ tc-export AR CC CXX PKG_CONFIG RANLIB |
136 |
+ |
137 |
+ emake V=1 |
138 |
+} |