R: Overwrite rpath of linked shared library in osx

Overwrite shpkg {pbdZMQ} | R Documentation

## Overwrite rpath of linked shared library in osx

### Description

Overwrite rpath of linked shared library (e.g. `JuniperKernel/libs/JuniperKernel.so` in osx only. Typically, it is called by `.onLoad()` to update rpath if `pbdZMQ` or `pbdZMQ/libs/libzmq.*.dylib` was moved to a personal directory (e.g. the binary package was installed to a none default path). The commands `otool` and `install_name_tool` are required. Permission may be needed (e.g. `sudo`) to overwrite the shared library.

### Usage

    overwrite.shpkg.rpath(mylib = NULL, mypkg = "JuniperKernel",
      linkingto = "pbdZMQ", shlib = "zmq")

### Arguments

`mylib` | the path where `mypkg` was installed (default `NULL` that will search from R's path)
`mypkg` | the package for where `mypkg.so` will be checked or updated
`linkingto` | the package for where `libshpkg*.dylib` is located
`shlib` | name of shlib to be searched for

### Author(s)

Wei-Chen Chen wccsnow@gmail.com.

Programming with Big Data in R Website: http://r-pbd.org/

### Examples

    ## Not run:
    ### Called by .onLoad() within "JuniperKernel/R/zzz.R"
    overwrite.shpkg.rpath(mypkg = "JuniperKernel",
                          linkingto = "pbdZMQ",
                          shlib = "zmq")

    ## End(Not run)

[Package pbdZMQ version 0.3-2 Index]