tech-pkg archive

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

[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

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

In the PLIST, you can then have:


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.

Any comments on the variable names chosen, or the "API" presented?


        -- Johnny C. Lam

Home | Main Index | Thread Index | Old Index