From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A6A921382C5 for ; Sat, 2 Jan 2021 21:00:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B8516E0829; Sat, 2 Jan 2021 21:00:58 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8D12AE0829 for ; Sat, 2 Jan 2021 21:00:58 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1D8AC33F698 for ; Sat, 2 Jan 2021 21:00:57 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9CDADCC for ; Sat, 2 Jan 2021 21:00:55 +0000 (UTC) From: "James Le Cuirot" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "James Le Cuirot" Message-ID: <1609621161.288360dc7ce2f968a2f12099edeace3f3ed1a705.chewi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: games-action/supertuxkart/, games-action/supertuxkart/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: games-action/supertuxkart/files/supertuxkart-1.2-new-sdl.patch games-action/supertuxkart/supertuxkart-1.2.ebuild X-VCS-Directories: games-action/supertuxkart/ games-action/supertuxkart/files/ X-VCS-Committer: chewi X-VCS-Committer-Name: James Le Cuirot X-VCS-Revision: 288360dc7ce2f968a2f12099edeace3f3ed1a705 X-VCS-Branch: master Date: Sat, 2 Jan 2021 21:00:55 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 992795a5-f03f-4afe-90f9-19bff9fa56be X-Archives-Hash: 7cea250793b186fc82796f831afbbb53 commit: 288360dc7ce2f968a2f12099edeace3f3ed1a705 Author: James Le Cuirot gentoo org> AuthorDate: Sat Jan 2 20:59:21 2021 +0000 Commit: James Le Cuirot gentoo org> CommitDate: Sat Jan 2 20:59:21 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=288360dc games-action/supertuxkart: Fix build with latest SDL2 Closes: https://bugs.gentoo.org/761814 Package-Manager: Portage-3.0.12, Repoman-3.0.1 Signed-off-by: James Le Cuirot gentoo.org> .../files/supertuxkart-1.2-new-sdl.patch | 106 +++++++++++++++++++++ games-action/supertuxkart/supertuxkart-1.2.ebuild | 3 +- 2 files changed, 108 insertions(+), 1 deletion(-) diff --git a/games-action/supertuxkart/files/supertuxkart-1.2-new-sdl.patch b/games-action/supertuxkart/files/supertuxkart-1.2-new-sdl.patch new file mode 100644 index 00000000000..973c75d010f --- /dev/null +++ b/games-action/supertuxkart/files/supertuxkart-1.2-new-sdl.patch @@ -0,0 +1,106 @@ +From 61833c9c26da5520f2eaa02f2458971ba07f2aad Mon Sep 17 00:00:00 2001 +From: Benau +Date: Sun, 29 Nov 2020 12:42:11 +0800 +Subject: [PATCH] Fix compilation with latest SDL + +--- + src/input/gamepad_config.cpp | 55 ++++++++++++++++++------------------ + 1 file changed, 27 insertions(+), 28 deletions(-) + +diff --git a/src/input/gamepad_config.cpp b/src/input/gamepad_config.cpp +index 7c6f632099..c060e7a5a7 100644 +--- a/src/input/gamepad_config.cpp ++++ b/src/input/gamepad_config.cpp +@@ -32,8 +32,7 @@ + #include "input/sdl_controller.hpp" + #include + +-static_assert(SDL_CONTROLLER_BUTTON_MAX - 1 == SDL_CONTROLLER_BUTTON_DPAD_RIGHT, "non continous name"); +-enum AxisWithDirection ++enum AxisWithDirection : unsigned + { + SDL_CONTROLLER_AXIS_LEFTX_RIGHT = SDL_CONTROLLER_BUTTON_MAX, + SDL_CONTROLLER_AXIS_LEFTX_LEFT, +@@ -140,56 +139,56 @@ void GamepadConfig::setDefaultBinds () + core::stringw GamepadConfig::getBindingAsString(const PlayerAction action) const + { + #ifndef SERVER_ONLY +- std::array readable = ++ std::map readable = + {{ +- "A", // SDL_CONTROLLER_BUTTON_A +- "B", // SDL_CONTROLLER_BUTTON_B +- "X", // SDL_CONTROLLER_BUTTON_X +- "Y", // SDL_CONTROLLER_BUTTON_Y ++ { SDL_CONTROLLER_BUTTON_A, "A" }, ++ { SDL_CONTROLLER_BUTTON_B, "B" }, ++ { SDL_CONTROLLER_BUTTON_X, "X" }, ++ { SDL_CONTROLLER_BUTTON_Y, "Y" }, + // I18N: name of buttons on gamepads +- _("Back"), // SDL_CONTROLLER_BUTTON_BACK ++ { SDL_CONTROLLER_BUTTON_BACK, _("Back") }, + // I18N: name of buttons on gamepads +- _("Guide"), // SDL_CONTROLLER_BUTTON_GUIDE ++ { SDL_CONTROLLER_BUTTON_GUIDE, _("Guide") }, + // I18N: name of buttons on gamepads +- _("Start"), // SDL_CONTROLLER_BUTTON_START ++ { SDL_CONTROLLER_BUTTON_START, _("Start") }, + // I18N: name of buttons on gamepads +- _("Left thumbstick press"), // SDL_CONTROLLER_BUTTON_LEFTSTICK ++ { SDL_CONTROLLER_BUTTON_LEFTSTICK, _("Left thumbstick press") }, + // I18N: name of buttons on gamepads +- _("Right thumbstick press"), // SDL_CONTROLLER_BUTTON_RIGHTSTICK ++ { SDL_CONTROLLER_BUTTON_RIGHTSTICK, _("Right thumbstick press") }, + // I18N: name of buttons on gamepads +- _("Left shoulder"), // SDL_CONTROLLER_BUTTON_LEFTSHOULDER ++ { SDL_CONTROLLER_BUTTON_LEFTSHOULDER, _("Left shoulder") }, + // I18N: name of buttons on gamepads +- _("Right shoulder"), // SDL_CONTROLLER_BUTTON_RIGHTSHOULDER ++ { SDL_CONTROLLER_BUTTON_RIGHTSHOULDER, _("Right shoulder") }, + // I18N: name of buttons on gamepads +- _("DPad up"), // SDL_CONTROLLER_BUTTON_DPAD_UP ++ { SDL_CONTROLLER_BUTTON_DPAD_UP, _("DPad up") }, + // I18N: name of buttons on gamepads +- _("DPad down"), // SDL_CONTROLLER_BUTTON_DPAD_DOWN ++ { SDL_CONTROLLER_BUTTON_DPAD_DOWN, _("DPad down") }, + // I18N: name of buttons on gamepads +- _("DPad left"), // SDL_CONTROLLER_BUTTON_DPAD_LEFT ++ { SDL_CONTROLLER_BUTTON_DPAD_LEFT, _("DPad left") }, + // I18N: name of buttons on gamepads +- _("DPad right"), // SDL_CONTROLLER_BUTTON_DPAD_RIGHT ++ { SDL_CONTROLLER_BUTTON_DPAD_RIGHT, _("DPad right") }, + + // Below are extensions after SDL2 header SDL_CONTROLLER_BUTTON_MAX + // I18N: name of buttons on gamepads +- _("Left thumbstick right"), // SDL_CONTROLLER_AXIS_LEFTX_RIGHT ++ { SDL_CONTROLLER_AXIS_LEFTX_RIGHT, _("Left thumbstick right") }, + // I18N: name of buttons on gamepads +- _("Left thumbstick left"), // SDL_CONTROLLER_AXIS_LEFTX_LEFT ++ { SDL_CONTROLLER_AXIS_LEFTX_LEFT, _("Left thumbstick left") }, + // I18N: name of buttons on gamepads +- _("Left thumbstick down"), // SDL_CONTROLLER_AXIS_LEFTY_DOWN ++ { SDL_CONTROLLER_AXIS_LEFTY_DOWN, _("Left thumbstick down") }, + // I18N: name of buttons on gamepads +- _("Left thumbstick up"), // SDL_CONTROLLER_AXIS_LEFTY_UP ++ { SDL_CONTROLLER_AXIS_LEFTY_UP, _("Left thumbstick up") }, + // I18N: name of buttons on gamepads +- _("Right thumbstick right"), // SDL_CONTROLLER_AXIS_RIGHTX_RIGHT ++ { SDL_CONTROLLER_AXIS_RIGHTX_RIGHT, _("Right thumbstick right") }, + // I18N: name of buttons on gamepads +- _("Right thumbstick left"), // SDL_CONTROLLER_AXIS_RIGHTX_LEFT ++ { SDL_CONTROLLER_AXIS_RIGHTX_LEFT, _("Right thumbstick left") }, + // I18N: name of buttons on gamepads +- _("Right thumbstick down"), // SDL_CONTROLLER_AXIS_RIGHTY_DOWN ++ { SDL_CONTROLLER_AXIS_RIGHTY_DOWN, _("Right thumbstick down") }, + // I18N: name of buttons on gamepads +- _("Right thumbstick up"), // SDL_CONTROLLER_AXIS_RIGHTY_UP ++ { SDL_CONTROLLER_AXIS_RIGHTY_UP, _("Right thumbstick up") }, + // I18N: name of buttons on gamepads +- _("Left trigger"), // SDL_CONTROLLER_AXIS_TRIGGERLEFT_UP ++ { SDL_CONTROLLER_AXIS_TRIGGERLEFT_UP, _("Left trigger") }, + // I18N: name of buttons on gamepads +- _("Right trigger") // SDL_CONTROLLER_AXIS_TRIGGERRIGHT_UP ++ { SDL_CONTROLLER_AXIS_TRIGGERRIGHT_UP, _("Right trigger") } + }}; + + const Binding &b = getBinding(action); diff --git a/games-action/supertuxkart/supertuxkart-1.2.ebuild b/games-action/supertuxkart/supertuxkart-1.2.ebuild index 5e9aa59fdef..fc674824ebb 100644 --- a/games-action/supertuxkart/supertuxkart-1.2.ebuild +++ b/games-action/supertuxkart/supertuxkart-1.2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -57,6 +57,7 @@ S="${WORKDIR}/${MY_P}" PATCHES=( "${FILESDIR}"/${PN}-1.1-irrlicht-arch-support.patch "${FILESDIR}"/${PN}-1.2-irrlicht-system-libs.patch + "${FILESDIR}"/${P}-new-sdl.patch ) src_prepare() {