Ticket #775: portfile-php4-20030829.diff
File portfile-php4-20030829.diff, 6.6 KB (added by bchesneau@…, 21 years ago) |
---|
-
(a) Portfile-orig vs. (b) Portfile
a b 2 2 3 3 PortSystem 1.0 4 4 name php4 5 version 4.3. 25 version 4.3.3 6 6 revision 1 7 categories www7 categories lang www 8 8 maintainers bchesneau@mac.com 9 9 description PHP: Hypertext Preprocessor 10 10 long_description PHP is a widely-used general-purpose scripting language \ … … 15 15 worksrcdir php-${version} 16 16 master_sites http://fr.php.net/distributions/ \ 17 17 http://www.php.net/distributions/ 18 checksums php-4.3.2.tar.gz md5 8433a1d0ce679780990d4813ae094590 19 20 depends_lib lib:libcurl.2:curl \ 21 lib:libiconv.2:libiconv \ 18 checksums php-4.3.3.tar.gz fe3fede4115354155fc6185522f7c6b2 19 depends_lib lib:libiconv.2:libiconv \ 22 20 lib:libexpat.0.4:expat \ 23 21 lib:libintl:gettext \ 24 lib:libjpeg.9:jpeg \25 lib:libpng3:libpng \26 lib:libmhash:mhash \27 22 lib:libz.1:zlib 28 23 29 set imapversion 2002d 30 31 configure.env LDFLAGS=-L${prefix}/lib CPPFLAGS=-I${prefix}/include 24 configure.env LDFLAGS=-L${prefix}/lib \ 25 CPPFLAGS=-I${prefix}/include 26 32 27 33 28 configure.args --mandir=${prefix}/share/man --infodir=${prefix}/share/info \ 34 29 --with-config-file-path=${prefix}/etc --enable-calendar \ 35 30 --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} \ 31 --with-zlib --without-mysql --with-gettext=${prefix} \ 32 --with-expat-dir=${prefix} --with-iconv-dir=${prefix} \ 39 33 --with-xmlrpc --enable-filepro --enable-bcmath 40 34 41 35 variant darwin { 42 36 depends_lib-append lib:libdl.1:dlcompat 43 37 } 44 38 45 variant 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 39 variant cli {} 40 41 pre-configure { 42 if { ![variant_isset cli] } { 43 configure.args-append --disable-cli 44 } 45 46 47 global APACHE_VER 48 if { [file readable ${prefix}/sbin/apxs] } { 49 configure.args-append --with-apxs=${prefix}/sbin/apxs 50 set APACHE_VER "" 51 } elseif { [file readable ${prefix}/apache/bin/apxs] } { 52 configure.args-append --with-apxs=${prefix}/apache/bin/apxs 53 set APACHE_VER "" 54 } elseif { [file readable ${prefix}/include/apache2/apr.h] } { 55 configure.args-append --with-apxs2=${prefix}/sbin/apxs 56 set APACHE_VER "2" 57 } elseif { [file readable ${prefix}/apache2/bin/apxs] } { 58 configure.args-append --with-apxs2=${prefix}/apache2/bin/apxs 59 set APACHE_VER "2" 60 } else { 61 depends_lib-append path:${prefix}/sbin/apxs:apache 62 configure.args-append --with-apxs=${prefix}/sbin/apxs 63 set APACHE_VER "" 64 } 48 65 } 49 66 50 variant apache2 { 51 depends_lib-append path:${prefix}/apache2/bin/apxs:apache2 52 configure.args-append --with-apxs2=${prefix}/apache2/bin/apxs 67 variant crypt { 68 69 depends_lib-append lib:libmhash:mhash \ 70 lib:libmcrypt:libmcrypt 71 configure.args-append --with-mhash=${prefix} --with-mcrypt=${prefix} 72 } 73 74 variant curl { 75 depends_lib-append lib:libcurl.2:curl 76 configure.args-append --with-curl=${prefix} 77 } 78 79 variant gd { 80 depends_lib-append lib:libjpeg.9:jpeg \ 81 lib:libpng3:libpng 82 83 84 configure.args-append --with-gd \ 85 --with-jpeg-dir=${prefix} \ 86 --with-png-dir=${prefix} 53 87 } 54 88 55 89 variant mysql { 56 depends_lib-append lib:libmysqlclient:mysql 90 if { ! [file readable ${prefix}/lib/mysql/libmysqlclient.12.dylib ] } { 91 depends_lib-append lib:libmysql:mysql 92 } 57 93 configure.args-append --with-mysql=${prefix} 58 94 } 59 95 … … 64 100 configure.args-append --with-pgsql=${prefix}/pgsql 65 101 } 66 102 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 72 73 extract.only php-${version}.tar.gz imap-${imapversion}.tar.Z 74 configure.args-append --with-imap=../imap-${imapversion} --with-imap-ssl=/usr 103 variant ssl { 104 configure.args-append --with-openssl=/usr 75 105 } 76 106 77 pre-configure { 78 if { [variant_isset imap] } { 79 system "cd ${workpath}/imap-${imapversion} && \ 80 make osx SSLTYPE=nopwd" 81 system "cd ${workpath}/${worksrcdir}" 107 variant imap { 108 depends_lib-append lib:c-client:cclient 109 configure.env-append CFLAGS=-I${prefix}/include/c-client 110 111 112 if { [variant_isset ssl] } { 113 configure.args-append --with-imap=${prefix} --with-imap-ssl=/usr 114 } else { 115 configure.args-append --with-imap=${prefix} 82 116 } 83 117 } 84 118 85 destroot.args prefix=${destroot}${prefix} 119 variant xslt { 120 depends_lib-append lib:libsablot:sablotron 86 121 122 configure.args-append --enable-xslt --with-xslt-sablot=${prefix} \ 123 --with-iconv-dir=${prefix} --with-expat-dir=${prefix} 124 } 125 126 127 destroot.args INSTALL_ROOT=${destroot} PHP_PEAR_INSTALL_DIR=${prefix}/lib/php 128 129 destroot.target install-cli install-modules install-pear install-build install-headers install-programs 130 87 131 post-destroot { 132 133 #copy module 134 if { [file readable ${prefix}/sbin/apxs] } { 135 file mkdir ${destroot}${prefix}/libexec/apache${APACHE_VER} 136 system "install -m 755 ${worksrcpath}/libs/libphp4.so ${destroot}${prefix}/libexec/apache${APACHE_VER}/" 137 } else { 138 file mkdir ${destroot}${prefix}/apache${APACHE_VER}/libexec 139 system "install -m 755 ${worksrcpath}/libs/libphp4.so ${destroot}${prefix}/apache${APACHE_VER}/libexec/" 140 } 141 142 #copy php.ini 88 143 file mkdir ${destroot}${prefix}/etc 89 system "cp ${workpath}/${worksrcdir}/php.ini-dist ${destroot}${prefix}/etc/php.ini" 144 system "install -m 755 ${workpath}/${worksrcdir}/php.ini-dist ${destroot}${prefix}/etc/php.ini-dist" 145 system "install -m 755 ${workpath}/${worksrcdir}/php.ini-recommended ${destroot}${prefix}/etc/php.ini-recommended" 146 147 if { [file readable ${prefix}/sbin/apxs] } { 148 file mkdir ${destroot}${prefix}/etc/apache${APACHE_VER}/modules.d 149 file mkdir ${destroot}${prefix}/etc/apache${APACHE_VER}/extras-conf 150 system "install -o root -m 755 -c ${portpath}/files/mod_php ${destroot}${prefix}/etc/apache${APACHE_VER}/modules.d" 151 system "install -o root -m 755 -c ${portpath}/files/mod_php.conf ${destroot}${prefix}/etc/apache${APACHE_VER}/extras-conf" 152 } else { 153 file mkdir ${destroot}${prefix}/apache${APACHE_VER}/conf/modules.d 154 file mkdir ${destroot}${prefix}/apache${APACHE_VER}/conf/extras-conf 155 system "install -o root -m 755 -c ${portpath}/files/mod_php ${destroot}${prefix}/apache${APACHE_VER}/conf/modules.d" 156 system "install -o root -m 755 -c ${portpath}/files/mod_php.conf ${destroot}${prefix}/apache${APACHE_VER}/conf/extras-conf" 157 } 90 158 }