Ticket #775: php4-portfile-20031001.diff
File php4-portfile-20031001.diff, 6.5 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.4RC1 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 \ 11 11 that is especially suited for Web development and can be \ 12 12 embedded into HTML. 13 13 platforms darwin freebsd 14 15 master_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 14 26 distname php-${version} 27 distfiles ${distname}${extract.sufx}:rc 15 28 worksrcdir 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 8433a1d0ce679780990d4813ae09459019 29 20 depends_lib lib:libcurl.2:curl \ 21 lib:libiconv.2:libiconv \ 30 31 checksums php-4.3.4RC1.tar.gz 7c137aea5608ec1526b0f98f9c41d791 32 33 patchfiles patch-configure 34 35 depends_lib lib:libiconv.2:libiconv \ 22 36 lib:libexpat.0.4:expat \ 23 37 lib:libintl:gettext \ 24 lib:libjpeg.9:jpeg \25 lib:libpng3:libpng \26 lib:libmhash:mhash \27 38 lib:libz.1:zlib 28 39 29 set imapversion 2002d 40 set apache_path ${prefix}/${name}-${version} 41 set apache2_path ${prefix}/apache2 42 43 configure.env LDFLAGS=-L${prefix}/lib \ 44 CPPFLAGS=-I${prefix}/include \ 45 LIBS=-ldl 30 46 31 configure.env LDFLAGS=-L${prefix}/lib CPPFLAGS=-I${prefix}/include32 47 33 48 configure.args --mandir=${prefix}/share/man --infodir=${prefix}/share/info \ 34 49 --with-config-file-path=${prefix}/etc --enable-calendar \ 35 50 --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 41 54 variant darwin { 42 55 depends_lib-append lib:libdl.1:dlcompat 43 56 } 44 57 58 variant cli {} 59 45 60 variant apache { 46 depends_lib-append path:${ prefix}/apache-1.3.28/sbin/apxs:apache47 configure.args-append --with-apxs=${prefix}/apache-1.3.28/sbin/apxs61 depends_lib-append path:${apache_path}/sbin/apxs:apache 62 configure.args-append --with-apxs=${apache_path}/sbin/apxs 48 63 } 49 64 50 65 variant 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 70 variant crypt { 71 depends_lib-append lib:libmhash:mhash \ 72 lib:libmcrypt:libmcrypt 73 configure.args-append --with-mhash=${prefix} --with-mcrypt=${prefix} 74 } 75 76 variant curl { 77 depends_lib-append lib:libcurl.2:curl 78 configure.args-append --with-curl=${prefix} 79 } 80 81 variant 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} 53 89 } 54 90 55 91 variant mysql { … … 57 93 configure.args-append --with-mysql=${prefix} 58 94 } 59 95 96 variant mysql4 { 97 depends_lib-append lib:libmysqlclient:mysql4 98 configure.args-append --with-mysql=${prefix} 99 } 100 101 60 102 variant postgresql { 61 103 configure.env-append LDFLAGS=-L${prefix}/lib -L${prefix}/pgsql 62 104 … … 64 106 configure.args-append --with-pgsql=${prefix}/pgsql 65 107 } 66 108 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 109 variant ssl { 110 configure.args-append --with-openssl=/usr 111 } 72 112 73 extract.only php-${version}.tar.gz imap-${imapversion}.tar.Z 74 configure.args-append --with-imap=../imap-${imapversion} --with-imap-ssl=/usr 113 variant 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 } 75 123 } 76 124 125 variant xslt { 126 depends_lib-append lib:libsablot:sablotron 127 128 configure.args-append --enable-xslt --with-xslt-sablot=${prefix} 129 } 130 77 131 pre-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 82 134 } 83 135 } 84 136 85 destroot.args prefix=${destroot}${prefix} 86 137 destroot.args INSTALL_ROOT=${destroot} PHP_PEAR_INSTALL_DIR=${prefix}/lib/php 138 139 destroot.target install-cli install-modules install-pear install-build install-headers install-programs 140 87 141 post-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 88 160 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 90 164 }