1 |
commit: 252a6dd9f24a9054f7d4e5b7996c531a640f1541 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jul 1 09:43:31 2018 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 1 09:46:19 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=252a6dd9 |
7 |
|
8 |
games-arcade/supertux: Build using Ninja |
9 |
|
10 |
* Use system PhysFS |
11 |
* Fix CMake unused variable error |
12 |
|
13 |
Closes: https://bugs.gentoo.org/638076 |
14 |
Closes: https://bugs.gentoo.org/649458 |
15 |
Package-Manager: Portage-2.3.41, Repoman-2.3.9 |
16 |
|
17 |
.../supertux/files/supertux-0.5.1-ninja.patch | 30 ++++++++++++++++++++++ |
18 |
games-arcade/supertux/supertux-0.5.1.ebuild | 19 +++++--------- |
19 |
2 files changed, 37 insertions(+), 12 deletions(-) |
20 |
|
21 |
diff --git a/games-arcade/supertux/files/supertux-0.5.1-ninja.patch b/games-arcade/supertux/files/supertux-0.5.1-ninja.patch |
22 |
new file mode 100644 |
23 |
index 00000000000..d5181177fdc |
24 |
--- /dev/null |
25 |
+++ b/games-arcade/supertux/files/supertux-0.5.1-ninja.patch |
26 |
@@ -0,0 +1,30 @@ |
27 |
+Allow building with ninja instead of CMake, see also: |
28 |
+ |
29 |
+ https://bugs.gentoo.org/649458 |
30 |
+ https://cmake.org/pipermail/cmake/2015-April/060234.html |
31 |
+ |
32 |
+--- a/CMakeLists.txt |
33 |
++++ b/CMakeLists.txt |
34 |
+@@ -332,7 +332,10 @@ |
35 |
+ -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} |
36 |
+ -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} |
37 |
+ -DCMAKE_INSTALL_PREFIX=${SQUIRREL_PREFIX} |
38 |
+- -DINSTALL_INC_DIR=include) |
39 |
++ -DINSTALL_INC_DIR=include |
40 |
++ BUILD_BYPRODUCTS |
41 |
++ squirrel/lib/libsquirrel_static.a |
42 |
++ squirrel/lib/libsqstdlib_static.a) |
43 |
+ |
44 |
+ IF(WIN32) |
45 |
+ ADD_LIBRARY(squirrel_lib SHARED IMPORTED) |
46 |
+@@ -370,7 +373,9 @@ |
47 |
+ -DHAVE_SDL=ON |
48 |
+ -DCMAKE_INSTALL_PREFIX=${TINYGETTEXT_PREFIX} |
49 |
+ -DSDL2_INCLUDE_DIRS=${SDL2_INCLUDE_DIRS} |
50 |
+- -DLIB_SUFFIX=${LIB_SUFFIX}) |
51 |
++ -DLIB_SUFFIX=${LIB_SUFFIX} |
52 |
++ BUILD_BYPRODUCTS |
53 |
++ tinygettext/lib${LIB_SUFFIX}/libtinygettext.a) |
54 |
+ |
55 |
+ ADD_LIBRARY(tinygettext_lib STATIC IMPORTED) |
56 |
+ SET_TARGET_PROPERTIES(tinygettext_lib PROPERTIES IMPORTED_LOCATION "${TINYGETTEXT_PREFIX}/lib${LIB_SUFFIX}/${CMAKE_STATIC_LIBRARY_PREFIX}tinygettext${CMAKE_STATIC_LIBRARY_SUFFIX}") |
57 |
|
58 |
diff --git a/games-arcade/supertux/supertux-0.5.1.ebuild b/games-arcade/supertux/supertux-0.5.1.ebuild |
59 |
index af91e8b026d..c1773f3228c 100644 |
60 |
--- a/games-arcade/supertux/supertux-0.5.1.ebuild |
61 |
+++ b/games-arcade/supertux/supertux-0.5.1.ebuild |
62 |
@@ -1,7 +1,9 @@ |
63 |
-# Copyright 1999-2017 Gentoo Foundation |
64 |
+# Copyright 1999-2018 Gentoo Foundation |
65 |
# Distributed under the terms of the GNU General Public License v2 |
66 |
|
67 |
EAPI=6 |
68 |
+ |
69 |
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja} |
70 |
inherit cmake-utils flag-o-matic |
71 |
|
72 |
MY_P="SuperTux-v${PV}-Source" |
73 |
@@ -32,35 +34,28 @@ S="${WORKDIR}/${MY_P}" |
74 |
PATCHES=( |
75 |
"${FILESDIR}"/${PN}-0.4.0-{desktop,license,icon}.patch |
76 |
"${FILESDIR}"/${PN}-0.5.0-{obstack,tinygettext}.patch |
77 |
+ "${FILESDIR}"/${PN}-0.5.1-ninja.patch |
78 |
) |
79 |
|
80 |
src_prepare() { |
81 |
cmake-utils_src_prepare |
82 |
|
83 |
# This is not a developer release so switch the logo to the non-dev one. |
84 |
- sed 's@logo_dev@logo@' \ |
85 |
+ sed -e 's@logo_dev@logo@' \ |
86 |
-i data/images/objects/logo/logo.sprite || die |
87 |
} |
88 |
|
89 |
src_configure() { |
90 |
append-cxxflags -std=c++11 |
91 |
+ |
92 |
local mycmakeargs=( |
93 |
-DWERROR=OFF |
94 |
-DINSTALL_SUBDIR_BIN=bin |
95 |
-DINSTALL_SUBDIR_DOC=share/doc/${PF} |
96 |
-DINSTALL_SUBDIR_SHARE=share/${PN}2 |
97 |
-DENABLE_SQDBG="$(usex debug)" |
98 |
- -DUSE_DEBUG="$(usex debug)" |
99 |
-DENABLE_BOOST_STATIC_LIBS=OFF # bug! Please check if this is still required. |
100 |
+ -DUSE_SYSTEM_PHYSFS=ON |
101 |
) |
102 |
- |
103 |
cmake-utils_src_configure |
104 |
} |
105 |
- |
106 |
-src_compile() { |
107 |
- cmake-utils_src_compile |
108 |
-} |
109 |
- |
110 |
-src_install() { |
111 |
- cmake-utils_src_install |
112 |
-} |