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