Changeset 78924


Ignore:
Timestamp:
May 27, 2011, 6:43:48 AM (6 years ago)
Author:
jmr@…
Message:

add 'installs_libs' option that allows us to skip several checks when set to 'no'

Location:
trunk/base
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/doc/portfile.7

    r78662 r78924  
    402402.sp
    403403.Dl add_users user1 group=mygroup user2 group=mygroup
     404.It Ic installs_libs
     405By default, it is assumed that ports may install libraries or headers that can
     406be incorporated into their dependents. If this is not the case, set
     407.Cm installs_libs
     408to
     409.Em no .
     410This means that this port's dependents need not check that it is installed
     411for the same architectures as them; that it is permissible to distribute
     412binaries of the dependents even if their licenses conflict with the license
     413of this port; and that updates to this port can never result in broken dynamic
     414linking in its dependents.
     415.br
     416.Sy Type:
     417.Em optional
     418.br
     419.Sy Default:
     420.Em none
     421.br
     422.Sy Example:
     423.Dl installs_libs no
    404424.El
    405425.Sh TARGET HOOKS
  • trunk/base/portmgr/jobs/port_binary_distributable.tcl

    r78062 r78924  
    8181    }
    8282
    83     return [list $dependencyList $portInfo(license)]
     83    set ret [list $dependencyList $portInfo(license)]
     84    if {[info exists portInfo(installs_libs)]} {
     85        lappend ret $portInfo(installs_libs)
     86    } else {
     87        # when in doubt, assume code from the dep is incorporated
     88        lappend ret yes
     89    }
     90    return $ret
    8491}
    8592
     
    117124    while {[llength $portList] > 0} {
    118125        set aPort [lindex $portList 0]
     126        # mark as seen and remove from the list
     127        set portSeen($aPort) 1
     128        set portList [lreplace $portList 0 0]
     129
    119130        set aPortInfo [infoForPort $aPort $variantInfo]
    120131        set aPortLicense [lindex $aPortInfo 1]
     132        set installs_libs [lindex $aPortInfo 2]
     133        if {!$installs_libs} {
     134            continue
     135        }
    121136        foreach full_lic $aPortLicense {
    122137            # check that this dependency's license(s) are good
     
    141156        }
    142157
    143         # mark it seen and add its deps to the list
    144         set portSeen($aPort) 1
    145         set portList [lreplace $portList 0 0]
     158        # add its deps to the list
    146159        foreach possiblyNewPort [lindex $aPortInfo 0] {
    147160            if {![info exists portSeen($possiblyNewPort)]} {
  • trunk/base/src/macports1.0/macports.tcl

    r78908 r78924  
    17121712                        array unset dep_portinfo
    17131713                        array set dep_portinfo [lindex $res 1]
     1714                        if {[info exists dep_portinfo(installs_libs)] && !$dep_portinfo(installs_libs)} {
     1715                            set missing {}
     1716                        }
     1717                    }
     1718                    if {[llength $missing] > 0} {
    17141719                        if {[info exists dep_portinfo(variants)] && [lsearch $dep_portinfo(variants) universal] != -1} {
    17151720                            # dep offers a universal variant
     
    24982503                    ui_error "Dependency '$dep_portname' not found."
    24992504                    return 1
     2505                } elseif {[info exists dep_portinfo(installs_libs)] && !$dep_portinfo(installs_libs)} {
     2506                    set check_archs 0
    25002507                }
    25012508                lappend options subport $dep_portname
  • trunk/base/src/port/portindex.tcl

    r78062 r78924  
    260260             depends_lib depends_run description epoch homepage \
    261261             long_description maintainers name platforms revision variants \
    262              version portdir portarchive replaced_by license} {
     262             version portdir portarchive replaced_by license installs_libs} {
    263263    set keepkeys($key) 1
    264264}
  • trunk/base/src/port1.0/portmain.tcl

    r78660 r78924  
    5252        platforms default_variants install.user install.group \
    5353        macosx_deployment_target universal_variant os.universal_supported \
    54         supported_archs depends_skip_archcheck \
     54        supported_archs depends_skip_archcheck installs_libs \
    5555        copy_log_files \
    5656        compiler.cpath compiler.library_path \
     
    6565
    6666# Export options via PortInfo
    67 options_export name version revision epoch categories maintainers platforms description long_description notes homepage license provides conflicts replaced_by
     67options_export name version revision epoch categories maintainers platforms description long_description notes homepage license provides conflicts replaced_by installs_libs
    6868
    6969default subport {[portmain::get_default_subport]}
Note: See TracChangeset for help on using the changeset viewer.