Need help with Portfile

René J.V. Bertin rjvbertin at
Tue Dec 9 04:51:06 PST 2014

On Tuesday December 09 2014 23:11:44 Behrang Saeedzadeh wrote:

> As part of a Portfile I am writing, I need to install a Ruby gem, so I have
> added this build block:

Is that a build dependency or a part of the port for which you're writing the Portfile? If the former, you'd have to write a port for the gem.
If the latter, the installation is not at its place in the build phase, I think.

> build {
>    system "${prefix}/bin/gem-1.8 install CFPropertyList"
> }
> This fails, because without root privileges, the gem cannot be installed.

> What's the proper way of invoking such commands that need root level
> permissions?

#> sudo port install <portname> ;)


More information about the macports-users mailing list