[49932] trunk/dports/lang
ryandesign at macports.org
ryandesign at macports.org
Mon Apr 20 04:07:45 PDT 2009
Revision: 49932
http://trac.macports.org/changeset/49932
Author: ryandesign at macports.org
Date: 2009-04-20 04:07:45 -0700 (Mon, 20 Apr 2009)
Log Message:
-----------
php4, php5, php5-devel: Improve php.ini message; see #12108
Modified Paths:
--------------
trunk/dports/lang/php4/Portfile
trunk/dports/lang/php5/Portfile
trunk/dports/lang/php5-devel/Portfile
Modified: trunk/dports/lang/php4/Portfile
===================================================================
--- trunk/dports/lang/php4/Portfile 2009-04-20 11:04:24 UTC (rev 49931)
+++ trunk/dports/lang/php4/Portfile 2009-04-20 11:07:45 UTC (rev 49932)
@@ -268,6 +268,8 @@
destroot.target \
install-cli install-pear install-build install-headers install-programs
+set phpinidir ${prefix}/etc
+
post-destroot {
#copy module
if { [variant_isset apache] } {
@@ -294,9 +296,11 @@
file rename ${destroot}${prefix}/etc/php4/pear.conf ${destroot}${prefix}/etc/php4/pear.conf.sample
#copy php.ini
- xinstall -m 755 -d ${destroot}${prefix}/etc
- xinstall -m 755 ${workpath}/${worksrcdir}/php.ini-dist ${destroot}${prefix}/etc/php.ini-dist
- xinstall -m 755 ${workpath}/${worksrcdir}/php.ini-recommended ${destroot}${prefix}/etc/php.ini-recommended
+ xinstall -m 755 -d ${destroot}${phpinidir}
+ xinstall -m 644 -W ${worksrcpath} \
+ php.ini-dist \
+ php.ini-recommended \
+ ${destroot}${phpinidir}
# rename files
file rename ${destroot}${prefix}/bin/pear ${destroot}${prefix}/bin/pear4
@@ -313,26 +317,33 @@
}
post-install {
- ui_msg "\nIf this is your first install, you might want"
+ if {![file exists ${phpinidir}/php.ini]} {
+ ui_msg "To customize php, copy"
+ ui_msg "${phpinidir}/php.ini-dist (if this is a development server) or"
+ ui_msg "${phpinidir}/php.ini-recommended (if this is a production server) to"
+ ui_msg "${phpinidir}/php.ini and then make changes."
+ } else {
+ ui_msg "You may need to update your php.ini for any changes that have been made"
+ ui_msg "in this version of php. Compare ${phpinidir}/php.ini with"
+ ui_msg "${phpinidir}/php.ini-dist (if this is a development server) or"
+ ui_msg "${phpinidir}/php.ini-recommended (if this is a production server)."
+ }
if { [variant_isset apache] } {
ui_msg " * enable php in apache :\n"
ui_msg "cd ${prefix}/libexec/apache"
ui_msg "${prefix}/apache/bin/apxs -a -e -n \"php4\" libphp4.so\n"
- ui_msg "* copy ${prefix}/etc/php.ini-dist to ${prefix}/etc/php.ini"
}
if { [variant_isset apache2] } {
ui_msg "cd ${prefix}/apache2/modules"
ui_msg "${prefix}/apache2/bin/apxs -a -e -n \"php4\" libphp4.so\n"
- ui_msg "* copy ${prefix}/etc/php.ini-dist to ${prefix}/etc/php.ini"
}
if { [variant_isset apache20] } {
ui_msg "cd ${prefix}/apache20/modules"
ui_msg "${prefix}/apache20/bin/apxs -a -e -n \"php4\" libphp4.so\n"
- ui_msg "* copy ${prefix}/etc/php.ini-dist to ${prefix}/etc/php.ini"
}
ui_msg "* copy ${prefix}/etc/php4/pear.conf.sample to ${prefix}/etc/php4/pear.conf"
Modified: trunk/dports/lang/php5/Portfile
===================================================================
--- trunk/dports/lang/php5/Portfile 2009-04-20 11:04:24 UTC (rev 49931)
+++ trunk/dports/lang/php5/Portfile 2009-04-20 11:07:45 UTC (rev 49932)
@@ -381,6 +381,8 @@
destroot.target \
install-cli install-build install-headers install-programs
+set phpinidir ${prefix}/etc
+
post-destroot {
# Copy the Apache 1 module.
if { [variant_isset apache] } {
@@ -438,26 +440,36 @@
#file rename ${destroot}${prefix}/etc/pear.conf ${destroot}${prefix}/etc/pear.conf.sample
# Copy the default php.ini files.
- xinstall -m 755 -d ${destroot}${prefix}/etc
- xinstall -m 755 ${workpath}/${worksrcdir}/php.ini-dist ${destroot}${prefix}/etc/php.ini-dist
- xinstall -m 755 ${workpath}/${worksrcdir}/php.ini-recommended ${destroot}${prefix}/etc/php.ini-recommended
+ xinstall -m 755 -d ${destroot}${phpinidir}
+ xinstall -m 644 -W ${worksrcpath} \
+ php.ini-dist \
+ php.ini-recommended \
+ ${destroot}${phpinidir}
}
post-install {
- ui_msg "\nIf this is your first install, you might want"
+ if {![file exists ${phpinidir}/php.ini]} {
+ ui_msg "To customize php, copy"
+ ui_msg "${phpinidir}/php.ini-dist (if this is a development server) or"
+ ui_msg "${phpinidir}/php.ini-recommended (if this is a production server) to"
+ ui_msg "${phpinidir}/php.ini and then make changes."
+ } else {
+ ui_msg "You may need to update your php.ini for any changes that have been made"
+ ui_msg "in this version of php. Compare ${phpinidir}/php.ini with"
+ ui_msg "${phpinidir}/php.ini-dist (if this is a development server) or"
+ ui_msg "${phpinidir}/php.ini-recommended (if this is a production server)."
+ }
if { [variant_isset apache] } {
ui_msg " * enable php in apache :\n"
ui_msg "cd ${prefix}/libexec/apache"
ui_msg "${prefix}/apache/bin/apxs -a -e -n \"php5\" libphp5.so\n"
- ui_msg "* copy ${prefix}/etc/php.ini-dist to ${prefix}/etc/php.ini"
}
if { [variant_isset apache2] } {
ui_msg "cd ${prefix}/apache2/modules"
ui_msg "${prefix}/apache2/bin/apxs -a -e -n \"php5\" libphp5.so\n"
- ui_msg "* copy ${prefix}/etc/php.ini-dist to ${prefix}/etc/php.ini"
}
#ui_msg "* copy ${prefix}/etc/pear.conf.sample to ${prefix}/etc/pear.conf"
Modified: trunk/dports/lang/php5-devel/Portfile
===================================================================
--- trunk/dports/lang/php5-devel/Portfile 2009-04-20 11:04:24 UTC (rev 49931)
+++ trunk/dports/lang/php5-devel/Portfile 2009-04-20 11:07:45 UTC (rev 49932)
@@ -386,6 +386,8 @@
destroot.target \
install-cli install-build install-headers install-programs
+set phpinidir ${prefix}/etc
+
post-destroot {
# Copy the Apache 1 module.
if { [variant_isset apache] } {
@@ -443,28 +445,36 @@
#file rename ${destroot}${prefix}/etc/pear.conf ${destroot}${prefix}/etc/pear.conf.sample
# Copy the default php.ini files.
- xinstall -m 755 -d ${destroot}${prefix}/etc
+ xinstall -m 755 -d ${destroot}${phpinidir}
xinstall -m 644 -W ${worksrcpath} \
php.ini-development \
php.ini-production \
- ${destroot}${prefix}/etc
+ ${destroot}${phpinidir}
}
post-install {
- ui_msg "\nIf this is your first install, you might want"
+ if {![file exists ${phpinidir}/php.ini]} {
+ ui_msg "To customize php, copy"
+ ui_msg "${phpinidir}/php.ini-development (if this is a development server) or"
+ ui_msg "${phpinidir}/php.ini-production (if this is a production server) to"
+ ui_msg "${phpinidir}/php.ini and then make changes."
+ } else {
+ ui_msg "You may need to update your php.ini for any changes that have been made"
+ ui_msg "in this version of php. Compare ${phpinidir}/php.ini with"
+ ui_msg "${phpinidir}/php.ini-development (if this is a development server) or"
+ ui_msg "${phpinidir}/php.ini-production (if this is a production server)."
+ }
if { [variant_isset apache] } {
ui_msg " * enable php in apache :\n"
ui_msg "cd ${prefix}/libexec/apache"
ui_msg "${prefix}/apache/bin/apxs -a -e -n \"php5\" libphp5.so\n"
- ui_msg "* copy ${prefix}/etc/php.ini-production to ${prefix}/etc/php.ini"
}
if { [variant_isset apache2] } {
ui_msg "cd ${prefix}/apache2/modules"
ui_msg "${prefix}/apache2/bin/apxs -a -e -n \"php5\" libphp5.so\n"
- ui_msg "* copy ${prefix}/etc/php.ini-production to ${prefix}/etc/php.ini"
}
#ui_msg "* copy ${prefix}/etc/pear.conf.sample to ${prefix}/etc/pear.conf"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090420/1759002b/attachment-0001.html>
More information about the macports-changes
mailing list