Ticket #775: php4-portfile-20031001.diff

File php4-portfile-20031001.diff, 6.5 KB (added by bchesneau@…, 21 years ago)

Patch portfile in cvs

  • (a) Portfile-orig vs. (b) Portfile

    a b  
    22
    33PortSystem 1.0
    44name            php4
    5 version         4.3.2
     5version         4.3.4RC1       
    66revision                1
    7 categories      www
     7categories      lang www
    88maintainers     bchesneau@mac.com
    99description     PHP: Hypertext Preprocessor
    1010long_description        PHP is a widely-used general-purpose scripting language \
    1111                        that is especially suited for Web development and can be \
    1212                        embedded into HTML.
    1313platforms       darwin freebsd
     14
     15master_sites    http://www.php.net/distributions/:release \
     16                http://it.php.net/distributions/:release \
     17                http://fi.php.net/distributions/:release \
     18                http://de.php.net/distributions/:release \
     19                http://gr.php.net/distributions/:release \
     20                http://fr.php.net/distributions/:release \
     21                http://es.php.net/distributions/:release \
     22                http://se.php.net/distributions/:release \
     23                http://downloads.php.net/ilia/:rc \
     24                http://downloads.php.net/jani/:rc
     25               
    1426distname        php-${version}
     27distfiles       ${distname}${extract.sufx}:rc
    1528worksrcdir      php-${version}
    16 master_sites    http://fr.php.net/distributions/ \
    17                 http://www.php.net/distributions/
    18 checksums       php-4.3.2.tar.gz md5 8433a1d0ce679780990d4813ae094590
    1929
    20 depends_lib     lib:libcurl.2:curl \
    21                 lib:libiconv.2:libiconv \
     30               
     31checksums       php-4.3.4RC1.tar.gz 7c137aea5608ec1526b0f98f9c41d791
     32
     33patchfiles      patch-configure
     34
     35depends_lib     lib:libiconv.2:libiconv \
    2236                lib:libexpat.0.4:expat  \
    2337                lib:libintl:gettext \
    24                 lib:libjpeg.9:jpeg \
    25                 lib:libpng3:libpng \
    26                 lib:libmhash:mhash \
    2738                lib:libz.1:zlib
    2839
    29 set imapversion 2002d
     40set apache_path ${prefix}/${name}-${version}
     41set apache2_path ${prefix}/apache2
     42
     43configure.env   LDFLAGS=-L${prefix}/lib \
     44                                CPPFLAGS=-I${prefix}/include \
     45                                LIBS=-ldl
    3046                               
    31 configure.env   LDFLAGS=-L${prefix}/lib CPPFLAGS=-I${prefix}/include
    3247
    3348configure.args  --mandir=${prefix}/share/man --infodir=${prefix}/share/info \
    3449                --with-config-file-path=${prefix}/etc --enable-calendar \
    3550                --with-iconv=${prefix} --enable-exif --enable-ftp --enable-wddx\
    36                 --with-zlib --with-curl=${prefix} --with-gd --with-jpeg-dir=${prefix} \
    37                 --with-png-dir=${prefix} --without-mysql --with-gettext=${prefix} \
    38                 --with-mhash=${prefix} --with-expat-dir=${prefix} --with-iconv-dir=${prefix} \
    39                 --with-xmlrpc --enable-filepro --enable-bcmath
    40 
     51                --with-zlib --without-mysql --with-gettext=${prefix} \
     52                --with-expat-dir=${prefix} --with-xml --with-xmlrpc --enable-filepro --enable-bcmath
     53               
    4154variant darwin {
    4255        depends_lib-append      lib:libdl.1:dlcompat
    4356}
    4457
     58variant cli {}
     59
    4560variant apache {
    46         depends_lib-append      path:${prefix}/apache-1.3.28/sbin/apxs:apache
    47         configure.args-append --with-apxs=${prefix}/apache-1.3.28/sbin/apxs
     61        depends_lib-append      path:${apache_path}/sbin/apxs:apache
     62        configure.args-append   --with-apxs=${apache_path}/sbin/apxs
    4863}
    4964
    5065variant apache2 {
    51         depends_lib-append      path:${prefix}/apache2/bin/apxs:apache2
    52         configure.args-append --with-apxs2=${prefix}/apache2/bin/apxs
     66        depends_lib-append      path:${apache2_path}/bin/apxs:apache2
     67        configure.args-append   --with-apxs2=${apache2_path}/bin/apxs
     68}
     69
     70variant crypt {
     71        depends_lib-append      lib:libmhash:mhash \
     72                                lib:libmcrypt:libmcrypt
     73        configure.args-append   --with-mhash=${prefix} --with-mcrypt=${prefix}
     74}       
     75
     76variant curl {
     77        depends_lib-append      lib:libcurl.2:curl
     78        configure.args-append   --with-curl=${prefix}
     79}
     80
     81variant gd {
     82        depends_lib-append      lib:libjpeg.9:jpeg \
     83                                lib:libpng3:libpng
     84                                               
     85       
     86        configure.args-append   --with-gd \
     87                                --with-jpeg-dir=${prefix} \
     88                                --with-png-dir=${prefix}
    5389}
    5490
    5591variant mysql {
     
    5793        configure.args-append   --with-mysql=${prefix}
    5894}
    5995
     96variant mysql4 {
     97        depends_lib-append      lib:libmysqlclient:mysql4
     98        configure.args-append   --with-mysql=${prefix}
     99}
     100
     101
    60102variant postgresql {
    61103        configure.env-append    LDFLAGS=-L${prefix}/lib -L${prefix}/pgsql
    62104                                       
     
    64106        configure.args-append   --with-pgsql=${prefix}/pgsql
    65107}
    66108
    67 variant imap {
    68         master_sites-append     ftp://ftp.cac.washington.edu/imap/:imap\
    69                                 http://distfiles.opendarwin.org/:imap
    70         distfiles-append        imap-${imapversion}.tar.Z:imap
    71         checksums-append        imap-2002d.tar.Z md5 64e82a195d21481fc4c54c4ed9fe0527
     109variant ssl {
     110        configure.args-append   --with-openssl=/usr
     111}
    72112
    73         extract.only            php-${version}.tar.gz imap-${imapversion}.tar.Z
    74         configure.args-append   --with-imap=../imap-${imapversion} --with-imap-ssl=/usr
     113variant imap {
     114        depends_lib-append              lib:c-client:cclient
     115        configure.env-append     CFLAGS=-I${prefix}/include/c-client
     116       
     117               
     118        if { [variant_isset ssl] } {
     119                configure.args-append   --with-imap=${prefix} --with-imap-ssl=/usr
     120        } else {
     121                configure.args-append   --with-imap=${prefix}
     122        }
    75123}
    76124
     125variant xslt {
     126        depends_lib-append      lib:libsablot:sablotron
     127       
     128        configure.args-append   --enable-xslt --with-xslt-sablot=${prefix}
     129 }
     130
    77131pre-configure {
    78         if { [variant_isset imap] } {
    79                 system "cd ${workpath}/imap-${imapversion} && \
    80                                                 make osx SSLTYPE=nopwd"
    81                 system "cd ${workpath}/${worksrcdir}"
     132        if { ![variant_isset cli] } {
     133                configure.args-append   --disable-cli
    82134        }
    83135}
    84136
    85 destroot.args   prefix=${destroot}${prefix}
    86        
     137destroot.args   INSTALL_ROOT=${destroot} PHP_PEAR_INSTALL_DIR=${prefix}/lib/php
     138
     139destroot.target install-cli install-modules install-pear install-build install-headers install-programs
     140
    87141post-destroot   {
     142
     143        #copy module
     144        if { [variant_isset apache] } {
     145                file mkdir ${destroot}${apache_path}/libexec/apache
     146                system "install -m 755 ${worksrcpath}/libs/libphp4.so ${destroot}${apache_path}/libexec/apache/"
     147                file mkdir ${destroot}${apache_path}/etc/apache/extras-conf
     148                system "install -o root -m 755 -c  ${portpath}/files/mod_php.conf ${destroot}${apache_path}/etc/apache/extras-conf"
     149        }
     150       
     151        if { [variant_isset apache2] } {
     152                file mkdir ${destroot}${apache2_path}/libexec/apache2
     153                system "install -m 755 ${worksrcpath}/libs/libphp4.so ${destroot}${apache_path}/libexec/apache/"
     154                file mkdir ${destroot}${apache2_path}/etc/apache/extras-conf
     155                system "install -o root -m 755 -c  ${portpath}/files/mod_php.conf ${destroot}${apache2_path}/etc/apache/extras-conf"
     156        }
     157
     158
     159        #copy php.ini
    88160        file mkdir ${destroot}${prefix}/etc
    89         system "cp ${workpath}/${worksrcdir}/php.ini-dist ${destroot}${prefix}/etc/php.ini"
     161        system "install -m 755 ${workpath}/${worksrcdir}/php.ini-dist ${destroot}${prefix}/etc/php.ini-dist"
     162        system "install -m 755 ${workpath}/${worksrcdir}/php.ini-recommended ${destroot}${prefix}/etc/php.ini-recommended"
     163
    90164}