Changeset 54563


Ignore:
Timestamp:
Jul 29, 2009, 3:40:44 PM (8 years ago)
Author:
ryandesign@…
Message:

php5extension-1.0.tcl: Allow a port to contain more than one extension. This change doesn't affect the existing php5extension ports, but will allow the creation of ports like the upcoming php5-mysql and php5-sqlite ports.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/_resources/port1.0/group/php5extension-1.0.tcl

    r53909 r54563  
    7373    destroot.destdir            INSTALL_ROOT=${destroot}
    7474   
    75     post-build {
    76         set fp [open ${workpath}/${php5extension.ini} w]
    77         if {"zend" == ${php5extension.type}} {
    78             puts $fp "zend_extension=[php5extension.extension_dir]/${php5extension.extension}.so"
    79         } else {
    80             puts $fp "extension=${php5extension.extension}.so"
     75    post-destroot {
     76        xinstall -m 755 -d ${destroot}${php5extension.inidir}
     77        set extensiondir [php5extension.extension_dir]
     78        set fp [open ${destroot}${php5extension.inidir}/${php5extension.ini} w]
     79        foreach extensionfile [glob -tails -directory ${destroot}${extensiondir} *.so] {
     80            if {"zend" == ${php5extension.type}} {
     81                puts $fp "zend_extension=${extensiondir}/${extensionfile}"
     82            } else {
     83                puts $fp "extension=${extensionfile}"
     84            }
    8185        }
    8286        close $fp
    83     }
    84    
    85     post-destroot {
    86         xinstall -m 755 -d ${destroot}${php5extension.inidir}
    87         xinstall -m 644 ${workpath}/${php5extension.ini} ${destroot}${php5extension.inidir}
    8887    }
    8988   
     
    150149            set extensiondir [php5extension.extension_dir]
    151150            xinstall -d ${destroot}${extensiondir}
    152             xinstall -m 644 ${worksrcpath}/modules/${php5extension.extension}.so ${destroot}${extensiondir}
     151            eval xinstall -m 644 [glob ${worksrcpath}/modules/*.so] ${destroot}${extensiondir}
    153152        }
    154153       
Note: See TracChangeset for help on using the changeset viewer.