Merge pull request #15 from schnitzeltony/master

pingus: fix warning / supertux update to 0.5.0 stable
This commit is contained in:
Marko Lindqvist
2016-10-20 23:16:16 +03:00
committed by GitHub
7 changed files with 276 additions and 66 deletions

View File

@@ -16,7 +16,7 @@ SRC_URI = "\
file://pingus.png \
"
EXTRA_OESCONS = "CC='${CC} -fPIC' CXX='${CXX} -fPIC'"
EXTRA_OESCONS = "CC='${CC} -fPIC' CXX='${CXX} -fPIC' LINKFLAGS='${LDFLAGS}'"
CLEANBROKEN = "1"
do_install() {

View File

@@ -0,0 +1,32 @@
From 4256cd336e766f545516151dda924d65423e0b50 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Mon, 26 Sep 2016 00:04:33 +0200
Subject: [PATCH] CMakeLists.txt: Pin PHYSFS_getPrefDir - autodetection does
not work
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cf97246..28ebada 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -173,7 +173,7 @@ INCLUDE_DIRECTORIES(SYSTEM ${VORBIS_INCLUDE_DIR})
INCLUDE(CheckSymbolExists)
FIND_PACKAGE(PhysFS)
-CHECK_SYMBOL_EXISTS("PHYSFS_getPrefDir" "${PHYSFS_INCLUDE_DIR}/physfs.h" HAVE_PHYSFS_GETPREFDIR)
+SET(HAVE_PHYSFS_GETPREFDIR TRUE)
IF(HAVE_PHYSFS_GETPREFDIR)
SET(USE_SYSTEM_PHYSFS ON CACHE BOOL "Use preinstalled physfs (must support getPrefDir)")
ELSE(HAVE_PHYSFS_GETPREFDIR)
--
2.5.5

View File

@@ -1,36 +0,0 @@
From ed6fd52abd39880b7b1b2cd187a4f54a648d9ea0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Fri, 13 Mar 2015 22:34:56 +0100
Subject: [PATCH] do not set CMAKE_C_FLAGS / CMAKE CXX_FLAGS to empty
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This causes horrible (many faces) errors in cross environments
Upstrem-Status: Pending
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
external/squirrel/CMakeLists.txt | 5 -----
1 file changed, 5 deletions(-)
diff --git a/external/squirrel/CMakeLists.txt b/external/squirrel/CMakeLists.txt
index 0c4ef29..cdfa38a 100644
--- a/external/squirrel/CMakeLists.txt
+++ b/external/squirrel/CMakeLists.txt
@@ -34,11 +34,6 @@ IF(ENABLE_SQDBG)
SET(SQUIRREL_SOURCES ${SQDBG_SOURCES} ${SQUIRREL_SOURCES})
ENDIF(ENABLE_SQDBG)
-# the squirrel sources are out of our control so don't be too pedantic about
-# them
-SET(CMAKE_CXX_FLAGS "")
-SET(CMAKE_C_FLAGS "")
-
## define a target for building the library
ADD_LIBRARY(squirrel ${SQUIRREL_SOURCES})
--
1.9.3

View File

@@ -0,0 +1,87 @@
From cfe8277b69aedf2ed9ae2befbae72aa22d312c41 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Wed, 19 Oct 2016 15:41:56 +0200
Subject: [PATCH 1/2] pass compile flags to external projects
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
In sysrooted environments (e.g yocto cross envirnomen we get strange errors
without passing the flags:
make[4]: Entering directory
'/home/superandy/tmp/oe-core-glibc/work/cortexa7t2hf-neon-vfpv4-angstrom-linux-gnueabi/supertux2/0.5.0-r0/build/tinygettext-prefix/src/tinygettext-build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_cad2b.dir/testCCompiler.c.o
/home/superandy/tmp/oe-core-glibc/sysroots/x86_64-linux/usr/bin/arm-angstrom-linux-gnueabi/arm-angstrom-linux-gnueabi-gcc
-O2 -pipe -g -feliminate-unused-debug-types
-fdebug-prefix-map=/home/superandy/tmp/oe-core-glibc/work/cortexa7t2hf-neon-vfpv4-angstrom-linux-gnueabi/supertux2/0.5.0-r0=/usr/src/debug/supertux2/0.5.0-r0
-fdebug-prefix-map=/home/superandy/tmp/oe-core-glibc/sysroots/x86_64-linux=
-fdebug-prefix-map=/home/superandy/tmp/oe-core-glibc/sysroots/raspberrypi2=
-o CMakeFiles/cmTC_cad2b.dir/testCCompiler.c.o -c
/home/superandy/tmp/oe-core-glibc/work/cortexa7t2hf-neon-vfpv4-angstrom-linux-gnueabi/supertux2/0.5.0-r0/build/tinygettext-prefix/src/tinygettext-build/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_cad2b
/home/superandy/tmp/oe-core-glibc/sysroots/x86_64-linux/usr/bin/cmake -E
cmake_link_script CMakeFiles/cmTC_cad2b.dir/link.txt --verbose=1
/home/superandy/tmp/oe-core-glibc/sysroots/x86_64-linux/usr/bin/arm-angstrom-linux-gnueabi/arm-angstrom-linux-gnueabi-gcc
-O2 -pipe -g -feliminate-unused-debug-types
-fdebug-prefix-map=/home/superandy/tmp/oe-core-glibc/work/cortexa7t2hf-neon-vfpv4-angstrom-linux-gnueabi/supertux2/0.5.0-r0=/usr/src/debug/supertux2/0.5.0-r0
-fdebug-prefix-map=/home/superandy/tmp/oe-core-glibc/sysroots/x86_64-linux=
-fdebug-prefix-map=/home/superandy/tmp/oe-core-glibc/sysroots/raspberrypi2=
-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
CMakeFiles/cmTC_cad2b.dir/testCCompiler.c.o -o cmTC_cad2b -rdynamic
/home/superandy/tmp/oe-core-glibc/sysroots/x86_64-linux/usr/libexec/arm-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/6.2.0/ld:
error: cannot open crt1.o: No such file or directory
/home/superandy/tmp/oe-core-glibc/sysroots/x86_64-linux/usr/libexec/arm-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/6.2.0/ld:
error: cannot open crti.o: No such file or directory
...
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
CMakeLists.txt | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cf97246..045bfbd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -198,7 +198,9 @@ IF(NOT USE_SYSTEM_PHYSFS)
SOURCE_DIR "${CMAKE_SOURCE_DIR}/external/physfs/"
CMAKE_ARGS
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
+ -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
+ -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
-DCMAKE_INSTALL_PREFIX=${PHYSFS_PREFIX}
-DLIB_SUFFIX=${LIB_SUFFIX}
-DPHYSFS_BUILD_SHARED=${PHYSFS_BUILD_SHARED}
@@ -330,7 +332,9 @@ ExternalProject_Add(squirrel
CMAKE_ARGS
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
+ -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
+ -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
-DCMAKE_INSTALL_PREFIX=${SQUIRREL_PREFIX}
-DINSTALL_INC_DIR=include)
@@ -365,7 +369,9 @@ ExternalProject_Add(tinygettext
CMAKE_ARGS
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
+ -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
+ -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
-DBUILD_SHARED_LIBS=OFF
-DHAVE_SDL=ON
-DCMAKE_INSTALL_PREFIX=${TINYGETTEXT_PREFIX}
--
2.5.5

View File

@@ -0,0 +1,127 @@
From 21c018a516a1d3299c26043d518fa627e9268dd6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Wed, 19 Oct 2016 15:53:44 +0200
Subject: [PATCH 2/2] do not set included paths as system - causes trouble with
gcc-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
fixes errors as:
| /home/superandy/tmp/oe-core-glibc/sysroots/raspberrypi2/usr/include/c++/6.2.0/cstdlib:75:25: fatal error: stdlib.h: No such file or directory
| #include_next <stdlib.h>
^
further information at [1]
[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
CMakeLists.txt | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 045bfbd..63e3072 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -119,7 +119,7 @@ ELSE(ENABLE_BOOST_STATIC_LIBS)
SET(Boost_USE_STATIC_LIBS FALSE)
ENDIF(ENABLE_BOOST_STATIC_LIBS)
FIND_PACKAGE(Boost REQUIRED COMPONENTS filesystem system date_time)
-INCLUDE_DIRECTORIES(SYSTEM ${Boost_INCLUDE_DIR})
+INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
IF(WIN32)
@@ -143,14 +143,14 @@ OPTION(GLBINDING_DEBUG_OUTPUT "Enable glbinding debug output for each called Ope
IF(ENABLE_OPENGL)
FIND_PACKAGE(OpenGL)
IF(OPENGL_FOUND)
- INCLUDE_DIRECTORIES(SYSTEM ${OPENGL_INCLUDE_DIR})
+ INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
SET(HAVE_OPENGL TRUE)
ENDIF(OPENGL_FOUND)
IF(GLBINDING_ENABLED)
FIND_PACKAGE(GLBINDING REQUIRED)
IF(GLBINDING_FOUND)
- INCLUDE_DIRECTORIES(SYSTEM ${GLBINDING_INCLUDES})
+ INCLUDE_DIRECTORIES(${GLBINDING_INCLUDES})
ADD_DEFINITIONS(-DUSE_GLBINDING)
IF (GLBINDING_DEBUG_OUTPUT)
ADD_DEFINITIONS(-DUSE_GLBINDING_DEBUG_OUTPUT)
@@ -159,16 +159,16 @@ IF(ENABLE_OPENGL)
ELSE()
FIND_PACKAGE(GLEW REQUIRED)
IF(GLEW_FOUND)
- INCLUDE_DIRECTORIES(SYSTEM ${GLEW_INCLUDE_DIR})
+ INCLUDE_DIRECTORIES(${GLEW_INCLUDE_DIR})
ENDIF(GLEW_FOUND)
ENDIF()
ENDIF(ENABLE_OPENGL)
FIND_PACKAGE(OpenAL REQUIRED)
-INCLUDE_DIRECTORIES(SYSTEM ${OPENAL_INCLUDE_DIR})
+INCLUDE_DIRECTORIES(${OPENAL_INCLUDE_DIR})
FIND_PACKAGE(OggVorbis REQUIRED)
-INCLUDE_DIRECTORIES(SYSTEM ${VORBIS_INCLUDE_DIR})
+INCLUDE_DIRECTORIES(${VORBIS_INCLUDE_DIR})
INCLUDE(CheckSymbolExists)
@@ -218,19 +218,19 @@ IF(NOT USE_SYSTEM_PHYSFS)
SET(PHYSFS_INCLUDE_DIR "${PHYSFS_PREFIX}/include/")
ENDIF()
-INCLUDE_DIRECTORIES(BEFORE SYSTEM ${PHYSFS_INCLUDE_DIR})
+INCLUDE_DIRECTORIES(BEFORE ${PHYSFS_INCLUDE_DIR})
## The curl headers are in the standard include path in dependencies
## so it's not required to add them here
FIND_PACKAGE(CURL REQUIRED)
IF(CURL_FOUND)
- INCLUDE_DIRECTORIES(SYSTEM ${CURL_INCLUDE_DIR})
+ INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIR})
SET(HAVE_LIBCURL TRUE)
ENDIF(CURL_FOUND)
#FIND_PACKAGE(ICONV REQUIRED)
-#INCLUDE_DIRECTORIES(SYSTEM ${ICONV_INCLUDE_DIR})
+#INCLUDE_DIRECTORIES(${ICONV_INCLUDE_DIR})
#LINK_LIBRARIES(${ICONV_LIBRARY})
IF(EXISTS "${CMAKE_SOURCE_DIR}/.git")
@@ -355,7 +355,7 @@ ELSE()
SET_TARGET_PROPERTIES(sqstdlib_lib PROPERTIES IMPORTED_LOCATION "${SQUIRREL_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}sqstdlib_static${CMAKE_STATIC_LIBRARY_SUFFIX}")
ENDIF()
-INCLUDE_DIRECTORIES(SYSTEM ${SQUIRREL_PREFIX}/include)
+INCLUDE_DIRECTORIES(${SQUIRREL_PREFIX}/include)
## Also build external/tinygettext
@@ -381,15 +381,15 @@ ExternalProject_Add(tinygettext
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}")
-INCLUDE_DIRECTORIES(SYSTEM ${TINYGETTEXT_PREFIX}/include)
+INCLUDE_DIRECTORIES(${TINYGETTEXT_PREFIX}/include)
## Some additional include paths
include_directories(${CMAKE_BINARY_DIR}/)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/)
-include_directories(SYSTEM ${CMAKE_CURRENT_SOURCE_DIR}/external/findlocale/)
-include_directories(SYSTEM ${CMAKE_CURRENT_SOURCE_DIR}/external/obstack/)
-include_directories(SYSTEM ${CMAKE_CURRENT_SOURCE_DIR}/external/sexp-cpp/include/)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/external/findlocale/)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/external/obstack/)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/external/sexp-cpp/include/)
IF(WIN32)
ADD_DEFINITIONS(-D_USE_MATH_DEFINES -DNOMINMAX)
--
2.5.5

