Ticket #775: portfile.2.diff

File portfile.2.diff, 7.3 KB (added by bchesneau@…, 21 years ago)

patch to update from 4.3.2 version to 4.3.3

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

    a b  
    22
    33PortSystem 1.0
    44name            php4
    5 version         4.3.2
     5version         4.3.3   
    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}:release
    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
     29checksums       php-4.3.3.tar.gz md5 fe3fede4115354155fc6185522f7c6b2               
     30
     31patchfiles      patch-configure
    1932
    20 depends_lib     lib:libcurl.2:curl \
    21                 lib:libiconv.2:libiconv \
     33depends_lib     lib:libiconv.2:libiconv \
    2234                lib:libexpat.0.4:expat  \
    2335                lib:libintl:gettext \
    24                 lib:libjpeg.9:jpeg \
    25                 lib:libpng3:libpng \
    26                 lib:libmhash:mhash \
    2736                lib:libz.1:zlib
    2837
    29 set imapversion 2002d
     38
     39configure.env   LDFLAGS=-L${prefix}/lib \
     40                                CPPFLAGS="-I${prefix}/include -no-cpp-precomp -DBIND_8_COMPAT" \
     41                                LIBS=-ldl
    3042                               
    31 configure.env   LDFLAGS=-L${prefix}/lib CPPFLAGS=-I${prefix}/include
    3243
    3344configure.args  --mandir=${prefix}/share/man --infodir=${prefix}/share/info \
    3445                --with-config-file-path=${prefix}/etc --enable-calendar \
    3546                --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 
     47                --with-zlib --without-mysql --with-gettext=${prefix} \
     48                --with-expat-dir=${prefix} --with-xml --with-xmlrpc --enable-filepro \
     49                --enable-bcmath --enable-trans-sid \
     50                --enable-mbstring --enable-dbx --enable-sockets
     51               
    4152variant darwin {
    4253        depends_lib-append      lib:libdl.1:dlcompat
    4354}
    4455
     56variant cli {}
     57
     58
     59variant apache_layout {
     60        depends_lib-append      path:${prefix}/apache/bin/apxs:apache
     61}
     62
    4563variant 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
     64
     65        if { ! [variant_isset apache_layout] } {
     66                depends_lib-append      path:${prefix}/sbin/apxs:apache
     67                configure.args-append   --with-apxs=${prefix}/sbin/apxs
     68        } else {
     69                configure.args-append   --with-apxs=${prefix}/apache/bin/apxs
     70        }
    4871}
    4972
    5073variant apache2 {
    51         depends_lib-append      path:${prefix}/apache2/bin/apxs:apache2
    52         configure.args-append --with-apxs2=${prefix}/apache2/bin/apxs
     74        depends_lib-append      path:${prefix}/apache2/bin/apxs:apache2
     75        configure.args-append   --with-apxs2=${apache2_path}/bin/apxs
     76}
     77
     78variant crypt {
     79        depends_lib-append      lib:libmhash:mhash \
     80                                lib:libmcrypt:libmcrypt
     81        configure.args-append   --with-mhash=${prefix} --with-mcrypt=${prefix}
     82}       
     83
     84variant curl {
     85        depends_lib-append      lib:libcurl.2:curl
     86        configure.args-append   --with-curl=${prefix}
     87}
     88
     89variant gd {
     90        depends_lib-append      lib:libjpeg.9:jpeg \
     91                                lib:libpng3:libpng
     92                                               
     93       
     94        configure.args-append   --with-gd \
     95                                --with-jpeg-dir=${prefix} \
     96                                --with-png-dir=${prefix}
    5397}
    5498
    5599variant mysql {
     
    57101        configure.args-append   --with-mysql=${prefix}
    58102}
    59103
     104variant mysql4 {
     105        depends_lib-append      lib:libmysqlclient:mysql4
     106        configure.args-append   --with-mysql=${prefix}
     107}
     108
     109
    60110variant postgresql {
    61111        configure.env-append    LDFLAGS=-L${prefix}/lib -L${prefix}/pgsql
    62112                                       
     
    64114        configure.args-append   --with-pgsql=${prefix}/pgsql
    65115}
    66116
    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
     117variant ssl {
     118        configure.args-append   --with-openssl=/usr
     119}
    72120
    73         extract.only            php-${version}.tar.gz imap-${imapversion}.tar.Z
    74         configure.args-append   --with-imap=../imap-${imapversion} --with-imap-ssl=/usr
     121variant imap {
     122        depends_lib-append              lib:c-client:cclient
     123        configure.env-append     CFLAGS=-I${prefix}/include/c-client
     124       
     125               
     126        if { [variant_isset ssl] } {
     127                configure.args-append   --with-imap=${prefix} --with-imap-ssl=${prefix}
     128        } else {
     129                configure.args-append   --with-imap=${prefix}
     130        }
    75131}
    76132
     133variant xslt {
     134        depends_lib-append      lib:libsablot:sablotron
     135       
     136        configure.args-append   --enable-xslt --with-xslt-sablot=${prefix}
     137 }
     138
    77139pre-configure {
    78         if { [variant_isset imap] } {
    79                 system "cd ${workpath}/imap-${imapversion} && \
    80                                                 make osx SSLTYPE=nopwd"
    81                 system "cd ${workpath}/${worksrcdir}"
     140        if { ![variant_isset cli] } {
     141                configure.args-append   --disable-cli
    82142        }
    83143}
    84144
    85 destroot.args   prefix=${destroot}${prefix}
    86        
     145
     146
     147destroot.args   INSTALL_ROOT=${destroot} PHP_PEAR_INSTALL_DIR=${prefix}/lib/php
     148
     149pre-destroot {
     150        if { [variant_isset cli] } {
     151                destroot.target install-cli install-modules install-pear install-build install-headers install-programs
     152        } else {
     153                destroot.target install-modules install-pear install-build install-headers install-programs
     154        }
     155}
     156
     157
    87158post-destroot   {
     159
     160        #copy module
     161        if { [variant_isset apache] } {
     162       
     163                if { ! [variant_isset apache_layout] } {
     164                        file mkdir ${destroot}${prefix}/libexec/apache
     165                        system "install -m 755 ${worksrcpath}/libs/libphp4.so ${destroot}${prefix}/libexec/apache/"
     166                        file mkdir ${destroot}${prefix}/etc/apache/extras-conf
     167                        system "install -o root -m 755 -c  ${portpath}/files/mod_php.conf ${destroot}$prefix/etc/apache/extras-conf"
     168                } else {
     169                        file mkdir ${destroot}${prefix}/apache/libexec
     170                        system "install -m 755 ${worksrcpath}/libs/libphp4.so ${destroot}${prefix}/apache/libexec/"
     171                        file mkdir ${destroot}${prefix}/apache/conf/extras-conf
     172                        system "install -o root -m 755 -c  ${portpath}/files/mod_php.conf ${destroot}${prefix}/apache/conf/extras-conf"
     173                }
     174        }
     175       
     176        if { [variant_isset apache2] } {
     177                file mkdir ${destroot}${apache2_path}/modules
     178                system "install -m 755 ${worksrcpath}/libs/libphp4.so ${destroot}${apache_path}/modules/"
     179                file mkdir ${destroot}${apache2_path}/conf/extras-conf
     180                system "install -o root -m 755 -c  ${portpath}/files/mod_php.conf ${destroot}${apache2_path}/conf/extras-conf"
     181        }
     182
     183
     184        #copy php.ini
    88185        file mkdir ${destroot}${prefix}/etc
    89         system "cp ${workpath}/${worksrcdir}/php.ini-dist ${destroot}${prefix}/etc/php.ini"
     186        system "install -m 755 ${workpath}/${worksrcdir}/php.ini-dist ${destroot}${prefix}/etc/php.ini-dist"
     187        system "install -m 755 ${workpath}/${worksrcdir}/php.ini-recommended ${destroot}${prefix}/etc/php.ini-recommended"
     188
    90189}