[MacPorts] #69764: mpv @0.37.0: ERROR: Program 'rst2man rst2man-3.12.py' not found or not executable (was: Mpv doesn't recognized rst2man installed by py312-docutils if it's not default)

MacPorts noreply at macports.org
Wed Apr 17 14:56:22 UTC 2024


#69764: mpv @0.37.0: ERROR: Program 'rst2man rst2man-3.12.py' not found or not
executable
---------------------+----------------------
  Reporter:  eirnym  |      Owner:  Ionic
      Type:  defect  |     Status:  assigned
  Priority:  Normal  |  Milestone:
 Component:  ports   |    Version:
Resolution:          |   Keywords:
      Port:  mpv     |
---------------------+----------------------
Changes (by ryandesign):

 * status:  new => assigned
 * cc: i0ntempest (added)
 * keywords:  mpv rst2man =>
 * owner:  (none) => Ionic


Comment:

 As shipped from its developers, mpv looks for rst2man this way:

 https://github.com/mpv-
 player/mpv/blob/818ce7c51a6b9179307950e919983e0909942098/meson.build#L1567

 {{{#!python
 rst2man = find_program('rst2man', 'rst2man.py', required: get_option
 ('manpage-build'))
 }}}

 The portfile patches this, replacing `rst2man.py` with `rst2man-3.12.py`:

 https://github.com/macports/macports-
 ports/blob/9425b39f9e6c8a20004c94bb6f33b7080d8395e6/multimedia/mpv/Portfile#L288-L291

 {{{#!tcl
 post-patch {
     set python_ver_dot [string index ${python.version} 0].[string range
 ${python.version} 1 end]
     reinplace "s|'rst2man.py'|'rst2man-${python_ver_dot}.py'|"
 ${worksrcpath}/meson.build
 }
 }}}

 Instead of patching, the port might use the new `meson.native.binaries`
 feature:

 https://github.com/macports/macports-ports/pull/23572

 {{{#!tcl
 set python_ver_dot [string index ${python.version} 0].[string range
 ${python.version} 1 end]
 meson.native.binaries-append \
                     rst2man=${prefix}/bin/rst2man-${python_ver_dot}
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/69764#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list