[MacPorts] #126: dependencies need to allow inclusion of variant

MacPorts noreply at macports.org
Wed May 27 23:23:46 PDT 2009


#126: dependencies need to allow inclusion of variant
---------------------------------+------------------------------------------
  Reporter:  jpm@…               |       Owner:  macports-tickets@…                   
      Type:  enhancement         |      Status:  new                                  
  Priority:  Normal              |   Milestone:  MacPorts Future                      
 Component:  base                |     Version:                                       
Resolution:                      |    Keywords:                                       
      Port:                      |  
---------------------------------+------------------------------------------

Comment(by jim@…):

 Replying to [comment:24 ryandesign@…]:
 > The simplest would be to check whether a file you need is present or
 not. For example, if you need that port `foo` is installed with variant
 `+bar`, and variant `+bar` causes port `foo` to install the file
 `${prefix}/lib/libfoobar.dylib`, then declare a dependency on `port:foo`
 and in the `pre-fetch` phase check if the file
 `${prefix}/lib/libfoobar.dylib` exists, and if not, use `return -code
 error` to inform the user and exit.

 An example where this is tougher (and where almost none of the portfiles
 are committed yet):

 I'm working to create a port for evolution-exchange at 2.26.2, the Exchange
 connector for Evolution, the Gnome mail client. Ideally, a user who knows
 they want to plug Evolution into MS Exchange should be able to:

 {{{
 sudo port install evolution-exchange
 }}}

 ... and everything else just fills in.

 Here's the dependency chain:

  * evolution-exchange at 2.26.2 requires evolution at 2.26.2+exchange
  * evolution at 2.26.2+exchange (which adds the config flag `--with-
 exchange`) requires evolution-data-server at 2.26.2+exchange
  * evolution-data-server at 2.26.2+exchange (which adds the config flags
 `--with-krb5 --with-openldap`) requires openldap at 2.3.35_2+evolution_ntlm
  * openldap at 2.3.35_2+evolution_ntlm ironically, applies an NTLM patch
 found in `evolution-exchange-2.26.2/docs/openldap-ntlm.diff`

 The best part: evolution-data-server's ./configure looks to see that it
 can successfully link ldap_ntlm_bind and, if not, refuses to fail;
 instead, it just prints a warning (which is dutifully suppressed unless
 you run `port -v ...`) and continues without error, but without
 configuring NTLM on. But that's neither here nor there for this
 discussion.

 I'm also aware that we can't do versioned dependencies. We'll ignore that
 for now, too.

 In order to install Evolution fully ready to talk to Exchange, a user
 would have to type:

 {{{
 sudo port install openldap +evolution_ntlm
 sudo port install evolution +exchange # this gets evolution-data-server
 too
 sudo port install evolution-exchange
 }}}

 In the name of reducing user-facing complexity, I could:

  * Name the openldap variant "exchange" which is consistent with the other
 ports, but less expressive of what the variant actually changes
  * Add a dummy "exchange" variant to evolution-exchange

 Then it would be:

 {{{
 sudo port install evolution-exchange +exchange
 }}}

 ... which is a bit redundant, but survivable.

 So I'm caught between a desire to package this accurately, which inflicts
 upon the user the need to understand all the moving parts in their many
 particulars, or the desire to help the user be successful, which makes the
 packaging kinda kludgy.

 Sure would be nice to be able to specify

 {{{
   depends_lib   port:evolution-data-server@${version}+exchange
 }}}

 ... and have that resolve properly.

-- 
Ticket URL: <http://trac.macports.org/ticket/126#comment:35>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list