Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[intel-mkl] Overhaul, install osx #30483

Merged
merged 18 commits into from
May 11, 2023
53 changes: 53 additions & 0 deletions ports/intel-mkl/copy-from-dmg.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
find_program(HDIUTIL NAMES hdiutil REQUIRED)
set(dmg_path "NOTFOUND" CACHE FILEPATH "Where to find the DMG")
set(output_dir "output_dir" CACHE FILEPATH "Where to put the packages")

if(NOT EXISTS "${dmg_path}")
message(FATAL_ERROR "'dmg_path' (${dmg_path}) does not exist.")
endif()
if(NOT IS_DIRECTORY "${output_dir}")
message(FATAL_ERROR "'output_dir' (${output_dir}) is not a directory.")
endif()

execute_process(
COMMAND mktemp -d
RESULT_VARIABLE mktemp_result
OUTPUT_VARIABLE mount_point
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT mktemp_result STREQUAL "0")
message(FATAL_ERROR "mktemp -d failed: ${mktemp_result}")
elseif(NOT IS_DIRECTORY "${mount_point}")
message(FATAL_ERROR "'mount_point' (${mount_point}) is not a directory.")
endif()

execute_process(
COMMAND "${HDIUTIL}" attach "${dmg_path}" -mountpoint "${mount_point}" -readonly
RESULT_VARIABLE mount_result
)
if(mount_result STREQUAL "0")
set(dmg_packages_dir "${mount_point}/bootstrapper.app/Contents/Resources/packages")
file(GLOB packages
"${dmg_packages_dir}/intel.oneapi.mac.mkl.devel,*"
"${dmg_packages_dir}/intel.oneapi.mac.mkl.runtime,*"
"${dmg_packages_dir}/intel.oneapi.mac.mkl.product,*"
"${dmg_packages_dir}/intel.oneapi.mac.openmp,*"
)
# Using execute_process to avoid direct errors
execute_process(
COMMAND cp -R ${packages} "${output_dir}/"
RESULT_VARIABLE copy_result
)
endif()
execute_process(
COMMAND "${HDIUTIL}" detach "${mount_point}"
RESULT_VARIABLE unmount_result
)

if(NOT mount_result STREQUAL "0")
message(FATAL_ERROR "Mounting ${dmg_path} failed: ${mount_result}")
elseif(NOT copy_result STREQUAL "0")
message(FATAL_ERROR "Coyping packages failed: ${copy_result}")
elseif(NOT unmount_result STREQUAL "0")
message(FATAL_ERROR "Unounting ${dmg_path} failed: ${unmount_result}")
endif()
390 changes: 183 additions & 207 deletions ports/intel-mkl/portfile.cmake

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions ports/intel-mkl/vcpkg-cmake-wrapper.cmake

This file was deleted.

1 change: 0 additions & 1 deletion ports/intel-mkl/vcpkg-port-config.cmake

This file was deleted.

3 changes: 2 additions & 1 deletion ports/intel-mkl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"name": "intel-mkl",
"version": "2023.0.0",
"port-version": 1,
"description": "Intel® Math Kernel Library (Intel® MKL) accelerates math processing routines, increases application performance, and reduces development time on Intel® processors.",
"homepage": "https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl.html",
"license": null,
"supports": "(windows | linux) & x64",
"supports": "(windows | linux | osx) & x64",
"dependencies": [
{
"name": "vcpkg-tool-lessmsi",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3282,7 +3282,7 @@
},
"intel-mkl": {
"baseline": "2023.0.0",
"port-version": 0
"port-version": 1
},
"intelrdfpmathlib": {
"baseline": "20U2",
Expand Down
5 changes: 5 additions & 0 deletions versions/i-/intel-mkl.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "285fa0de9d6f05022ce06e53f7c8c21048ff586f",
"version": "2023.0.0",
"port-version": 1
},
{
"git-tree": "e5a15d03509e3eaf676a2e3ec935acff7fbb9285",
"version": "2023.0.0",
Expand Down