Skip to content

Commit

Permalink
[magnum-plugins] Fix basisimporter/basisimageconverter features (mic…
Browse files Browse the repository at this point in the history
…rosoft#8939)

* [magnum-plugins] Patch FindBasisUniversal to find prebuilt basisu

Signed-off-by: Squareys <[email protected]>

* [magnum-plugins] Patch BasisImporter to use slightly outdated basisu

jherico's fork which the vcpkg port is based on does not integrate
BinomialLLC/basis_universal@54304fa
yet, which renamed a parameter.

Signed-off-by: Squareys <[email protected]>

* [magnum-plugins] Only apply FindBasisUniversal patch on release

The change is integrated upstream for --head builds already.

Signed-off-by: Squareys <[email protected]>

* [magnum-plugins] Download large patch from GitHub history
  • Loading branch information
Squareys authored and grdowns committed Nov 25, 2019
1 parent 4603d00 commit a3ab450
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 2 deletions.
27 changes: 27 additions & 0 deletions ports/magnum-plugins/003-use-outdated-basisu.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From 4d59a1eafc7a5828a0dedc92a713b3394d5f64fc Mon Sep 17 00:00:00 2001
From: Squareys <[email protected]>
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

2 changes: 1 addition & 1 deletion ports/magnum-plugins/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: magnum-plugins
Version: 2019.10
Version: 2019.10-1
Build-Depends: magnum[core]
Description: Plugins for magnum, C++11/C++14 graphics middleware for games and data visualization
Homepage: https://magnum.graphics/
Expand Down
13 changes: 12 additions & 1 deletion ports/magnum-plugins/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
include(vcpkg_common_functions)
set(_RELEASE_ONLY_PATCHES)
if(NOT VCPKG_USE_HEAD_VERSION)
vcpkg_download_distfile(
_RELEASE_ONLY_PATCHES
URLS "https://github.com/mosra/magnum-plugins/commit/c2a05465fa43befbb628b424378e328fa42923b7.diff"
FILENAME "c2a05465fa43befbb628b424378e328fa42923b7.diff"
SHA512 e03953ff7319b3b8e3644b8e25c006a856dd6a85cec6e4c033f9b2059af7ae39ed84b76c11c93c41ea6a681d7f34dd5980806f49f760d1c26778047c90cc76df
)
endif()

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO mosra/magnum-plugins
Expand All @@ -7,6 +16,8 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
001-tools-path.patch
${_RELEASE_ONLY_PATCHES}
003-use-outdated-basisu.patch
)

if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
Expand Down

0 comments on commit a3ab450

Please sign in to comment.