summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrançois-Xavier Carton <fx.carton91@gmail.com>2017-12-26 05:01:24 +0100
committerJames Le Cuirot <chewi@gentoo.org>2017-12-26 12:01:33 +0000
commite6532de05dd104f6427e27a6445b58e4ba062da5 (patch)
tree5a89510bf42aae3d40f30dd9bd483860ac216c3d /games-action/supertuxkart/files
parentmedia-libs/libopenglrecorder: new package (diff)
downloadgentoo-e6532de05dd104f6427e27a6445b58e4ba062da5.tar.gz
gentoo-e6532de05dd104f6427e27a6445b58e4ba062da5.tar.bz2
gentoo-e6532de05dd104f6427e27a6445b58e4ba062da5.zip
games-action/supertuxkart: add version 0.9.3
Closes: https://bugs.gentoo.org/show_bug.cgi?id=640574
Diffstat (limited to 'games-action/supertuxkart/files')
-rw-r--r--games-action/supertuxkart/files/supertuxkart-0.9.3-fix-buildsystem.patch103
-rw-r--r--games-action/supertuxkart/files/supertuxkart-0.9.3-irrlicht-arch-support.patch47
-rw-r--r--games-action/supertuxkart/files/supertuxkart-0.9.3-irrlicht-bundled-libs.patch33
-rw-r--r--games-action/supertuxkart/files/supertuxkart-0.9.3-irrlicht-system-libs.patch56
-rw-r--r--games-action/supertuxkart/files/supertuxkart-0.9.3-unbundle-enet.patch57
-rw-r--r--games-action/supertuxkart/files/supertuxkart-0.9.3-unbundle-libs.patch19
6 files changed, 315 insertions, 0 deletions
diff --git a/games-action/supertuxkart/files/supertuxkart-0.9.3-fix-buildsystem.patch b/games-action/supertuxkart/files/supertuxkart-0.9.3-fix-buildsystem.patch
new file mode 100644
index 000000000000..def5c80340ba
--- /dev/null
+++ b/games-action/supertuxkart/files/supertuxkart-0.9.3-fix-buildsystem.patch
@@ -0,0 +1,103 @@
+* Unbundle remaining libraries: GLEW, zlib, png, jpeg
+* Add -DAS_DEPRECATED for Angelscript
+* Remove definition of debug macros
+* Build bundled Irrlicht with user flags
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -110,43 +110,11 @@
+ include_directories(${ENET_INCLUDE_DIR})
+
+ # Build glew library
+ if(NOT USE_GLES2 AND NOT SERVER_ONLY)
++ find_package(GLEW REQUIRED)
++ include_directories(${GLEW_INCLUDE_DIRS})
+ add_definitions(-DGLEW_NO_GLU)
+- add_subdirectory("${PROJECT_SOURCE_DIR}/lib/glew")
+- include_directories("${PROJECT_SOURCE_DIR}/lib/glew/include")
+ endif()
+
+-if(MSVC OR APPLE)
+- if (NOT APPLE)
+- # Build zlib library
+- add_subdirectory("${PROJECT_SOURCE_DIR}/lib/zlib")
+- include_directories("${PROJECT_SOURCE_DIR}/lib/zlib")
+-
+- set(ZLIB_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lib/zlib" "${PROJECT_BINARY_DIR}/lib/zlib/")
+- set(ZLIB_LIBRARY zlibstatic)
+- endif()
+-
+- # Build png library
+- set(SKIP_INSTALL_ALL TRUE)
+- set(PNG_STATIC TRUE CACHE BOOL "Build static lib")
+- set(PNG_TESTS FALSE CACHE BOOL "Build libpng tests")
+- set(PNG_SHARED FALSE CACHE BOOL "Build shared lib")
+- add_subdirectory("${PROJECT_SOURCE_DIR}/lib/libpng")
+- include_directories("${PROJECT_SOURCE_DIR}/lib/libpng")
+-
+- set(PNG_PNG_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lib/libpng/")
+- set(PNG_LIBRARY png_static)
+-endif()
+-
+-# Add jpeg library
+-if (APPLE)
+- add_subdirectory("${PROJECT_SOURCE_DIR}/lib/jpeglib")
+- include_directories("${PROJECT_SOURCE_DIR}/lib/jpeglib")
+- set(JPEG_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lib/jpeglib/")
+- set(JPEG_LIBRARY jpeglib)
+-else()
+- find_package(JPEG REQUIRED)
+- include_directories(${JPEG_INCLUDE_DIR})
+-endif()
+
+ if (BUILD_RECORDER)
+@@ -206,6 +174,7 @@
+ find_package(Angelscript)
+ if(ANGELSCRIPT_FOUND)
+ include_directories(${Angelscript_INCLUDE_DIRS})
++ add_definitions(-DAS_DEPRECATED)
+ else()
+ message(FATAL_ERROR "Angelscript not found. "
+ "Either install angelscript or use built-in version using "
+@@ -307,14 +276,6 @@
+ # VS will automatically add NDEBUG for release mode, but only _DEBUG in debug mode.
+ # Since STK uses DEBUG, this is added for debug compilation only:
+ set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG)
+-else()
+- # All non VS generators used create only a single compile mode, so
+- # compile flags can be simplye be added
+- if(CMAKE_BUILD_TYPE MATCHES Debug)
+- add_definitions(-DDEBUG)
+- else()
+- add_definitions(-DNDEBUG)
+- endif()
+ endif()
+
+ # TODO: remove this switch
+@@ -426,7 +395,7 @@
+ if(NOT SERVER_ONLY)
+ if(NOT USE_GLES2)
+- target_link_libraries(supertuxkart ${OPENGL_gl_LIBRARY} glew graphics_utils)
++ target_link_libraries(supertuxkart ${OPENGL_gl_LIBRARY} ${GLEW_LIBRARIES} graphics_utils)
+ else()
+ target_link_libraries(supertuxkart GLESv2)
+ endif()
+ endif()
+--- a/lib/irrlicht/CMakeLists.txt
++++ b/lib/irrlicht/CMakeLists.txt
+@@ -68,15 +68,6 @@
+ if(WIN32)
+ add_definitions(-D_IRR_STATIC_LIB_)
+ add_definitions(-D_CRT_SECURE_NO_WARNINGS) # Shut up about unsafe stuff
+-else()
+- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pipe -O3 -fno-exceptions -fstrict-aliasing")
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pipe -O3 -fno-exceptions -fstrict-aliasing")
+- if(CMAKE_COMPILER_IS_GNUCC)
+- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexpensive-optimizations")
+- endif()
+- if(CMAKE_COMPILER_IS_GNUCXX)
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexpensive-optimizations")
+- endif()
+ endif()
+
+ if(USE_GLES2)
diff --git a/games-action/supertuxkart/files/supertuxkart-0.9.3-irrlicht-arch-support.patch b/games-action/supertuxkart/files/supertuxkart-0.9.3-irrlicht-arch-support.patch
new file mode 100644
index 000000000000..66191861a963
--- /dev/null
+++ b/games-action/supertuxkart/files/supertuxkart-0.9.3-irrlicht-arch-support.patch
@@ -0,0 +1,47 @@
+From: Christoph Egger <debian@christoph-egger.org>
+Subject: [PATCH] debian/arch-support
+
+Building on non-linux architectures currently fails with unpatched
+irrlicht because irrlicht tries to create Joystick support using
+linux-specific headers. However there's infrastructure to disable
+Joystick support, we just need to activate that on non-linux
+architectures.
+
+Additionally if built on a sparc machine irrlicht assumes wrongly it's
+a solaris system. We fix this wrong assumption as our sparc builds are
+all on linux.
+
+Finally irrlicht exceeds the size constraights for -fpic requiering to
+build with -fPIC. As upstream doesn't do that we need to fix this for
+sparc and s390 builds (powerPC?).
+
+Signed-off-by: Christoph Egger <debian@christoph-egger.org>
+
+---
+ lib/irrlicht/include/IrrCompileConfig.h | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+--- a/lib/irrlicht/include/IrrCompileConfig.h
++++ b/lib/irrlicht/include/IrrCompileConfig.h
+@@ -110,4 +110,8 @@
+ #ifndef _IRR_SOLARIS_PLATFORM_
+ #define _IRR_LINUX_PLATFORM_
++#include <endian.h>
++ #if __BYTE_ORDER == __BIG_ENDIAN
++ #define __BIG_ENDIAN__
++ #endif
+ #endif
+ #define _IRR_POSIX_API_
+@@ -460,11 +464,7 @@
+ #undef _IRR_WCHAR_FILESYSTEM
+ #endif
+
+-#if defined(__sparc__) || defined(__sun__)
+-#define __BIG_ENDIAN__
+-#endif
+-
+-#if defined(_IRR_SOLARIS_PLATFORM_)
++#if defined(_IRR_SOLARIS_PLATFORM_) || defined(__FreeBSD_kernel__) || defined(__gnu_hurd__)
+ #undef _IRR_COMPILE_WITH_JOYSTICK_EVENTS_
+ #endif
+
diff --git a/games-action/supertuxkart/files/supertuxkart-0.9.3-irrlicht-bundled-libs.patch b/games-action/supertuxkart/files/supertuxkart-0.9.3-irrlicht-bundled-libs.patch
new file mode 100644
index 000000000000..194f278b958d
--- /dev/null
+++ b/games-action/supertuxkart/files/supertuxkart-0.9.3-irrlicht-bundled-libs.patch
@@ -0,0 +1,33 @@
+Description: Remove embedded libraries in Irrlicht source (flagged by lintian)
+ Since removing the subdirectories containing libjpeg/libpng/zlib/bzip2/lzma
+ would make this patch way too large, this patch should be applied on top of
+ rm -rf lib/jpeglib/
+ rm -rf lib/zlib/
+ rm -rf lib/libpng/
+ in debian/rules (e.g. in the clean target).
+Forwarded: no
+Author: Vincent Cheng <vcheng@debian.org>
+Last-Update: 2016-07-07
+
+--- a/lib/irrlicht/CMakeLists.txt
++++ b/lib/irrlicht/CMakeLists.txt
+@@ -2,9 +2,6 @@
+ find_package(PNG REQUIRED)
+ find_package(JPEG REQUIRED)
+
+-include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include/"
+- "${JPEG_INCLUDE_DIR}"
+- "${PNG_INCLUDE_DIRS}"
+- "${ZLIB_INCLUDE_DIR}")
++include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include/)
+
+ if(MSVC OR APPLE)
+@@ -576,7 +573,7 @@
+ endif()
+
+ add_library(stkirrlicht STATIC ${IRRLICHT_SOURCES})
+
+-target_link_libraries(stkirrlicht ${PNG_LIBRARY} ${JPEG_LIBRARY} ${ZLIB_LIBRARY})
++target_link_libraries(stkirrlicht png jpeg z)
+
+ if(NOT SERVER_ONLY)
diff --git a/games-action/supertuxkart/files/supertuxkart-0.9.3-irrlicht-system-libs.patch b/games-action/supertuxkart/files/supertuxkart-0.9.3-irrlicht-system-libs.patch
new file mode 100644
index 000000000000..ce7ce63fa661
--- /dev/null
+++ b/games-action/supertuxkart/files/supertuxkart-0.9.3-irrlicht-system-libs.patch
@@ -0,0 +1,56 @@
+Subject: [PATCH] debian/use-system-libs
+
+Path to build irrlicht using the system libraries for png,zlib and
+jpeg as well as the glext family of header files.
+
+Signed-off-by: Christoph Egger <debian@christoph-egger.org
+
+--- a/lib/irrlicht/source/Irrlicht/COpenGLExtensionHandler.h
++++ b/lib/irrlicht/source/Irrlicht/COpenGLExtensionHandler.h
+@@ -21,7 +21,7 @@
+ #endif
+ #include <GL/gl.h>
+ #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
+- #include "glext.h"
++ #include <GL/glext.h>
+ #endif
+ #include "wglext.h"
+
+@@ -36,7 +36,7 @@
+ #endif
+ #include <OpenGL/gl.h>
+ #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
+- #include "glext.h"
++ #include <GL/glext.h>
+ #endif
+ #elif defined(_IRR_COMPILE_WITH_SDL_DEVICE_) && !defined(_IRR_COMPILE_WITH_X11_DEVICE_)
+ #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
+@@ -50,7 +50,7 @@
+ #include <SDL/SDL_video.h>
+ #include <SDL/SDL_opengl.h>
+ typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
+- #include "glext.h"
++ #include <GL/glext.h>
+ #else
+ #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
+ #define GL_GLEXT_LEGACY 1
+--- a/lib/irrlicht/source/Irrlicht/COpenGLSLMaterialRenderer.h
++++ b/lib/irrlicht/source/Irrlicht/COpenGLSLMaterialRenderer.h
+@@ -12,7 +12,7 @@
+ #define WIN32_LEAN_AND_MEAN
+ #include <windows.h>
+ #include <GL/gl.h>
+- #include "glext.h"
++ #include <GL/glext.h>
+ #else
+ #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
+ #define GL_GLEXT_LEGACY 1
+@@ -25,7 +25,7 @@
+ #include <GL/gl.h>
+ #endif
+ #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
+- #include "glext.h"
++ #include <GL/glext.h>
+ #endif
+ #endif
+
diff --git a/games-action/supertuxkart/files/supertuxkart-0.9.3-unbundle-enet.patch b/games-action/supertuxkart/files/supertuxkart-0.9.3-unbundle-enet.patch
new file mode 100644
index 000000000000..8c00fce7e186
--- /dev/null
+++ b/games-action/supertuxkart/files/supertuxkart-0.9.3-unbundle-enet.patch
@@ -0,0 +1,57 @@
+Description: Build supertuxkart against system enet instead of embedded copy
+Forwarded: not-yet
+Author: Vincent Cheng <vcheng@debian.org>
+Last-Update: 2016-07-17
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -105,9 +105,9 @@
+ add_subdirectory("${PROJECT_SOURCE_DIR}/lib/bullet")
+ include_directories("${PROJECT_SOURCE_DIR}/lib/bullet/src")
+
+-# Build the ENet UDP network library
+-add_subdirectory("${PROJECT_SOURCE_DIR}/lib/enet")
+-include_directories("${PROJECT_SOURCE_DIR}/lib/enet/include")
++# ENet
++find_package(ENet REQUIRED)
++include_directories(${ENET_INCLUDE_DIR})
+
+ # Build glew library
+ if(NOT USE_GLES2 AND NOT SERVER_ONLY)
+@@ -406,10 +406,10 @@
+ bulletdynamics
+ bulletcollision
+ bulletmath
+- enet
+ stkirrlicht
+ ${Angelscript_LIBRARIES}
+ ${CURL_LIBRARIES}
++ ${ENET_LIBRARIES}
+ ${OGGVORBIS_LIBRARIES}
+ ${OPENAL_LIBRARY}
+ ${FREETYPE_LIBRARIES}
+--- /dev/null
++++ b/cmake/FindENet.cmake
+@@ -0,0 +1,22 @@
++# - Find ENet
++# Find the ENet includes and libraries
++#
++# Following variables are provided:
++# ENET_FOUND
++# True if ENet has been found
++# ENET_INCLUDE_DIR
++# The include directories of ENet
++# ENET_LIBRARIES
++# ENet library list
++
++
++find_path(ENET_INCLUDE_DIR enet/enet.h /usr/include)
++find_library(ENET_LIBRARY NAMES enet PATHS /usr/lib)
++
++include(FindPackageHandleStandardArgs)
++find_package_handle_standard_args(ENet DEFAULT_MSG ENET_INCLUDE_DIR ENET_LIBRARY)
++
++# Publish variables
++set(ENET_INCLUDE_DIRS ${ENET_INCLUDE_DIR})
++set(ENET_LIBRARIES ${ENET_LIBRARY})
++mark_as_advanced(ENET_INCLUDE_DIR ENET_LIBRARY)
diff --git a/games-action/supertuxkart/files/supertuxkart-0.9.3-unbundle-libs.patch b/games-action/supertuxkart/files/supertuxkart-0.9.3-unbundle-libs.patch
new file mode 100644
index 000000000000..798a6cdea7ac
--- /dev/null
+++ b/games-action/supertuxkart/files/supertuxkart-0.9.3-unbundle-libs.patch
@@ -0,0 +1,19 @@
+Description: Link against system copies of zlib/libpng/libjpeg/bzip2
+Forwarded: not-yet
+Author: Vincent Cheng <vcheng@debian.org>
+Last-Update: 2016-07-17
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -416,6 +416,11 @@
+ ${JPEG_LIBRARIES}
+ ${TURBOJPEG_LIBRARY}
+ #${VPX_LIBRARIES}
++ X11
++ z
++ png
++ jpeg
++ bz2
+ )
+
+ if(NOT SERVER_ONLY)