diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/wg21-linear-algebra | |
Diffstat (limited to 'vcpkg/ports/wg21-linear-algebra')
| -rw-r--r-- | vcpkg/ports/wg21-linear-algebra/portfile.cmake | 32 | ||||
| -rw-r--r-- | vcpkg/ports/wg21-linear-algebra/use-external-mdspan.patch | 17 | ||||
| -rw-r--r-- | vcpkg/ports/wg21-linear-algebra/vcpkg.json | 18 |
3 files changed, 67 insertions, 0 deletions
diff --git a/vcpkg/ports/wg21-linear-algebra/portfile.cmake b/vcpkg/ports/wg21-linear-algebra/portfile.cmake new file mode 100644 index 0000000..d4f9799 --- /dev/null +++ b/vcpkg/ports/wg21-linear-algebra/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO BobSteagall/wg21 + REF "v${VERSION}" + SHA512 ab1db0cff476d2f63a5d1fcc1d3b40acbceeacae61a99d7ad0b8d8abe21413da97b71c088a331b70c0d0c3dc4615953485c68af46698ec7f0013e14bea5f9452 + PATCHES + use-external-mdspan.patch # https://github.com/BobSteagall/wg21/pull/80 +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DLA_INSTALL=ON + -DLA_BUILD_PACKAGE=OFF + -DLA_ENABLE_TESTS=OFF + -DUSE_EXTERNAL_MDSPAN=ON +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup( + PACKAGE_NAME wg21_linear_algebra + CONFIG_PATH lib/cmake/wg21_linear_algebra +) + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt") + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/cmake" + "${CURRENT_PACKAGES_DIR}/debug" + "${CURRENT_PACKAGES_DIR}/lib" +) diff --git a/vcpkg/ports/wg21-linear-algebra/use-external-mdspan.patch b/vcpkg/ports/wg21-linear-algebra/use-external-mdspan.patch new file mode 100644 index 0000000..a5a70c1 --- /dev/null +++ b/vcpkg/ports/wg21-linear-algebra/use-external-mdspan.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7821b27..723a1a9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,7 +12,11 @@ include(GNUInstallDirs) + include(CMakeDependentOption) + include(CMakePackageConfigHelpers) + +-if(EXISTS ${CMAKE_BINARY_DIR}/conanbuildinfo_multi.cmake) ++option(USE_EXTERNAL_MDSPAN "Use external copy of mdspan" OFF) ++ ++if(${USE_EXTERNAL_MDSPAN}) ++ find_package(mdspan CONFIG REQUIRED) ++elseif(EXISTS ${CMAKE_BINARY_DIR}/conanbuildinfo_multi.cmake) + include(${CMAKE_BINARY_DIR}/conanbuildinfo_multi.cmake) + conan_basic_setup() + find_package(mdspan CONFIG REQUIRED) diff --git a/vcpkg/ports/wg21-linear-algebra/vcpkg.json b/vcpkg/ports/wg21-linear-algebra/vcpkg.json new file mode 100644 index 0000000..4379168 --- /dev/null +++ b/vcpkg/ports/wg21-linear-algebra/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "wg21-linear-algebra", + "version": "0.7.3", + "port-version": 1, + "description": "A linear algebra proposal for the C++ standard library", + "license": "NCSA", + "dependencies": [ + "mdspan", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |