MacPorts, how to run "post-destroot" script

Posted by Potatoswatter on Super User See other posts from Super User or by Potatoswatter
Published on 2012-10-18T05:05:15Z Indexed on 2012/10/18 5:09 UTC
Read the original article Hit count: 515

Filed under:
|
|

I'm trying to install MacPorts gdb; it seems to be poorly supported…

Running "port install" installs it to /opt/local/libexec/gnubin/gdb, but the intent doesn't seem to be to add that to $PATH. The portfile doesn't define any parameters for port select which is typically used to set a MacPorts installation to handle default Unix commands. But it does include these lines:

foreach binary [glob -tails -directory ${destroot}${prefix}/bin g*] {
    ln -s ${prefix}/bin/${binary} ${destroot}${prefix}/libexec/gnubin/[string range $binary 1 end]
}

This is buried under an action labeled post-destroot. destroot is a MacPorts command but post-destroot is not. The script is apparently not run by port install or port activate, or if it's failing it's doing so silently.

Is there a better approach than creating the links manually?

© Super User or respective owner

Related posts about osx

Related posts about macports