SymLinks need to be created during install

Ryan Schmidt ryandesign at macports.org
Sat Sep 29 02:05:03 PDT 2007


On Sep 28, 2007, at 19:03, Susan Mackay wrote:

> In order to get around some library referencing issues, I would  
> like to
> create a symlink in /opt/local/lib that points to where the .dylib  
> file
> actually resides.
>
> What is the necessary command (I know what it is from the terminal  
> once the
> whole thing is activated) and where should I put this in the portfile?


I guess that would be the "ln" command, similar to the terminal ln  
command.

See the "tk" port for an example:

post-destroot {
     ln -s ${prefix}/bin/wish8.4 ${destroot}${prefix}/bin/wish
     ln -s ${prefix}/lib/libtk8.4.dylib ${destroot}${prefix}/lib/ 
libtk.dylib

[snip]

}

The -s means symbolic (as opposed to hard) link.

The first path is the symbolic link's target, where the actual file  
is (or rather will be, after activation) on disk.

The second path is where to create the symlink. You must create this  
inside ${destroot}, probably should be inside ${destroot}${prefix},  
in your case inside ${destroot}${prefix}/lib.




More information about the macports-users mailing list