# -*- 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 name py-meson # update version and revision also in the meson port github.setup mesonbuild meson 1.5.0 github.tarball_from releases revision 0 checksums rmd160 a344eeb69d38eff4e54334caf1ca25941b08a6f4 \ sha256 45d7b8653c1e5139df35b33be2dd5b2d040c5b2c6129f9a7c890d507e33312b8 \ size 2257170 license Apache-2 categories-append devel maintainers {soap.za.net:git @SoapZA} {reneeotten @reneeotten} openmaintainer supported_archs noarch homepage https://mesonbuild.com description Meson - A high productivity build system long_description Meson is a build system designed to optimize programmer productivity. \ It aims to do this by providing simple, out-of-the-box support for modern \ software development tools and practices, such as unit tests, coverage reports, \ Valgrind, CCache and the like. It is both extremely fast, and, even more importantly, \ as user friendly as possible. python.versions 38 39 310 311 312 github.livecheck.regex {([0-9.]+)} if {${subport} ne ${name}} { depends_build-append \ port:py${python.version}-setuptools depends_run-append port:py${python.version}-setuptools \ port:ninja # requires a newer install_name_tool on older systems if {${os.platform} eq "darwin" && ${os.major} <= 9} { depends_run-append \ port:cctools } if {${os.platform} eq "darwin" && ${os.major} <= 10} { patchfiles-append \ patch-meson-remove-Wl,-no_weak_imports.diff } # https://github.com/mesonbuild/meson/issues/6187 patchfiles-append patch-meson-32bit-apple.diff # https://github.com/mesonbuild/meson/pull/9211 patchfiles-append patch-meson-gcc-appleframeworks.diff # Compiled typelib files need their dylibs' full install path patchfiles-append patch-meson-gnome.diff # don't set CC for g-ir-scanner. MacPorts does that, often with modifications patchfiles-append patch-meson-gnome-dont-set-cc-for-gir-scanner.diff # disable warning not accepted by older clang versions # this manifests currently on systems up to 10.9 # https://github.com/mesonbuild/meson/issues/8307 if {${os.platform} eq "darwin" && ${os.major} <= 13} { patchfiles-append \ patch-meson-clang-unknown-optimization-error.diff } # add a search path for crossfiles in our prefix patchfiles-append patch-meson-search-prefix-for-cross-files.diff platform darwin 8 { # this meson is modified for systems without @rpath support # and is therefore fragile. Keep pegged, and update occasionally github.setup mesonbuild meson 0.64.1 github.tarball_from releases revision 0 checksums rmd160 6ed7a0c8b1ac2a0de91d25aa253ad2efa132c6dc \ sha256 3a8e030c2334f782085f81627062cc6d4a6771edf31e055ffe374f9e6b089ab9 \ size 2089752 patchfiles patch-meson64-tiger-no-rpath-fix.diff \ patch-meson64-remove-Wl,-no_weak_imports.diff \ patch-meson64-32bit-apple.diff \ patch-meson64-gcc-appleframeworks.diff \ patch-meson64-gnome.diff \ patch-meson64-clang-unknown-optimization-error.diff \ patch-meson64-search-prefix-for-cross-files.diff } post-patch { reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/data/shell-completions/bash/meson \ ${worksrcpath}/mesonbuild/coredata.py reinplace "s|@@SUBPORT@@|${subport}|g" ${worksrcpath}/data/shell-completions/bash/meson \ ${worksrcpath}/mesonbuild/coredata.py } post-destroot { # install our MacPorts cross files xinstall -m 0755 -d ${destroot}${prefix}/share/${subport}/meson copy ${filespath}/cross ${destroot}${prefix}/share/${subport}/meson fs-traverse f ${destroot}${prefix}/share/${subport}/meson/cross/ { if {![file isdirectory ${f}]} { reinplace "s|@@PREFIX@@|${prefix}|g" ${f} } } # install shell completion files set bash_completion_dir ${prefix}/share/${subport}/bash-completion/completions xinstall -d ${destroot}${bash_completion_dir} xinstall -m 0644 ${worksrcpath}/data/shell-completions/bash/meson ${destroot}${bash_completion_dir} xinstall -m 0644 ${worksrcpath}/data/shell-completions/bash/meson ${destroot}${bash_completion_dir} set zsh_completion_dir ${prefix}/share/${subport}/zsh/site-functions xinstall -d ${destroot}${zsh_completion_dir} xinstall -m 0644 ${worksrcpath}/data/shell-completions/zsh/_meson ${destroot}${zsh_completion_dir} xinstall -m 0644 ${worksrcpath}/data/shell-completions/zsh/_meson ${destroot}${zsh_completion_dir} # install editor syntax files set vim_dir ${prefix}/share/${subport}/vim/vimfiles foreach d {ftdetect ftplugin syntax indent} { xinstall -d ${destroot}${vim_dir}/${d} xinstall -m 0644 ${worksrcpath}/data/syntax-highlighting/vim/${d}/meson.vim ${destroot}${vim_dir}/${d} xinstall -m 0644 ${worksrcpath}/data/syntax-highlighting/vim/${d}/meson.vim ${destroot}${vim_dir}/${d} } } pre-activate { # the original meson port new pyXY-meson ports conflict if {![catch {lindex [registry_active meson] 0} installed]} { set _version [lindex $installed 1] if {[vercmp $_version 1.2.3] < 0} { registry_deactivate_composite meson "" [list ports_nodepcheck 1] } } } pre-test { reinplace "s|/usr/bin/env python3$|${python.bin}|" \ ${worksrcpath}/run_tests.py \ ${worksrcpath}/run_cross_test.py \ ${worksrcpath}/run_meson_command_tests.py \ ${worksrcpath}/run_project_tests.py \ ${worksrcpath}/run_unittests.py set testpath "${worksrcpath}/test\\ cases" fs-traverse f ${testpath} { if { [string match *.py ${f}] } { reinplace "s|/usr/bin/env python3$|${python.bin}|" ${f} } } } test.run yes python.test_framework test.env CXX=${configure.cxx} \ "CXXFLAGS=${configure.cxxflags} [get_canonical_archflags cxx]" \ CC=${configure.cc} \ "CFLAGS=${configure.cflags} [get_canonical_archflags cc]" \ "LDFLAGS=${configure.ldflags} [get_canonical_archflags ld]" \ PREFIX=${prefix} test.cmd ./run_tests.py test.target }