# -*- 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 PortGroup github 1.0 PortGroup compiler_blacklist_versions 1.0 github.setup ronaldoussoren pyobjc 10.3.1 v revision 0 checksums rmd160 43356faa695f2ef10a0419a8bc2014b41fee6f90 \ sha256 81988ae72a6bb1aef34a96336496720540f1dc4ed71508f4c30fe7934743c9c8 \ size 20376629 name py-pyobjc categories-append devel license MIT maintainers openmaintainer {danchr @danchr} # https://pyobjc.readthedocs.io/en/latest/install.html platforms {darwin >= 13} description bidirectional bridge between python and Objective C long_description The PyObjC project aims to provide a bridge between \ the Python and Objective-C programming languages. The \ bridge is intended to be fully bidirectional, allowing \ the Python programmer to take full advantage of the \ power provided by various Objective-C based toolkits \ and the Objective-C programmer transparent access to \ Python based functionality. homepage https://pyobjc.readthedocs.io python.versions 38 39 310 311 312 313 if {${name} ne ${subport}} { depends_lib-append \ port:py${python.version}-setuptools depends_build-append \ port:py${python.version}-sphinx \ port:py${python.version}-sphinxcontrib-blockdiag patchfiles-append \ patch-docs-conf.py.diff \ patch-pyobjc-core-setup.py.diff \ patch-setup-no-werror.diff \ patch-development-support-_install_tool.py-no-setup.diff # use system libffi on Catalina and Big Sur until upstream merges # and releases Apple's changes # https://trac.macports.org/ticket/62475 if {${os.major} < 19} { depends_lib-append \ port:libffi } use_xcode yes compiler.blacklist-append {clang < 900} # Quartz module uses CGWindowListCreateImageFromArray which is no longer available on macOS 15 # See https://trac.macports.org/ticket/71103 if {${os.platform} eq "darwin" && [vercmp ${macosx_deployment_target} >= 15.0]} { macosx_deployment_target 14.0 } post-patch { reinplace \ "s/sphinx-build /sphinx-build-${python.branch} /g" \ ${worksrcpath}/docs/Makefile # see comment above if {${os.major} < 19} { # force using both our libffi _and_ its headers reinplace \ "s,/usr/include/ffi,${prefix}/include,g" \ ${worksrcpath}/pyobjc-core/setup.py reinplace \ "s,,,g" \ ${worksrcpath}/pyobjc-core/Modules/objc/libffi_support.h } else { # force linking against system libffi by path, so that we # bypass CPython's dependency on it reinplace \ "s,-lffi,${configure.sdkroot}/usr/lib/libffi.tbd,g" \ ${worksrcpath}/pyobjc-core/setup.py } } if {${configure.sdkroot} eq ""} { if {${os.platform} eq "darwin" && ${os.major} == 13} { # Fix for 10.9: use SIMD headers from 10.10 SDK set sdkroot "${developer_dir}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk" } else { set sdkroot "/" } } else { set sdkroot ${configure.sdkroot} } build.env-append SDKROOT=${sdkroot} destroot.env-append SDKROOT=${sdkroot} python.pep517 yes build.cmd-prepend ${python.bin} ${filespath}/multibuild.py ${build.jobs} destroot.cmd-prepend \ ${python.bin} ${filespath}/multiinstall.py ${workpath} destroot.target # build the documentation post-build { system -W ${worksrcpath}/docs "make -j${build.jobs} html" } post-destroot { xinstall -m 644 -W ${worksrcpath}/pyobjc-core HISTORIC.txt Install.txt \ License.txt README.txt \ ${destroot}${prefix}/share/doc/${subport} copy ${worksrcpath}/docs/_build/html ${destroot}${prefix}/share/doc/${subport}/html } } # suppress release candidates github.livecheck.regex (\\d+(?:\\.\\d+)*)