aboutsummaryrefslogtreecommitdiff
path: root/ports/magnum-plugins
diff options
context:
space:
mode:
authorJonathan Hale <Squareys@googlemail.com>2020-07-14 17:38:18 +0200
committerGitHub <noreply@github.com>2020-07-14 08:38:18 -0700
commit5e40afca0d7286a9a7d742822cc2a1179a9e63fc (patch)
tree4e83343034a70f029a180a78d9fbab3971c222ba /ports/magnum-plugins
parent9891a8f2132aa18cdc6f96862ee5406f2d901b0e (diff)
downloadvcpkg-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-plugins')
-rw-r--r--ports/magnum-plugins/CONTROL24
-rw-r--r--ports/magnum-plugins/portfile.cmake66
2 files changed, 62 insertions, 28 deletions
diff --git a/ports/magnum-plugins/CONTROL b/ports/magnum-plugins/CONTROL
index 39d0d1016..24e3e2fbb 100644
--- a/ports/magnum-plugins/CONTROL
+++ b/ports/magnum-plugins/CONTROL
@@ -1,9 +1,9 @@
Source: magnum-plugins
-Version: 2019.10-2
+Version: 2020.06
Build-Depends: magnum[core]
Description: Plugins for magnum, C++11/C++14 graphics middleware for games and data visualization
Homepage: https://magnum.graphics/
-Default-Features: ddsimporter, miniexrimageconverter, opengeximporter, stanfordimporter, stbimageconverter, stbimageimporter
+Default-Features: ddsimporter, icoimporter, miniexrimageconverter, opengeximporter, stanfordimporter, stanfordsceneconverter, stbimageconverter, stbimageimporter, stlimporter
Feature: assimpimporter
Description: AssimpImporter plugin
@@ -14,11 +14,11 @@ Description: OpenDdl library
Feature: basisimageconverter
Description: BasisImageConverter plugin
-Build-Depends: magnum[trade], basisu
+Build-Depends: magnum[trade]
Feature: basisimporter
Description: BasisImporter plugin
-Build-Depends: magnum[trade], basisu
+Build-Depends: magnum[trade]
Feature: ddsimporter
Description: DdsImporter plugin
@@ -51,6 +51,10 @@ Feature: harfbuzzfont
Description: HarfBuzzFont plugin
Build-Depends: harfbuzz, magnum-plugins[freetypefont]
+Feature: icoimporter
+Description: IcoImporter plugin
+Build-Depends: magnum[trade]
+
Feature: jpegimporter
Description: JpegImporter plugin
Build-Depends: libjpeg-turbo, magnum[trade]
@@ -59,6 +63,10 @@ Feature: jpegimageconverter
Description: JpegImageConverter plugin
Build-Depends: libjpeg-turbo, magnum[trade]
+Feature: meshoptimizersceneconverter
+Description: MeshOptimizerSceneConverter plugin
+Build-Depends: magnum[trade], meshoptimizer
+
Feature: miniexrimageconverter
Description: MiniExrImageConverter plugin
Build-Depends: magnum[trade]
@@ -79,6 +87,10 @@ Feature: stanfordimporter
Description: StanfordImporter plugin
Build-Depends: magnum[trade]
+Feature: stanfordsceneconverter
+Description: StanfordSceneConverter plugin
+Build-Depends: magnum[trade]
+
Feature: stbimageconverter
Description: StbImageConverter plugin
Build-Depends: magnum[trade]
@@ -95,6 +107,10 @@ Feature: stbvorbisaudioimporter
Description: StbVorbisAudioImporter plugin
Build-Depends: magnum[audio]
+Feature: stlimporter
+Description: StlImporter plugin
+Build-Depends: magnum[trade]
+
Feature: tinygltfimporter
Description: TinyGltfImporter plugin
Build-Depends: magnum[anyimageimporter], magnum-plugins[stbimageimporter], magnum[trade]
diff --git a/ports/magnum-plugins/portfile.cmake b/ports/magnum-plugins/portfile.cmake
index 1fc50e203..62e4da7bc 100644
--- a/ports/magnum-plugins/portfile.cmake
+++ b/ports/magnum-plugins/portfile.cmake
@@ -1,51 +1,68 @@
-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
- REF v2019.10
- SHA512 702c43b0d323dc5b903ffee3dd9aaecf2de3b6bb00e7b243880e433df12efe337e512aac75a6f38adce02eb94f3065770ff6a03b7241198f27b5c46de63e5750
+ REF v2020.06
+ SHA512 3c11c2928bfc9d04c1ad64f72b6ffac6cf80a1ef3aacc5d0486b9ad955cf4f6ea6d5dcb3846dc5d73f64ec522a015eafb997f62c79ad7ff91169702341f23af0
HEAD_REF master
PATCHES
001-tools-path.patch
- ${_RELEASE_ONLY_PATCHES}
)
+if("basisimporter" IN_LIST FEATURES OR "basisimageconverter" IN_LIST FEATURES)
+ # Bundle Basis Universal, a commit that's before the UASTC support (which
+ # is not implemented yet). The repo has big unrequired files in its
+ # history, so we're downloading just a snapshot instead of a git clone.
+ vcpkg_download_distfile(
+ _BASIS_UNIVERSAL_PATCHES
+ URLS "https://github.com/BinomialLLC/basis_universal/commit/e9c55faac7745ebf38d08cd3b4f71aaf542f8191.diff"
+ FILENAME "e9c55faac7745ebf38d08cd3b4f71aaf542f8191.patch"
+ SHA512 e5dda11de2ba8cfd39728e69c74a7656bb522e509786fe5673c94b26be9bd4bee897510096479ee6323f5276d34cba1c44c60804a515c0b35ff7b6ac9d625b88
+ )
+ set(_BASIS_VERSION "8565af680d1bd2ad56ab227ca7d96c56dfbe93ed")
+ vcpkg_download_distfile(
+ _BASIS_UNIVERSAL_ARCHIVE
+ URLS "https://github.com/BinomialLLC/basis_universal/archive/${_BASIS_VERSION}.tar.gz"
+ FILENAME "basis-universal-${_BASIS_VERSION}.tar.gz"
+ SHA512 65062ab3ba675c46760f56475a7528189ed4097fb9bab8316e25d9e23ffec2a9560eb9a6897468baf2a6ab2bd698b5907283e96deaeaef178085a47f9d371bb2
+ )
+ vcpkg_extract_source_archive_ex(
+ OUT_SOURCE_PATH _BASIS_UNIVERSAL_SOURCE
+ ARCHIVE ${_BASIS_UNIVERSAL_ARCHIVE}
+ WORKING_DIRECTORY "${SOURCE_PATH}/src/external"
+ PATCHES
+ ${_BASIS_UNIVERSAL_PATCHES})
+ # Remove potentially cached directory which would cause renaming to fail
+ file(REMOVE_RECURSE "${SOURCE_PATH}/src/external/basis-universal")
+ # Rename the output folder so that magnum auto-detects it
+ file(RENAME ${_BASIS_UNIVERSAL_SOURCE} "${SOURCE_PATH}/src/external/basis-universal")
+endif()
+
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
set(BUILD_PLUGINS_STATIC 1)
else()
set(BUILD_PLUGINS_STATIC 0)
endif()
-# Handle features
-set(_COMPONENT_FLAGS "")
+set(_COMPONENTS "")
+# Generate cmake parameters from feature names
foreach(_feature IN LISTS ALL_FEATURES)
# Uppercase the feature name and replace "-" with "_"
string(TOUPPER "${_feature}" _FEATURE)
string(REPLACE "-" "_" _FEATURE "${_FEATURE}")
- # Turn "-DWITH_*=" ON or OFF depending on whether the feature
- # is in the list.
- if(_feature IN_LIST FEATURES)
- list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=ON")
- else()
- list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=OFF")
+ # 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}
PREFER_NINJA # Disable this option if project cannot be built with Ninja
OPTIONS
- ${_COMPONENT_FLAGS}
+ ${FEATURE_OPTIONS}
-DBUILD_STATIC=${BUILD_PLUGINS_STATIC}
-DBUILD_PLUGINS_STATIC=${BUILD_PLUGINS_STATIC}
-DMAGNUM_PLUGINS_DEBUG_DIR=${CURRENT_INSTALLED_DIR}/debug/bin/magnum-d
@@ -86,7 +103,8 @@ else()
endif()
# Handle copyright
-file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/magnum-plugins)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/magnum-plugins/COPYING ${CURRENT_PACKAGES_DIR}/share/magnum-plugins/copyright)
+file(INSTALL ${SOURCE_PATH}/COPYING
+ DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
+ RENAME copyright)
vcpkg_copy_pdbs()