On Sep 7, 2009, at 10:08 AM, Martin Costabel wrote:

> William G. Scott wrote:
>>
>> #!/bin/zsh -f
>> source %p/bin/init.sh
>> PATH=%p/bin:%p/sbin:${PATH} ; export PATH
>> this appears to put everything right, at least in my experiment.
>
> But on 10.6 "gcc" then would still be "/usr/bin/gcc" (which produces  
> 64bit binaries) and not "/usr/bin/gcc -arch i386" as it should. Hard  
> to see how this can work.

Well, with apbs, it just did :)   (I switched it to /bin/bash for good  
measure).

I think switching the second and third lines (setting the $PATH first)  
would probably be better.  I assume source %p/bin/init.sh is doing the  
right thing as it sets VERSIONER_PERL_PREFER_32_BIT to yes.



>
>> Because of zsh's path anti-metastasis feature, I HAD to do this
>
> Are you saying that with zsh, /sw/bin/init.sh does not place Fink's  
> paths in front of PATH?

If the user has any instance of

  typeset -U path

then only the original entry is preserved, as shown in this example.

I've contrived it by putting /sw/bin and /sw/sbin at the end to begin  
with, and then I just print the first five elements of the path array  
for clarity:

sage-% print $path[1,5]
/usr/local/phenix-1.4-4/build/mac-intel-osx/bin /usr/bin /bin /usr/ 
sbin /sbin

sage-% source /sw/bin/init.sh

sage-% print $path[1,5]
/usr/local/phenix-1.4-4/build/mac-intel-osx/bin /usr/bin /bin /usr/ 
sbin /sbin

Now reset the $PATH and $path:

sage-% PATH=/usr/bin:/bin

sage-% print $path[1,5]
/usr/bin /bin

sage-% source /sw/bin/init.sh

sage-% print $path[1,5]
/sw/bin /sw/sbin /usr/bin /bin /usr/X11R6/bin



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fink-devel mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to