tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [RFC] PLIST feature to simplify conditionals



  I'd like to add a feature to the mk/plist module to make it simpler to
  do something that's quite common in pkgsrc.  Example usage:

          PLIST_VARS+=  nss pam

          .if !empty(PKG_OPTIONS:Mpam)
          PLIST.pam=    defined
          .endif

          .if !empty(PKG_OPTIONS:Mnss)
          PLIST.nss=    defined
          .endif

  In the PLIST, you can then have:

  ${PLIST.pam}lib/security/pam_winbind.so
  ${PLIST.nss)lib/nss_winbind.so

  Those PLIST.* variables automatically expand into "@comment " or an
  empty value in the PLIST processing depending on whether or not it's
  defined in the package Makefile.

Seems ok to me.  The variables are too wordy in the PLIST, where
"PLIST." is content-free.  But it's namespace pollution and confusing
otherwise.

I think you mean that if one defines the variable to anything, it turns
into empty, and that one gets @comment as the default value from
PLIST_VARS+=.  That seems ok.



Home | Main Index | Thread Index | Old Index