View File

@@ -0,0 +1,29 @@
DESCRIPTION = "SuperTux is a classic 2D jump'n run sidescroller game in a style similar to the original Super Mario games covered under the GPL"
HOMEAPAGE = "http://supertux.lethargik.org"
SECTION = "x11/application"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=d32239bcb673463ab874e80d47fae504"
DEPENDS = "boost libsdl2 libsdl2-image libvorbis curl openal-soft physfs glew"
# somehow boost is not dragged in
RDEPENDS_${PN} += "boost"
inherit cmake
SRC_URI = " \
https://github.com/SuperTux/supertux/releases/download/v${PV}/SuperTux-v${PV}-Source.tar.gz \
file://0001-CMakeLists.txt-Pin-PHYSFS_getPrefDir-autodetection-d.patch \
file://0002-pass-compile-flags-to-external-projects.patch \
file://0003-do-not-set-included-paths-as-system-causes-trouble-w.patch \
"
SRC_URI[md5sum] = "3bb7c1f3f622da79ec9fe1ebc521f286"
SRC_URI[sha256sum] = "cfae0da40c41532fb414c3b17891c98396b59471fe583a8fc756b96aea61a73b"
S = "${WORKDIR}/SuperTux-v${PV}-Source"
EXTRA_OECMAKE = "-DINSTALL_SUBDIR_BIN=bin -DCMAKE_BUILD_TYPE=RELEASE"
FILES_${PN} += " \
${datadir}/appdata \
${datadir}/games/supertux2 \
"

