aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/corrade
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/corrade
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/corrade')
-rw-r--r--vcpkg/ports/corrade/build-corrade-rc-always.patch27
-rw-r--r--vcpkg/ports/corrade/clang-16.patch32
-rw-r--r--vcpkg/ports/corrade/fix-vs2019.patch13
-rw-r--r--vcpkg/ports/corrade/missing-headers.diff69
-rw-r--r--vcpkg/ports/corrade/portfile.cmake81
-rw-r--r--vcpkg/ports/corrade/vcpkg.json86
6 files changed, 308 insertions, 0 deletions
diff --git a/vcpkg/ports/corrade/build-corrade-rc-always.patch b/vcpkg/ports/corrade/build-corrade-rc-always.patch
new file mode 100644
index 0000000..0e46a52
--- /dev/null
+++ b/vcpkg/ports/corrade/build-corrade-rc-always.patch
@@ -0,0 +1,27 @@
+--- a/src/Corrade/Utility/CMakeLists.txt
++++ b/src/Corrade/Utility/CMakeLists.txt
+@@ -185,13 +185,12 @@
+ # corrade-rc when generating WinRT targets by setting
+ # set_target_properties(corrade-rc PROPERTIES VS_WINRT_COMPONENT OFF)
+ # Then this would be if(NOT CMAKE_CROSSCOMPILING OR CORRADE_TARGET_WINDOWS_RT).
+ # However, it seems like this feature never materialized, as doing this will
+ # result in corrade-rc that's looking for vcruntime140_app.dll in order to be
+ # run. Last checked: Nov 2019.
+-if(NOT CMAKE_CROSSCOMPILING)
+ # Sources for standalone corrade-rc
+ set(CorradeUtilityRc_SRCS
+ Arguments.cpp
+ Debug.cpp
+ Directory.cpp
+ Configuration.cpp
+@@ -235,9 +234,10 @@
+ if(CORRADE_TARGET_UNIX)
+ target_link_libraries(corrade-rc PRIVATE ${CMAKE_DL_LIBS})
+ endif()
+ set_target_properties(corrade-rc PROPERTIES FOLDER "Corrade/Utility")
+ install(TARGETS corrade-rc DESTINATION ${CORRADE_BINARY_INSTALL_DIR})
+
++if(NOT CMAKE_CROSSCOMPILING)
+ # Corrade::rc target alias for superprojects
+ add_executable(Corrade::rc ALIAS corrade-rc)
+ endif()
diff --git a/vcpkg/ports/corrade/clang-16.patch b/vcpkg/ports/corrade/clang-16.patch
new file mode 100644
index 0000000..a6e6fe1
--- /dev/null
+++ b/vcpkg/ports/corrade/clang-16.patch
@@ -0,0 +1,32 @@
+diff --git a/src/Corrade/Utility/StlForwardArray.h b/src/Corrade/Utility/StlForwardArray.h
+index 0e78d61..363fafb 100644
+--- a/src/Corrade/Utility/StlForwardArray.h
++++ b/src/Corrade/Utility/StlForwardArray.h
+@@ -55,7 +55,11 @@ possible or is unknown is equivalent to @cpp #include <array> @ce.
+
+ #ifdef CORRADE_TARGET_LIBCXX
+ /* https://github.com/llvm-mirror/libcxx/blob/73d2eccc78ac83d5947243c4d26a53f668b4f432/include/__tuple#L223 */
++#if _LIBCPP_VERSION < 160000
+ #include <__tuple>
++#else
++#include <__fwd/array.h>
++#endif
+ #elif defined(CORRADE_TARGET_DINKUMWARE)
+ /* MSVC has it defined next to std::pair */
+ #include <utility>
+diff --git a/src/Corrade/Utility/StlForwardTuple.h b/src/Corrade/Utility/StlForwardTuple.h
+index 5701bc0..3292ec8 100644
+--- a/src/Corrade/Utility/StlForwardTuple.h
++++ b/src/Corrade/Utility/StlForwardTuple.h
+@@ -55,7 +55,11 @@ is equivalent to @cpp #include <tuple> @ce.
+
+ #ifdef CORRADE_TARGET_LIBCXX
+ /* https://github.com/llvm-mirror/libcxx/blob/73d2eccc78ac83d5947243c4d26a53f668b4f432/include/__tuple#L163 */
++#if _LIBCPP_VERSION < 160000
+ #include <__tuple>
++#else
++#include <__fwd/tuple.h>
++#endif
+ #elif defined(CORRADE_TARGET_LIBSTDCXX)
+ /* https://github.com/gcc-mirror/gcc/blob/c014d57d57a03e6061a57fa8534e90979567392b/libstdc%2B%2B-v3/include/std/type_traits#L2465-L2466 */
+ #include <type_traits>
diff --git a/vcpkg/ports/corrade/fix-vs2019.patch b/vcpkg/ports/corrade/fix-vs2019.patch
new file mode 100644
index 0000000..b7e6599
--- /dev/null
+++ b/vcpkg/ports/corrade/fix-vs2019.patch
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e0cc288..e5a4648 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -195,7 +195,7 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+ set(MSVC2017_COMPATIBILITY ON)
+ message(WARNING "MSVC 2017 detected, automatically enabling MSVC2017_COMPATIBILITY. Note that some features may not be available with this compiler.")
+ endif()
+- elseif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.30")
++ elseif(CMAKE_CXX_COMPILER_VERSION GREATER "19.20")
+ if(NOT MSVC2019_COMPATIBILITY)
+ set(MSVC2019_COMPATIBILITY ON)
+ message(WARNING "MSVC 2019 detected, automatically enabling MSVC2019_COMPATIBILITY. Note that some features may not be available with this compiler.")
diff --git a/vcpkg/ports/corrade/missing-headers.diff b/vcpkg/ports/corrade/missing-headers.diff
new file mode 100644
index 0000000..8063084
--- /dev/null
+++ b/vcpkg/ports/corrade/missing-headers.diff
@@ -0,0 +1,69 @@
+diff --git a/src/Corrade/PluginManager/AbstractManager.h b/src/Corrade/PluginManager/AbstractManager.h
+index c8ef531..3d2e3dd 100644
+--- a/src/Corrade/PluginManager/AbstractManager.h
++++ b/src/Corrade/PluginManager/AbstractManager.h
+@@ -29,6 +29,10 @@
+ * @brief Class @ref Corrade::PluginManager::AbstractManager, macro @ref CORRADE_PLUGIN_VERSION, @ref CORRADE_PLUGIN_REGISTER()
+ */
+
++#include <string>
++#include <vector>
++#include <utility>
++
+ #include "Corrade/Containers/EnumSet.h"
+ #include "Corrade/Containers/Pointer.h"
+ #include "Corrade/PluginManager/PluginManager.h"
+diff --git a/src/Corrade/PluginManager/AbstractPlugin.h b/src/Corrade/PluginManager/AbstractPlugin.h
+index b22deee..4f5738f 100644
+--- a/src/Corrade/PluginManager/AbstractPlugin.h
++++ b/src/Corrade/PluginManager/AbstractPlugin.h
+@@ -29,6 +29,10 @@
+ * @brief Class @ref Corrade::PluginManager::AbstractPlugin
+ */
+
++#include <string>
++#include <vector>
++#include <utility>
++
+ #include "Corrade/Containers/Pointer.h"
+ #include "Corrade/PluginManager/PluginManager.h"
+ #include "Corrade/PluginManager/visibility.h"
+diff --git a/src/Corrade/Utility/Arguments.h b/src/Corrade/Utility/Arguments.h
+index 84d856d..ea801be 100644
+--- a/src/Corrade/Utility/Arguments.h
++++ b/src/Corrade/Utility/Arguments.h
+@@ -31,6 +31,7 @@
+
+ #include <string>
+ #include <utility>
++#include <vector>
+
+ #include "Corrade/Containers/Array.h"
+ #include "Corrade/Utility/ConfigurationValue.h"
+diff --git a/src/Corrade/Utility/Directory.h b/src/Corrade/Utility/Directory.h
+index 21c1e1a..8d9bde6 100644
+--- a/src/Corrade/Utility/Directory.h
++++ b/src/Corrade/Utility/Directory.h
+@@ -30,6 +30,9 @@
+ */
+
+ #include <initializer_list>
++#include <string>
++#include <utility>
++#include <vector>
+
+ #include "Corrade/Containers/Containers.h"
+ #include "Corrade/Containers/EnumSet.h"
+diff --git a/src/Corrade/Utility/Resource.h b/src/Corrade/Utility/Resource.h
+index e08c03d..6ce48b0 100644
+--- a/src/Corrade/Utility/Resource.h
++++ b/src/Corrade/Utility/Resource.h
+@@ -30,6 +30,8 @@
+ */
+
+ #include <utility>
++#include <string>
++#include <vector>
+
+ #include "Corrade/Containers/ArrayView.h"
+ #include "Corrade/Utility/StlForwardString.h"
diff --git a/vcpkg/ports/corrade/portfile.cmake b/vcpkg/ports/corrade/portfile.cmake
new file mode 100644
index 0000000..496ea37
--- /dev/null
+++ b/vcpkg/ports/corrade/portfile.cmake
@@ -0,0 +1,81 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO mosra/corrade
+ REF v2020.06
+ SHA512 94cc8959b0ee43ecd8d13a25307e7829d53dc6601628d97c32288d1704e2c0835b755bffc06b2105e6aa5a612f119a60e83cb475860b51e6a35999215c100227
+ HEAD_REF master
+ PATCHES
+ fix-vs2019.patch
+ build-corrade-rc-always.patch
+ clang-16.patch
+ missing-headers.diff
+)
+
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
+
+# Handle features
+set(_COMPONENTS "")
+foreach(_feature IN LISTS ALL_FEATURES)
+ # Uppercase the feature name and replace "-" with "_"
+ string(TOUPPER "${_feature}" _FEATURE)
+ string(REPLACE "-" "_" _FEATURE "${_FEATURE}")
+
+ # Final feature is empty, ignore it
+ if(_feature AND NOT "${_feature}" STREQUAL "dynamic-pluginmanager")
+ list(APPEND _COMPONENTS ${_feature} WITH_${_FEATURE})
+ endif()
+endforeach()
+
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES ${_COMPONENTS})
+
+set(corrade_rc_param "")
+if(VCPKG_CROSSCOMPILING)
+ set(corrade_rc_param
+ "-DCORRADE_RC_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/corrade/corrade-rc${VCPKG_HOST_EXECUTABLE_SUFFIX}"
+ )
+endif()
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ ${FEATURE_OPTIONS}
+ "${corrade_rc_param}"
+ -DUTILITY_USE_ANSI_COLORS=ON
+ -DBUILD_STATIC=${BUILD_STATIC}
+ MAYBE_UNUSED_VARIABLES
+ CORRADE_RC_EXECUTABLE
+ UTILITY_USE_ANSI_COLORS
+)
+
+vcpkg_cmake_install()
+
+# Debug includes and share are the same as release
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+
+# corrade-rc is not built when CMAKE_CROSSCOMPILING
+vcpkg_copy_tools(TOOL_NAMES "corrade-rc" AUTO_CLEAN)
+
+# Ensure no empty folders are left behind
+if(FEATURES STREQUAL "core")
+ # No features, no libs (only Corrade.h).
+ file(REMOVE_RECURSE
+ "${CURRENT_PACKAGES_DIR}/bin"
+ "${CURRENT_PACKAGES_DIR}/lib"
+ "${CURRENT_PACKAGES_DIR}/debug")
+ # debug is completely empty, as include and share
+ # have already been removed.
+
+elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ # No dlls
+ file(REMOVE_RECURSE
+ "${CURRENT_PACKAGES_DIR}/bin"
+ "${CURRENT_PACKAGES_DIR}/debug/bin")
+endif()
+
+# Handle copyright
+file(INSTALL "${SOURCE_PATH}/COPYING"
+ DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
+ RENAME copyright)
+
+vcpkg_copy_pdbs()
diff --git a/vcpkg/ports/corrade/vcpkg.json b/vcpkg/ports/corrade/vcpkg.json
new file mode 100644
index 0000000..44cc741
--- /dev/null
+++ b/vcpkg/ports/corrade/vcpkg.json
@@ -0,0 +1,86 @@
+{
+ "name": "corrade",
+ "version-string": "2020.06",
+ "port-version": 9,
+ "description": "C++11/C++14 multiplatform utility library.",
+ "homepage": "https://magnum.graphics/corrade/",
+ "dependencies": [
+ {
+ "name": "corrade",
+ "host": true,
+ "default-features": false
+ },
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ],
+ "default-features": [
+ "interconnect",
+ "pluginmanager",
+ "testsuite",
+ "utility"
+ ],
+ "features": {
+ "dynamic-pluginmanager": {
+ "description": "PluginManager library with dynamic plugin support",
+ "supports": "!ios & !uwp & !android",
+ "dependencies": [
+ {
+ "name": "corrade",
+ "default-features": false,
+ "features": [
+ "pluginmanager"
+ ]
+ }
+ ]
+ },
+ "interconnect": {
+ "description": "Interconnect library",
+ "dependencies": [
+ {
+ "name": "corrade",
+ "default-features": false,
+ "features": [
+ "utility"
+ ]
+ }
+ ]
+ },
+ "pluginmanager": {
+ "description": "PluginManager library",
+ "dependencies": [
+ {
+ "name": "corrade",
+ "default-features": false,
+ "features": [
+ {
+ "name": "dynamic-pluginmanager",
+ "platform": "!ios & !uwp & !android"
+ },
+ "utility"
+ ]
+ }
+ ]
+ },
+ "testsuite": {
+ "description": "TestSuite library",
+ "dependencies": [
+ {
+ "name": "corrade",
+ "default-features": false,
+ "features": [
+ "utility"
+ ]
+ }
+ ]
+ },
+ "utility": {
+ "description": "Utility library"
+ }
+ }
+}