diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-12-15 18:09:03 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-12-15 18:09:03 +0000 |
commit | 7bc9c63c9da678a7e6fceb095d56c634afd22c56 (patch) | |
tree | 4a67d50a439e9af63947e5f8b6ba3719af98b6c9 /games-simulation/openrct2/files | |
parent | b284a3168fa91a038925d2ecf5e4791011ea5e7d (diff) |
gentoo resync : 15.12.2019
Diffstat (limited to 'games-simulation/openrct2/files')
7 files changed, 239 insertions, 50 deletions
diff --git a/games-simulation/openrct2/files/README.gentoo b/games-simulation/openrct2/files/README.gentoo new file mode 100644 index 000000000000..7e5fc8c65857 --- /dev/null +++ b/games-simulation/openrct2/files/README.gentoo @@ -0,0 +1,15 @@ +OpenRCT2 needs the original RollerCoaster Tycoon 2 data files." + +You need the folders 'Data', 'ObjData', 'Scenarios' and 'Tracks'" +from the original release and copy them into '/usr/share/openrct2/rct2_data'." + +For additional content, you can install the RollerCoaster Tycoon 1 data files." + +You need the folders 'Data', 'Scenarios' and 'Tracks'" +from the original release and copy them into '/usr/share/openrct2/rct1_data'." + +Optionally, the paths can be overwritten by the parameters" +'game_path' and 'rct1_path' in your local ~/.config/OpenRCT2/config.ini file." + +See: https://github.com/OpenRCT2/OpenRCT2/wiki/Required-RCT2-files" +See: https://github.com/OpenRCT2/OpenRCT2/wiki/Loading-RCT1-scenarios-and-data" diff --git a/games-simulation/openrct2/files/openrct2-0.2.1-disable-tests-with-assets.patch b/games-simulation/openrct2/files/openrct2-0.2.1-disable-tests-with-assets.patch deleted file mode 100644 index a4f1e2375321..000000000000 --- a/games-simulation/openrct2/files/openrct2-0.2.1-disable-tests-with-assets.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 86b45a7a4a4fc9b038bcd0e720cf575b934fb462 Mon Sep 17 00:00:00 2001 -From: "Hendrik v. Raven" <hendrik@consetetur.de> -Date: Sat, 4 Aug 2018 13:58:31 +0200 -Subject: [PATCH] reintroduce DISABLE_RCT2_TESTS compile option - -the option was removing when restructuring the CI system, but it is -still usefull for package maintainers. ---- - test/tests/CMakeLists.txt | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -diff --git a/test/tests/CMakeLists.txt b/test/tests/CMakeLists.txt -index 1f862153d..34ab5c884 100644 ---- a/test/tests/CMakeLists.txt -+++ b/test/tests/CMakeLists.txt -@@ -1,5 +1,6 @@ - cmake_minimum_required(VERSION 2.6) - -+option(DISABLE_RCT2_TESTS "Disable tests that require RollerCoaster Tycoon 2 assets.") - option(SYSTEM_GTEST "Use the googletest library provided by the system.") - - if (SYSTEM_GTEST) -@@ -172,18 +173,21 @@ set(RIDE_RATINGS_TEST_SOURCES "${CMAKE_CURRENT_LIST_DIR}/RideRatings.cpp" - "${CMAKE_CURRENT_LIST_DIR}/TestData.cpp") - add_executable(test_ride_ratings ${RIDE_RATINGS_TEST_SOURCES}) - target_link_libraries(test_ride_ratings ${GTEST_LIBRARIES} libopenrct2 ${LDL} z) --add_test(NAME ride_ratings COMMAND test_ride_ratings) - - # Multi-launch test - set(MULTILAUNCH_TEST_SOURCES "${CMAKE_CURRENT_LIST_DIR}/MultiLaunch.cpp" - "${CMAKE_CURRENT_LIST_DIR}/TestData.cpp") - add_executable(test_multilaunch ${MULTILAUNCH_TEST_SOURCES}) - target_link_libraries(test_multilaunch ${GTEST_LIBRARIES} libopenrct2 ${LDL} z) --add_test(NAME multilaunch COMMAND test_multilaunch) - - # Tile element test - set(TILE_ELEMENT_TEST_SOURCES "${CMAKE_CURRENT_LIST_DIR}/TileElements.cpp" - "${CMAKE_CURRENT_LIST_DIR}/TestData.cpp") - add_executable(test_tile_elements ${TILE_ELEMENT_TEST_SOURCES}) - target_link_libraries(test_tile_elements ${GTEST_LIBRARIES} libopenrct2 ${LDL} z) --add_test(NAME tile_elements COMMAND test_tile_elements) -+ -+if (NOT DISABLE_RCT2_TESTS) -+ add_test(NAME ride_ratings COMMAND test_ride_ratings) -+ add_test(NAME multilaunch COMMAND test_multilaunch) -+ add_test(NAME tile_elements COMMAND test_tile_elements) -+endif () --- -2.18.0 - diff --git a/games-simulation/openrct2/files/openrct2-0.2.4-disable-desktop-and-icon-files-without-gui.patch b/games-simulation/openrct2/files/openrct2-0.2.4-disable-desktop-and-icon-files-without-gui.patch new file mode 100644 index 000000000000..cddbe7a93a32 --- /dev/null +++ b/games-simulation/openrct2/files/openrct2-0.2.4-disable-desktop-and-icon-files-without-gui.patch @@ -0,0 +1,52 @@ +From 9df66b1f1f56427d896263728c84009c8c3b842b Mon Sep 17 00:00:00 2001 +From: Conrad Kostecki <conrad@kostecki.com> +Date: Sun, 10 Nov 2019 20:05:51 +0100 +Subject: [PATCH] CMakeLists.txt: don't install desktop and icon files without + GUI (#10206) + +If OpenRCT2 is compiled without GUI (for example as a dedicated server), +it does not make sense to install the desktop and icon files. + +Signed-off-by: Conrad Kostecki <conrad@kostecki.com> +--- + CMakeLists.txt | 28 +++++++++++++++------------- + 1 file changed, 15 insertions(+), 13 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7dda401bbdd..f6e4683c9b7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -319,18 +319,20 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/g2.dat" DESTINATION "${CMAKE_INSTALL_ + install(DIRECTORY "data/" DESTINATION "${CMAKE_INSTALL_DATADIR}/openrct2") + install(FILES ${DOC_FILES} DESTINATION "${CMAKE_INSTALL_DOCDIR}") + install(FILES "distribution/linux/openrct2.appdata.xml" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo") +-install(FILES "resources/logo/icon_x16.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/16x16/apps" RENAME "openrct2.png") +-install(FILES "resources/logo/icon_x24.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/24x24/apps" RENAME "openrct2.png") +-install(FILES "resources/logo/icon_x32.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/32x32/apps" RENAME "openrct2.png") +-install(FILES "resources/logo/icon_x48.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/48x48/apps" RENAME "openrct2.png") +-install(FILES "resources/logo/icon_x64.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/64x64/apps" RENAME "openrct2.png") +-install(FILES "resources/logo/icon_x96.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/96x96/apps" RENAME "openrct2.png") +-install(FILES "resources/logo/icon_x128.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/128x128/apps" RENAME "openrct2.png") +-install(FILES "resources/logo/icon_x256.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/256x256/apps" RENAME "openrct2.png") +-install(FILES "resources/logo/icon_flag.svg" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps" RENAME "openrct2.svg") +-install(FILES "distribution/linux/openrct2.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications") +-install(FILES "distribution/linux/openrct2-savegame.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications") +-install(FILES "distribution/linux/openrct2-scenario.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications") +-install(FILES "distribution/linux/openrct2-uri.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications") ++if (NOT DISABLE_GUI) ++ install(FILES "resources/logo/icon_x16.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/16x16/apps" RENAME "openrct2.png") ++ install(FILES "resources/logo/icon_x24.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/24x24/apps" RENAME "openrct2.png") ++ install(FILES "resources/logo/icon_x32.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/32x32/apps" RENAME "openrct2.png") ++ install(FILES "resources/logo/icon_x48.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/48x48/apps" RENAME "openrct2.png") ++ install(FILES "resources/logo/icon_x64.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/64x64/apps" RENAME "openrct2.png") ++ install(FILES "resources/logo/icon_x96.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/96x96/apps" RENAME "openrct2.png") ++ install(FILES "resources/logo/icon_x128.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/128x128/apps" RENAME "openrct2.png") ++ install(FILES "resources/logo/icon_x256.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/256x256/apps" RENAME "openrct2.png") ++ install(FILES "resources/logo/icon_flag.svg" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps" RENAME "openrct2.svg") ++ install(FILES "distribution/linux/openrct2.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications") ++ install(FILES "distribution/linux/openrct2-savegame.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications") ++ install(FILES "distribution/linux/openrct2-scenario.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications") ++ install(FILES "distribution/linux/openrct2-uri.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications") ++endif() + install(FILES "distribution/linux/openrct2-mimeinfo.xml" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/mime/packages/" RENAME "openrct2.xml") + install(DIRECTORY "distribution/man/" DESTINATION "${CMAKE_INSTALL_MANDIR}/man6" FILES_MATCHING PATTERN "*.6") diff --git a/games-simulation/openrct2/files/openrct2-0.2.4-disable-optional-features.patch b/games-simulation/openrct2/files/openrct2-0.2.4-disable-optional-features.patch new file mode 100644 index 000000000000..03d6496bf3ee --- /dev/null +++ b/games-simulation/openrct2/files/openrct2-0.2.4-disable-optional-features.patch @@ -0,0 +1,87 @@ +From fef1906d0d7050b1dfa3792f6e8d3a9b9632df68 Mon Sep 17 00:00:00 2001 +From: Conrad Kostecki <conrad+github@kostecki.com> +Date: Sat, 9 Nov 2019 21:20:16 +0100 +Subject: [PATCH] CMakeLists.txt: make discord-rpc and google benchmark + optional (#10208) + +For a package maintainer, it should be possible to disable the support +for discord-rpc and google benchmark, as it currently always includes them, +when the library if found. +--- + CMakeLists.txt | 26 +++++++++++++++----------- + src/openrct2/CMakeLists.txt | 18 ++++++++++-------- + 2 files changed, 25 insertions(+), 19 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ea4bdfd8221..7dda401bbdd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -42,6 +42,8 @@ CMAKE_DEPENDENT_OPTION(DOWNLOAD_REPLAYS "Download replays during installation." + option(STATIC "Create a static build.") + option(USE_MMAP "Use mmap to try loading rct2's data segment into memory.") + ++option(DISABLE_DISCORD_RPC "Disable Discord-RPC support." OFF) ++option(DISABLE_GOOGLE_BENCHMARK "Disable Google Benchmarks support." OFF) + option(DISABLE_HTTP_TWITCH "Disable HTTP and Twitch support.") + option(DISABLE_NETWORK "Disable multiplayer functionality. Mainly for testing.") + option(DISABLE_TTF "Disable support for TTF provided by freetype2.") +@@ -125,17 +127,19 @@ if (CXX_WARN_SUGGEST_FINAL_METHODS) + add_definitions(-D__WARN_SUGGEST_FINAL_METHODS__) + endif () + +-if(EXISTS "${ROOT_DIR}/discord-rpc") +- # Don't build discord's examples, some of which are in C and do not honour +- # the flags we set for C++. Also we don't use the provided examples. +- set(BUILD_EXAMPLES OFF CACHE BOOL "Build example apps") +- add_subdirectory("${ROOT_DIR}/discord-rpc") +- add_definitions(-D__ENABLE_DISCORD__) +- include_directories("${ROOT_DIR}/discord-rpc/include") +- set(HAVE_DISCORD_RPC TRUE) +- message("Building with discord-rpc support") +-else() +- message("No discord-rpc detected, to enable clone discord-rpc to root directory: ${ROOT_DIR}") ++if (NOT DISABLE_DISCORD_RPC) ++ if(EXISTS "${ROOT_DIR}/discord-rpc") ++ # Don't build discord's examples, some of which are in C and do not honour ++ # the flags we set for C++. Also we don't use the provided examples. ++ set(BUILD_EXAMPLES OFF CACHE BOOL "Build example apps") ++ add_subdirectory("${ROOT_DIR}/discord-rpc") ++ add_definitions(-D__ENABLE_DISCORD__) ++ include_directories("${ROOT_DIR}/discord-rpc/include") ++ set(HAVE_DISCORD_RPC TRUE) ++ message("Building with discord-rpc support") ++ else() ++ message("No discord-rpc detected, to enable clone discord-rpc to root directory: ${ROOT_DIR}") ++ endif() + endif() + + # Copied from https://github.com/opencv/opencv/blob/dcdd6af5a856826fe62c95322145731e702e54c5/cmake/OpenCVDetectCXXCompiler.cmake#L63-L70 +diff --git a/src/openrct2/CMakeLists.txt b/src/openrct2/CMakeLists.txt +index 61be3d13c2a..97674911c0c 100644 +--- a/src/openrct2/CMakeLists.txt ++++ b/src/openrct2/CMakeLists.txt +@@ -73,14 +73,16 @@ if (NOT DISABLE_TTF) + endif () + endif () + +-find_package(benchmark 1.4 QUIET) +-if (benchmark_FOUND) +- message("Found Google benchmark, enabling support") +- set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_DEFINITIONS USE_BENCHMARK) +- target_link_libraries(${PROJECT_NAME} benchmark::benchmark) +- target_include_directories(${PROJECT_NAME} PRIVATE ${benchmark_INCLUDE_DIRS}) +-else () +- message("Google benchmark not found, disabling support") ++if (NOT DISABLE_GOOGLE_BENCHMARK) ++ find_package(benchmark 1.4 QUIET) ++ if (benchmark_FOUND) ++ message("Found Google benchmark, enabling support") ++ set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_DEFINITIONS USE_BENCHMARK) ++ target_link_libraries(${PROJECT_NAME} benchmark::benchmark) ++ target_include_directories(${PROJECT_NAME} PRIVATE ${benchmark_INCLUDE_DIRS}) ++ else () ++ message("Google benchmark not found, disabling support") ++ endif () + endif () + + # Third party libraries diff --git a/games-simulation/openrct2/files/openrct2-0.2.4-include-additional-paths.patch b/games-simulation/openrct2/files/openrct2-0.2.4-include-additional-paths.patch new file mode 100644 index 000000000000..d7c3bb7b4442 --- /dev/null +++ b/games-simulation/openrct2/files/openrct2-0.2.4-include-additional-paths.patch @@ -0,0 +1,33 @@ +From 370b6c6ee48dd1ccc68e03f4bba3e9a2cb2067aa Mon Sep 17 00:00:00 2001 +From: Conrad Kostecki <conrad@kostecki.com> +Date: Sat, 9 Nov 2019 22:32:03 +0100 +Subject: [PATCH] src/openrct2/config/Config.cpp: Search additional paths for + rct data. + +With '/usr/share/openrct2/rct{1,2}_data' added into the search path list, +it makes possible to install rct{1,2} game files globally, +so every user on a linux system can run OpenRCT2 directly. +--- + src/openrct2/config/Config.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/openrct2/config/Config.cpp b/src/openrct2/config/Config.cpp +index 08d59488eea..969533f8820 100644 +--- a/src/openrct2/config/Config.cpp ++++ b/src/openrct2/config/Config.cpp +@@ -615,6 +615,7 @@ namespace Config + log_verbose("config_find_rct1_path(...)"); + + static constexpr const utf8* searchLocations[] = { ++ R"(/usr/share/openrct2/rct1_data)", + R"(C:\Program Files\Steam\steamapps\common\Rollercoaster Tycoon Deluxe)", + R"(C:\Program Files (x86)\Steam\steamapps\common\Rollercoaster Tycoon Deluxe)", + R"(C:\GOG Games\RollerCoaster Tycoon Deluxe)", +@@ -659,6 +660,7 @@ namespace Config + log_verbose("config_find_rct2_path(...)"); + + static constexpr const utf8* searchLocations[] = { ++ R"(/usr/share/openrct2/rct2_data)", + R"(C:\Program Files\Steam\steamapps\common\Rollercoaster Tycoon 2)", + R"(C:\Program Files (x86)\Steam\steamapps\common\Rollercoaster Tycoon 2)", + R"(C:\GOG Games\RollerCoaster Tycoon 2 Triple Thrill Pack)", diff --git a/games-simulation/openrct2/files/openrct2.confd b/games-simulation/openrct2/files/openrct2.confd new file mode 100644 index 000000000000..cdc414542d26 --- /dev/null +++ b/games-simulation/openrct2/files/openrct2.confd @@ -0,0 +1,11 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Name of the OpenRCT2 scenario file, +# which will be used by the dedicated server. +# It needs to be placed in '/var/lib/openrct2/<instance>/scenario'. +# The default instance is 'main'. +OPENRCT2_SCENARIO_FILE="scenario.sc6" + +# Options, which can be passed to the dedicated server. +OPENRCT2_OPTS="--port 11753" diff --git a/games-simulation/openrct2/files/openrct2.initd b/games-simulation/openrct2/files/openrct2.initd new file mode 100644 index 000000000000..de95158a68e7 --- /dev/null +++ b/games-simulation/openrct2/files/openrct2.initd @@ -0,0 +1,41 @@ +#!/sbin/openrc-run +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +if [ "${SVCNAME}" = "openrct2" ]; then + instance="main" +else + instance="${SVCNAME#*.}" +fi + +openrct2_command="/usr/bin/openrct2-cli" +openrct2_path="/var/lib/openrct2" +openrct2_path_instance="${openrct2_path}/${instance}" +openrct2_path_scenario="${openrct2_path_instance}/scenario" +name="OpenRCT2 server (${instance})" +pidfile="/run/openrct2-cli.${instance}.pid" +start_stop_daemon_args="--chdir ${openrct2_path_instance}" + +command="/usr/bin/openrct2-cli" +command_args="host \"${openrct2_path_scenario}/${OPENRCT2_SCENARIO_FILE}\" --headless --user-data-path ${openrct2_path_instance} ${OPENRCT2_OPTS}" +command_background="true" +command_group="openrct2" +command_user="openrct2" + +depend() { + use net +} + +start_pre() { + checkpath -d -o "${command_user}:${command_group}" -q "${openrct2_path}" "${openrct2_path_instance}" "${openrct2_path_scenario}" + + if [ ! -f "${openrct2_path_scenario}/${OPENRCT2_SCENARIO_FILE}" ]; then + eerror "The scenario ${openrct2_path_scenario}/${OPENRCT2_SCENARIO_FILE} could not be found!" + eerror "An OpenRCT2 scenario file is needed by the dedicated server." + eerror "Please check, if OPENRCT2_SCENARIO is configured correctly." + return 1 + else + checkpath -f -o "${command_user}:${command_group}" -q "${openrct2_path_scenario}/${OPENRCT2_SCENARIO_FILE}" + return 0 + fi +} |