Ticket #775: portfile.5.diff

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

bump to 4.3.4, portfile diff

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

    a b  
    22
    33PortSystem 1.0
    44name            php4
    5 version         4.3.2
    6 revision                1
    7 categories      www
     5version         4.3.4   
     6categories      lang www
    87maintainers     bchesneau@mac.com
    98description     PHP: Hypertext Preprocessor
    109long_description        PHP is a widely-used general-purpose scripting language \
    1110                        that is especially suited for Web development and can be \
    1211                        embedded into HTML.
    1312platforms       darwin freebsd
     13
     14master_sites    http://www.php.net/distributions/:release \
     15                http://it.php.net/distributions/:release \
     16                http://fi.php.net/distributions/:release \
     17                http://de.php.net/distributions/:release \
     18                http://gr.php.net/distributions/:release \
     19                http://fr.php.net/distributions/:release \
     20                http://es.php.net/distributions/:release \
     21                http://se.php.net/distributions/:release \
     22                http://downloads.php.net/ilia/:rc \
     23                http://downloads.php.net/jani/:rc
     24               
    1425distname        php-${version}
     26distfiles       ${distname}${extract.sufx}:release
    1527worksrcdir      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
     28checksums       php-4.3.4.tar.gz md5 c0e7f7388fadacbf4948391c6d93dc5e             
     29
     30patchfiles      patch-configure
    1931
    20 depends_lib     lib:libcurl.2:curl \
    21                 lib:libiconv.2:libiconv \
     32depends_lib     lib:libiconv.2:libiconv \
    2233                lib:libexpat.0.4:expat  \
    2334                lib:libintl:gettext \
    24                 lib:libjpeg.9:jpeg \
    25                 lib:libpng3:libpng \
    26                 lib:libmhash:mhash \
    27                 lib:libz.1:zlib
     35                lib:libz.1:zlib \
     36                lib:libtiff.3:tiff
     37
     38
    2839
    29 set imapversion 2002d
    3040                               
    31 configure.env   LDFLAGS=-L${prefix}/lib CPPFLAGS=-I${prefix}/include
    3241
    3342configure.args  --mandir=${prefix}/share/man --infodir=${prefix}/share/info \
    3443                --with-config-file-path=${prefix}/etc --enable-calendar \
    3544                --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 
    41 variant darwin {
     45                --with-zlib --without-mysql --with-gettext=${prefix} \
     46                --with-expat-dir=${prefix} --with-xml --with-xmlrpc --enable-filepro \
     47                --enable-bcmath --enable-trans-sid \
     48                --enable-mbstring --enable-dbx
     49               
     50platform darwin 6 {
    4251        depends_lib-append      lib:libdl.1:dlcompat
     52        configure.env   LDFLAGS=-L${prefix}/lib \
     53                                        CPPFLAGS="-I${prefix}/include -no-cpp-precomp -DBIND_8_COMPAT" \
     54                                        LIBS=-ldl
     55        if { [variant_isset imap] } {
     56                configure.args-append --with-imap-ssl=/usr
     57        }
     58                                       
     59}
     60
     61platform darwin 7 {
     62        configure.env   LDFLAGS="-L${prefix}/lib" \
     63                                        CPPFLAGS="-I${prefix}/include -no-cpp-precomp" \
     64                                        LIBS=-ldl
     65                                       
     66       
    4367}
    4468
     69platform freebsd {
     70        configure.env   LDFLAGS=-L${prefix}/lib \
     71                                        CPPFLAGS="-I${prefix}/include \
     72                                        LIBS=-ldl
     73}
     74
     75
     76variant cli {}
     77
     78
     79
    4580variant 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
     81
     82        if { ! [variant_isset apache_layout] } {
     83                depends_lib-append      path:${prefix}/sbin/apxs:apache
     84                configure.args-append   --with-apxs=${prefix}/sbin/apxs
     85        } else {
     86                configure.args-append   --with-apxs=${prefix}/apache/bin/apxs
     87        }
    4888}
    4989
    5090variant apache2 {
    51         depends_lib-append      path:${prefix}/apache2/bin/apxs:apache2
    52         configure.args-append --with-apxs2=${prefix}/apache2/bin/apxs
     91        depends_lib-append      path:${prefix}/apache2/bin/apxs:apache2
     92        configure.args-append   --with-apxs2=${apache2_path}/bin/apxs
     93}
     94
     95variant crypt {
     96        depends_lib-append      lib:libmhash:mhash \
     97                                lib:libmcrypt:libmcrypt
     98        configure.args-append   --with-mhash=${prefix} --with-mcrypt=${prefix}
     99}       
     100
     101variant curl {
     102        depends_lib-append      lib:libcurl.2:curl
     103        configure.args-append   --with-curl=${prefix}
     104}
     105
     106variant gd {
     107        depends_lib-append      lib:libjpeg.9:jpeg \
     108                                                lib:libpng3:libpng
     109                                               
     110       
     111        configure.args-append   --with-gd \
     112                                --with-jpeg-dir=${prefix} \
     113                                --with-png-dir=${prefix}
    53114}
    54115
    55116variant mysql {
     
    57118        configure.args-append   --with-mysql=${prefix}
    58119}
    59120
     121variant mysql4 {
     122        depends_lib-append      lib:libmysqlclient:mysql4
     123        configure.args-append   --with-mysql=${prefix}
     124}
     125
     126
    60127variant postgresql {
    61         configure.env-append    LDFLAGS=-L${prefix}/lib -L${prefix}/pgsql
    62                                        
    63128        depends_lib-append      lib:plpgsql:postgresql
    64         configure.args-append   --with-pgsql=${prefix}/pgsql
     129        configure.args-append   --with-pgsql=${prefix}
     130}
     131
     132variant ssl {
     133        configure.args-append   --with-openssl
    65134}
    66135
    67136variant 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
     137        depends_lib-append              lib:c-client:cclient
     138        configure.env-append     CFLAGS=-I${prefix}/include/c-client
     139        configure.args-append   --with-imap=${prefix} --with-imap-ssl=/usr
     140}
    72141
    73         extract.only            php-${version}.tar.gz imap-${imapversion}.tar.Z
    74         configure.args-append   --with-imap=../imap-${imapversion} --with-imap-ssl=/usr
     142variant xslt {
     143        depends_lib-append      lib:libsablot:sablotron
     144       
     145        configure.args-append   --enable-xslt --with-xslt-sablot=${prefix} --with-iconv-dir=${prefix}
    75146}
     147 
    76148
    77149pre-configure {
    78         if { [variant_isset imap] } {
    79                 system "cd ${workpath}/imap-${imapversion} && \
    80                                                 make osx SSLTYPE=nopwd"
    81                 system "cd ${workpath}/${worksrcdir}"
     150        if { ![variant_isset cli] } {
     151                configure.args-append   --disable-cli
    82152        }
    83153}
    84154
    85 destroot.args   prefix=${destroot}${prefix}
    86        
     155
     156
     157destroot.args   INSTALL_ROOT=${destroot} PHP_PEAR_INSTALL_DIR=${prefix}/lib/php
     158
     159pre-destroot {
     160        if { [variant_isset cli] } {
     161                if {[variant_isset apache] || [variant_isset apache2]} {
     162                        destroot.target install-cli install-modules install-pear install-build install-headers install-programs
     163                }
     164        } else {
     165                destroot.target install-modules install-pear install-build install-headers install-programs
     166        }
     167}
     168
     169
    87170post-destroot   {
     171
     172        #copy module
     173        if { [variant_isset apache] } {
     174       
     175                if { ! [variant_isset apache_layout] } {
     176                        file mkdir ${destroot}${prefix}/libexec/apache
     177                        system "install -m 755 ${worksrcpath}/libs/libphp4.so ${destroot}${prefix}/libexec/apache/"
     178                        file mkdir ${destroot}${prefix}/etc/apache/extras-conf
     179                        system "install -o root -m 755 -c  ${portpath}/files/mod_php.conf ${destroot}$prefix/etc/apache/extras-conf"
     180                } else {
     181                        file mkdir ${destroot}${prefix}/apache/libexec
     182                        system "install -m 755 ${worksrcpath}/libs/libphp4.so ${destroot}${prefix}/apache/libexec/"
     183                        file mkdir ${destroot}${prefix}/apache/conf/extras-conf
     184                        system "install -o root -m 755 -c  ${portpath}/files/mod_php.conf ${destroot}${prefix}/apache/conf/extras-conf"
     185                }
     186        }
     187       
     188        if { [variant_isset apache2] } {
     189                file mkdir ${destroot}${apache2_path}/modules
     190                system "install -m 755 ${worksrcpath}/libs/libphp4.so ${destroot}${apache_path}/modules/"
     191                file mkdir ${destroot}${apache2_path}/conf/extras-conf
     192                system "install -o root -m 755 -c  ${portpath}/files/mod_php.conf ${destroot}${apache2_path}/conf/extras-conf"
     193        }
     194
     195
     196        #copy php.ini
    88197        file mkdir ${destroot}${prefix}/etc
    89         system "cp ${workpath}/${worksrcdir}/php.ini-dist ${destroot}${prefix}/etc/php.ini"
     198        system "install -m 755 ${workpath}/${worksrcdir}/php.ini-dist ${destroot}${prefix}/etc/php.ini-dist"
     199        system "install -m 755 ${workpath}/${worksrcdir}/php.ini-recommended ${destroot}${prefix}/etc/php.ini-recommended"
     200
    90201}