Ticket #775: portfile.7.diff
File portfile.7.diff, 8.4 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.2 6 revision 1 7 categories www 5 version 4.3.4 6 categories lang www 8 7 maintainers bchesneau@mac.com 9 8 description PHP: Hypertext Preprocessor 10 9 long_description PHP is a widely-used general-purpose scripting language \ 11 10 that is especially suited for Web development and can be \ 12 11 embedded into HTML. 13 12 platforms darwin freebsd 13 14 master_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 14 25 distname php-${version} 26 distfiles ${distname}.tar.gz:release 15 27 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 28 checksums ${distname}.tar.gz md5 c0e7f7388fadacbf4948391c6d93dc5e 29 30 patchfiles patch-configure 19 31 20 depends_lib lib:libcurl.2:curl \ 21 lib:libiconv.2:libiconv \ 32 depends_lib lib:libiconv.2:libiconv \ 22 33 lib:libexpat.0.4:expat \ 23 34 lib:libintl:gettext \ 24 lib:lib jpeg.9:jpeg\25 lib:lib png3:libpng \26 lib:libmhash:mhash \ 27 lib:libz.1:zlib 35 lib:libz.1:zlib \ 36 lib:libtiff.3:tiff 37 38 28 39 29 set imapversion 2002d30 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 58 platform darwin 7 { 59 configure.env LDFLAGS="-L${prefix}/lib" \ 60 CPPFLAGS="-I${prefix}/include -no-cpp-precomp" \ 61 LIBS=-ldl 62 63 64 } 65 66 platform freebsd { 67 configure.env LDFLAGS=-L${prefix}/lib \ 68 CPPFLAGS="-I${prefix}/include 69 } 70 71 72 variant cli {} 73 74 variant apache_layout { 75 depends_lib-append path:${prefix}/apache/bin/apxs 43 76 } 77 78 44 79 45 80 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 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 } 48 88 } 49 89 50 90 variant 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 95 variant crypt { 96 depends_lib-append lib:libmhash:mhash \ 97 lib:libmcrypt:libmcrypt 98 configure.args-append --with-mhash=${prefix} --with-mcrypt=${prefix} 99 } 100 101 variant curl { 102 depends_lib-append lib:libcurl.2:curl 103 configure.args-append --with-curl=${prefix} 104 } 105 106 variant 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} 53 114 } 54 115 55 116 variant mysql { … … 57 118 configure.args-append --with-mysql=${prefix} 58 119 } 59 120 121 variant mysql4 { 122 depends_lib-append lib:libmysqlclient:mysql4 123 configure.args-append --with-mysql=${prefix} 124 } 125 126 60 127 variant postgresql { 61 configure.env-append LDFLAGS=-L${prefix}/lib -L${prefix}/pgsql62 63 128 depends_lib-append lib:plpgsql:postgresql 64 configure.args-append --with-pgsql=${prefix}/pgsql 129 configure.args-append --with-pgsql=${prefix} 130 } 131 132 variant ssl { 133 configure.args-append --with-openssl 65 134 } 66 135 67 136 variant imap { 68 master_sites-append ftp://ftp.cac.washington.edu/imap/:imap\69 http://distfiles.opendarwin.org/:imap70 distfiles-append imap-${imapversion}.tar.Z:imap71 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 } 72 141 73 extract.only php-${version}.tar.gz imap-${imapversion}.tar.Z 74 configure.args-append --with-imap=../imap-${imapversion} --with-imap-ssl=/usr 142 variant xslt { 143 depends_lib-append lib:libsablot:sablotron 144 145 configure.args-append --enable-xslt --with-xslt-sablot=${prefix} --with-iconv-dir=${prefix} 75 146 } 147 76 148 77 149 pre-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 --without-pear 82 152 } 83 153 } 84 154 85 destroot.args prefix=${destroot}${prefix} 86 155 156 157 destroot.args INSTALL_ROOT=${destroot} PHP_PEAR_INSTALL_DIR=${prefix}/lib/php 158 159 pre-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-build install-headers install-programs 166 } 167 } 168 169 87 170 post-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 if { [variant_isset cli] } { 196 system "mv ${destroot}${prefix}/etc/pear.conf ${destroot}${prefix}/etc/pear.conf.sample" 197 } 198 199 200 #copy php.ini 88 201 file mkdir ${destroot}${prefix}/etc 89 system "cp ${workpath}/${worksrcdir}/php.ini-dist ${destroot}${prefix}/etc/php.ini" 202 system "install -m 755 ${workpath}/${worksrcdir}/php.ini-dist ${destroot}${prefix}/etc/php.ini-dist" 203 system "install -m 755 ${workpath}/${worksrcdir}/php.ini-recommended ${destroot}${prefix}/etc/php.ini-recommended" 204 205 206 207 } 208 209 post-install { 210 ui_msg "\nIf this your first install, you might want" 211 212 if { [variant_isset apache] } { 213 ui_msg " * enable php in apache :\n" 214 215 if { [variant_isset apache_layout] } { 216 ui_msg "cd ${prefix}/apache/libexec" 217 } else { 218 ui_msg "cd ${prefix}/libexec/apache" 219 } 220 221 ui_msg "apxs -a -e -n \"php4\" libphp4.so\n" 222 ui_msg "* copy /etc/php.ini-dist to /etc/php.ini" 223 } 224 225 if { [variant_isset apache2] } { 226 ui_msg "cd ${prefix}/apache2/libs" 227 ui_msg "apxs -a -e -n \"php4\" libphp4.so\n" 228 ui_msg "* copy /etc/php.ini-dist to /etc/php.ini" 229 } 230 231 ui_msg "* copy /etc/pear.conf.sample to /etc/pear.conf" 232 233 234 90 235 }