[MacPorts] #15161: depends_* should have more useful semantics

MacPorts trac at macosforge.org
Wed Apr 30 11:55:49 PDT 2008


#15161: depends_* should have more useful semantics
------------------------------+---------------------------------------------
 Reporter:  jmr at macports.org  |       Owner:  macports-tickets at lists.macosforge.org
     Type:  enhancement       |      Status:  new                                  
 Priority:  Normal            |   Milestone:  MacPorts base enhancements           
Component:  base              |     Version:  1.7.0                                
 Keywords:  dependencies      |  
------------------------------+---------------------------------------------
 The depends_lib, depends_build and depends_run dependency classes don't
 currently do what a typical new portfile author would expect. Presumably
 the different classes exist so that end users installing binaries can
 avoid installing ports that are only needed to build the port they are
 interested in, and not to run it. (Possibly also so that the build box
 that makes the binary can avoid installing ports that are only needed at
 runtime.) However, the actual behaviour is this (from the portfile(7)
 manual):
 {{{
      depends_build
          List of dependencies to check before build, destroot, install,
 and
          package targets.

      depends_run
          List of dependencies to check before destroot, install and
 package
          targets.

      depends_lib
          List of dependencies to check before configure, build, destroot,
          install, and package targets.
 }}}

 This seems to match up with what happens in `mportdepends` in
 [http://trac.macosforge.org/projects/macports/browser/trunk/base/src/macports1.0/macports.tcl#L1655
 macports.tcl]. [http://guide.macports.org/#reference.dependencies The
 Guide] gives the dep classes some additional meanings, e.g. "Build
 dependencies are needed when software is compiled, but not needed at all
 once the software is compiled and installed," but there appears to be
 nothing to back this up in the code.

 The way the system currently works means that you can't avoid installing
 build-time-only dependencies when you install from a binary package. Even
 if that part worked, you still couldn't have deps that are needed at
 configure time but not at runtime (e.g. pkgconfig), because depends_build
 is not checked before configure.

 I would suggest changing the meanings to the following:
  * depends_lib: these dependencies must be present for all phases of port
 building and installation (fetch through to activate).
  * depends_build: these dependencies must be present for fetch through to
 destroot. (Note that this adds the ability to use software from
 dependencies in the fetch, extract and patch phases, as required by e.g.
 python23.)
  * depends_run: these dependencies are only needed when the port is
 installed. (and also for test?)

-- 
Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/15161>
MacPorts </projects/macports>
Ports system for Mac OS


More information about the macports-tickets mailing list