perl5.8 fixup

Bradley Giesbrecht brad at pixilla.com
Tue Mar 10 17:04:29 PDT 2009


On Mar 10, 2009, at 1:02 PM, Eric Hall wrote:
>>
>> I think the perl5.8 compile flags alone will fix the man path
>> collisions. The @INC env var looks like a good solution and I favor
>> using a /opt/local/etc/profile mechanism with /opt/local/etc/ 
>> profile.d/
>> perl5.8 and friends.
>>
>> I think a new port name "profile" could be created to make this easy
>> or it could become part of macports. Then perl5.8 could add the /opt/
>> local/etc/profile.d/perl5.8 file.
>>
>
> 	What is the 'profile' idea?  Shell profile, and if
> so what would be in it?

end of ~/.profile:
. /opt/local/etc/profile // source the macports profile



/opt/local/etc/profile:
export PATH=/opt/local/bin:/opt/local/sbin/:$PATH // add PATH env for  
macports base
for file in $(ls /opt/local/etc/profile.d/); do // /opt/local/etc/ 
profile.d contains env vars needed and installed by ports like perl5,  
mysql5 ect....
  . /opt/local/etc/profile.d/$file // source the file
done



/opt/local/etc/profile.d/mysql5:
export PATH=/opt/local/bin/mysql5:$PATH // add PATH env for mysql



/opt/local/etc/profile.d/perl5.8.9:
export PERL5LIB="/opt/local/lib/perl5/vendor_perl/perl5.8.9:/opt/local/ 
perl5/perl5.8.9:$PERL5LIB" // add perl5 module paths



Something like that. So the perl5 port could add this profile.d/ 
perl5.8.9 file and remove it if uninstalled.

With something like this adding another os user and setting up their  
env would be just adding the sourcing of /opt/local/etc/profile to the  
~/.profile.


//Brad

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20090310/c983638f/attachment-0001.html>


More information about the macports-dev mailing list