From owner-dev-commits-ports-branches@freebsd.org Wed Apr 28 19:09:11 2021 Return-Path: Delivered-To: dev-commits-ports-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1E8E55FDC70; Wed, 28 Apr 2021 19:09:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FVp8R0Q0gz3FqY; Wed, 28 Apr 2021 19:09:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 00E7D137A8; Wed, 28 Apr 2021 19:09:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13SJ9ApJ025638; Wed, 28 Apr 2021 19:09:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13SJ9AdB025637; Wed, 28 Apr 2021 19:09:10 GMT (envelope-from git) Date: Wed, 28 Apr 2021 19:09:10 GMT Message-Id: <202104281909.13SJ9AdB025637@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Dmitry Marakasov Subject: git: 7a06623c035f - 2021Q2 - devel/sdl20: backport Wayland fix for games/supertuxkart MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: amdmi3 X-Git-Repository: ports X-Git-Refname: refs/heads/2021Q2 X-Git-Reftype: branch X-Git-Commit: 7a06623c035f41585104cc14f1b2fc04e09e660a Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the quarterly branches of the FreeBSD ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Apr 2021 19:09:11 -0000 The branch 2021Q2 has been updated by amdmi3: URL: https://cgit.FreeBSD.org/ports/commit/?id=7a06623c035f41585104cc14f1b2fc04e09e660a commit 7a06623c035f41585104cc14f1b2fc04e09e660a Author: Dmitry Marakasov AuthorDate: 2021-04-27 18:28:46 +0000 Commit: Dmitry Marakasov CommitDate: 2021-04-28 19:07:42 +0000 devel/sdl20: backport Wayland fix for games/supertuxkart PR: 255418 Reported by: stephan@lichtenauer.co.za Submitted by: jbeich (cherry picked from commit b46d53b6cedd133f4caa018e76a161e686ff5858) --- devel/sdl20/Makefile | 2 +- devel/sdl20/files/patch-wayland | 70 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 1 deletion(-) diff --git a/devel/sdl20/Makefile b/devel/sdl20/Makefile index baeda1a40fc0..a504c98f31cd 100644 --- a/devel/sdl20/Makefile +++ b/devel/sdl20/Makefile @@ -1,7 +1,7 @@ PORTNAME= sdl2 PORTVERSION= 2.0.12 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= devel MASTER_SITES= https://www.libsdl.org/release/ DISTNAME= SDL2-${PORTVERSION} diff --git a/devel/sdl20/files/patch-wayland b/devel/sdl20/files/patch-wayland new file mode 100644 index 000000000000..9191eff7fe43 --- /dev/null +++ b/devel/sdl20/files/patch-wayland @@ -0,0 +1,70 @@ +From 8babda2c206949ad9c4f42e64bf8ae3e35b2e709 Mon Sep 17 00:00:00 2001 +From: "Ryan C. Gordon" +Date: Thu, 16 Jul 2020 13:18:19 -0400 +Subject: [PATCH] egl: SDL_EGL_LoadLibaryOnly() shouldn't set + _this->gl_config.driver_loaded = 1 + +This is handled in in the higher-level SDL_GL_LoadLibrary(). + +All uses of SDL_EGL_LoadLibrary (which calls the Only version) are just +target-specific wrappers for their own GL_LoadLibrary hook, with two +exceptions which now handle driver_loaded correctly (although it's +questionable if these init-if-no-one-did-it-correctly-already code blocks +should exist at all, fwiw). + +Fixes Bugzilla #5190. +--- + src/video/SDL_egl.c | 2 -- + src/video/cocoa/SDL_cocoaopengles.m | 2 ++ + src/video/windows/SDL_windowsopengles.c | 3 ++- + 3 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/video/SDL_egl.c b/src/video/SDL_egl.c +index 58939053c..3358f47b8 100644 +--- src/video/SDL_egl.c ++++ src/video/SDL_egl.c +@@ -438,8 +438,6 @@ SDL_EGL_LoadLibraryOnly(_THIS, const char *egl_path) + LOAD_FUNC_EGLEXT(eglQueryDevicesEXT); + LOAD_FUNC_EGLEXT(eglGetPlatformDisplayEXT); + +- _this->gl_config.driver_loaded = 1; +- + if (path) { + SDL_strlcpy(_this->gl_config.driver_path, path, sizeof(_this->gl_config.driver_path) - 1); + } else { +diff --git a/src/video/cocoa/SDL_cocoaopengles.m b/src/video/cocoa/SDL_cocoaopengles.m +index a45a9f57c..0f551de10 100644 +--- src/video/cocoa/SDL_cocoaopengles.m ++++ src/video/cocoa/SDL_cocoaopengles.m +@@ -109,10 +109,12 @@ + + + if (_this->egl_data == NULL) { ++ SDL_assert(!_this->gl_config.driver_loaded); + if (SDL_EGL_LoadLibrary(_this, NULL, EGL_DEFAULT_DISPLAY, 0) < 0) { + SDL_EGL_UnloadLibrary(_this); + return -1; + } ++ _this->gl_config.driver_loaded = 1; + } + + /* Create the GLES window surface */ +diff --git a/src/video/windows/SDL_windowsopengles.c b/src/video/windows/SDL_windowsopengles.c +index e4bfe49cc..5ee46d83c 100644 +--- src/video/windows/SDL_windowsopengles.c ++++ src/video/windows/SDL_windowsopengles.c +@@ -107,12 +107,13 @@ WIN_GLES_SetupWindow(_THIS, SDL_Window * window) + SDL_Window *current_win = SDL_GL_GetCurrentWindow(); + SDL_GLContext current_ctx = SDL_GL_GetCurrentContext(); + +- + if (_this->egl_data == NULL) { ++ SDL_assert(!_this->gl_config.driver_loaded); + if (SDL_EGL_LoadLibrary(_this, NULL, EGL_DEFAULT_DISPLAY, 0) < 0) { + SDL_EGL_UnloadLibrary(_this); + return -1; + } ++ _this->gl_config.driver_loaded = 1; + } + + /* Create the GLES window surface */