[magnum/magnum-plugins] Fix patches for --head builds (#10158)

* [magnum] Update patches for --head builds

Signed-off-by: Squareys <squareys@googlemail.com>

* [magnum-plugins] Remove obsolete patch

Since basisu port has been updated, we can now use it without patching
the magnum-plugins code for compatibility.

Signed-off-by: Squareys <squareys@googlemail.com>

* [corrade] Remove obsolete warning and flag

Signed-off-by: Squareys <squareys@googlemail.com>

* [magnum] Rename patches to reflect order of application

Signed-off-by: Squareys <squareys@googlemail.com>

* [corrade/magnum/magnum-plugins] Update port versions

Signed-off-by: Squareys <squareys@googlemail.com>
This commit is contained in:
Jonathan Hale 2020-03-28 04:37:33 +01:00 committed by GitHub
parent 9efff1124a
commit edfce3b455
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 59 additions and 44 deletions

View File

@ -1,5 +1,5 @@
Source: corrade
Version: 2019.10
Version: 2019.10-1
Description: C++11/C++14 multiplatform utility library
Homepage: https://magnum.graphics/corrade/
Default-Features: interconnect, pluginmanager, testsuite, utility

View File

@ -25,16 +25,6 @@ foreach(_feature IN LISTS ALL_FEATURES)
endif()
endforeach()
if(NOT VCPKG_CMAKE_SYSTEM_NAME)
# building for Windows desktop
if (VCPKG_PLATFORM_TOOLSET STREQUAL "v142" AND NOT VCPKG_USE_HEAD_VERSION)
message("**********")
message("WARNING: Visual Studio 2019 is not official supported by Corrade/Magnum team. Please use --head version if you intend to have upstream support.")
message("**********")
set(_CUSTOM_BUILD_FLAGS "-DCORRADE_MSVC2017_COMPATIBILITY=ON")
endif()
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA # Disable this option if project cannot be built with Ninja

View File

@ -1,27 +0,0 @@
From 4d59a1eafc7a5828a0dedc92a713b3394d5f64fc Mon Sep 17 00:00:00 2001
From: Squareys <squareys@googlemail.com>
Date: Wed, 6 Nov 2019 18:45:17 +0100
Subject: [PATCH] fix vcpkg build
---
src/MagnumPlugins/BasisImageConverter/BasisImageConverter.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/MagnumPlugins/BasisImageConverter/BasisImageConverter.cpp b/src/MagnumPlugins/BasisImageConverter/BasisImageConverter.cpp
index db3a39cb..d5c80b11 100644
--- a/src/MagnumPlugins/BasisImageConverter/BasisImageConverter.cpp
+++ b/src/MagnumPlugins/BasisImageConverter/BasisImageConverter.cpp
@@ -106,7 +106,9 @@ Containers::Array<char> BasisImageConverter::doExportToData(const ImageView2D& i
/* Hierarchical virtual selector codebook options */
PARAM_CONFIG_FIX_NAME(global_sel_pal, bool, "global_selector_palette");
- PARAM_CONFIG_FIX_NAME(auto_global_sel_pal, bool, "auto_global_selector_palette");
+ /* vcpkg version is begind 54304fa01443280bbaa9854f16c9f1756b17b40b, which changes name
+ * to m_auto_global_sel_pal */
+ params.m_no_auto_global_sel_pal = !configuration().value<bool>("auto_global_selector_palette");
PARAM_CONFIG_FIX_NAME(no_hybrid_sel_cb, bool, "no_hybrid_selector_codebook");
PARAM_CONFIG_FIX_NAME(global_pal_bits, int, "global_palette_bits");
PARAM_CONFIG_FIX_NAME(global_mod_bits, int, "global_modifier_bits");
--
2.17.0.windows.1

View File

@ -1,5 +1,5 @@
Source: magnum-plugins
Version: 2019.10-1
Version: 2019.10-2
Build-Depends: magnum[core]
Description: Plugins for magnum, C++11/C++14 graphics middleware for games and data visualization
Homepage: https://magnum.graphics/

View File

@ -17,7 +17,6 @@ vcpkg_from_github(
PATCHES
001-tools-path.patch
${_RELEASE_ONLY_PATCHES}
003-use-outdated-basisu.patch
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)

View File

@ -0,0 +1,43 @@
diff --git a/src/Magnum/Platform/Sdl2Application.cpp b/src/Magnum/Platform/Sdl2Application.cpp
index 276c7ee55..90c52f3cb 100644
--- a/src/Magnum/Platform/Sdl2Application.cpp
+++ b/src/Magnum/Platform/Sdl2Application.cpp
@@ -34,7 +34,7 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpragma-pack"
#endif
-#include <SDL.h>
+#include <SDL2/SDL.h>
#ifdef CORRADE_TARGET_CLANG_CL
#pragma clang diagnostic pop
#endif
diff --git a/src/Magnum/Platform/Sdl2Application.h b/src/Magnum/Platform/Sdl2Application.h
index b2426d513..176729fdb 100644
--- a/src/Magnum/Platform/Sdl2Application.h
+++ b/src/Magnum/Platform/Sdl2Application.h
@@ -57,11 +57,11 @@
#pragma clang diagnostic ignored "-Wpragma-pack"
#endif
/* SDL.h includes the world, adding 50k LOC. We don't want that either. */
-#include <SDL_keycode.h>
-#include <SDL_mouse.h>
-#include <SDL_version.h> /* huh, why is this not pulled in implicitly?! */
-#include <SDL_video.h>
-#include <SDL_scancode.h>
+#include <SDL2/SDL_keycode.h>
+#include <SDL2/SDL_mouse.h>
+#include <SDL2/SDL_version.h> /* huh, why is this not pulled in implicitly?! */
+#include <SDL2/SDL_video.h>
+#include <SDL2/SDL_scancode.h>
#ifdef CORRADE_TARGET_IOS
/* Including SDL_main.h unconditionally would mean it'd override Corrade::Main
@@ -74,7 +74,7 @@
#endif
#ifdef CORRADE_TARGET_WINDOWS_RT
-#include <SDL_main.h> /* For SDL_WinRTRunApp */
+#include <SDL2/SDL_main.h> /* For SDL_WinRTRunApp */
#include <wrl.h> /* For the WinMain entrypoint */
#endif
#ifdef CORRADE_TARGET_CLANG_CL

View File

@ -1,5 +1,5 @@
Source: magnum
Version: 2019.10
Version: 2019.10-1
Build-Depends: corrade[utility]
Description: C++11/C++14 graphics middleware for games and data visualization
Homepage: https://magnum.graphics/

View File

@ -1,4 +1,15 @@
include(vcpkg_common_functions)
# Patches that are independent of --head flag
set(_PATCHES 001-tools-path.patch)
# Patches that are only applied to --head builds
if(VCPKG_USE_HEAD_VERSION)
list(APPEND _PATCHES 002-sdl-includes-head.patch)
# Patches that are only applied to release builds
else()
list(APPEND _PATCHES 002-sdl-includes.patch)
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO mosra/magnum
@ -6,8 +17,7 @@ vcpkg_from_github(
SHA512 b1c991199fa9b09b780ea822de4b2251c70fcc95e7f28bb14a6184861d92fcd4c6e6fe43ad21acfbfd191cd46e79bf58b867240ad6f706b07cd1fbe145b8eaff
HEAD_REF master
PATCHES
001-sdl-includes.patch
002-tools-path.patch
${_PATCHES}
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)