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

Bradley Giesbrecht pixilla at macports.org
Wed Nov 16 17:20:50 PST 2011


On Nov 16, 2011, at 4:50 PM, Ryan Schmidt wrote:

> 
> On Nov 16, 2011, at 16:58, pixilla at macports.org wrote:
> 
>> Revision: 87311
>>         http://trac.macports.org/changeset/87311
>> +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.

Thanks.

>>    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

Thanks, an old habit I'll try to break.

Regards,
Bradley Giesbrecht (pixilla)


More information about the macports-dev mailing list