Ticket #50285: php_postgres95.diff

File php_postgres95.diff, 39.3 KB (added by xeron (Ivan Larionov), 8 years ago)
  • lang/php/Portfile

    diff --git a/lang/php/Portfile b/lang/php/Portfile
    index 640f0ce..eacb180 100644
    a b  
    11# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
    2 # $Id: Portfile 144450 2016-01-09 07:00:52Z ryandesign@macports.org $
     2# $Id$
    33
    44PortSystem              1.0
    55PortGroup               php 1.1
    if {[vercmp ${major} 5] > 0} { 
    150150}
    151151
    152152if {[is_sapi_subport]} {
    153    
     153
    154154    depends_build       port:pkgconfig
    155    
     155
    156156    if {${subport} ne ${php}} {
    157157        depends_lib     port:${php}
    158158    }
    159    
     159
    160160    depends_lib-append  path:bin/gsed:gsed \
    161161                        port:libiconv \
    162162                        port:libxml2 \
    if {[is_sapi_subport]} { 
    164164                        port:mhash \
    165165                        port:pcre \
    166166                        port:zlib
    167    
     167
    168168    # Use -p1 to accommodate the Suhosin patch
    169169    patch.pre_args      -p1
    170170    patchfiles          patch-${php}-scripts-php-config.in.diff
    171    
     171
    172172    if {[vercmp ${branch} 5.2] <= 0} {
    173173        patchfiles-append \
    174174                        patch-${php}-libxml-2.9.diff \
    if {[is_sapi_subport]} { 
    179179    # Tested all subports (except oracle) and they built with clang-425.  The reported failure was with Xcode 4.2.
    180180    # Xcode 4.3 may work, but leaving it blacklisted due to lack of testing
    181181    compiler.blacklist  {clang < 400}
    182    
     182
    183183    set phpinidir       ${prefix}/etc/${php}
    184184    set extraphpinidir  ${prefix}/var/db/${php}
    185    
     185
    186186    configure.args      --mandir=${prefix}/share/man \
    187187                        --infodir=${prefix}/share/info \
    188188                        --program-suffix=[php.suffix_from_branch ${branch}] \
    if {[is_sapi_subport]} { 
    213213                        --without-pear \
    214214                        --disable-cgi \
    215215                        --disable-cli
    216    
     216
    217217    if {[vercmp ${branch} 5.3] >= 0} {
    218218        configure.args-append \
    219219                        --enable-fileinfo \
    220220                        --enable-phar \
    221221                        --disable-fpm
    222        
     222
    223223        # ${php}-mysql +mysqlnd needs mysqlnd support compiled into the SAPI
    224224        configure.env-append \
    225225                        PHP_MYSQLND_ENABLED=yes
    226226    }
    227    
     227
    228228    if {[vercmp ${branch} 5.4] == 0} {
    229229        # https://bugs.php.net/bug.php?id=68114
    230230        configure.args-append ac_cv_decimal_fp_supported=no
    231231    }
    232    
     232
    233233    configure.universal_args-delete --disable-dependency-tracking
    234    
     234
    235235    test.run            yes
    236    
     236
    237237    destroot.args       INSTALL_ROOT=${destroot}
    238    
     238
    239239    variant debug description {Enable debug support (useful to analyze a PHP-related core dump)} {
    240240        configure.args-append   --enable-debug
    241241    }
    242    
     242
    243243    if {[vercmp ${branch} 5.3] <= 0} {
    244244    variant suhosin description {Add Suhosin patch} {
    245245        pre-fetch {
    if {[is_sapi_subport]} { 
    269269        }
    270270    }
    271271    }
    272    
     272
    273273    if {${subport} ne ${php}} {
    274274        notes-append "If this is your first install, you need to enable ${subport} in your web server."
    275275    }
    276    
     276
    277277}
    278278
    279279}
    if {[is_sapi_subport]} { 
    282282
    283283subport ${php} {
    284284    PortGroup               select 1.0
    285    
     285
    286286    switch -- ${version} {
    287287        5.2.17              {revision 11}
    288288        5.3.29              {revision 1}
    289289    }
    290    
     290
    291291    depends_run             port:php_select
    292    
     292
    293293    select.group            php
    294294    select.file             ${filespath}/${subport}
    295    
     295
    296296    configure.args-replace  --disable-cli --enable-cli
    297    
     297
    298298    destroot.target         install-cli install-build install-headers install-programs
    299    
     299
    300300    destroot.keepdirs       ${destroot}${extraphpinidir}
    301    
     301
    302302    post-destroot {
    303303        # Copy the default php.ini files.
    304304        xinstall -m 755 -d ${destroot}${phpinidir}
    subport ${php} { 
    313313                php.ini-recommended \
    314314                ${destroot}${phpinidir}
    315315        }
    316        
     316
    317317        if {[vercmp ${branch} 5.3] >= 0} {
    318318            # Copy mysqlnd headers.
    319319            xinstall -d ${destroot}${prefix}/include/${php}/php/ext/mysqlnd
    320320            xinstall -m 644 {*}[glob ${worksrcpath}/ext/mysqlnd/*.h] ${destroot}${prefix}/include/${php}/php/ext/mysqlnd
    321321        }
    322322    }
    323    
     323
    324324    # Include the readline extension http://www.php.net/readline directly in
    325325    # the PHP CLI SAPI because until PHP 6 the interactive mode "php -a" won't
    326326    # work with a separately built readline extension.
    subport ${php} { 
    340340    if {![variant_isset readline]} {
    341341        default_variants +libedit
    342342    }
    343    
     343
    344344    if {[vercmp ${branch} 5.5] < 0} {
    345345        notes-append "
    346346PHP ${branch} has reached end-of-life. Please upgrade to PHP 5.5 or newer. The newest stable version is ${php.latest_stable_branch}.
    To learn how to update your code, please read the following guides: 
    352352
    353353"
    354354    }
    355    
     355
    356356    if {[vercmp ${branch} ${php.latest_stable_branch}] > 0} {
    357357        notes-append "${php} @${version}_${revision} is a development preview—do not use it in production!\n\n\n"
    358358    }
    359    
     359
    360360    if {![file exists ${phpinidir}/php.ini]} {
    361361        if {[vercmp ${branch} 5.3] >= 0} {
    362362            notes-append "
    ${phpinidir}/php.ini-recommended. 
    387387"
    388388        }
    389389    }
    390    
     390
    391391    # Enable livecheck for the two most recent stable PHP branches and the development branch.
    392392    if {[vercmp ${branch} [lindex ${php.branches} end-3]] >= 0} {
    393393        livecheck.type      regex
    ${phpinidir}/php.ini-recommended. 
    400400
    401401subport ${php}-apache2handler {
    402402    PortGroup               active_variants 1.1
    403    
     403
    404404    description             ${php} Apache 2 Handler SAPI
    405    
     405
    406406    long_description        ${description}
    407    
     407
    408408    homepage                http://www.php.net/install.unix.apache2
    409    
     409
    410410    depends_lib-append      port:apache2
    411    
     411
    412412    require_active_variants apache2 preforkmpm
    413    
     413
    414414    set apxs ${prefix}/apache2/bin/apxs
    415415    set confdir ${prefix}/apache2/conf
    416416    set moduledir ${prefix}/apache2/modules
    417    
     417
    418418    configure.args-append   --with-apxs2=${apxs}
    419    
     419
    420420    build.target            libs/libphp${major}.bundle
    421    
     421
    422422    destroot.violate_mtree  yes
    423    
     423
    424424    destroot {
    425425        xinstall -m 755 -d ${destroot}${moduledir} ${destroot}${confdir}/extra
    426426        xinstall -m 644 ${worksrcpath}/libs/libphp${major}.so ${destroot}${moduledir}/mod_${php}.so
    427427        xinstall -m 644 ${filespath}/mod_php.conf.in ${destroot}${confdir}/extra/mod_${php}.conf
    428428        reinplace s/@MAJOR@/${major}/g ${destroot}${confdir}/extra/mod_${php}.conf
    429429    }
    430    
     430
    431431    notes-append "
    432432
    433433To enable ${subport}, run:
    To enable ${subport}, run: 
    441441
    442442subport ${php}-cgi {
    443443    description             ${php} CGI SAPI
    444    
     444
    445445    long_description        ${description}
    446    
     446
    447447    homepage                http://www.php.net/install.unix.commandline
    448    
     448
    449449    configure.args-delete   --disable-cgi
    450450    if {[vercmp ${branch} 5.3] >= 0} {
    451451        configure.args-append --enable-cgi
    452452    } else {
    453453        configure.args-append --enable-fastcgi --enable-force-cgi-redirect
    454454    }
    455    
     455
    456456    if {[vercmp ${branch} 5.4] >= 0} {
    457457        build.target        cgi
    458458        destroot.target     install-cgi
    subport ${php}-cgi { 
    461461            xinstall ${worksrcpath}/sapi/cgi/php-cgi ${destroot}${prefix}/bin/php-cgi[php.suffix_from_branch ${branch}]
    462462        }
    463463    }
    464    
     464
    465465}
    466466
    467467### FPM SAPI ###
    subport ${php}-cgi { 
    469469if {[vercmp ${branch} 5.3] >= 0} {
    470470subport ${php}-fpm {
    471471    description             ${php} FPM SAPI
    472    
     472
    473473    long_description        ${description}
    474    
     474
    475475    homepage                http://www.php.net/install.fpm
    476    
     476
    477477    set fpmuser             nobody
    478478    set fpmgroup            nobody
    479    
     479
    480480    patchfiles-append       patch-${php}-sapi-fpm-php-fpm.conf.in.diff
    481    
     481
    482482    post-patch {
    483483        reinplace "s|@PHP@|${php}|g" ${worksrcpath}/sapi/fpm/php-fpm.conf.in
    484484    }
    485    
     485
    486486    configure.args-replace  --disable-fpm --enable-fpm
    487487    configure.args-append   --datadir=${prefix}/share/examples/${php} \
    488488                            --sysconfdir=${phpinidir} \
    489489                            --with-fpm-user=${fpmuser} \
    490490                            --with-fpm-group=${fpmgroup}
    491    
     491
    492492    build.target            fpm
    493    
     493
    494494    destroot.target         install-fpm
    495    
     495
    496496    destroot.keepdirs       ${destroot}${prefix}/var/log/${php} \
    497497                            ${destroot}${prefix}/var/run/${php}
    498    
     498
    499499    post-destroot {
    500500        xinstall -d -o ${fpmuser} -g ${fpmgroup} ${destroot}${prefix}/var/log/${php} ${destroot}${prefix}/var/run/${php}
    501501    }
    502    
     502
    503503    startupitem.create      yes
    504504    startupitem.executable  ${prefix}/sbin/php-fpm[php.suffix_from_branch ${branch}]
    505    
     505
    506506    if {![file exists ${phpinidir}/php-fpm.conf]} {
    507507        notes-append "
    508508
    ${phpinidir}/php-fpm.conf.default. 
    526526subport ${php}-calendar {
    527527    description             a PHP extension for converting between different \
    528528                            calendar formats
    529    
     529
    530530    long_description        ${description}
    531531}
    532532
    533533subport ${php}-curl {
    534534    categories-append       net www
    535    
     535
    536536    description             a PHP interface to the curl library, which lets you \
    537537                            download files from servers with a variety of protocols
    538    
     538
    539539    long_description        ${description}
    540    
     540
    541541    depends_lib-append      port:curl
    542    
     542
    543543    configure.args-append   --with-curl=${prefix}
    544544}
    545545
    546546subport ${php}-dba {
    547547    categories-append       databases
    548    
     548
    549549    description             a PHP interface for accessing DBM databases such as \
    550550                            BerkeleyDB
    551    
     551
    552552    long_description        ${description}
    553    
     553
    554554    variant gdbm conflicts qdbm description {Add GDBM support} {
    555555        depends_lib-append      port:gdbm
    556556        configure.args-append   --with-gdbm=${prefix}
    557557    }
    558    
     558
    559559    variant qdbm conflicts gdbm description {Add QDBM support} {
    560560        depends_lib-append      port:qdbm
    561561        configure.args-append   --with-qdbm=${prefix}
    subport ${php}-dba { 
    565565if {[vercmp ${branch} 5.3] >= 0} {
    566566subport ${php}-enchant {
    567567    categories-append       textproc devel
    568    
     568
    569569    description             a PHP interface to enchant
    570    
     570
    571571    long_description        ${name} is ${description}, a common API for many spell libraries.
    572    
     572
    573573    depends_lib-append      port:enchant
    574    
     574
    575575    configure.args-append   --with-enchant=${prefix}
    576    
     576
    577577    post-destroot {
    578578        set docdir ${prefix}/share/doc/${subport}
    579579        xinstall -d ${destroot}${docdir}
    580580        xinstall -m 644 -W ${destroot.dir} CREDITS ${destroot}${docdir}
    581        
     581
    582582        set examplesdir ${prefix}/share/examples/${subport}
    583583        xinstall -d ${destroot}${examplesdir}
    584584        xinstall -m 644 ${destroot.dir}/docs/examples/example1.php \
    subport ${php}-enchant { 
    589589
    590590subport ${php}-exif {
    591591    categories-append       graphics
    592    
     592
    593593    description             a PHP interface to the EXIF image metadata functions
    594    
     594
    595595    long_description        ${description}
    596596}
    597597
    598598subport ${php}-ftp {
    599599    categories-append       net
    600    
     600
    601601    description             a PHP extension for accessing file servers using the \
    602602                            File Transfer Protocol
    603    
     603
    604604    long_description        ${description}
    605    
     605
    606606    depends_lib-append      path:lib/libssl.dylib:openssl
    607    
     607
    608608    configure.args-append   --with-openssl-dir=${prefix}
    609609}
    610610
    611611subport ${php}-gd {
    612612    categories-append       graphics
    613    
     613
    614614    description             a PHP interface to the gd library
    615    
     615
    616616    long_description        ${description}
    617    
     617
    618618    depends_lib-append      port:freetype \
    619619                            port:jpeg \
    620620                            port:libpng \
    621621                            port:zlib
    622    
     622
    623623    patchfiles-append       patch-${php}-ext-gd-config.m4.diff
    624    
     624
    625625    configure.args-append   --with-freetype-dir=${prefix} \
    626626                            --with-jpeg-dir=${prefix} \
    627627                            --with-png-dir=${prefix} \
    subport ${php}-gd { 
    632632        depends_lib-append  port:webp
    633633        configure.args-append --with-webp-dir=${prefix}
    634634    }
    635    
     635
    636636    if {[vercmp ${branch} 7] < 0} {
    637637    variant t1lib description {Add PostScript Type 1 font support with t1lib} {
    638638        depends_lib-append      port:t1lib
    subport ${php}-gd { 
    643643
    644644subport ${php}-gettext {
    645645    categories-append       devel
    646    
     646
    647647    description             a PHP interface to the gettext natural language \
    648648                            support functions
    649    
     649
    650650    long_description        ${description}
    651    
     651
    652652    depends_lib-append      port:gettext
    653    
     653
    654654    configure.args-append   --with-gettext=${prefix}
    655655}
    656656
    657657subport ${php}-gmp {
    658658    categories-append       devel math
    659    
     659
    660660    description             a PHP interface to GMP, the GNU multiprocessing \
    661661                            library through which you can work with \
    662662                            arbitrary-length integers
    663    
     663
    664664    long_description        ${description}
    665    
     665
    666666    depends_lib-append      port:gmp
    667    
     667
    668668    if {[vercmp ${branch} 5.2] <= 0} {
    669669        patchfiles-append   patch-${php}-ext-gmp-gmp.c.diff
    670670    }
    671    
     671
    672672    configure.args-append   --with-gmp=${prefix}
    673673}
    674674
    675675subport ${php}-iconv {
    676676    categories-append       textproc
    677    
     677
    678678    description             a PHP interface to the libiconv character encoding \
    679679                            conversion functions
    680    
     680
    681681    long_description        ${description}
    682    
     682
    683683    depends_lib-append      port:libiconv
    684    
     684
    685685    configure.args-append   --with-iconv=${prefix}
    686686}
    687687
    688688subport ${php}-imap {
    689689    categories-append       mail
    690    
     690
    691691    description             a PHP interface to the IMAP protocol
    692    
     692
    693693    long_description        ${description}
    694    
     694
    695695    depends_build-append    port:cclient
    696    
     696
    697697    depends_lib-append      port:kerberos5 \
    698698                            port:libcomerr
    699    
     699
    700700    configure.args-append   --with-imap=${prefix} \
    701701                            --with-imap-ssl=${prefix} \
    702702                            --with-kerberos=${prefix}
    subport ${php}-intl { 
    707707    switch -- ${version} {
    708708        5.3.29              {revision 2}
    709709    }
    710    
     710
    711711    categories-append       devel
    712    
     712
    713713    description             internationalization extension for PHP
    714    
     714
    715715    long_description        Internationalization extension implements ICU \
    716716                            library functionality in PHP.
    717    
     717
    718718    depends_lib-append      port:icu
    719719}
    720720}
    721721
    722722subport ${php}-ipc {
    723723    php.extensions          shmop sysvmsg sysvsem sysvshm
    724    
     724
    725725    description             interprocess communication extensions for PHP
    726    
     726
    727727    long_description        PHP extensions for interprocess communication (IPC), including the \
    728728                            shmop, sysvmsg, sysvsem, and sysvshm extensions.
    729729}
    730730
    731731subport ${php}-ldap {
    732732    categories-append       databases
    733    
     733
    734734    description             a PHP interface to LDAP
    735735
    736736    long_description        ${subport} is ${description}, the Lightweight Directory \
    737737                            Access Protocol, which is used to access Directory \
    738738                            Servers.
    739    
     739
    740740    depends_lib-append      port:openldap \
    741741                            port:cyrus-sasl2
    742    
     742
    743743    configure.args-append   --with-ldap=${prefix} \
    744744                            --with-ldap-sasl=${prefix}
    745745}
    746746
    747747subport ${php}-mbstring {
    748748    categories-append       textproc
    749    
     749
    750750    description             a PHP extension for manipulating strings in multibyte \
    751751                            encodings
    752    
     752
    753753    long_description        ${description}
    754754}
    755755
    756756subport ${php}-mcrypt {
    757757    categories-append       security
    758    
     758
    759759    description             a PHP interface to the mcrypt library, which offers \
    760760                            a wide variety of algorithms
    761    
     761
    762762    long_description        ${description}
    763    
     763
    764764    depends_lib-append      port:libmcrypt
    765    
     765
    766766    # The mcrypt extension may be using libtool unnecessarily; monitor
    767767    # https://bugs.php.net/bug.php?id=54500
    768768    depends_lib-append      port:libtool
    769    
     769
    770770    configure.args-append   --with-mcrypt=${prefix}
    771771}
    772772
    773773if {[vercmp ${branch} 7] < 0} {
    774774subport ${php}-mssql {
    775775    php.extensions          mssql pdo_dblib
    776    
     776
    777777    categories-append       databases
    778    
     778
    779779    description             a PHP interface to MSSQL using FreeTDS, including \
    780780                            the mssql and pdo_dblib extensions
    781    
     781
    782782    long_description        ${description}
    783    
     783
    784784    depends_lib-append      port:freetds
    785    
     785
    786786    configure.args-append   --with-mssql=${prefix} \
    787787                            --with-pdo-dblib=${prefix}
    788788}
    subport ${php}-mysql { 
    793793    if {[vercmp ${branch} 7] < 0} {
    794794        php.extensions-prepend mysql
    795795    }
    796    
     796
    797797    categories-append       databases
    798    
     798
    799799    description             a PHP interface to MySQL databases, including the
    800800    if {[vercmp ${branch} 7] < 0} {
    801801        description-append  mysql,
    802802    }
    803803    description-append      mysqli and pdo_mysql extensions
    804    
     804
    805805    long_description        ${description}
    806    
     806
    807807    depends_lib-append      port:zlib
    808    
     808
    809809    configure.args-append   --with-zlib-dir=${prefix}
    810    
     810
    811811    if {[vercmp ${branch} 5.3] >= 0} {
    812812    variant mysqlnd conflicts mysql4 mysql5 mysql51 mysql55 mysql56 mariadb percona description {Use MySQL Native Driver} {
    813813        configure.args-append   --with-mysql=mysqlnd \
    814814                                --with-mysqli=mysqlnd \
    815815                                --with-pdo-mysql=mysqlnd
    816        
     816
    817817        configure.cppflags-append   -I${worksrcpath}
    818        
     818
    819819        set phpini ${prefix}/etc/${php}/php.ini
    820820        notes "
    821821To use mysqlnd with a local MySQL server, edit ${phpini} and set\
    For percona, use ${prefix}/var/run/percona/mysqld.sock 
    831831"
    832832    }
    833833    }
    834    
     834
    835835    variant mysql4 conflicts mysqlnd mysql5 mysql51 mysql55 mysql56 mariadb percona description {Use MySQL 4 libraries} {
    836836        depends_lib-append      port:mysql4
    837        
     837
    838838        configure.args-append   --with-mysql=${prefix} \
    839839                                --with-pdo-mysql=${prefix}
    840840    }
    841    
     841
    842842    variant mysql5 conflicts mysqlnd mysql4 mysql51 mysql55 mysql56 mariadb percona description {Use MySQL 5 libraries} {
    843843        depends_lib-append      path:bin/mysql_config5:mysql5
    844        
     844
    845845        post-extract {
    846846            file mkdir ${workpath}/mysql5
    847847            file link -symbolic ${workpath}/mysql5/lib ${prefix}/lib/mysql5
    848848            file link -symbolic ${workpath}/mysql5/include ${prefix}/include/mysql5
    849849        }
    850        
     850
    851851        configure.args-append   --with-mysql=${workpath}/mysql5 \
    852852                                --with-mysqli=${prefix}/bin/mysql_config5 \
    853853                                --with-pdo-mysql=${prefix}/bin/mysql_config5 \
    854854                                --with-mysql-sock=${prefix}/var/run/mysql5/mysqld.sock
    855855    }
    856    
     856
    857857    variant mysql51 conflicts mysqlnd mysql4 mysql5 mysql55 mysql56 mariadb percona description {Use MySQL 5.1 libraries} {
    858858        depends_lib-append      port:mysql51
    859        
     859
    860860        post-extract {
    861861            file mkdir ${workpath}/mysql51
    862862            file link -symbolic ${workpath}/mysql51/lib ${prefix}/lib/mysql51
    863863            file link -symbolic ${workpath}/mysql51/include ${prefix}/include/mysql51
    864864        }
    865        
     865
    866866        configure.args-append   --with-mysql=${workpath}/mysql51 \
    867867                                --with-mysqli=${prefix}/lib/mysql51/bin/mysql_config \
    868868                                --with-pdo-mysql=${prefix}/lib/mysql51/bin/mysql_config \
    869869                                --with-mysql-sock=${prefix}/var/run/mysql51/mysqld.sock
    870870    }
    871    
     871
    872872    variant mysql55 conflicts mysqlnd mysql4 mysql5 mysql51 mysql56 mariadb percona description {Use MySQL 5.5 libraries} {
    873873        depends_lib-append      port:mysql55
    874        
     874
    875875        post-extract {
    876876            file mkdir ${workpath}/mysql55
    877877            file link -symbolic ${workpath}/mysql55/lib ${prefix}/lib/mysql55
    878878            file link -symbolic ${workpath}/mysql55/include ${prefix}/include/mysql55
    879879        }
    880        
     880
    881881        configure.args-append   --with-mysql=${workpath}/mysql55 \
    882882                                --with-mysqli=${prefix}/lib/mysql55/bin/mysql_config \
    883883                                --with-pdo-mysql=${prefix}/lib/mysql55/bin/mysql_config \
    884884                                --with-mysql-sock=${prefix}/var/run/mysql55/mysqld.sock
    885885    }
    886    
     886
    887887    variant mysql56 conflicts mysqlnd mysql4 mysql5 mysql51 mysql55 mariadb percona description {Use MySQL 5.6 libraries} {
    888888        depends_lib-append      port:mysql56
    889        
     889
    890890        post-extract {
    891891            file mkdir ${workpath}/mysql56
    892892            file link -symbolic ${workpath}/mysql56/lib ${prefix}/lib/mysql56
    893893            file link -symbolic ${workpath}/mysql56/include ${prefix}/include/mysql56
    894894        }
    895        
     895
    896896        configure.args-append   --with-mysql=${workpath}/mysql56 \
    897897                                --with-mysqli=${prefix}/lib/mysql56/bin/mysql_config \
    898898                                --with-pdo-mysql=${prefix}/lib/mysql56/bin/mysql_config \
    899899                                --with-mysql-sock=${prefix}/var/run/mysql56/mysqld.sock
    900900    }
    901    
     901
    902902    variant mariadb conflicts mysqlnd mysql4 mysql5 mysql51 mysql55 mysql56 percona description {Use MariaDB libraries} {
    903903        depends_lib-append      port:mariadb
    904        
     904
    905905        post-extract {
    906906            file mkdir ${workpath}/mariadb
    907907            file link -symbolic ${workpath}/mariadb/lib ${prefix}/lib/mariadb
    908908            file link -symbolic ${workpath}/mariadb/include ${prefix}/include/mariadb
    909909        }
    910        
     910
    911911        configure.args-append   --with-mysql=${workpath}/mariadb \
    912912                                --with-mysqli=${prefix}/lib/mariadb/bin/mysql_config \
    913913                                --with-pdo-mysql=${prefix}/lib/mariadb/bin/mysql_config \
    914914                                --with-mysql-sock=${prefix}/var/run/mariadb/mysqld.sock
    915915    }
    916    
     916
    917917    variant percona conflicts mysqlnd mysql4 mysql5 mysql51 mysql55 mysql56 mariadb description {Use Percona libraries} {
    918918        depends_lib-append      port:percona
    919        
     919
    920920        post-extract {
    921921            file mkdir ${workpath}/percona
    922922            file link -symbolic ${workpath}/percona/lib ${prefix}/lib/percona
    923923            file link -symbolic ${workpath}/percona/include ${prefix}/include/percona
    924924        }
    925        
     925
    926926        configure.args-append   --with-mysql=${workpath}/percona \
    927927                                --with-mysqli=${prefix}/lib/percona/bin/mysql_config \
    928928                                --with-pdo-mysql=${prefix}/lib/percona/bin/mysql_config \
    929929                                --with-mysql-sock=${prefix}/var/run/percona/mysqld.sock
    930930    }
    931    
     931
    932932    if {![variant_isset mysql4] && ![variant_isset mysql5] && ![variant_isset mysql51] && ![variant_isset mysql55] && ![variant_isset mysql56] && ![variant_isset mariadb] && ![variant_isset percona]} {
    933933        if {[vercmp ${branch} 5.3] >= 0} {
    934934            default_variants +mysqlnd
    For percona, use ${prefix}/var/run/percona/mysqld.sock 
    940940
    941941subport ${php}-odbc {
    942942    php.extensions          odbc pdo_odbc
    943    
     943
    944944    categories-append       databases
    945    
     945
    946946    description             a PHP interface for accessing databases via Open \
    947947                            DataBase Connectivity (ODBC)
    948    
     948
    949949    long_description        ${description}
    950    
     950
    951951    variant iodbc conflicts unixodbc description {Use iODBC} {
    952952        depends_lib-append      port:libiodbc
    953        
     953
    954954        patchfiles-append       patch-${php}-iODBC.diff
    955        
     955
    956956        configure.args-append   --with-iODBC=${prefix} \
    957957                                --with-pdo-odbc=iODBC,${prefix}
    958958    }
    959    
     959
    960960    variant unixodbc conflicts iodbc description {Use unixODBC} {
    961961        depends_lib-append      port:unixODBC
    962        
     962
    963963        patchfiles-append       patch-${php}-unixODBC.diff
    964        
     964
    965965        configure.args-append   --with-unixODBC=${prefix} \
    966966                                --with-pdo-odbc=unixODBC,${prefix}
    967967    }
    968    
     968
    969969    if {![variant_isset iodbc] && ![variant_isset unixodbc]} {
    970970        default_variants +unixodbc
    971971    }
    subport ${php}-odbc { 
    974974if {[vercmp ${branch} 5.5] >= 0} {
    975975    subport ${php}-opcache {
    976976        php.extensions.zend opcache
    977        
     977
    978978        description         OPcache improves PHP performance by storing precompiled \
    979979                            script bytecode in shared memory, thereby removing the \
    980980                            need for PHP to load and parse scripts on each request.
    981        
     981
    982982        long_description    ${description}
    983        
     983
    984984        configure.args-append --enable-opcache
    985        
     985
    986986        post-destroot {
    987987            set docdir ${destroot}${prefix}/share/doc/${subport}
    988988            xinstall -d ${docdir}
    if {[vercmp ${branch} 5.5] >= 0} { 
    993993
    994994subport ${php}-openssl {
    995995    categories-append       devel security
    996    
     996
    997997    description             a PHP interface to OpenSSL signature-generation \
    998998                            and -verification and data-encryption and \
    999999                            -decryption functions
    1000    
     1000
    10011001    long_description        ${description}
    1002    
     1002
    10031003    depends_lib-append      port:kerberos5 \
    10041004                            port:libcomerr \
    10051005                            path:lib/libssl.dylib:openssl
    1006    
     1006
    10071007    post-extract {
    10081008        move ${php.build_dirs}/config0.m4 ${php.build_dirs}/config.m4
    10091009    }
    1010    
     1010
    10111011    configure.args-append   --with-kerberos=${prefix} \
    10121012                            --with-openssl=${prefix}
    10131013}
    10141014
    10151015subport ${php}-oracle {
    10161016    php.extensions          oci8 pdo_oci
    1017    
     1017
    10181018    categories-append       databases
    1019    
     1019
    10201020    description             a PHP interface to Oracle, including the oci8 and \
    10211021                            pdo_oci extensions
    1022    
     1022
    10231023    long_description        ${description}
    1024    
     1024
    10251025    depends_lib-append      port:oracle-instantclient
    1026    
     1026
    10271027    if {[vercmp ${branch} 5.2] <= 0} {
    10281028        patchfiles-append   patch-${php}-ext-pdo_oci-config.m4.diff
    10291029    }
    1030    
     1030
    10311031    set lib_dir             ${prefix}/lib/oracle
    10321032    pre-configure {
    10331033        regexp {\.dylib\.(.+)$} [glob -directory ${lib_dir} libclntsh.dylib.*] -> library_version
    subport ${php}-oracle { 
    10391039
    10401040subport ${php}-pcntl {
    10411041    categories-append       sysutils
    1042    
     1042
    10431043    description             a PHP interface to Unix-style process creation, \
    10441044                            program execution, signal handling and process \
    10451045                            termination functions
    1046    
     1046
    10471047    long_description        ${description}
    1048    
     1048
    10491049    notes "
    10501050${subport} should not be enabled within a web server environment.\
    10511051Unexpected results may occur if any process control functions are used within\
    a web server environment. 
    10551055
    10561056subport ${php}-posix {
    10571057    categories-append       sysutils
    1058    
     1058
    10591059    description             a PHP interface to additional POSIX functions
    1060    
     1060
    10611061    long_description        a PHP interface to those functions defined in the \
    10621062                            IEEE 1003.1 (POSIX.1) standards document which are \
    10631063                            not accessible through other means
    subport ${php}-posix { 
    10651065
    10661066subport ${php}-postgresql {
    10671067    php.extensions          pgsql pdo_pgsql
    1068    
     1068
    10691069    categories-append       databases
    1070    
     1070
    10711071    homepage                http://www.php.net/pgsql
    1072    
     1072
    10731073    description             a PHP interface to PostgreSQL, including \
    10741074                            the pgsql and pdo_pgsql extensions
    1075    
     1075
    10761076    long_description        ${description}
    1077    
    1078     variant postgresql82 conflicts postgresql83 postgresql84 postgresql90 postgresql91 postgresql92 postgresql93 postgresql94 description {Use PostgreSQL 8.2 libraries} {
     1077
     1078    variant postgresql82 conflicts postgresql83 postgresql84 postgresql90 postgresql91 postgresql92 postgresql93 postgresql94 postgresql95 description {Use PostgreSQL 8.2 libraries} {
    10791079        depends_lib-append      port:postgresql82
    1080        
     1080
    10811081        configure.args-append   --with-pgsql=${prefix}/lib/postgresql82/bin \
    10821082                                --with-pdo-pgsql=${prefix}/lib/postgresql82/bin
    10831083    }
    1084    
    1085     variant postgresql83 conflicts postgresql82 postgresql84 postgresql90 postgresql91 postgresql92 postgresql93 postgresql94 description {Use PostgreSQL 8.3 libraries} {
     1084
     1085    variant postgresql83 conflicts postgresql82 postgresql84 postgresql90 postgresql91 postgresql92 postgresql93 postgresql94 postgresql95 description {Use PostgreSQL 8.3 libraries} {
    10861086        depends_lib-append      port:postgresql83
    1087        
     1087
    10881088        configure.args-append   --with-pgsql=${prefix}/lib/postgresql83/bin \
    10891089                                --with-pdo-pgsql=${prefix}/lib/postgresql83/bin
    10901090    }
    1091    
    1092     variant postgresql84 conflicts postgresql82 postgresql83 postgresql90 postgresql91 postgresql92 postgresql93 postgresql94 description {Use PostgreSQL 8.4 libraries} {
     1091
     1092    variant postgresql84 conflicts postgresql82 postgresql83 postgresql90 postgresql91 postgresql92 postgresql93 postgresql94 postgresql95 description {Use PostgreSQL 8.4 libraries} {
    10931093        depends_lib-append      port:postgresql84
    1094        
     1094
    10951095        configure.args-append   --with-pgsql=${prefix}/lib/postgresql84/bin \
    10961096                                --with-pdo-pgsql=${prefix}/lib/postgresql84/bin
    10971097    }
    1098    
    1099     variant postgresql90 conflicts postgresql82 postgresql83 postgresql84 postgresql91 postgresql92 postgresql93 postgresql94 description {Use PostgreSQL 9.0 libraries} {
     1098
     1099    variant postgresql90 conflicts postgresql82 postgresql83 postgresql84 postgresql91 postgresql92 postgresql93 postgresql94 postgresql95 description {Use PostgreSQL 9.0 libraries} {
    11001100        depends_lib-append      port:postgresql90
    1101        
     1101
    11021102        configure.args-append   --with-pgsql=${prefix}/lib/postgresql90/bin \
    11031103                                --with-pdo-pgsql=${prefix}/lib/postgresql90/bin
    11041104    }
    1105    
    1106     variant postgresql91 conflicts postgresql82 postgresql83 postgresql84 postgresql90 postgresql92 postgresql93 postgresql94 description {Use PostgreSQL 9.1 libraries} {
     1105
     1106    variant postgresql91 conflicts postgresql82 postgresql83 postgresql84 postgresql90 postgresql92 postgresql93 postgresql94 postgresql95 description {Use PostgreSQL 9.1 libraries} {
    11071107        depends_lib-append      port:postgresql91
    1108        
     1108
    11091109        configure.args-append   --with-pgsql=${prefix}/lib/postgresql91/bin \
    11101110                                --with-pdo-pgsql=${prefix}/lib/postgresql91/bin
    11111111    }
    1112    
    1113     variant postgresql92 conflicts postgresql82 postgresql83 postgresql84 postgresql90 postgresql91 postgresql93 postgresql94 description {Use PostgreSQL 9.2 libraries} {
     1112
     1113    variant postgresql92 conflicts postgresql82 postgresql83 postgresql84 postgresql90 postgresql91 postgresql93 postgresql94 postgresql95 description {Use PostgreSQL 9.2 libraries} {
    11141114        depends_lib-append      port:postgresql92
    1115        
     1115
    11161116        configure.args-append   --with-pgsql=${prefix}/lib/postgresql92/bin \
    11171117                                --with-pdo-pgsql=${prefix}/lib/postgresql92/bin
    11181118    }
    1119    
    1120     variant postgresql93 conflicts postgresql82 postgresql83 postgresql84 postgresql90 postgresql91 postgresql92 postgresql94 description {Use PostgreSQL 9.3 libraries} {
     1119
     1120    variant postgresql93 conflicts postgresql82 postgresql83 postgresql84 postgresql90 postgresql91 postgresql92 postgresql94 postgresql95 description {Use PostgreSQL 9.3 libraries} {
    11211121        depends_lib-append      port:postgresql93
    1122        
     1122
    11231123        configure.args-append   --with-pgsql=${prefix}/lib/postgresql93/bin \
    11241124                                --with-pdo-pgsql=${prefix}/lib/postgresql93/bin
    11251125    }
    1126    
    1127     variant postgresql94 conflicts postgresql82 postgresql83 postgresql84 postgresql90 postgresql91 postgresql92 postgresql93 description {Use PostgreSQL 9.4 libraries} {
     1126
     1127    variant postgresql94 conflicts postgresql82 postgresql83 postgresql84 postgresql90 postgresql91 postgresql92 postgresql93 postgresql95 description {Use PostgreSQL 9.4 libraries} {
    11281128        depends_lib-append      port:postgresql94
    1129        
     1129
    11301130        configure.args-append   --with-pgsql=${prefix}/lib/postgresql94/bin \
    11311131                                --with-pdo-pgsql=${prefix}/lib/postgresql94/bin
    11321132    }
    1133    
    1134     if {![variant_isset postgresql82] && ![variant_isset postgresql83] && ![variant_isset postgresql84] && ![variant_isset postgresql90] && ![variant_isset postgresql91] && ![variant_isset postgresql92] && ![variant_isset postgresql93] && ![variant_isset postgresql94]} {
     1133
     1134    variant postgresql95 conflicts postgresql82 postgresql83 postgresql84 postgresql90 postgresql91 postgresql92 postgresql93 postgresql94 description {Use PostgreSQL 9.5 libraries} {
     1135        depends_lib-append      port:postgresql95
     1136
     1137        configure.args-append   --with-pgsql=${prefix}/lib/postgresql95/bin \
     1138                                --with-pdo-pgsql=${prefix}/lib/postgresql95/bin
     1139    }
     1140
     1141    if {![variant_isset postgresql82] && ![variant_isset postgresql83] && ![variant_isset postgresql84] && ![variant_isset postgresql90] && ![variant_isset postgresql91] && ![variant_isset postgresql92] && ![variant_isset postgresql93] && ![variant_isset postgresql94] && ![variant_isset postgresql95]} {
    11351142        default_variants +postgresql94
    11361143    }
    11371144}
    11381145
    11391146subport ${php}-pspell {
    11401147    categories-append       textproc
    1141    
     1148
    11421149    description             a PHP interface to the aspell library, which lets you \
    11431150                            check spelling and offer spelling suggestions
    1144    
     1151
    11451152    long_description        ${description}
    1146    
     1153
    11471154    depends_lib-append      port:aspell
    1148    
     1155
    11491156    configure.args-append   --with-pspell=${prefix}
    11501157}
    11511158
    11521159subport ${php}-snmp {
    11531160    categories-append       sysutils
    1154    
     1161
    11551162    description             a PHP interface to the Simple Network Management \
    11561163                            Protocol (SNMP)
    1157    
     1164
    11581165    long_description        ${description}
    1159    
     1166
    11601167    depends_lib-append      port:net-snmp
    1161    
     1168
    11621169    configure.args-append   --with-snmp=${prefix}
    11631170}
    11641171
    11651172subport ${php}-soap {
    11661173    categories-append       net
    1167    
     1174
    11681175    description             a PHP extension for writing SOAP clients and servers
    1169    
     1176
    11701177    long_description        ${description}
    1171    
     1178
    11721179    depends_lib-append      port:libxml2
    1173    
     1180
    11741181    configure.args-append   --with-libxml-dir=${prefix}
    11751182}
    11761183
    11771184subport ${php}-sockets {
    11781185    categories-append       net
    1179    
     1186
    11801187    description             a PHP interface to BSD socket communication \
    11811188                            functions
    1182    
     1189
    11831190    long_description        ${description}
    11841191}
    11851192
    11861193if {[vercmp ${branch} 5.3] >= 0} {
    11871194subport ${php}-sqlite {
    11881195    php.extensions          sqlite sqlite3 pdo_sqlite
    1189    
     1196
    11901197    categories-append       databases
    1191    
     1198
    11921199    description             a PHP interface to SQLite, including the sqlite, sqlite3 \
    11931200                            and pdo_sqlite extensions
    1194    
     1201
    11951202    if {[vercmp ${branch} 5.4] >= 0} {
    11961203        php.extensions-delete sqlite
    11971204        description-delete "sqlite,"
    11981205    }
    1199    
     1206
    12001207    long_description        ${description}
    1201    
     1208
    12021209    depends_lib-append      port:sqlite3
    1203    
     1210
    12041211    post-extract {
    12051212        move ${worksrcpath}/ext/sqlite3/config0.m4 ${worksrcpath}/ext/sqlite3/config.m4
    12061213    }
    1207    
     1214
    12081215    configure.args-append   --with-sqlite3=${prefix} \
    12091216                            --with-pdo-sqlite=${prefix} \
    12101217                            --enable-sqlite-utf8
    subport ${php}-tidy { 
    12171224        5.3.29              {revision 2}
    12181225        5.4.45              {revision 1}
    12191226    }
    1220    
     1227
    12211228    categories-append       www
    1222    
     1229
    12231230    description             a PHP interface to tidy, the HTML cleaning and \
    12241231                            repair utility
    1225    
     1232
    12261233    long_description        ${description}
    1227    
     1234
    12281235    depends_lib-append      port:tidy
    1229    
     1236
    12301237    if {[vercmp ${branch} 7.0] <= 0} {
    12311238        patchfiles-append   patch-${php}-ext-tidy-tidy.c.diff
    12321239    }
    1233    
     1240
    12341241    configure.args-append   --with-tidy=${prefix}
    12351242}
    12361243
    12371244subport ${php}-wddx {
    12381245    categories-append       textproc
    1239    
     1246
    12401247    description             a PHP interface to Web Distributed Data Exchange
    1241    
     1248
    12421249    long_description        ${description}
    1243    
     1250
    12441251    depends_build-append    port:expat \
    12451252                            port:libxml2
    1246    
     1253
    12471254    configure.args-append   --with-libexpat-dir=${prefix} \
    12481255                            --with-libxml-dir=${prefix}
    12491256}
    12501257
    12511258subport ${php}-xmlrpc {
    12521259    categories-append       textproc
    1253    
     1260
    12541261    description             a PHP extension for writing XML-RPC clients and servers
    1255    
     1262
    12561263    long_description        ${description}
    1257    
     1264
    12581265    depends_build-append    port:libiconv \
    12591266                            port:libxml2
    1260    
     1267
    12611268    depends_lib-append      port:expat
    1262    
     1269
    12631270    configure.args-append   --with-iconv-dir=${prefix} \
    12641271                            --with-libexpat-dir=${prefix} \
    12651272                            --with-libxml-dir=${prefix}
    1266    
     1273
    12671274    pre-configure {
    12681275        configure.cppflags-append [exec ${prefix}/bin/xml2-config --cflags]
    12691276    }
    subport ${php}-xmlrpc { 
    12711278
    12721279subport ${php}-xsl {
    12731280    categories-append       textproc
    1274    
     1281
    12751282    description             a PHP interface to libxslt, which implements the XSL \
    12761283                            standard and lets you perform XSL transformations
    1277    
     1284
    12781285    long_description        ${description}
    1279    
     1286
    12801287    depends_lib-append      port:libxslt
    1281    
     1288
    12821289    configure.args-append   --with-xsl=${prefix}
    1283    
     1290
    12841291    configure.cppflags-append   -I${prefix}/include/${php}/php/ext/dom
    12851292}
    12861293
    12871294subport ${php}-zip {
    12881295    categories-append       archivers
    1289    
     1296
    12901297    description             PHP zip functions
    1291    
     1298
    12921299    long_description        ${description}
    1293    
     1300
    12941301    depends_lib-append      port:zlib
    1295    
     1302
    12961303    configure.args-append   --with-zlib-dir=${prefix}
    12971304}
    12981305
    proc get_default_php_extensions {} { 
    13331340if {[is_extension_subport]} {
    13341341    default php.extensions {[get_default_php_extensions]}
    13351342    default homepage    http://www.php.net/${php.rootname}
    1336    
     1343
    13371344    php.build_dirs
    13381345    set pdo no
    13391346    foreach extension [concat ${php.extensions} ${php.extensions.zend}] {
    if {[is_extension_subport]} { 
    13451352                ln -s ${worksrcpath}/ext/pdo ${worksrcpath}/ext/${extension}/ext
    13461353            }
    13471354        }
    1348        
     1355
    13491356        # Speed up extraction by extracting only the modules we're going to be building.
    13501357        extract.post_args-append ${worksrcdir}/ext/${extension}
    1351        
     1358
    13521359        # Run phpize, configure, build and destroot in each extension's directory.
    13531360        php.build_dirs-append ${worksrcpath}/ext/${extension}
    13541361    }
    1355    
     1362
    13561363    if {${pdo}} {
    13571364        # The PDO extensions need the PDO headers.
    13581365        extract.post_args-append ${worksrcdir}/ext/pdo
    13591366    }
    1360    
     1367
    13611368    pre-configure {
    13621369        set php_version [exec ${php.config} --version 2>/dev/null]
    13631370        if {${version} ne ${php_version}} {
    if {[is_extension_subport]} { 
    13651372            return -code error "incompatible ${php} installation"
    13661373        }
    13671374    }
    1368    
     1375
    13691376    destroot.target     install-modules install-headers
    1370    
     1377
    13711378    php.add_port_code
    13721379}