[MacPorts] #59815: php: add php74 subports

MacPorts noreply at macports.org
Sun Jan 12 23:15:46 UTC 2020


#59815: php: add php74 subports
----------------------+------------------------
  Reporter:  elcheco  |      Owner:  ryandesign
      Type:  request  |     Status:  accepted
  Priority:  Normal   |  Milestone:
 Component:  ports    |    Version:
Resolution:           |   Keywords:
      Port:  php      |
----------------------+------------------------

Comment (by ryandesign):

 Let's make sure that the pkgconfig dependency does not appear on subports
 that don't need it, so maybe:

 {{{
 if {${subport} ne ${name} && ${php.rootname} ne "dba" && [vercmp ${branch}
 7.4] >= 0} {
     ...
 }
 }}}

 Let's also make sure that the dependency only gets added once. Adding it
 more than once looks untidy in `port info`. One way this could be done is
 to do it near the end of the subport, after all of the module subports
 have been defined, maybe in the `else` part of the existing `if {${name}
 eq ${subport}}` block, and to first delete the dependency and then add it.
 Deleting a nonexistent dependency is permitted (it just does nothing).

 {{{
 if {${name} eq ${subport}} {
     ...
 } else {
     if {${php.rootname} ne "dba" && [vercmp ${branch} 7.4] >= 0} {
         depends_build-delete port:pkgconfig
         depends_build-append port:pkgconfig
     }
     ...
 }
 }}}

 This way all of the existing dependencies on pkgconfig that appear in some
 subports can remain as they are and we can handle the additional
 dependency for php 7.4 in just one place.

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


More information about the macports-tickets mailing list