View File

@@ -1,29 +0,0 @@
DESCRIPTION = "SuperTux is a classic 2D jump'n run sidescroller game in a style similar to the original Super Mario games covered under the GPL"
HOMEAPAGE = "http://supertux.lethargik.org"
SECTION = "x11/application"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
DEPENDS = "boost libsdl libsdl-image libvorbis curl openal-soft physfs glew"
# somehow boost is not dragged in
RDEPENDS_${PN} += "boost"
inherit cmake
SRCREV = "947098af8085388eef4b5352f5c5d0b6edbcd78a"
PV = "0.3.3+git${SRCPV}"
S = "${WORKDIR}/git"
SRC_URI = " \
git://code.google.com/p/supertux;protocol=https \
file://0001-do-not-set-CMAKE_C_FLAGS-CMAKE-CXX_FLAGS-to-empty.patch \
"
EXTRA_OECMAKE = "-DINSTALL_SUBDIR_BIN=bin -DCMAKE_BUILD_TYPE=RELEASE"
do_install_append() {
# Most of us don't have OpenGL. SDL in fullscreen seems to work best
sed -i 's#Exec=supertux2#Exec=supertux2 --renderer sdl -f#' ${D}${datadir}/applications/supertux2.desktop
}
FILES_${PN} += "${datadir}/games/supertux2"