package/supertux: use the bundled version of physfs
PATCH v3 1/3 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 v3 2/3 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
---
v2: fix LGPL.txt license path
update patch to apply properly
--- .../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 | 7 ++-- 4 files changed, 34 insertions(+), 40 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 1aafb2a83fc35d11f50ebc21129b195f68b856e8 Mon Sep 17 00:00:00 2001 +From: Romain Naour <[email protected]> +Date: Thu, 13 Jul 2017 14:49:27 +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 bfc35b1..db2fbf5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -49,7 +49,7 @@ ENDIF(MACOSX) + # 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 +5 -2
@@ -4,12 +4,15 @@ # ################################################################################ -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_LICENSE_FILES = LICENSE.txt lzma/LGPL.txt + +PHYSFS_DEPENDENCIES = zlib PHYSFS_INSTALL_STAGING = YES
Signature · 1 line
2.9.4
PATCH v3 3/3 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.
---
v2: add DEVELOPERS entry
Add a note in help text about Salarus games
Add license hash.
--- DEVELOPERS | 1 + package/Config.in | 1 + package/solarus/0001-cmake-remove-Werror.patch | 27 ++++++++++++++++++++ package/solarus/Config.in | 34 ++++++++++++++++++++++++++ package/solarus/solarus.hash | 5 ++++ package/solarus/solarus.mk | 23 +++++++++++++++++ 6 files changed, 91 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
DEVELOPERS +1 -0
@@ -1440,6 +1440,7 @@ F: package/mcelog/ F: package/openpowerlink/ F: package/physfs/ F: package/stress-ng/ +F: package/solarus/ F: package/supertux/ F: package/terminology/ F: package/upower/
package/Config.in +1 -0
@@ -233,6 +233,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 +34 -0
@@ -0,0 +1,34 @@ +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 Solarus Zelda fangames. + + Note: This package doesn't contain any game data file in it. + The user should provide these data files using an rootfs + overlay or using an custom external package. + + 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 +5 -0
@@ -0,0 +1,5 @@ +# Locally calculated +sha256 5930584e7c333089a2c1bf372ccc25ad3fb5c1d973189d2bf67f2308189af94d solarus-v1.5.3.tar.gz + +sha256 09cb24006b6a3f2698d8851dc5df4f413c1a98e20d4008bffd76ec236f14244d license.txt +sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 license_gpl.txt
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