package/supertux: use the bundled version of physfs
PATCH v2 1/4 package/supertux: use the bundled version of physfs
In order to add supertux package, a physfs package was introduced using the same version (2.1.x) than the one bundled in supertux sources. However this version is not released yet and it's still under development.
The 2.1.x version introduce API changes that may break other packages using the latest stable version of physfs (2.0.x).
Also, there is an issue (segfault) with physfs 2.1.x while extracting a zip archive. This issue is fixed in 2.0.x branch but not in 2.1.x branch since physfs 2.1.x now use minizip which doesn't provide inflateCopy() used by the bugfix [1].
This doesn't affect supertux itself, so we can safely use the bundled version.
[1] https://hg.icculus.org/icculus/physfs/rev/090cb9c74b87
--- package/supertux/Config.in | 1 - package/supertux/supertux.mk | 12 +++++++----- 2 files changed, 7 insertions(+), 6 deletions(-)
package/supertux/Config.in +0 -1
@@ -19,7 +19,6 @@ config BR2_PACKAGE_SUPERTUX select BR2_PACKAGE_LIBOGG select BR2_PACKAGE_LIBVORBIS select BR2_PACKAGE_OPENAL - select BR2_PACKAGE_PHYSFS select BR2_PACKAGE_SDL2 select BR2_PACKAGE_SDL2_IMAGE select BR2_PACKAGE_SDL2_OPENGL
package/supertux/supertux.mk +7 -5
@@ -10,13 +10,14 @@ SUPERTUX_SOURCE = SuperTux-v$(SUPERTUX_VERSION)-Source.tar.gz # Supertux itself is GPL-3.0+, but it bundles a few libraries with different # licenses (sexp-cpp, squirrel, tinygettext) which are linked statically. -SUPERTUX_LICENSE = GPL-3.0+ (code), CC-BY-SA-2.0, CC-BY-SA-3.0, GPL-2.0+ (images music sounds) +SUPERTUX_LICENSE = GPL-3.0+ (code), CC-BY-SA-2.0, CC-BY-SA-3.0, GPL-2.0+ (images music sounds) \ + Zlib (physfs) SUPERTUX_LICENSE_FILES = LICENSE.txt data/AUTHORS # Use bundled squirrel, tinygettext sexp-cpp packages which are hardcoded in # the CMake build system. SUPERTUX_DEPENDENCIES = host-pkgconf boost libcurl libgl libglew libglu \ - libogg libvorbis openal physfs sdl2 sdl2_image + libogg libvorbis openal sdl2 sdl2_image # ENABLE_BOOST_STATIC_LIBS=OFF: use boost shared libraries since supertux # depends on !BR2_STATIC_LIBS and boost provide only shared libraries with
@@ -24,8 +25,9 @@ SUPERTUX_DEPENDENCIES = host-pkgconf boost libcurl libgl libglew libglu \ # ENABLE_OPENGL=ON: Can be disabled but will make SuperTux unplayable slow. # GLBINDING_ENABLED=OFF: use GLEW (default) instead of glbinding. # Install the game directly in /usr/bin and game data in /usr/share/supertux2. -# Force using physfs.so from staging since the check on PHYSFS_getPrefDir symbol -# in physfs.h (CHECK_SYMBOL_EXISTS) doesn't work. +# Force using the bundled version of physfs since it use a non released version +# of physfs (2.1.x) which is incompatible with the latest released version (2.0.x) +# due to API changes. SUPERTUX_CONF_OPTS += \ -DENABLE_BOOST_STATIC_LIBS=OFF \ -DBUILD_DOCUMENTATION=OFF \
@@ -33,7 +35,7 @@ SUPERTUX_CONF_OPTS += \ -DGLBINDING_ENABLED=OFF \ -DINSTALL_SUBDIR_BIN="bin" \ -DINSTALL_SUBDIR_SHARE="share/supertux2" \ - -DUSE_SYSTEM_PHYSFS=ON + -DUSE_SYSTEM_PHYSFS=OFF # Avoid incompatible posix_memalign declaration on x86 and x86_64 with # musl.
Signature · 1 line
2.9.4
PATCH v2 2/4 package/physfs: use the 2.0.x stable branch
The 2.1.x version is not released yet and it's still under development and introduce API changes that may break other packages using the latest stable version of physfs (2.0.x).
Also, there is an issue (segfault) with physfs 2.1.x while extracting a zip archive. This issue is fixed in 2.0.x branch but not in 2.1.x branch since physfs 2.1.x now use minizip which doesn't provide inflateCopy() used by the bugfix [1].
[1] https://hg.icculus.org/icculus/physfs/rev/090cb9c74b87
--- .../physfs/0001-Fix-builds-with-modern-GCC.patch | 38 ---------------------- package/physfs/0001-Remove-Werror.patch | 28 ++++++++++++++++ package/physfs/Config.in | 1 + package/physfs/physfs.mk | 5 ++- 4 files changed, 33 insertions(+), 39 deletions(-) delete mode 100644 package/physfs/0001-Fix-builds-with-modern-GCC.patch create mode 100644 package/physfs/0001-Remove-Werror.patch
package/physfs/0001-Fix-builds-with-modern-GCC.patch deleted +0 -38
@@ -1,38 +0,0 @@ -From 61d3b63abcba8e9615dcb8a3d1fc026bf7f8d5f8 Mon Sep 17 00:00:00 2001 -From: Jacob Burroughs <[email protected]> -Date: Thu, 23 Jun 2016 13:03:47 -0500 -Subject: [PATCH] Fix builds with modern GCC - -From SuperTux project: -https://github.com/SuperTux/physfs/commit/61d3b63abcba8e9615dcb8a3d1fc026bf7f8d5f8 - -Signed-off-by: Romain Naour <[email protected]> ---- - CMakeLists.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2a371af..94c4844 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -50,7 +50,7 @@ endif() - # Add some gcc-specific command lines. - if(CMAKE_COMPILER_IS_GNUCC) - # Always build with debug symbols...you can strip it later. -- add_definitions(-g -pipe -Werror -fsigned-char) -+ add_definitions(-g -pipe -fsigned-char) - - # Stupid BeOS generates warnings in the system headers. - if(NOT BEOS) -@@ -304,7 +304,7 @@ if(PHYSFS_BUILD_TEST) - if(READLINE_LIBRARY) - set(HAVE_SYSTEM_READLINE TRUE) - set(TEST_PHYSFS_LIBS ${TEST_PHYSFS_LIBS} ${READLINE_LIBRARY} ${CURSES_LIBRARY}) -- include_directories(${READLINE_H} ${HISTORY_H}) -+ include_directories(SYSTEM ${READLINE_H} ${HISTORY_H}) - add_definitions(-DPHYSFS_HAVE_READLINE=1) - endif() - endif() --- -2.9.3 -
package/physfs/0001-Remove-Werror.patch new file +28 -0
@@ -0,0 +1,28 @@ +From 2d75791a88e18225f4cbadaed30d25e0de00fef0 Mon Sep 17 00:00:00 2001 +From: Romain Naour <[email protected]> +Date: Thu, 22 Jun 2017 00:25:55 +0200 +Subject: [PATCH] Remove Werror + +This may break the build with new compiler version (gcc 7.x) + +Signed-off-by: Romain Naour <[email protected]> +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2a371af..6fef770 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -50,7 +50,7 @@ endif() + # Add some gcc-specific command lines. + if(CMAKE_COMPILER_IS_GNUCC) + # Always build with debug symbols...you can strip it later. +- add_definitions(-g -pipe -Werror -fsigned-char) ++ add_definitions(-g -pipe -fsigned-char) + + # Stupid BeOS generates warnings in the system headers. + if(NOT BEOS) +-- +2.9.4 +
package/physfs/Config.in +1 -0
@@ -1,6 +1,7 @@ config BR2_PACKAGE_PHYSFS bool "physfs" depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_ZLIB help PhysicsFS; a portable, flexible file i/o abstraction.
package/physfs/physfs.mk +4 -1
@@ -4,13 +4,16 @@ # ################################################################################ -PHYSFS_VERSION = be27dfd07d97336145e7f49d3fd200a6e902f85e +# stable-2.0 branch +PHYSFS_VERSION = 090cb9c74b87198e6d520afca9d649ca0d84669f PHYSFS_SITE = https://hg.icculus.org/icculus/physfs PHYSFS_SITE_METHOD = hg PHYSFS_LICENSE = Zlib (physfs), LGPL with exceptions (lzma) PHYSFS_LICENSE_FILES = LICENSE.txt src/lzma/LGPL.txt +PHYSFS_DEPENDENCIES = zlib + PHYSFS_INSTALL_STAGING = YES PHYSFS_CONF_OPTS = -DPHYSFS_BUILD_TEST=OFF
Signature · 1 line
2.9.4
PATCH v2 3/4 package/solarus: new package
In reply to Romain NaourSample quest and testing quest are not included in SOLARUS_LICENSE since it's notinstalled by default.
Remove Werror when building with debugging symbols.
--- package/Config.in | 1 + package/solarus/0001-cmake-remove-Werror.patch | 27 +++++++++++++++++++++++ package/solarus/Config.in | 30 ++++++++++++++++++++++++++ package/solarus/solarus.hash | 2 ++ package/solarus/solarus.mk | 23 ++++++++++++++++++++ 5 files changed, 83 insertions(+) create mode 100644 package/solarus/0001-cmake-remove-Werror.patch create mode 100644 package/solarus/Config.in create mode 100644 package/solarus/solarus.hash create mode 100644 package/solarus/solarus.mk
package/Config.in +1 -0
@@ -232,6 +232,7 @@ menu "Games" source "package/prboom/Config.in" source "package/rubix/Config.in" source "package/sl/Config.in" + source "package/solarus/Config.in" source "package/stella/Config.in" source "package/supertux/Config.in" source "package/supertuxkart/Config.in"
package/solarus/0001-cmake-remove-Werror.patch new file +27 -0
@@ -0,0 +1,27 @@ +From 4d315359d15e1221f3463b77a960a60093aac893 Mon Sep 17 00:00:00 2001 +From: Romain Naour <[email protected]> +Date: Thu, 22 Jun 2017 00:19:56 +0200 +Subject: [PATCH] cmake: remove Werror + +Signed-off-by: Romain Naour <[email protected]> +--- + cmake/AddCompilationFlags.cmake | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/cmake/AddCompilationFlags.cmake b/cmake/AddCompilationFlags.cmake +index 5159ff9..a506033 100644 +--- a/cmake/AddCompilationFlags.cmake ++++ b/cmake/AddCompilationFlags.cmake +@@ -24,9 +24,6 @@ endif() + # Be less pedantic in release builds for users. + set(CMAKE_CXX_FLAGS_RELEASE "-Wno-error -Wall -Wextra -Wno-unknown-pragmas -Wno-fatal-errors ${CMAKE_CXX_FLAGS_RELEASE}") + +-# Be more pedantic in debug mode for developers. +-set(CMAKE_CXX_FLAGS_DEBUG "-Werror -Wall -Wextra -pedantic ${CMAKE_CXX_FLAGS_DEBUG}") +- + # Platform-specific flags. + if(WIN32) + # MinGW: disable the console by default. +-- +2.9.4 +
package/solarus/Config.in new file +30 -0
@@ -0,0 +1,30 @@ +config BR2_PACKAGE_SOLARUS + bool "solarus" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS + depends on BR2_PACKAGE_OPENAL_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # openal + depends on !BR2_STATIC_LIBS # SDL2 + select BR2_PACKAGE_LIBMODPLUG + select BR2_PACKAGE_LIBOGG + select BR2_PACKAGE_LIBVORBIS + select BR2_PACKAGE_LUAJIT + select BR2_PACKAGE_OPENAL + select BR2_PACKAGE_PHYSFS + select BR2_PACKAGE_SDL2 + select BR2_PACKAGE_SDL2_IMAGE + select BR2_PACKAGE_SDL2_TTF + help + Solarus is an open-source Zelda-like 2D game engine written + in C++. It can run games scripted in Lua. This engine is used + by our Zelda fangames. Solarus is licensed under GPL v3. + + http://www.solarus-games.org + https://github.com/solarus-games/solarus + +comment "solarus needs a toolchain w/ C++, gcc >= 4.8, NPTL, dynamic library" + depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS + depends on BR2_PACKAGE_OPENAL_ARCH_SUPPORTS + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 \ + || !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS
package/solarus/solarus.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally calculated +sha256 5930584e7c333089a2c1bf372ccc25ad3fb5c1d973189d2bf67f2308189af94d solarus-v1.5.3.tar.gz
package/solarus/solarus.mk new file +23 -0
@@ -0,0 +1,23 @@ +################################################################################ +# +# solarus +# +################################################################################ + +SOLARUS_VERSION = v1.5.3 +SOLARUS_SITE = $(call github,solarus-games,solarus,$(SOLARUS_VERSION)) + +SOLARUS_LICENSE = GPL-3.0 (code), CC-BY-SA-4.0 (Solarus logos and icons), \ + CC-BY-SA-3.0 (GUI icons) +SOLARUS_LICENSE_FILES = license.txt license_gpl.txt + +# Install libsolarus.so +SOLARUS_INSTALL_STAGING = YES + +SOLARUS_DEPENDENCIES = libmodplug libogg libvorbis luajit openal physfs sdl2 \ + sdl2_image sdl2_ttf + +# Disable launcher GUI (requires Qt5) +SOLARUS_CONF_OPTS = -DSOLARUS_GUI=OFF + +$(eval $(cmake-package))
Signature · 1 line
2.9.4
PATCH v2 4/4 package/solarus-zsdx: new package
In reply to Romain Naour---
v2 fix Config.in help comment
--- package/Config.in | 1 + package/solarus-zsdx/Config.in | 16 ++++++++++++++++ package/solarus-zsdx/solarus-zsdx.hash | 2 ++ package/solarus-zsdx/solarus-zsdx.mk | 19 +++++++++++++++++++ 4 files changed, 38 insertions(+) create mode 100644 package/solarus-zsdx/Config.in create mode 100644 package/solarus-zsdx/solarus-zsdx.hash create mode 100644 package/solarus-zsdx/solarus-zsdx.mk
package/Config.in +1 -0
@@ -233,6 +233,7 @@ menu "Games" source "package/rubix/Config.in" source "package/sl/Config.in" source "package/solarus/Config.in" + source "package/solarus-zsdx/Config.in" source "package/stella/Config.in" source "package/supertux/Config.in" source "package/supertuxkart/Config.in"
package/solarus-zsdx/Config.in new file +16 -0
@@ -0,0 +1,16 @@ +config BR2_PACKAGE_SOLARUS_ZSDX + bool "solarus-zsdx" + depends on BR2_PACKAGE_SOLARUS + help + This package contains the data files of the game Zelda: + Mystery of Solarus DX. This quest is a free, open-source game + that works with Solarus, an open-source Zelda-like 2D game + engine. To play this game, you need Solarus. We assume in this + readme that Solarus is already installed. + + Note: solarus-zsdx contains some Zelda sprites, characters and + musics that are copyrighted by Nitendo. + http://www.solarus-games.org/engine/faq + + http://www.solarus-games.org + https://github.com/solarus-games/zsdx
package/solarus-zsdx/solarus-zsdx.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally calculated +sha256 05a5d220bbf2439c9da2e71cd9d104240878123fff5bc702e2405d6d0712f0dc solarus-zsdx-1.11.0.tar.gz
package/solarus-zsdx/solarus-zsdx.mk new file +19 -0
@@ -0,0 +1,19 @@ +################################################################################ +# +# solarus-zsdx +# +################################################################################ + +SOLARUS_ZSDX_VERSION = 1.11.0 +SOLARUS_ZSDX_SITE = $(call github,solarus-games,zsdx,zsdx-$(SOLARUS_ZSDX_VERSION)) + +# Upstream say: "Our games contain Nintendo?s proprietary content, but we believe +# this is fair use." +# http://www.solarus-games.org/engine/faq/#are_you_affiliated_with_nintendo +SOLARUS_ZSDX_LICENSE = GPL-3.0 (Lua scripts), CC-BY-SA-4.0 (Most data files), \ + GPL-2.0 (fonts/wqy-zenhei.ttc), CC-BY-SA-3.0 \ + (sprites/enemies/agahnim.png, sprites/enemies/agahnim_fake.png) \ + PROPRIETARY (graphics, sounds and names that belong to Nintendo) +SOLARUS_ZSDX_LICENSE_FILES = license.txt + +$(eval $(cmake-package))
Signature · 1 line
2.9.4
PATCH v2 4/4 package/solarus-zsdx: new package
Hi All,
Le 22/06/2017 ? 00:47, Romain Naour a ?crit :
Quoted 34 lines
Signed-off-by Romain Naour <[email protected]>---
v2 fix Config.in help comment--- package/Config.in | 1 + package/solarus-zsdx/Config.in | 16 ++++++++++++++++ package/solarus-zsdx/solarus-zsdx.hash | 2 ++ package/solarus-zsdx/solarus-zsdx.mk | 19 +++++++++++++++++++ 4 files changed, 38 insertions(+) create mode 100644 package/solarus-zsdx/Config.in create mode 100644 package/solarus-zsdx/solarus-zsdx.hash create mode 100644 package/solarus-zsdx/solarus-zsdx.mkpackage/Config.in +1
-0@@ -233,6 +233,7 @@ menu "Games" source "package/rubix/Config.in" source "package/sl/Config.in" source "package/solarus/Config.in" + source "package/solarus-zsdx/Config.in" source "package/stella/Config.in" source "package/supertux/Config.in" source "package/supertuxkart/Config.in"package/solarus-zsdx/Config.in new file +3
-0@@ -0,0 +1,16 @@ +config BR2_PACKAGE_SOLARUS_ZSDX + bool "solarus-zsdx" + depends on BR2_PACKAGE_SOLARUS
package/solarus-zsdx/Config.in line 13
Quoted 10 lines
package/solarus-zsdx/Config.in new file +10
-0+ help + This package contains the data files of the game Zelda: + Mystery of Solarus DX. This quest is a free, open-source game + that works with Solarus, an open-source Zelda-like 2D game + engine. To play this game, you need Solarus. We assume in this + readme that Solarus is already installed. + + Note: solarus-zsdx contains some Zelda sprites, characters and + musics that are copyrighted by Nitendo. + http://www.solarus-games.org/engine/faq
As discussed during the Buildroot summer camp, we are not sure if this is legal. Since we don't want to host a copy of the solarus-zsdx archive in
http://sources.buildroot.net, I removed this patch form the soralus series.
User wanted to use solarus engine can easily download each game from github and use a rootfs overlay to install them to the target.
Best regards,
Romain
Quoted 37 lines
package/solarus-zsdx/Config.in new file +3
-0+ + http://www.solarus-games.org + https://github.com/solarus-games/zsdxpackage/solarus-zsdx/solarus-zsdx.hash new file +2
-0@@ -0,0 +1,2 @@ +# Locally calculated +sha256 05a5d220bbf2439c9da2e71cd9d104240878123fff5bc702e2405d6d0712f0dc solarus-zsdx-1.11.0.tar.gzpackage/solarus-zsdx/solarus-zsdx.mk new file +19
-0@@ -0,0 +1,19 @@ +################################################################################ +# +# solarus-zsdx +# +################################################################################ + +SOLARUS_ZSDX_VERSION = 1.11.0 +SOLARUS_ZSDX_SITE = $(call github,solarus-games,zsdx,zsdx-$(SOLARUS_ZSDX_VERSION)) + +# Upstream say: "Our games contain Nintendo?s proprietary content, but we believe +# this is fair use." +# http://www.solarus-games.org/engine/faq/#are_you_affiliated_with_nintendo +SOLARUS_ZSDX_LICENSE = GPL-3.0 (Lua scripts), CC-BY-SA-4.0 (Most data files), \ + GPL-2.0 (fonts/wqy-zenhei.ttc), CC-BY-SA-3.0 \ + (sprites/enemies/agahnim.png, sprites/enemies/agahnim_fake.png) \ + PROPRIETARY (graphics, sounds and names that belong to Nintendo) +SOLARUS_ZSDX_LICENSE_FILES = license.txt + +$(eval $(cmake-package))