I think you can do this in single step:

```
pkg install --no-refresh -g /tmp/<package>.p5p opengrok
```

having some upgrade step would not hurt either:

```
pkg update --no-refresh -g /tmp/<package>.p5p 'pkg://XXX/*'
```