vcpkg/ports/sundials/portfile.cmake
Billy O'Neal d5bb8c1541
Build Fixes 2022-05-01 (#24497)
Discovered in https://dev.azure.com/vcpkg/public/_build/results?buildId=71530

PASSING, REMOVE FROM FAIL LIST: blosc:arm64-windows (C:\a\2\s\scripts\azure-pipelines/../ci.baseline.txt).
PASSING, REMOVE FROM FAIL LIST: corrade:arm-uwp (C:\a\1\s\scripts\azure-pipelines/../ci.baseline.txt).
PASSING, REMOVE FROM FAIL LIST: corrade:x64-uwp (C:\a\1\s\scripts\azure-pipelines/../ci.baseline.txt).
PASSING, REMOVE FROM FAIL LIST: libhydrogen:arm64-windows (C:\a\2\s\scripts\azure-pipelines/../ci.baseline.txt).

REGRESSION: sundials:x64-osx failed with BUILD_FAILED. If expected, add sundials:x64-osx=fail to /Users/vagrant/Data/work/2/s/scripts/azure-pipelines/../ci.baseline.txt.

File does not have the expected hash:
             url : [ https://github.com/LLNL/sundials/archive/v5.8.0.tar.gz ]
       File path : [ /Users/vagrant/Data/downloads/LLNL-sundials-v5.8.0.tar.gz.98418.part ]
   Expected hash : [ 30f6a7bddf813634e4266c36331673b52448b719f938f45a4efb6a96cfbeea4fe168fdded89309672b148f8ef8bc05997d838627e828573900ec169a41472372 ]
     Actual hash : [ 0b11db1b944cfce4672954aceeec3f21253b4f684031f26b8bc0a8b3b12d895e604456bd1f283767812352eb5a9202c5797f612410f654f561ca5565d719bcae ]

REGRESSION: brunocodutra-metal:x64-linux failed with BUILD_FAILED. If expected, add brunocodutra-metal:x64-linux=fail to /agent/_work/1/s/scripts/azure-pipelines/../ci.baseline.txt.

This was another download failure but may as well update.

REGRESSION: plplot:x64-linux failed with BUILD_FAILED. If expected, add plplot:x64-linux=fail to /agent/_work/1/s/scripts/azure-pipelines/../ci.baseline.txt.

This was another download failure with every SourceForge mirror giving a different hash O_O. I tried to do an update but it's ... involved for this library so I've separated it.
2022-05-04 15:09:15 -07:00

32 lines
1.0 KiB
CMake

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO LLNL/sundials
REF e2f29c34f324829302037a1492db480be8828084
SHA512 9af9a5d7a44de1f2afbc35d8e2ec3d35a2d15f1b708be7a90bf849a0d0576fda6c73fae6b8954025805ac1ca25468558c02dcc2fd86b5767699518988817d4d8
HEAD_REF master
PATCHES
install-dlls-in-bin.patch
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SUN_BUILD_STATIC)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SUN_BUILD_SHARED)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-D_BUILD_EXAMPLES=OFF
-DBUILD_STATIC_LIBS=${SUN_BUILD_STATIC}
-DBUILD_SHARED_LIBS=${SUN_BUILD_SHARED}
)
vcpkg_cmake_install()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
file(REMOVE "${CURRENT_PACKAGES_DIR}/LICENSE")
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/LICENSE")
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")