You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
virt-viewer: resolve python3 via meson native binaries
Use meson.native.binaries to point find_program at the versioned python3 instead of patching meson.build, and keep the reinplace only for upstream's run_command() calls that bypass the found program. See: https://trac.macports.org/ticket/71963
This commit is contained in:
@@ -73,12 +73,15 @@ variant bash_completion {
|
||||
|
||||
default_variants +vte +bash_completion
|
||||
|
||||
# meson.build invokes the unversioned "python3", which MacPorts provides only
|
||||
# via "port select"; use the versioned interpreter directly.
|
||||
# meson.build looks up the unversioned "python3", which MacPorts provides only
|
||||
# via "port select"; point find_program at the versioned interpreter. The
|
||||
# reinplace works around upstream calling run_command() with the "python3"
|
||||
# string instead of the program found above.
|
||||
# https://trac.macports.org/ticket/71963
|
||||
meson.native.binaries-append \
|
||||
python3=${prefix}/bin/python${py_branch}
|
||||
post-patch {
|
||||
reinplace "s|find_program('python3', required: true)|find_program('${prefix}/bin/python${py_branch}', required: true)|" ${worksrcpath}/meson.build
|
||||
reinplace "s|'python3', '-c'|'${prefix}/bin/python${py_branch}', '-c'|g" ${worksrcpath}/meson.build
|
||||
reinplace "s|'python3', '-c'|python3, '-c'|g" ${worksrcpath}/meson.build
|
||||
}
|
||||
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user