summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-sports/dustrac/files')
-rw-r--r--games-sports/dustrac/files/dustrac-1.13.0-appdata.patch27
-rw-r--r--games-sports/dustrac/files/dustrac-1.13.0-cmake-add_library-static.patch31
-rw-r--r--games-sports/dustrac/files/dustrac-1.13.0-cmake.patch69
-rw-r--r--games-sports/dustrac/files/dustrac-1.13.0-gcc10.patch48
-rw-r--r--games-sports/dustrac/files/dustrac-1.13.0-opengl.patch91
5 files changed, 266 insertions, 0 deletions
diff --git a/games-sports/dustrac/files/dustrac-1.13.0-appdata.patch b/games-sports/dustrac/files/dustrac-1.13.0-appdata.patch
new file mode 100644
index 000000000000..e932a411fd62
--- /dev/null
+++ b/games-sports/dustrac/files/dustrac-1.13.0-appdata.patch
@@ -0,0 +1,27 @@
+From 5c5c437c2634572da21a22e1f64fac1dc1b296ea Mon Sep 17 00:00:00 2001
+From: Pino Toscano <toscano.pino@tiscali.it>
+Date: Sun, 24 Sep 2017 16:19:51 +0200
+Subject: [PATCH] Install AppData file to the right location
+
+According to the specs [1], the location is now /usr/share/metainfo,
+with appdata left as legacy directory. Hence, install the AppData file
+to the non-legacy directory.
+
+[1] https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html
+---
+ InstallLinux.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/InstallLinux.cmake b/InstallLinux.cmake
+index 15e69855..3e0443d1 100644
+--- a/InstallLinux.cmake
++++ b/InstallLinux.cmake
+@@ -74,7 +74,7 @@ function(setup_install_targets BIN_PATH DATA_PATH DOC_PATH)
+ install(FILES ${CMAKE_BINARY_DIR}/dustrac-editor.desktop DESTINATION share/applications)
+
+ # Install app store meta data
+- install(FILES src/dustrac.appdata.xml DESTINATION share/appdata)
++ install(FILES src/dustrac.appdata.xml DESTINATION share/metainfo)
+
+ # Install icons
+ install(FILES data/icons/dustrac-game.png DESTINATION share/pixmaps)
diff --git a/games-sports/dustrac/files/dustrac-1.13.0-cmake-add_library-static.patch b/games-sports/dustrac/files/dustrac-1.13.0-cmake-add_library-static.patch
new file mode 100644
index 000000000000..f6b2cc612cc1
--- /dev/null
+++ b/games-sports/dustrac/files/dustrac-1.13.0-cmake-add_library-static.patch
@@ -0,0 +1,31 @@
+Fix linking with BUILD_SHARED_LIBS=ON default in EAPI-7.
+
+--- a/src/game/STFH/CMakeLists.txt 2017-08-28 21:43:54.000000000 +0200
++++ b/src/game/STFH/CMakeLists.txt 2021-02-27 20:58:35.523503983 +0100
+@@ -10,5 +10,5 @@
+ source.cpp
+ )
+
+-add_library(STFH ${STFHSRC})
++add_library(STFH STATIC ${STFHSRC})
+
+--- a/src/game/MTFH/CMakeLists.txt 2017-08-28 21:43:54.000000000 +0200
++++ b/src/game/MTFH/CMakeLists.txt 2021-02-27 20:58:48.451565823 +0100
+@@ -9,5 +9,5 @@
+ menumanager.cpp
+ menuitemview.cpp)
+
+-add_library(MTFH ${MTFHSRC})
++add_library(MTFH STATIC ${MTFHSRC})
+
+--- a/src/game/MiniCore/CMakeLists.txt 2017-08-28 21:43:54.000000000 +0200
++++ b/src/game/MiniCore/CMakeLists.txt 2021-02-27 20:59:01.267627130 +0100
+@@ -82,7 +82,7 @@
+ set(MiniCoreSRC ${MiniCoreSRC} Graphics/contrib/glew/glew.c)
+ endif()
+
+-add_library(MiniCore ${MiniCoreSRC})
++add_library(MiniCore STATIC ${MiniCoreSRC})
+
+ target_link_libraries(MiniCore Qt5::Core Qt5::OpenGL Qt5::Xml OpenGL::GL)
+
diff --git a/games-sports/dustrac/files/dustrac-1.13.0-cmake.patch b/games-sports/dustrac/files/dustrac-1.13.0-cmake.patch
new file mode 100644
index 000000000000..57a00c0068fa
--- /dev/null
+++ b/games-sports/dustrac/files/dustrac-1.13.0-cmake.patch
@@ -0,0 +1,69 @@
+Rebase CFLAGS and COPYING removal patch onto 1.13.0
+Use CTest module for standard BUILD_TESTING switch and make Qt5Test optional
+
+--- a/CMakeLists.txt 2017-08-28 21:43:54.000000000 +0200
++++ b/CMakeLists.txt 2021-02-27 19:21:04.090117623 +0100
+@@ -57,6 +57,9 @@
+ add_definitions(-DGLEW_STATIC)
+ add_definitions(-DGLEW_NO_GLU)
+
++# Enable CMake's unit test framework
++include(CTest)
++
+ if(UNIX)
+ include("InstallLinux.cmake")
+ elseif(WIN32)
+@@ -64,8 +67,7 @@
+ endif()
+
+ if(CMAKE_COMPILER_IS_GNUCXX OR MINGW OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
+- add_compile_options(-std=c++11 -W -Wall -O3 -pedantic)
+- add_compile_options(-fomit-frame-pointer -finline-functions -ffast-math)
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -W -Wall -fomit-frame-pointer -finline-functions")
+ elseif(MSVC)
+ add_definitions(-DNOMINMAX)
+ endif()
+@@ -83,7 +85,10 @@
+ find_package(Qt5Xml ${QT_MIN_VER} REQUIRED)
+ find_package(Qt5Widgets ${QT_MIN_VER} REQUIRED)
+ find_package(Qt5LinguistTools ${QT_MIN_VER} REQUIRED)
+-find_package(Qt5Test ${QT_MIN_VER} REQUIRED)
++
++if(BUILD_TESTING)
++ find_package(Qt5Test ${QT_MIN_VER} REQUIRED)
++endif()
+
+ # Find OpenGL
+ find_package(OpenGL REQUIRED)
+@@ -109,9 +114,6 @@
+ pkg_check_modules(VORBISFILE REQUIRED vorbisfile)
+ endif()
+
+-# Enable CMake's unit test framework
+-enable_testing()
+-
+ # Install paths depend on the build type and target platform
+ resolve_install_paths()
+
+--- a/InstallLinux.cmake 2017-08-28 21:43:54.000000000 +0200
++++ b/InstallLinux.cmake 2021-02-27 19:21:23.760211724 +0100
+@@ -58,7 +58,7 @@
+ install(FILES data/fonts.conf DESTINATION ${DATA_PATH})
+ install(FILES data/meshes.conf DESTINATION ${DATA_PATH})
+ install(FILES data/surfaces.conf DESTINATION ${DATA_PATH})
+- install(FILES AUTHORS CHANGELOG COPYING README.md DESTINATION ${DOC_PATH})
++ install(FILES AUTHORS CHANGELOG README.md DESTINATION ${DOC_PATH})
+ install(DIRECTORY data/images DESTINATION ${DATA_PATH} FILES_MATCHING PATTERN "*.jpg")
+ install(DIRECTORY data/images DESTINATION ${DATA_PATH} FILES_MATCHING PATTERN "*.png")
+ install(DIRECTORY data/levels DESTINATION ${DATA_PATH} FILES_MATCHING PATTERN "*.trk")
+--- a/src/game/MiniCore/CMakeLists.txt 2017-08-28 21:43:54.000000000 +0200
++++ b/src/game/MiniCore/CMakeLists.txt 2021-02-27 19:17:29.616848751 +0100
+@@ -86,5 +86,7 @@
+
+ target_link_libraries(MiniCore Qt5::OpenGL Qt5::Xml)
+
+-add_subdirectory(UnitTests)
++if(BUILD_TESTING)
++ add_subdirectory(UnitTests)
++endif()
+
diff --git a/games-sports/dustrac/files/dustrac-1.13.0-gcc10.patch b/games-sports/dustrac/files/dustrac-1.13.0-gcc10.patch
new file mode 100644
index 000000000000..1a3f51896bdb
--- /dev/null
+++ b/games-sports/dustrac/files/dustrac-1.13.0-gcc10.patch
@@ -0,0 +1,48 @@
+From d41a46ac32038055bfc9fe9a907e199ed74e371c Mon Sep 17 00:00:00 2001
+From: Pino Toscano <toscano.pino@tiscali.it>
+Date: Fri, 17 Apr 2020 13:25:12 +0200
+Subject: [PATCH] Include <stdexcept> for std::runtime_error
+
+It was implicitly pulled before, and in GCC 10 it will not be anymore.
+---
+ src/game/openaloggdata.cpp | 1 +
+ src/game/openalsource.cpp | 1 +
+ src/game/openalwavdata.cpp | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/src/game/openaloggdata.cpp b/src/game/openaloggdata.cpp
+index 56634c20..4a2ab882 100644
+--- a/src/game/openaloggdata.cpp
++++ b/src/game/openaloggdata.cpp
+@@ -19,6 +19,7 @@
+
+ #include <vector>
+ #include <cstdio>
++#include <stdexcept>
+
+ #include <vorbis/vorbisfile.h>
+
+diff --git a/src/game/openalsource.cpp b/src/game/openalsource.cpp
+index 9d2bb7f5..37a4272a 100644
+--- a/src/game/openalsource.cpp
++++ b/src/game/openalsource.cpp
+@@ -19,6 +19,7 @@
+ #include <AL/alc.h>
+
+ #include <memory>
++#include <stdexcept>
+
+ static bool checkError()
+ {
+diff --git a/src/game/openalwavdata.cpp b/src/game/openalwavdata.cpp
+index 3a9fc20a..015a11d3 100644
+--- a/src/game/openalwavdata.cpp
++++ b/src/game/openalwavdata.cpp
+@@ -25,6 +25,7 @@
+
+ #include <cstdio>
+ #include <AL/alc.h>
++#include <stdexcept>
+
+ static bool checkError()
+ {
diff --git a/games-sports/dustrac/files/dustrac-1.13.0-opengl.patch b/games-sports/dustrac/files/dustrac-1.13.0-opengl.patch
new file mode 100644
index 000000000000..5251169b46ef
--- /dev/null
+++ b/games-sports/dustrac/files/dustrac-1.13.0-opengl.patch
@@ -0,0 +1,91 @@
+From acde4499b4a4d014d95668269797a272fd53bf86 Mon Sep 17 00:00:00 2001
+From: Jussi Lind <jussi.lind@iki.fi>
+Date: Thu, 15 Nov 2018 01:35:58 +0200
+Subject: [PATCH] CMake: Default to GLVND, use the recommended way to link to
+ GL
+
+---
+ CMakeLists.txt | 7 +++++++
+ src/game/CMakeLists.txt | 2 +-
+ src/game/MiniCore/src/CMakeLists.txt | 2 +-
+ 3 files changed, 9 insertions(+), 2 deletions(-)
+
+From 7d6d2213d10ea96d25b5b9f18b42cace5bf0fbfd Mon Sep 17 00:00:00 2001
+From: Jussi Lind <jussi.lind@iki.fi>
+Date: Sun, 18 Nov 2018 21:12:20 +0200
+Subject: [PATCH] Fix linking to OpenGL libs on CMake < 3.11.0
+
+---
+ CMakeLists.txt | 5 +++++
+ src/game/CMakeLists.txt | 4 +---
+ src/game/MiniCore/CMakeLists.txt | 5 +++++
+ src/game/MiniCore/src/CMakeLists.txt | 2 +-
+ 4 files changed, 12 insertions(+), 4 deletions(-)
+
+From edc1825110f80377af51226a686731bf17d1de52 Mon Sep 17 00:00:00 2001
+From: Jussi Lind <jussi.lind@iki.fi>
+Date: Tue, 30 Jul 2019 23:14:20 +0300
+Subject: [PATCH] Use OpenGL::GL instead of OpenGL::OpenGL
+
+- For more info: https://cmake.org/cmake/help/v3.10/module/FindOpenGL.html
+---
+ CMakeLists.txt | 2 +-
+ src/game/MiniCore/CMakeLists.txt | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff -u a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -3,6 +3,8 @@
+ cmake_minimum_required(VERSION 2.8.12)
+ cmake_policy(VERSION 2.8.12)
+
++# Use cmake --help-policy [POLICY] for more information about these:
++
+ if(POLICY CMP0005)
+ cmake_policy(SET CMP0005 NEW)
+ endif()
+@@ -11,6 +13,11 @@
+ cmake_policy(SET CMP0020 NEW)
+ endif()
+
++# Default to GLVND
++if(POLICY CMP0072)
++ cmake_policy(SET CMP0072 OLD)
++endif()
++
+ # Global game version
+ set(VERSION_MAJOR "2")
+ set(VERSION_MINOR "0")
+diff -u a/src/game/CMakeLists.txt b/src/game/CMakeLists.txt
+--- a/src/game/CMakeLists.txt
++++ b/src/game/CMakeLists.txt
+@@ -157,15 +157,13 @@
+ MiniCore
+ MTFH
+ STFH
+- ${OPENGL_gl_LIBRARY}
+- ${OPENGL_glu_LIBRARY}
+ ${OPENAL_LIBRARY}
+ ${VORBISFILE_LIBRARIES}
+ ${VORBISFILE_LIB} # Valid only with MSVC
+ ${VORBIS_LIB} # Valid only with MSVC
+ ${OGG_LIB}) # Valid only with MSVC
+
+-target_link_libraries(${GAME_BINARY_NAME} ${COMMON_LIBS} Qt5::OpenGL Qt5::Xml)
++target_link_libraries(${GAME_BINARY_NAME} ${COMMON_LIBS} Qt5::OpenGL Qt5::Xml OpenGL::GL)
+
+ foreach(TS_FILE ${TS})
+ # Make targets to copy generated qm files to data dir. This is done the hard
+diff -u a/src/game/MiniCore/CMakeLists.txt b/src/game/MiniCore/CMakeLists.txt
+--- a/src/game/MiniCore/CMakeLists.txt
++++ b/src/game/MiniCore/CMakeLists.txt
+@@ -88,7 +88,7 @@
+
+ add_library(MiniCore ${MiniCoreSRC})
+
+-target_link_libraries(MiniCore Qt5::OpenGL Qt5::Xml)
++target_link_libraries(MiniCore Qt5::Core Qt5::OpenGL Qt5::Xml OpenGL::GL)
+
+ if(BUILD_TESTING)
+ add_subdirectory(UnitTests)