tech-pkg archive

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

Re: [RFC] PLIST feature to simplify conditionals



Adam Hoka wrote:
Hi!

        PLIST_VARS+=    nss pam

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

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

Couldn't it be more automagical?
Like, using PKG_SUPPORTED_OPTIONS instead of introducing PLIST_VARS,
and using it like this:

  .if !empty(PKG_OPTIONS:Mpam)
  PLIST_UNHIDE+=    pam
  .endif

This isn't just about PKG_OPTIONS, e.g.

        PLIST_VARS+=    cifsmount

        .if ${OPSYS} == "Linux"
        PLIST_VARS.cifsmount=   defined
        .endif

Of course, having a default of:

        PLIST_VARS+=    ${PKG_SUPPORTED_OPTIONS}

would be worth considering if that's the most common case, but I haven't investigated whether that's true yet or not.

        Cheers,

        -- Johnny C. Lam


Home | Main Index | Thread Index | Old Index