Ignore:
Timestamp:
May 27, 2012, 11:18:37 AM (7 years ago)
Author:
ryandesign@…
Message:

php-1.1.tcl:

  • "php.setup" is gone; now set name and version manually; this makes it easier to coexist with other portgroups that might want to set "name" themselves
  • subports are created when you set "php.branches", like the python 1.0 portgroup
  • "php.extensions" is now automatically determined for almost all ports
  • "php.type" is gone; Zend extensions should now be listed in "php.extensions.zend"
  • indicating PECL hosting is now done via "php.pecl yes"
  • "php.pecl_livecheck_stable no" is changed to "php.pecl.prerelease yes"
  • "php.pecl_name" is changed to "php.pecl.name"
  • in the comments at the top of the generated extension ini files, indicate that changes will be lost by deactivating the port too (now that we're using registry 2)
  • single-branch extension ports are now supported (e.g. "name php53-foo")
  • "php.create_subports" is added, in the hopes that it could be used to add php extension subports to ports for other software
  • "php.build_dirs_proc" is gone; this functionality is moving to the php port
  • "php._bundled" is gone as it's no longer referenced anywhere
  • every option is now documented with comments
File:
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/dports/_resources/port1.0/group/php-1.1.tcl

    r93569 r93575  
    3131#
    3232#
    33 # This PortGroup automatically sets up the standard environment for building
    34 # a PHP extension.
    35 #
    36 # Usage:
    37 #
    38 #   PortGroup                   php 1.0
    39 #   php.setup                   extension version source
     33# This PortGroup builds PHP extensions. Set name and version as for a normal
     34# standalone port, then set php.branches and optionally any other php options,
     35# described in more detail below.
     36
     37default categories              php
     38
     39
     40# php.branches: the list of PHP branches for which the extension(s) will be
     41# built. For unified extension ports (name begins with "php-") setting
     42# php.branches is mandatory; there is no default. Example:
     43#
    4044#   php.branches                5.3 5.4
    4145#
    42 # where extension is the name of the extension (e.g. APC), version is its
    43 # version, and if the extension is hosted at PECL, source is "pecl"; otherwise
    44 # don't use source.
    45 #
    46 # php.branches must be set to the list of PHP branches for which this extension
    47 # should be made available.
    48 #
    49 # If this is a Zend extension, use
    50 #
    51 #   php.type                    zend
    52 
    53 ### This portgroup is not ready to be used yet ###
    54 
    55 
    56 # Options that relate to the PHP extension.
     46# For unified ports, setting php.branches will create the subports.
     47#
     48# For single-branch extension ports (name begins with e.g. "php54-")
     49# php.branches is set automatically based on the port name and should not be
     50# changed.
     51
    5752options php.branches
    5853option_proc php.branches        php._set_branches
    59 options php.build_dirs
    60 default php.build_dirs          {[php.build_dirs_proc]}
     54
     55proc php._set_branches {option action args} {
     56    if {"set" != ${action}} {
     57        return
     58    }
     59   
     60    # Sort the values so we can use lindex 0 and end to get the min and max branches respectively.
     61    option ${option} [lsort -command vercmp [option ${option}]]
     62   
     63    global php.default_branch php.rootname name subport
     64   
     65    if {[regexp {^php\d*-} ${name}]} {
     66        # Legacy dist_subdir to match old php5- port layout.
     67        if {[lindex [split [lindex [option ${option}] 0] .] 0] == "5"} {
     68            dist_subdir php5-${php.rootname}
     69        }
     70       
     71        if {[regexp {^php-} ${name}]} {
     72            # Create subport for each PHP branch.
     73            php.create_subports
     74           
     75            # Set up stub port.
     76            if {${name} == ${subport}} {
     77                supported_archs     noarch
     78                depends_run         port:php[php.suffix_from_branch ${php.default_branch}]-${php.rootname}
     79                pre-fetch {
     80                    distfiles
     81                }
     82                pre-checksum {
     83                    distfiles
     84                }
     85                pre-extract {
     86                    distfiles
     87                }
     88                patch {}
     89                use_configure       no
     90                build {}
     91                test {}
     92                destroot {
     93                    xinstall -d -m 755 ${destroot}${prefix}/share/doc/${subport}
     94                    system "echo \"${subport} is a stub port\" > ${destroot}${prefix}/share/doc/${subport}/README"
     95                }
     96            }
     97        } else {
     98            # Single-branch extension port; add the code to the port directly.
     99            php.add_port_code
     100        }
     101    }
     102}
     103
     104
     105# Set php.branches automatically if the port name includes the PHP branch.
     106
     107option_proc name                php._set_name
     108
     109proc php._set_name {option action args} {
     110    if {"set" != ${action}} {
     111        return
     112    }
     113   
     114    if {[regexp {^php\d+-} ${args}]} {
     115        php.branches            [php.branch_from_subport]
     116    }
     117}
     118
     119
     120# php.default_branch: the branch of PHP which should be installed if the user
     121# installs the stub port. The default is the largest value in php.branches and
     122# most ports should not need to change this.
     123
    61124options php.default_branch
    62125default php.default_branch      {[lindex ${php.branches} end]}
     126option_proc php.default_branch  php._set_default_branch
     127
     128proc php._set_default_branch {option action args} {
     129    if {"set" != ${action}} {
     130        return
     131    }
     132   
     133    global name subport php.rootname
     134   
     135    if {[regexp {^php-} ${name}] && ${name} == ${subport}} {
     136        depends_run             port:php[php.suffix_from_branch [option ${option}]]-${php.rootname}
     137    }
     138}
     139
     140
     141# php.rootname: for normal extension ports, the part of the port name after the
     142# "php-" prefix. The default distname is based on this, as are the names of the
     143# subports (if any). Extension ports should not need to set this, but other
     144# ports calling php.create_subports manually might.
     145
     146options php.rootname
     147default php.rootname            {[php._get_rootname]}
     148proc php._get_rootname {} {
     149    global name
     150    regexp {^php\d*-(.+)$} ${name} -> rootname
     151    if {[info exists rootname]} {
     152        return ${rootname}
     153    }
     154    return ${name}
     155}
     156
     157
     158# php.create_subports: creates subports for each PHP branch
     159#
     160# For a normal extension port whose name starts with "php-" this will be called
     161# automatically when you set php.branches so you shouldn't need to call it
     162# manually unless for example you're adding PHP extension subports to a port
     163# that also installs other software.
     164
     165proc php.create_subports {} {
     166    global php.branches php.rootname
     167    foreach branch ${php.branches} {
     168        subport php[php.suffix_from_branch ${branch}]-${php.rootname} {
     169            php.add_port_code
     170        }
     171    }
     172}
     173
     174
     175# php.extension_ini: the name of the automatically-generated ini file that
     176# loads the exension(s). There should be no need to change the default.
     177
    63178options php.extension_ini
    64179default php.extension_ini       {${php.rootname}.ini}
     180
     181
     182# php.extensions: the list of normal extensions that will be listed in the
     183# port's ini file, which will cause PHP to load them. The default is to list
     184# all installed extensions, and most ports won't need to change this.
     185
    65186options php.extensions
    66 options php.pecl_livecheck_stable
    67 default php.pecl_livecheck_stable yes
    68 option_proc php.pecl_livecheck_stable php._set_pecl_livecheck_stable
    69 options php.rootname
    70 default php.rootname            {[lindex ${php.extensions} 0]}
    71 options php.type
    72 default php.type                php
    73 
    74 # Options that relate to the branch of PHP being used by a subport.
     187
     188
     189# php.extensions.zend: the list of Zend extensions that will be listed in the
     190# port's ini file. The default is that none of the extensions are Zend
     191# extensions. Most extensions are normal extensions, not Zend extensions. Zend
     192# extensions are those that directly interact with the Zend engine, such as PHP
     193# accelerators and debuggers.
     194
     195options php.extensions.zend
     196default php.extensions.zend     {}
     197
     198
     199# php.build_dirs: the list of directories we need to phpize, configure, build
     200# and destroot in. Most ports only need to phpize, configure, build and destroot
     201# in a single directory and so do not need to change this value, and should be
     202# setting worksrcdir instead. This option exists primarily so that some subports
     203# of the php port can install multiple related extensions at once.
     204
     205options php.build_dirs
     206default php.build_dirs          {${worksrcpath}}
     207
     208
     209# php.pecl: whether this extension is hosted on PECL or not. When set to "yes"
     210# the homepage, master_sites, extract.suffix, and livecheck are set according
     211# to PECL standards.
     212
     213options php.pecl
     214default php.pecl                no
     215option_proc php.pecl            php._set_pecl
     216
     217proc php._set_pecl {option action args} {
     218    if {"set" != ${action}} {
     219        return
     220    }
     221   
     222    if {${args}} {
     223        global php.rootname
     224       
     225        php.pecl.name           ${php.rootname}
     226        master_sites            http://pecl.php.net/get/
     227        extract.suffix          .tgz
     228       
     229        livecheck.type          regexm
     230        php.pecl.prerelease     no
     231    }
     232}
     233
     234
     235# php.pecl.name: for PECL extensions, the name of the PECL project. The default
     236# distname, homepage and livecheck.url are based on this. The default is based
     237# on ${php.rootname} which is appropriate for most PECL extensions.
     238
     239options php.pecl.name
     240default php.pecl.name           {${php.rootname}}
     241option_proc php.pecl.name       php._set_pecl_name
     242
     243proc php._set_pecl_name {option action args} {
     244    if {"set" != ${action}} {
     245        return
     246    }
     247   
     248    global php.pecl
     249   
     250    if {${php.pecl}} {
     251        set pecl_homepage       http://pecl.php.net/package/${args}
     252        default distname        {${php.pecl.name}-${version}}
     253        homepage                ${pecl_homepage}
     254        livecheck.url           ${pecl_homepage}
     255    }
     256}
     257
     258
     259# php.pecl.prerelease: for PECL extensions, whether to allow livecheck to match
     260# pre-release versions or only stable versions. For most PECL extensions the
     261# default of "no" is appropriate, but for extensions that have not yet released
     262# their first stable version, you can set this to "yes".
     263
     264options php.pecl.prerelease
     265default php.pecl.prerelease     no
     266option_proc php.pecl.prerelease php._set_pecl_prerelease
     267
     268proc php._set_pecl_prerelease {option action args} {
     269    if {"set" != ${action}} {
     270        return
     271    }
     272   
     273    global php.pecl
     274   
     275    if {${php.pecl}} {
     276        if {${args}} {
     277            livecheck.regex     {>([0-9a-zA-Z.]+)</a></th>}
     278        } else {
     279            livecheck.regex     {>([0-9a-zA-Z.]+)</a></th>\s*<[^>]+>stable<}
     280        }
     281    }
     282}
     283
     284
     285# php: the name of this branch of PHP, e.g. "php53" or "php54".
     286
    75287options php
    76288default php                     {php${php.suffix}}
     289
     290
     291# php.branch: the version number of this branch of PHP, e.g. "5.3" or "5.4".
     292
    77293options php.branch
    78294default php.branch              {[php.branch_from_subport]}
     295
     296
     297# php.config: the path to the php-config script for this branch of PHP.
     298
    79299options php.config
    80300default php.config              {${prefix}/bin/php-config${php.suffix}}
     301
     302
     303# php.extension_dir: the path to the directory extensions will be installed into
     304# for this branch of PHP.
     305
    81306options php.extension_dir
    82307default php.extension_dir       {[exec ${php.config} --extension-dir 2>/dev/null]}
     308
     309
     310# php.ini: the path to the configuration file for this branch of PHP.
     311
    83312options php.ini
    84313default php.ini                 {${prefix}/etc/${php}/php.ini}
     314
     315
     316# php.ini_dir: the directory the automatically-generated extension ini files
     317# will be installed into for this branch of PHP.
     318
    85319options php.ini_dir
    86320default php.ini_dir             {${prefix}/var/db/${php}}
     321
     322
     323# php.ize: the path to the phpize script for this branch of PHP.
     324
    87325options php.ize
    88326default php.ize                 {${prefix}/bin/phpize${php.suffix}}
     327
     328
     329# php.suffix: the suffix appended to file and directory names for this branch of
     330# PHP, e.g. "53" or "54".
     331
    89332options php.suffix
    90333default php.suffix              {[php.suffix_from_branch ${php.branch}]}
    91334
    92 # Private options you don't need to worry about.
    93 options php._bundled
    94 default php._bundled            {[string equal ${name} "php"]}
    95 
    96 
    97 proc php._set_branches {option action args} {
    98     if {"set" != ${action}} {
    99         return
    100     }
    101    
    102     # Sort the values so we can use lindex 0 and end to get the min and max branches respectively.
    103     option ${option} [lsort -command vercmp [option ${option}]]
    104    
    105     global php.default_branch php.rootname php._bundled name subport
    106     if {[regexp {^php-} ${name}]} {
    107         # Legacy dist_subdir to match old php5- port layout.
    108         if {!${php._bundled}} {
    109             if {[lindex [split [lindex [option ${option}] 0] .] 0] == "5"} {
    110                 dist_subdir php5-${php.rootname}
    111             }
    112         }
    113        
    114         # Create subport for each PHP branch.
    115         foreach branch [option ${option}] {
    116             subport php[php.suffix_from_branch ${branch}]-${php.rootname} {}
    117         }
    118        
    119         # Set up stub port.
    120         if {${name} == ${subport}} {
    121             supported_archs     noarch
    122             depends_run         port:php[php.suffix_from_branch ${php.default_branch}]-${php.rootname}
    123             fetch {}
    124             checksum {}
    125             extract {}
    126             patch {}
    127             use_configure       no
    128             build {}
    129             test {}
    130             destroot {
    131                 xinstall -d -m 755 ${destroot}${prefix}/share/doc/${subport}
    132                 system "echo \"${subport} is a stub port\" > ${destroot}${prefix}/share/doc/${subport}/README"
    133             }
    134         }
    135     }
    136 }
    137 
    138 proc php._set_pecl_livecheck_stable {option action args} {
    139     global livecheck.regex
    140    
    141     if {"set" != ${action}} {
    142         return
    143     }
    144    
    145     if {${args}} {
    146         livecheck.regex     {>([0-9a-zA-Z.]+)</a></th>\s*<[^>]+>stable<}
    147     } else {
    148         livecheck.regex     {>([0-9a-zA-Z.]+)</a></th>}
    149     }
    150 }
    151 
    152 proc php.setup {extensions version {source ""}} {
    153     global php php.branch php.branches php.build_dirs php.config php.extension_ini php.extensions php.homepage php.ini_dir php.rootname php._bundled
    154     global destroot name subport
    155    
    156     # Use "set" to preserve the list structure.
    157     set php.extensions          ${extensions}
    158    
    159     if {![info exists name]} {
    160         name                    php-${php.rootname}
    161     }
    162     version                     ${version}
    163     categories                  php
    164    
    165     if {${name} != ${subport}} {
    166         # Set up distfiles for non-bundled extensions.
    167         if {!${php._bundled}} {
    168             distname            ${php.rootname}-${version}
    169         }
    170        
    171         depends_lib-append      port:${php}
    172        
    173         # These are set only for the convenience of subports that want to access
    174         # these variables directly, e.g. the ${php}-openssl subport which wants
    175         # to move a file in ${build.dir} in a post-extract block.
    176         configure.dir           [lindex ${php.build_dirs} 0]
    177         build.dir               [lindex ${php.build_dirs} 0]
    178         destroot.dir            [lindex ${php.build_dirs} 0]
    179        
    180         configure.pre_args-append --with-php-config=${php.config}
    181        
    182         configure.universal_args-delete --disable-dependency-tracking
    183        
    184         variant debug description {Enable debug support (useful to analyze a PHP-related core dump)} {}
    185        
    186         pre-configure {
    187             set php_debug_variant [regexp {/debug-[^/]+$} ${php.extension_dir}]
    188             if {${php_debug_variant} && ![variant_isset debug]} {
    189                 ui_error "${subport} cannot be installed without the debug variant because ${php} is installed with the debug variant."
    190                 return -code error "incompatible variant selection"
    191             } elseif {[variant_isset debug] && !${php_debug_variant}} {
    192                 ui_error "${subport} cannot be installed with the debug variant because ${php} is installed without the debug variant."
    193                 return -code error "incompatible variant selection"
    194             }
    195             foreach dir ${php.build_dirs} {
    196                 ui_debug "Generating configure script in [file tail ${dir}]"
    197                 system -W ${dir} "${php.ize}"
    198             }
    199         }
    200        
    201         configure {
    202             foreach configure.dir ${php.build_dirs} {
    203                 ui_debug "Configuring in [file tail ${configure.dir}]"
    204                 portconfigure::configure_main
    205             }
    206         }
    207        
    208         build {
    209             foreach build.dir ${php.build_dirs} {
    210                 ui_debug "Building in [file tail ${build.dir}]"
    211                 portbuild::build_main
    212             }
    213         }
    214        
    215         destroot.destdir        INSTALL_ROOT=${destroot}
    216        
    217         destroot {
    218             foreach destroot.dir ${php.build_dirs} {
    219                 ui_debug "Staging in [file tail ${destroot.dir}]"
    220                 portdestroot::destroot_main
    221             }
     335
     336# php.add_port_code: adds the code to the port or subport to do the actual
     337# building. For normal extension ports, the portgroup automatically calls this
     338# for you when appropriate; the php port's extension subports are a special case
     339# and call it manually.
     340
     341proc php.add_port_code {} {
     342    global php php.branch php.branches php.build_dirs php.config php.extension_ini php.extensions php.ini_dir php.rootname php._bundled
     343    global destroot name subport version
     344   
     345    # Set up distfiles default for non-bundled extensions.
     346    default distname        {${php.rootname}-${version}}
     347   
     348    depends_lib-append      port:${php}
     349   
     350    # These are set only for the convenience of subports that want to access
     351    # these variables directly, e.g. the ${php}-openssl subport which wants
     352    # to move a file in ${build.dir} in a post-extract block.
     353    #configure.dir           [lindex ${php.build_dirs} 0]
     354    #build.dir               [lindex ${php.build_dirs} 0]
     355    #destroot.dir            [lindex ${php.build_dirs} 0]
     356   
     357    configure.pre_args-append --with-php-config=${php.config}
     358   
     359    configure.universal_args-delete --disable-dependency-tracking
     360   
     361    variant debug description {Enable debug support (useful to analyze a PHP-related core dump)} {}
     362   
     363    pre-configure {
     364        set php_debug_variant [regexp {/debug-[^/]+$} ${php.extension_dir}]
     365        if {${php_debug_variant} && ![variant_isset debug]} {
     366            ui_error "${subport} cannot be installed without the debug variant because ${php} is installed with the debug variant."
     367            return -code error "incompatible variant selection"
     368        } elseif {[variant_isset debug] && !${php_debug_variant}} {
     369            ui_error "${subport} cannot be installed with the debug variant because ${php} is installed without the debug variant."
     370            return -code error "incompatible variant selection"
     371        }
     372        foreach dir ${php.build_dirs} {
     373            ui_debug "Generating configure script in [file tail ${dir}]"
     374            system -W ${dir} "${php.ize}"
     375        }
     376    }
     377   
     378    configure {
     379        foreach configure.dir ${php.build_dirs} {
     380            ui_debug "Configuring in [file tail ${configure.dir}]"
     381            portconfigure::configure_main
     382        }
     383    }
     384   
     385    build {
     386        foreach build.dir ${php.build_dirs} {
     387            ui_debug "Building in [file tail ${build.dir}]"
     388            portbuild::build_main
     389        }
     390    }
     391   
     392    destroot.destdir        INSTALL_ROOT=${destroot}
     393   
     394    destroot {
     395        foreach destroot.dir ${php.build_dirs} {
     396            ui_debug "Staging in [file tail ${destroot.dir}]"
     397            portdestroot::destroot_main
     398        }
     399    }
     400   
     401    post-destroot {
     402        # Get the list of extensions that got installed by the port.
     403        set installed_extension_files [lsort [glob -nocomplain -tails -directory ${destroot}${php.extension_dir} *.so]]
     404        set installed_extensions {}
     405        foreach installed_extension_file ${installed_extension_files} {
     406            lappend installed_extensions [file rootname ${installed_extension_file}]
     407        }
     408       
     409        # If the portfile author didn't specify which extensions to load,
     410        # load all of them.
     411        if {![info exists php.extensions]} {
     412            if {0 < [llength ${php.extensions.zend}]} {
     413                set php.extensions {}
     414            } else {
     415                set php.extensions ${installed_extensions}
     416            }
     417        }
     418       
     419        foreach extension [concat ${php.extensions} ${php.extensions.zend}] {
     420            if {-1 == [lsearch -exact ${installed_extensions} ${extension}]} {
     421                ui_error "Cannot list extension \"${extension}\" in ${php.extension_ini} because the port only installed the extensions \"[join ${installed_extensions} "\", \""]\""
     422                return -code error "invalid extension name"
     423            }
     424        }
     425       
     426        if {0 < [llength ${php.extensions}] || 0 < [llength ${php.extensions.zend}]} {
    222427            xinstall -m 755 -d ${destroot}${php.ini_dir}
    223             if {"zend" == ${php.type}} {
    224                 set extension_prefix "zend_extension=${php.extension_dir}/"
    225             } else {
    226                 set extension_prefix "extension="
    227             }
    228428            set fp [open ${destroot}${php.ini_dir}/${php.extension_ini} w]
    229             puts $fp "; Do not edit this file; it is automatically generated by MacPorts."
    230             puts $fp "; Any changes you make will be lost if you upgrade or uninstall ${subport}."
     429            puts $fp "; Do not edit this file; it is automatically generated by MacPorts. Any changes"
     430            puts $fp "; you make will be lost if you upgrade, uninstall or deactivate ${subport}."
    231431            puts $fp "; To configure ${php}, edit ${php.ini}."
     432            foreach extension ${php.extensions.zend} {
     433                puts $fp "zend_extension=${php.extension_dir}/${extension}.so"
     434            }
    232435            foreach extension ${php.extensions} {
    233                 puts $fp "${extension_prefix}${extension}.so"
     436                puts $fp "extension=${extension}.so"
    234437            }
    235438            close $fp
    236439        }
    237        
    238         post-install {
    239             if {[file exists ${php.ini}]} {
    240                 set count 0
    241                 set fp [open ${php.ini} r]
    242                 while {![eof $fp]} {
    243                     set line [gets $fp]
    244                     regexp {^extension_dir *= *"?([^\"]*)"?} $line -> php_ini_extension_dir
    245                     if {[info exists php_ini_extension_dir]} {
    246                         ui_debug "Found extension_dir ${php_ini_extension_dir} in ${php.ini}"
    247                         if {${php_ini_extension_dir} != ${php.extension_dir}} {
    248                             if {0 == ${count}} {
    249                                 ui_msg "Your php.ini contains a line that will prevent ${subport}"
    250                                 ui_msg "and other ${php} extensions from working. To fix this,"
    251                                 ui_msg "edit ${php.ini} and delete this line:"
    252                                 ui_msg ""
    253                             }
    254                             ui_msg ${line}
    255                             incr count
     440    }
     441   
     442    post-install {
     443        if {[file exists ${php.ini}]} {
     444            set count 0
     445            set fp [open ${php.ini} r]
     446            while {![eof $fp]} {
     447                set line [gets $fp]
     448                regexp {^extension_dir *= *"?([^\"]*)"?} $line -> php_ini_extension_dir
     449                if {[info exists php_ini_extension_dir]} {
     450                    ui_debug "Found extension_dir ${php_ini_extension_dir} in ${php.ini}"
     451                    if {${php_ini_extension_dir} != ${php.extension_dir}} {
     452                        if {0 == ${count}} {
     453                            ui_msg "Your php.ini contains a line that will prevent ${subport}"
     454                            ui_msg "and other ${php} extensions from working. To fix this,"
     455                            ui_msg "edit ${php.ini} and delete this line:"
     456                            ui_msg ""
    256457                        }
    257                         unset php_ini_extension_dir
     458                        ui_msg ${line}
     459                        incr count
    258460                    }
     461                    unset php_ini_extension_dir
    259462                }
    260                 close $fp
    261             }
    262         }
    263     }
    264    
    265     if {"pecl" == ${source}} {
    266         global php.pecl_livecheck_stable
    267        
    268         set php.homepage        http://pecl.php.net/package/${php.rootname}
    269        
    270         homepage                ${php.homepage}
    271         master_sites            http://pecl.php.net/get/
    272         extract.suffix          .tgz
    273        
    274         livecheck.type          regexm
    275         livecheck.url           ${php.homepage}
    276         php.pecl_livecheck_stable yes
    277     }
    278 }
    279 
    280 # Return the list of directories we need to phpize / configure / make in.
    281 proc php.build_dirs_proc {} {
    282     global php.extensions php._bundled worksrcpath
    283     if {${php._bundled}} {
    284         set dirs {}
    285         foreach extension ${php.extensions} {
    286             lappend dirs ${worksrcpath}/ext/${extension}
    287         }
    288         return ${dirs}
    289     }
    290     return ${worksrcpath}
    291 }
    292 
    293 # Calculate suffix from given branch.
     463            }
     464            close $fp
     465        }
     466    }
     467}
     468
     469
     470# php.suffix_from_branch: calculates the suffix from the given branch.
     471
    294472proc php.suffix_from_branch {branch} {
    295473    return [strsed ${branch} {g/\\.//}]
    296474}
    297475
    298 # Calculate branch from given suffix.
     476
     477# php.branch_from_suffix: calculates the branch from the given suffix.
     478
    299479proc php.branch_from_suffix {suffix} {
    300480    return [string index ${suffix} 0].[string range ${suffix} 1 end]
    301481}
    302482
    303 # Calculate branch from subport.
     483
     484# php.branch_from_subport: calculates the branch from the subport.
     485
    304486proc php.branch_from_subport {} {
    305487    global php.default_branch subport
Note: See TracChangeset for help on using the changeset viewer.