[87311] trunk/dports/php/php5-pear/Portfile

Ryan Schmidt ryandesign at macports.org
Wed Nov 16 16:50:09 PST 2011


On Nov 16, 2011, at 16:58, pixilla at macports.org wrote:

> Revision: 87311
>          http://trac.macports.org/changeset/87311
> Author:   pixilla at macports.org
> Date:     2011-11-16 14:58:24 -0800 (Wed, 16 Nov 2011)
> Log Message:
> -----------
> php/php5-pear:
> - Do not install resident pear command.
> - Install install-pear-nozlib.phar to be used by php5pear PortGroup ports
>  to install their pear packages.
> 
> Modified Paths:
> --------------
>    trunk/dports/php/php5-pear/Portfile
> 
> Modified: trunk/dports/php/php5-pear/Portfile
> ===================================================================
> --- trunk/dports/php/php5-pear/Portfile	2011-11-16 22:54:37 UTC (rev 87310)
> +++ trunk/dports/php/php5-pear/Portfile	2011-11-16 22:58:24 UTC (rev 87311)
> @@ -23,87 +23,37 @@
>                     sha256  06757ae34c93d4aad8a3abc63958106ca11bb1a9a5f85e7e013d70077e4aafa1
> 
> set buildpath       ${worksrcpath}/build
> -set instpath        ${buildpath}/libexec/php
> -set pearpath        ${prefix}/libexec/php
> -set systemtmp       /private/tmp/pear
> +set libpath         /lib/php/pear
> +set dbpath          /var/db/php5
> 
> extract.mkdir       yes
> extract {
> -    file copy ${distpath}/install-pear-nozlib.phar ${worksrcpath}
> +    xinstall -d ${buildpath}/${libpath}
> +    file copy ${distpath}/install-pear-nozlib.phar ${buildpath}/${libpath}

You've got doubled slashes everywhere you're using libpath or dbpath. Either libpath and dbpath should not be declared with a leading slash, or you should not put a slash every time before you reference libpath or dbpath.


>     puts $fp "<?php"
>     puts $fp "# Automatically add the PEAR repository path to PHP's include_path."
>     puts $fp "set_include_path ( get_include_path (  ) . PATH_SEPARATOR . '${prefix}/lib/php/pear' ) ;"
>     puts $fp "?>"
>     close $fp

You may want to omit the trailing "?>". It's not necessary. Having it there isn't harmful in this case (unless a user edits the file badly) but many projects, including Zend Framework, by Zend, the makers of PHP, have coding standards that say you shouldn't use them, and omitting them is a habit I've gotten into.

http://framework.zend.com/manual/en/coding-standard.php-file-formatting.html





More information about the macports-dev mailing list