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