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
        .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.

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

        Thanks,

        -- Johnny C. Lam


Home | Main Index | Thread Index | Old Index