port PATH handling

Salvatore Domenick Desiano sal at ri.cmu.edu
Mon Jan 29 14:57:59 PST 2007


Having an internally consistent PATH file is one of the things that 
makes MacPorts as stable as it is.

If your port is for your own consumption, you might use binpath. If your 
port is for public use, but doesn't require the commercial compiler 
you're using, then you probably shouldn't change the binpath unless you 
put it in a variant.

If you need a really strange environment (i.e., one in which a file has 
been sourced), you might make a wrapper to do the build progress that 
first calls the file to be sourced and then runs make or configure or 
whatever. Remember that the environment for build is different from the 
environment or configure, so you'll have to source the file twice if 
configure doesn't set everything.

-- Sal
smile.

--------------
  Salvatore Domenick Desiano
    Doctoral Candidate
      Robotics Institute
        Carnegie Mellon University

On Mon, 29 Jan 2007, Daniel J. Luke wrote:

o On Jan 29, 2007, at 5:41 PM, Kevin Ballard wrote:
o > > Does port(1) clean out $PATH ??
o 
o yes.
o 
o > If you look at /opt/local/etc/ports/ports.conf, at the bottom is a list of
o > environment variables to keep. You may want to try setting that to PATH.
o 
o That won't work.
o 
o macports' PATH is set to
o "${prefix}/bin:${prefix}/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin"
o unless 'binpath' is set in the ports.conf file.
o 
o (see darwinports1.0/darwinports.tcl line 415 and darwinports1.0/portconf.c
o line 49)
o 
o --
o Daniel J. Luke
o +========================================================+
o | *---------------- dluke at geeklair.net ----------------* |
o | *-------------- http://www.geeklair.net -------------* |
o +========================================================+
o |   Opinions expressed are mine and do not necessarily   |
o |          reflect the opinions of my employer.          |
o +========================================================+
o 
o 



More information about the macports-users mailing list