Ticket #775: portfile_php-4.3.4.diff
File portfile_php-4.3.4.diff, 7.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.4 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}:release 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 8433a1d0ce679780990d4813ae094590 29 checksums php-4.3.4.tar.gz md5 c0e7f7388fadacbf4948391c6d93dc5e 30 31 patchfiles patch-configure 19 32 20 depends_lib lib:libcurl.2:curl \ 21 lib:libiconv.2:libiconv \ 33 depends_lib lib:libiconv.2:libiconv \ 22 34 lib:libexpat.0.4:expat \ 23 35 lib:libintl:gettext \ 24 lib:libjpeg.9:jpeg \25 lib:libpng3:libpng \26 lib:libmhash:mhash \27 36 lib:libz.1:zlib 28 37 29 set imapversion 2002d 38 39 30 40 31 configure.env LDFLAGS=-L${prefix}/lib CPPFLAGS=-I${prefix}/include32 41 33 42 configure.args --mandir=${prefix}/share/man --infodir=${prefix}/share/info \ 34 43 --with-config-file-path=${prefix}/etc --enable-calendar \ 35 44 --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-bcmath40 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 50 platform darwin 6 { 42 51 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 } 56 57 platform darwin 7 { 58 configure.env LDFLAGS=-L${prefix}/lib \ 59 CPPFLAGS="-I${prefix}/include -no-cpp-precomp -DBIND_8_COMPAT" \ 60 LIBS=-ldl 61 } 62 63 platform freebsd { 64 configure.env LDFLAGS=-L${prefix}/lib \ 65 CPPFLAGS="-I${prefix}/include \ 66 LIBS=-ldl 67 } 68 69 70 variant cli {} 71 72 73 variant apache_layout { 74 depends_lib-append path:${prefix}/apache/bin/apxs:apache 43 75 } 44 76 45 77 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 78 79 if { ! [variant_isset apache_layout] } { 80 depends_lib-append path:${prefix}/sbin/apxs:apache 81 configure.args-append --with-apxs=${prefix}/sbin/apxs 82 } else { 83 configure.args-append --with-apxs=${prefix}/apache/bin/apxs 84 } 48 85 } 49 86 50 87 variant apache2 { 51 depends_lib-append path:${prefix}/apache2/bin/apxs:apache2 52 configure.args-append --with-apxs2=${prefix}/apache2/bin/apxs 88 depends_lib-append path:${prefix}/apache2/bin/apxs:apache2 89 configure.args-append --with-apxs2=${apache2_path}/bin/apxs 90 } 91 92 variant crypt { 93 depends_lib-append lib:libmhash:mhash \ 94 lib:libmcrypt:libmcrypt 95 configure.args-append --with-mhash=${prefix} --with-mcrypt=${prefix} 96 } 97 98 variant curl { 99 depends_lib-append lib:libcurl.2:curl 100 configure.args-append --with-curl=${prefix} 101 } 102 103 variant gd { 104 depends_lib-append lib:libjpeg.9:jpeg \ 105 lib:libpng3:libpng 106 107 108 configure.args-append --with-gd \ 109 --with-jpeg-dir=${prefix} \ 110 --with-png-dir=${prefix} 53 111 } 54 112 55 113 variant mysql { … … 57 115 configure.args-append --with-mysql=${prefix} 58 116 } 59 117 118 variant mysql4 { 119 depends_lib-append lib:libmysqlclient:mysql4 120 configure.args-append --with-mysql=${prefix} 121 } 122 123 60 124 variant postgresql { 61 125 configure.env-append LDFLAGS=-L${prefix}/lib -L${prefix}/pgsql 62 126 … … 64 128 configure.args-append --with-pgsql=${prefix}/pgsql 65 129 } 66 130 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 131 variant ssl { 132 configure.args-append --with-openssl 133 } 72 134 73 extract.only php-${version}.tar.gz imap-${imapversion}.tar.Z 74 configure.args-append --with-imap=../imap-${imapversion} --with-imap-ssl=/usr 135 variant imap { 136 depends_lib-append lib:c-client:cclient 137 configure.env-append CFLAGS=-I${prefix}/include/c-client 138 139 140 if { [variant_isset ssl] } { 141 configure.args-append --with-imap=${prefix} --with-imap-ssl=${prefix} 142 } else { 143 configure.args-append --with-imap=${prefix} 144 } 75 145 } 76 146 147 variant xslt { 148 depends_lib-append lib:libsablot:sablotron 149 150 configure.args-append --enable-xslt --with-xslt-sablot=${prefix} 151 } 152 77 153 pre-configure { 78 if { [variant_isset imap] } { 79 system "cd ${workpath}/imap-${imapversion} && \ 80 make osx SSLTYPE=nopwd" 81 system "cd ${workpath}/${worksrcdir}" 154 if { ![variant_isset cli] } { 155 configure.args-append --disable-cli 82 156 } 83 157 } 84 158 85 destroot.args prefix=${destroot}${prefix} 86 159 160 161 destroot.args INSTALL_ROOT=${destroot} PHP_PEAR_INSTALL_DIR=${prefix}/lib/php 162 163 pre-destroot { 164 if { [variant_isset cli] } { 165 destroot.target install-cli install-modules install-pear install-build install-headers install-programs 166 } else { 167 destroot.target install-modules install-pear install-build install-headers install-programs 168 } 169 } 170 171 87 172 post-destroot { 173 174 #copy module 175 if { [variant_isset apache] } { 176 177 if { ! [variant_isset apache_layout] } { 178 file mkdir ${destroot}${prefix}/libexec/apache 179 system "install -m 755 ${worksrcpath}/libs/libphp4.so ${destroot}${prefix}/libexec/apache/" 180 file mkdir ${destroot}${prefix}/etc/apache/extras-conf 181 system "install -o root -m 755 -c ${portpath}/files/mod_php.conf ${destroot}$prefix/etc/apache/extras-conf" 182 } else { 183 file mkdir ${destroot}${prefix}/apache/libexec 184 system "install -m 755 ${worksrcpath}/libs/libphp4.so ${destroot}${prefix}/apache/libexec/" 185 file mkdir ${destroot}${prefix}/apache/conf/extras-conf 186 system "install -o root -m 755 -c ${portpath}/files/mod_php.conf ${destroot}${prefix}/apache/conf/extras-conf" 187 } 188 } 189 190 if { [variant_isset apache2] } { 191 file mkdir ${destroot}${apache2_path}/modules 192 system "install -m 755 ${worksrcpath}/libs/libphp4.so ${destroot}${apache_path}/modules/" 193 file mkdir ${destroot}${apache2_path}/conf/extras-conf 194 system "install -o root -m 755 -c ${portpath}/files/mod_php.conf ${destroot}${apache2_path}/conf/extras-conf" 195 } 196 197 198 #copy php.ini 88 199 file mkdir ${destroot}${prefix}/etc 89 system "cp ${workpath}/${worksrcdir}/php.ini-dist ${destroot}${prefix}/etc/php.ini" 200 system "install -m 755 ${workpath}/${worksrcdir}/php.ini-dist ${destroot}${prefix}/etc/php.ini-dist" 201 system "install -m 755 ${workpath}/${worksrcdir}/php.ini-recommended ${destroot}${prefix}/etc/php.ini-recommended" 202 90 203 }