Ignore:
Timestamp:
Nov 17, 2014, 11:23:34 PM (5 years ago)
Author:
ionic@…
Message:

gpg-agent: deprecate no_pinentry variant. Add pinentry and pinentry_mac variants. Change switching algorithm to add either pinentry or pinentry_mac to default_variants.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/security/gpg-agent/Portfile

    r128214 r128275  
    77name                gpg-agent
    88version             2.0.26
    9 revision            3
     9revision            4
    1010categories          security mail
    1111maintainers         ionic openmaintainer
     
    5656
    5757platform darwin {
    58     if {![variant_isset no_pinentry]} {
    59       # Automatically switch between pinentry and pinentry-mac, with pinentry-mac being
    60       # preferred.
    61       # 10.7 and below are not supported by pinentry-mac, though, and will default to
    62       # pinentry. Just like pure darwin without OS X will.
    63       set pinentry            pinentry-mac
    64       if {${os.subplatform} ne "macosx" ||
    65           ${os.major} < 12 || ([catch "registry_active pinentry"] &&
    66                                ![catch "registry_active pinentry-mac"])} {
    67           set pinentry        pinentry
    68       }
    69 
    70       set pinentry_binary     ""
    71 
    72       if {${pinentry} eq "pinentry"} {
    73           set pinentry_binary "${prefix}/bin/${pinentry}"
    74       } else {
    75           set pinentry_binary "${applications_dir}/${pinentry}.app/Contents/MacOS/${pinentry}"
    76       }
    77 
    78       depends_lib-append      port:${pinentry}
    79       configure.args-append   --with-pinentry-pgm=${pinentry_binary}
     58    # Automatically switch between pinentry and pinentry-mac, with pinentry-mac being
     59    # preferred.
     60    # 10.7 and below are not supported by pinentry-mac, though, and will default to
     61    # pinentry. Just like pure darwin without OS X will.
     62    if {${os.subplatform} ne "macosx" ||
     63        ${os.major} < 12 || ([catch "registry_active pinentry"] &&
     64                             ![catch "registry_active pinentry-mac"])} {
     65        default_variants-append +pinentry
     66    } else {
     67        default_variants-append +pinentry_mac
    8068    }
    8169
     
    163151}
    164152
    165 # FIXME: switch to (default on) pinentry variant.
    166 variant no_pinentry description {Do not use pinentry to handle user input} {
     153# Remove after 11-17-2015.
     154variant no_pinentry conflicts pinentry pinentry_mac description {Legacy compatibility variant for disabling pinentry. Will be removed soon.} {
     155}
     156
     157variant pinentry conflicts pinentry_mac no_pinentry description {Handle user input via pinentry.} {
     158    depends_lib-append      port:pinentry
     159    configure.args-append   --with-pinentry-pgm=${prefix}/bin/pinentry
     160}
     161
     162variant pinentry_mac conflicts pinentry no_pinentry description {Handle user input via pinentry-mac. Only compatible with OS X 10.8+.} {
     163    depends_lib-append      port:pinentry-mac
     164    configure.args-append   --with-pinentry-pgm=${applications_dir}/pinentry-mac.app/Contents/MacOS/pinentry-mac
    167165}
    168166
Note: See TracChangeset for help on using the changeset viewer.