SymLinks need to be created during install
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? Thanks Susan
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.
Ryan, Thank you - the post-destroot part was what I'm after. Also, thank you for the reference to the 'tk' port - I suspected that there was something out there but there are too many ports to blindly search through when I had no idea what to look for. Susan On 29/9/07 19:05, "Ryan Schmidt" <ryandesign@macports.org> wrote:
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.
participants (2)
-
Ryan Schmidt
-
Susan Mackay