summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2018-07-01 11:43:31 +0200
committerDavid Seifert <soap@gentoo.org>2018-07-01 11:46:19 +0200
commit252a6dd9f24a9054f7d4e5b7996c531a640f1541 (patch)
treefe6352e0e683e9e35deb803dd447b85655f6cba9 /games-arcade
parentapp-misc/gramps: x86 stable wrt bug #659408 (diff)
downloadgentoo-252a6dd9f24a9054f7d4e5b7996c531a640f1541.tar.gz
gentoo-252a6dd9f24a9054f7d4e5b7996c531a640f1541.tar.bz2
gentoo-252a6dd9f24a9054f7d4e5b7996c531a640f1541.zip
games-arcade/supertux: Build using Ninja
* Use system PhysFS * Fix CMake unused variable error Closes: https://bugs.gentoo.org/638076 Closes: https://bugs.gentoo.org/649458 Package-Manager: Portage-2.3.41, Repoman-2.3.9
Diffstat (limited to 'games-arcade')
-rw-r--r--games-arcade/supertux/files/supertux-0.5.1-ninja.patch30
-rw-r--r--games-arcade/supertux/supertux-0.5.1.ebuild19
2 files changed, 37 insertions, 12 deletions
diff --git a/games-arcade/supertux/files/supertux-0.5.1-ninja.patch b/games-arcade/supertux/files/supertux-0.5.1-ninja.patch
new file mode 100644
index 000000000000..d5181177fdcd
--- /dev/null
+++ b/games-arcade/supertux/files/supertux-0.5.1-ninja.patch
@@ -0,0 +1,30 @@
+Allow building with ninja instead of CMake, see also:
+
+ https://bugs.gentoo.org/649458
+ https://cmake.org/pipermail/cmake/2015-April/060234.html
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -332,7 +332,10 @@
+ -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
+ -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
+ -DCMAKE_INSTALL_PREFIX=${SQUIRREL_PREFIX}
+- -DINSTALL_INC_DIR=include)
++ -DINSTALL_INC_DIR=include
++ BUILD_BYPRODUCTS
++ squirrel/lib/libsquirrel_static.a
++ squirrel/lib/libsqstdlib_static.a)
+
+ IF(WIN32)
+ ADD_LIBRARY(squirrel_lib SHARED IMPORTED)
+@@ -370,7 +373,9 @@
+ -DHAVE_SDL=ON
+ -DCMAKE_INSTALL_PREFIX=${TINYGETTEXT_PREFIX}
+ -DSDL2_INCLUDE_DIRS=${SDL2_INCLUDE_DIRS}
+- -DLIB_SUFFIX=${LIB_SUFFIX})
++ -DLIB_SUFFIX=${LIB_SUFFIX}
++ BUILD_BYPRODUCTS
++ tinygettext/lib${LIB_SUFFIX}/libtinygettext.a)
+
+ ADD_LIBRARY(tinygettext_lib STATIC IMPORTED)
+ SET_TARGET_PROPERTIES(tinygettext_lib PROPERTIES IMPORTED_LOCATION "${TINYGETTEXT_PREFIX}/lib${LIB_SUFFIX}/${CMAKE_STATIC_LIBRARY_PREFIX}tinygettext${CMAKE_STATIC_LIBRARY_SUFFIX}")
diff --git a/games-arcade/supertux/supertux-0.5.1.ebuild b/games-arcade/supertux/supertux-0.5.1.ebuild
index af91e8b026d3..c1773f3228cd 100644
--- a/games-arcade/supertux/supertux-0.5.1.ebuild
+++ b/games-arcade/supertux/supertux-0.5.1.ebuild
@@ -1,7 +1,9 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
+
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
inherit cmake-utils flag-o-matic
MY_P="SuperTux-v${PV}-Source"
@@ -32,35 +34,28 @@ S="${WORKDIR}/${MY_P}"
PATCHES=(
"${FILESDIR}"/${PN}-0.4.0-{desktop,license,icon}.patch
"${FILESDIR}"/${PN}-0.5.0-{obstack,tinygettext}.patch
+ "${FILESDIR}"/${PN}-0.5.1-ninja.patch
)
src_prepare() {
cmake-utils_src_prepare
# This is not a developer release so switch the logo to the non-dev one.
- sed 's@logo_dev@logo@' \
+ sed -e 's@logo_dev@logo@' \
-i data/images/objects/logo/logo.sprite || die
}
src_configure() {
append-cxxflags -std=c++11
+
local mycmakeargs=(
-DWERROR=OFF
-DINSTALL_SUBDIR_BIN=bin
-DINSTALL_SUBDIR_DOC=share/doc/${PF}
-DINSTALL_SUBDIR_SHARE=share/${PN}2
-DENABLE_SQDBG="$(usex debug)"
- -DUSE_DEBUG="$(usex debug)"
-DENABLE_BOOST_STATIC_LIBS=OFF # bug! Please check if this is still required.
+ -DUSE_SYSTEM_PHYSFS=ON
)
-
cmake-utils_src_configure
}
-
-src_compile() {
- cmake-utils_src_compile
-}
-
-src_install() {
- cmake-utils_src_install
-}