[MacPorts] #70077: The stub PG should (be able to) clear all pre- and post- blocks

MacPorts noreply at macports.org
Tue May 28 12:10:36 UTC 2024


#70077: The stub PG should (be able to) clear all pre- and post- blocks
--------------------------+----------------------
  Reporter:  RJVB         |      Owner:  mascguy
      Type:  enhancement  |     Status:  assigned
  Priority:  Normal       |  Milestone:
 Component:  base         |    Version:
Resolution:               |   Keywords:
      Port:               |
--------------------------+----------------------

Comment (by RJVB):

 I'll see if I can remember where, but I discovered the stub PG only
 relatively recently so such examples can be well hidden, so to speak.

 I don't really see a use for the underlying idea that I'm working on,
 where a generic variant (not unlike the `+universal` variant) has to turn
 a port into a stub, but that would be the perfect example otherwise. I
 don't have to explain how complicated tuning individual ports to universal
 builds can become, and there it's undoubtedly inevitable. But if somehow
 it weren't, wouldn't you consider that having to tweak individual ports
 defeats the purpose of a generic variant at least somewhat?

 The closest thing to that what I'm currently working on is probable the
 design used in a large number of the python ports I've seen, where the
 main port (`py-foo`) is a stub, but in this case the declaration of pre-
 and post- blocks can probably always be done inside an `if {${subport} ne
 "py-${name}"}` conditional. Handling that main port with a simple trailing

 {{{
 if {${subport} eq "py-${name}"} {
     PortGroup stub 1.0
 }
 }}}

 would still be more elegant. And it could even be relegated to the python
 PG callback, I suppose, which would be even more elegant. But even I
 wouldn't qualify this a "particularly inconvenient" situation. As far as I
 can oversee anyway :)

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


More information about the macports-tickets mailing list