diff options
| author | Jonathan Hale <Squareys@googlemail.com> | 2020-07-14 17:38:18 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-14 08:38:18 -0700 |
| commit | 5e40afca0d7286a9a7d742822cc2a1179a9e63fc (patch) | |
| tree | 4e83343034a70f029a180a78d9fbab3971c222ba /ports/magnum | |
| parent | 9891a8f2132aa18cdc6f96862ee5406f2d901b0e (diff) | |
| download | vcpkg-5e40afca0d7286a9a7d742822cc2a1179a9e63fc.tar.gz vcpkg-5e40afca0d7286a9a7d742822cc2a1179a9e63fc.zip | |
[corrade,magnum,*-plugins,*-extras,*-integration] Update to v2020.06 (#12211)
* [magnum] Improve maintainability of feature to cmake flag conversion
* [magnum] Ignore features not supported on current platform
Allows `vcpkg install magnum[*]` on any platform.
Signed-off-by: Squareys <squareys@googlemail.com>
* [magnum] Add cglcontext and windowlesscglapplication features
* docs: Update valid VCPKG_CMAKE_SYSTEM_NAME values
Signed-off-by: Squareys <squareys@googlemail.com>
* [magnum-plugins] Replace deprecated basisu with archive download
Signed-off-by: Squareys <squareys@googlemail.com>
* [magnum-plugins] Add meshoptimizersceneconverter feature
Signed-off-by: Squareys <squareys@googlemail.com>
* [magnum-plugins] Also use vcpkg_check_features
Analog to magnum port.
Signed-off-by: Squareys <squareys@googlemail.com>
* [corrade,magnum,*-plugins,*-extras,*-integration] Update to v2020.06
Signed-off-by: Squareys <squareys@googlemail.com>
* [meshoptimizer] Add initial port
Signed-off-by: Squareys <squareys@googlemail.com>
* [magnum-plugins] Replace meshoptimizer download with feature dependency
Signed-off-by: Squareys <squareys@googlemail.com>
* [corrade,magnum-*] Fix license installation command
Signed-off-by: Squareys <squareys@googlemail.com>
* [meshoptimizer] Use vcpkg_fixup_cmake_targets
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Diffstat (limited to 'ports/magnum')
| -rw-r--r-- | ports/magnum/002-sdl-includes-head.patch | 43 | ||||
| -rw-r--r-- | ports/magnum/002-sdl-includes.patch | 33 | ||||
| -rw-r--r-- | ports/magnum/CONTROL | 32 | ||||
| -rw-r--r-- | ports/magnum/portfile.cmake | 144 |
4 files changed, 112 insertions, 140 deletions
diff --git a/ports/magnum/002-sdl-includes-head.patch b/ports/magnum/002-sdl-includes-head.patch deleted file mode 100644 index fb2ffed8d..000000000 --- a/ports/magnum/002-sdl-includes-head.patch +++ /dev/null @@ -1,43 +0,0 @@ -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 diff --git a/ports/magnum/002-sdl-includes.patch b/ports/magnum/002-sdl-includes.patch index b7ae6a446..fb2ffed8d 100644 --- a/ports/magnum/002-sdl-includes.patch +++ b/ports/magnum/002-sdl-includes.patch @@ -1,36 +1,43 @@ diff --git a/src/Magnum/Platform/Sdl2Application.cpp b/src/Magnum/Platform/Sdl2Application.cpp -index 46ade2d00..24d8eabe7 100644 +index 276c7ee55..90c52f3cb 100644 --- a/src/Magnum/Platform/Sdl2Application.cpp +++ b/src/Magnum/Platform/Sdl2Application.cpp -@@ -26,7 +26,7 @@ - #include "Sdl2Application.h" - - #include <cstring> +@@ -34,7 +34,7 @@ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpragma-pack" + #endif -#include <SDL.h> +#include <SDL2/SDL.h> - #ifndef CORRADE_TARGET_EMSCRIPTEN - #include <tuple> - #else + #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 1a50b1c72..45e88edf5 100644 +index b2426d513..176729fdb 100644 --- a/src/Magnum/Platform/Sdl2Application.h +++ b/src/Magnum/Platform/Sdl2Application.h -@@ -46,13 +46,13 @@ - #define SDL_MAIN_HANDLED +@@ -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 diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL index 8f187b890..8bea92fbf 100644 --- a/ports/magnum/CONTROL +++ b/ports/magnum/CONTROL @@ -1,9 +1,9 @@ Source: magnum -Version: 2019.10-2 +Version: 2020.06 Build-Depends: corrade[utility] Description: C++11/C++14 graphics middleware for games and data visualization Homepage: https://magnum.graphics/ -Default-Features: anyimageimporter, anyaudioimporter, anyimageconverter, anysceneimporter, debugtools, gl, meshtools, primitives, scenegraph, shaders, text, texturetools, trade, sdl2application +Default-Features: anyaudioimporter, anyimageimporter, anyimageconverter, anysceneconverter, anysceneimporter, debugtools, gl, meshtools, primitives, scenegraph, shaders, text, texturetools, trade, sdl2application Feature: al-info Description: magnum-al-info utility @@ -21,6 +21,10 @@ Feature: anyimageconverter Description: AnyImageConverter plugin Build-Depends: magnum[trade] +Feature: anysceneconverter +Description: AnySceneConverter plugin +Build-Depends: magnum[trade] + Feature: anysceneimporter Description: AnySceneImporter plugin Build-Depends: magnum[trade] @@ -90,6 +94,10 @@ Build-Depends: sdl2 Feature: scenegraph Description: SceneGraph library +Feature: sceneconverter +Description: magnum-sceneconverter utility +Build-Depends: magnum[anysceneconverter] + Feature: shaders Description: Shaders library Build-Depends: magnum[gl] @@ -113,20 +121,16 @@ Feature: wavaudioimporter Description: WavAudioImporter plugin Build-Depends: magnum[audio] -Feature: windowlesswglapplication -Description: WindowlessWglApplication library -Build-Depends: magnum[gl] - -Feature: eglcontext -Description: EglContext library +Feature: windowlesscglapplication +Description: WindowlessCglApplication library Build-Depends: magnum[gl] Feature: cglcontext Description: CglContext library Build-Depends: magnum[gl] -Feature: glxcontext -Description: GlxContext library +Feature: windowlesswglapplication +Description: WindowlessWglApplication library Build-Depends: magnum[gl] Feature: wglcontext @@ -137,6 +141,14 @@ Feature: windowlesseglapplication Description: WindowlessEglApplication library Build-Depends: magnum[gl] +Feature: eglcontext +Description: EglContext library +Build-Depends: magnum[gl] + Feature: windowlessglxapplication Description: WindowlessGlxApplication library Build-Depends: magnum[gl] + +Feature: glxcontext +Description: GlxContext library +Build-Depends: magnum[gl] diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index bc45ed9fd..cbdb34cd5 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -1,23 +1,12 @@ -# 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 - REF v2019.10 - SHA512 b1c991199fa9b09b780ea822de4b2251c70fcc95e7f28bb14a6184861d92fcd4c6e6fe43ad21acfbfd191cd46e79bf58b867240ad6f706b07cd1fbe145b8eaff + REF v2020.06 + SHA512 65b0c8a4520d1d282420c30ecd7c8525525d4dbb6e562e1e2e93d110f4eb686af43f098bf02460727fab1e1f9446dd00a99051e150c05ea40b1486a44fea1042 HEAD_REF master PATCHES - ${_PATCHES} + 001-tools-path.patch + 002-sdl-includes.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) @@ -28,43 +17,52 @@ else() set(BUILD_PLUGINS_STATIC 0) endif() -vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - al-info WITH_AL_INFO - anyimageimporter WITH_ANYIMAGEIMPORTER - anyaudioimporter WITH_ANYAUDIOIMPORTER - anyimageconverter WITH_ANYIMAGECONVERTER - anysceneimporter WITH_ANYSCENEIMPORTER - audio WITH_AUDIO - debugtools WITH_DEBUGTOOLS - distancefieldconverter WITH_DISTANCEFIELDCONVERTER - fontconverter WITH_FONTCONVERTER - gl WITH_GL - gl-info WITH_GL_INFO - glfwapplication WITH_GLFWAPPLICATION - imageconverter WITH_IMAGECONVERTER - magnumfont WITH_MAGNUMFONT - magnumfontconverter WITH_MAGNUMFONTCONVERTER - meshtools WITH_MESHTOOLS - objimporter WITH_OBJIMPORTER - tgaimageconverter WITH_TGAIMAGECONVERTER - opengltester WITH_OPENGLTESTER - primitives WITH_PRIMITIVES - sdl2application WITH_SDL2APPLICATION - scenegraph WITH_SCENEGRAPH - shaders WITH_SHADERS - text WITH_TEXT - texturetools WITH_TEXTURETOOLS - tgaimporter WITH_TGAIMPORTER - trade WITH_TRADE - wavaudioimporter WITH_WAVAUDIOIMPORTER - windowlesswglapplication WITH_WINDOWLESSWGLAPPLICATION - eglcontext WITH_EGLCONTEXT - cglcontext WITH_CGLCONTEXT - glxcontext WITH_GLXCONTEXT - wglcontext WITH_WGLCONTEXT - windowlesseglapplication WITH_WINDOWLESSEGLAPPLICATION - windowlessglxapplication WITH_WINDOWLESSGLXAPPLICATION -) +# Remove platform-specific feature that are not available +# on current target platform from all features. + +# For documentation on VCPKG_CMAKE_SYSTEM_NAME see +# https://github.com/microsoft/vcpkg/blob/master/docs/users/triplets.md#vcpkg_cmake_system_name + +set(ALL_SUPPORTED_FEATURES ${ALL_FEATURES}) +# Windows Desktop +if(NOT "${VCPKG_CMAKE_SYSTEM_NAME}" STREQUAL "") + list(REMOVE_ITEM ALL_SUPPORTED_FEATURES wglcontext windowlesswglapplication) +endif() + +# Universal Windows Platform +if(NOT "${VCPKG_CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore") + # No UWP specific features +endif() + +# Mac OSX +if(NOT "${VCPKG_CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") + list(REMOVE_ITEM ALL_SUPPORTED_FEATURES cglcontext windowlesscglapplication) +endif() + +# Linux +if(NOT "${VCPKG_CMAKE_SYSTEM_NAME}" STREQUAL "Linux") + list(REMOVE_ITEM ALL_SUPPORTED_FEATURES glxcontext windowlessglxapplication) +endif() + +# WebAssembly / Linux +if(NOT "${VCPKG_CMAKE_SYSTEM_NAME}" MATCHES "(Emscripten|Linux)") + list(REMOVE_ITEM ALL_SUPPORTED_FEATURES eglcontext windowlesseglapplication) +endif() + +set(_COMPONENTS "") +# Generate cmake parameters from feature names +foreach(_feature IN LISTS ALL_SUPPORTED_FEATURES) + # Uppercase the feature name and replace "-" with "_" + string(TOUPPER "${_feature}" _FEATURE) + string(REPLACE "-" "_" _FEATURE "${_FEATURE}") + + # Final feature is empty, ignore it + if(_feature) + list(APPEND _COMPONENTS ${_feature} WITH_${_FEATURE}) + endif() +endforeach() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS ${_COMPONENTS}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -88,27 +86,23 @@ else() set(EXE_SUFFIX) endif() -if(distancefieldconverter IN_LIST FEATURES) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-distancefieldconverter${EXE_SUFFIX} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) -endif() -if(fontconverter IN_LIST FEATURES) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-fontconverter${EXE_SUFFIX} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) -endif() -if(al-info IN_LIST FEATURES) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-al-info${EXE_SUFFIX} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) -endif() -if(magnuminfo IN_LIST FEATURES) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-info${EXE_SUFFIX} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) -endif() - -# Tools require dlls -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/magnum) - -file(GLOB_RECURSE TO_REMOVE - ${CURRENT_PACKAGES_DIR}/bin/*${EXE_SUFFIX} - ${CURRENT_PACKAGES_DIR}/debug/bin/*${EXE_SUFFIX}) -if(TO_REMOVE) - file(REMOVE ${TO_REMOVE}) +# Copy tools into vcpkg's tools directory +set(_TOOL_EXEC_NAMES "") +set(_TOOLS + al-info + distancefieldconverter + fontconverter + gl-info + imageconverter + sceneconverter) +foreach(_tool IN LISTS _TOOLS) + if("${_tool}" IN_LIST FEATURES) + list(APPEND _TOOL_EXEC_NAMES magnum-${_tool}) + endif() +endforeach() +message(STATUS ${_TOOL_EXEC_NAMES}) +if(_TOOL_EXEC_NAMES) + vcpkg_copy_tools(TOOL_NAMES "${_TOOL_EXEC_NAMES}" AUTO_CLEAN) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) @@ -129,4 +123,6 @@ else() file(COPY ${CMAKE_CURRENT_LIST_DIR}/magnumdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/magnum-d) endif() -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/COPYING + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright) |
