depends_lib, depends_build, depends_run, oh my

markd at macports.org markd at macports.org
Mon Aug 6 15:37:12 PDT 2007


Kevin Van Vechten <kvv@ writes:
>>> Why do we have depends_lib, depends_build and depends_run? Why not
>>> just a single "depends"? Why does it matter which phase requires the
>>> other software? Isn't it enough to know that the other software is
>>> required at some point, and so MacPorts should install that other
>>> software first?
>
>Depends_build dependencies are only needed if you're actually  
>building the software.  They're not needed at all once the software  
>is built and installed.  (Think of gcc).
>
>Depends_run dependencies are needed when the software is run, but not  
>necessarily to build the software.  (Think of a program that does a  
>fork/exec of /usr/bin/foo at runtime).
>
>Depends_lib dependencies are needed both at build time (for headers  
>and libraries to link against) and at run time (to provide necessary  
>code).
>
>For binary packages, you'd only need to consider depends_lib +  
>depends_run.  Even for those building their own software, it makes  
>sense to distinguish since it gives a better sense of what uninstalls  
>might break (i.e. gcc is a depends_build for most projects, but  
>uninstalling it wouldn't interfere with many ports operation).

Thanks, Kevin.  I'll review this more closely in a bit and document it in
the new guide.

Mark




More information about the macports-dev mailing list