[MacPorts] #68038: pg meson: add formal support for 'buildtype'; potentially support adding variant 'debug'

MacPorts noreply at macports.org
Fri Aug 25 17:13:18 UTC 2023


#68038: pg meson: add formal support for 'buildtype'; potentially support adding
variant 'debug'
-------------------------+----------------------
 Reporter:  mascguy      |      Owner:  mascguy
     Type:  enhancement  |     Status:  assigned
 Priority:  Normal       |  Milestone:
Component:  ports        |    Version:  2.8.1
 Keywords:  portgroup    |       Port:  pg-meson
-------------------------+----------------------
 Presently, Meson-based ports have to explicitly add a configure argument
 for the build type, which can be one of the following options [as of
 2023-08]:

 * `custom`
 * `debug`
 * `debugoptimized`
 * `minsize`
 * `plain`
 * `release`

 That's typically done either via `--buildtype=xxx`, or `-Dbuildtype=xxx`.

 At a minimum, we should provide a formal option for that - say,
 `meson.buildtype` - with a reasonable default. (`debugoptimized` is often
 the preferred choice for a non-debug build, as it provides the best of
 both worlds: debug symbols, combined with optimization.)

 In addition, we should consider adding support for auto-creation of
 variant `debug`, if the latter isn't already defined in the portfile. For
 such a case, the build type should default to `debug`. (Though it should
 also be overridable via another formal option, to ensure authors don't
 have to resort to creating their own variant.)

 All of this can be implemented with minimal changes to pg `meson`, and the
 logic is very straightforward. So it should introduce minimal risk. It's
 also extremely easy to test, via a selection of Meson-based ports.

 Finally, for cases where debug support has been added via pg `debug`, that
 should be removed in favor of the above. Thankfully there are only a small
 number of such ports, however.

-- 
Ticket URL: <https://trac.macports.org/ticket/68038>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list