Need help with Portfile

Behrang Saeedzadeh behrangsa at gmail.com
Tue Dec 9 06:03:47 PST 2014


I did invoke the port with "sudo", but somehow didn't get passed to the
system command.

Here's my Portfile:

# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil;
c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 124084 2014-08-18 17:05:27Z khindenburg at macports.org $

PortSystem          1.0

name                facter
version             2.3.0
categories          sysutils
license             Apache-2 MIT
maintainers         explanatorygap.net:nigel gmail.com:behrangsa
openmaintainer
supported_archs     noarch

description         A cross-platform library for describing OS attributes.

long_description    A cross-platform library for describing OS attributes. \
                    Supports multiple resolution mechanisms, any of which \
                    can  be restricted to working only on certain operating
\
                    systems or environments. Facter is especially useful
for \
                    retrieving things like operating system names, \
                    IP  addresses, MAC addresses, and SSH keys.

homepage            http://puppetlabs.com/facter
platforms           darwin

master_sites        http://downloads.puppetlabs.com/facter

checksums           rmd160  a75d4e66b0e11664136df94f8309b33b4037ad26 \
                    sha256
 a91ea915b276172e002a8670684e5c6be7df1dfdd55db6937d27fffad70c5e51

depends_lib         port:ruby port:rb-rubygems

use_configure       no

build {
   system "${prefix}/bin/gem-1.8 install CFPropertyList"
}

test.run            no
destroot.cmd        ${prefix}/bin/ruby1.8 ${worksrcpath}/install.rb \
                    --destdir=${destroot}


Best regards,
Behrang
http://www.behrang.org

On Tue, Dec 9, 2014 at 11:51 PM, René J.V. <rjvbertin at gmail.com> wrote:

> 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> ;)
>
> R.
> _______________________________________________
> macports-users mailing list
> macports-users at lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-users/attachments/20141210/50ff06a5/attachment.html>


More information about the macports-users mailing list