You've already forked macports-ports
mirror of
https://github.com/encounter/macports-ports.git
synced 2026-07-10 12:19:27 -07:00
134 lines
4.4 KiB
Tcl
134 lines
4.4 KiB
Tcl
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
|
|
|
|
PortSystem 1.0
|
|
PortGroup python 1.0
|
|
|
|
name py-mkl
|
|
if {${os.platform} eq "darwin" && ${os.major} < 19} {
|
|
version 2019.0
|
|
} else {
|
|
version 2021.2.0
|
|
}
|
|
revision 0
|
|
platforms darwin
|
|
supported_archs noarch
|
|
|
|
# https://software.intel.com/en-us/license/intel-simplified-software-license
|
|
license Restrictive/Distributable
|
|
|
|
maintainers {jonesc @cjones051073} openmaintainer
|
|
|
|
description Math library for Intel and compatible processors
|
|
long_description ${description}
|
|
|
|
extract.suffix .whl
|
|
extract.only
|
|
|
|
python.versions 27 35 36 37 38 39
|
|
python.default_version 38
|
|
|
|
# Intel only supports 10.12 and newer
|
|
if {${os.platform} eq "darwin" && ${os.major} <= 15} {
|
|
known_fail yes
|
|
pre-fetch {
|
|
ui_error "${name} is not supported on this OS X release."
|
|
return -code error "Unsupported OS X version"
|
|
}
|
|
}
|
|
|
|
# add sub-ports for headers
|
|
foreach _py ${python.versions} {
|
|
subport py${_py}-mkl-include { }
|
|
}
|
|
|
|
if {${name} ne ${subport}} {
|
|
|
|
supported_archs x86_64
|
|
|
|
depends_build-append \
|
|
port:py${python.version}-pip
|
|
|
|
build { }
|
|
|
|
# strip pyXY from subport name
|
|
set local_name [string replace ${subport} 0 4 ]
|
|
|
|
homepage https://pypi.org/project/${local_name}
|
|
|
|
if {[string match "*-include" $subport]} {
|
|
|
|
if {${os.platform} eq "darwin" && ${os.major} < 19} {
|
|
|
|
master_sites https://files.pythonhosted.org/packages/4f/49/c24113b33981a2c3e6915eb94f50c56ea61639963339e03eaed37787cc81/
|
|
distname mkl_include-${version}-py2.py3-none-macosx_10_12_intel.macosx_10_12_x86_64
|
|
|
|
checksums rmd160 097dd5bcbcc0a704e065cbdc629c7a10bf9e0b71 \
|
|
sha256 dd9e2224dcdbede569c996f971e663f64f184a432ccb01f2dceca768a77cb2b4 \
|
|
size 871122
|
|
|
|
} else {
|
|
|
|
master_sites https://files.pythonhosted.org/packages/16/5e/4dfe5bca8f0aa7b9369bc6b336ba8c76c3d50a61252c053a5250380143ae/
|
|
distname mkl_include-${version}-py2.py3-none-macosx_10_15_x86_64
|
|
|
|
checksums rmd160 052b1627aa7d23e8c96beebaa479f66a8d14f60f \
|
|
sha256 1d230c8197d3d959a762f93fb9f01e646609c2dce6baf2644378c430f0b45a7f \
|
|
size 895005
|
|
|
|
}
|
|
|
|
depends_lib-append port:py${python.version}-mkl
|
|
|
|
} else {
|
|
|
|
if {${os.platform} eq "darwin" && ${os.major} < 19} {
|
|
|
|
master_sites https://files.pythonhosted.org/packages/ac/1e/c713b011b90cd238023df1c0025130c40bc40870a46273d942e89114233c/
|
|
distname mkl-${version}-py2.py3-none-macosx_10_12_intel.macosx_10_12_x86_64
|
|
|
|
checksums rmd160 62011c74574b354c8996edfdd1d6b3d5e1aa2623 \
|
|
sha256 23c8e8ba2cac703d8bc357d2bf10519e91dc4371e7dd1decf461f70db20b9783 \
|
|
size 193800193
|
|
} else {
|
|
|
|
master_sites https://files.pythonhosted.org/packages/71/57/9c355e1c215f39ab2fa44aac9d617659e09f8e1aff0e5bddc742bcf8c6f7/
|
|
distname mkl-${version}-py2.py3-none-macosx_10_15_x86_64
|
|
|
|
checksums rmd160 7aca67881758c0d637b9fba860bdbd13f2f676d1 \
|
|
sha256 340d9c33a26f62cbcbe5b755fa4c454fce7f7a0a5d7e8aa45ec589b23ed107ea \
|
|
size 184653459
|
|
|
|
}
|
|
|
|
depends_lib-append port:tbb port:libomp
|
|
|
|
post-destroot {
|
|
set PythonVersionWithDot [join [split ${python.version} ""] "."]
|
|
set py_lib_root ${prefix}/Library/Frameworks/Python.framework/Versions/${PythonVersionWithDot}/lib
|
|
foreach dlib [glob -directory ${destroot}${py_lib_root} *.dylib] {
|
|
system "install_name_tool -add_rpath ${prefix}/lib ${dlib}"
|
|
system "install_name_tool -add_rpath ${prefix}/lib/libomp ${dlib}"
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
destroot.cmd pip-${python.branch}
|
|
destroot.args \
|
|
--ignore-installed \
|
|
--no-cache-dir \
|
|
--no-dependencies \
|
|
--root ${destroot} \
|
|
${distpath}/${distfiles}
|
|
destroot.post_args
|
|
|
|
if {[string match "py-*" $subport]} {
|
|
livecheck.url ${homepage}
|
|
livecheck.type regex
|
|
livecheck.regex "${local_name}\ (\\d+(\\.\\d+)+)"
|
|
} else {
|
|
livecheck.type none
|
|
}
|
|
|
|
}
|