[128275] trunk/dports/security/gpg-agent/Portfile

ionic at macports.org ionic at macports.org
Mon Nov 17 15:23:34 PST 2014


Revision: 128275
          https://trac.macports.org/changeset/128275
Author:   ionic at macports.org
Date:     2014-11-17 15:23:34 -0800 (Mon, 17 Nov 2014)
Log 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.

Modified Paths:
--------------
    trunk/dports/security/gpg-agent/Portfile

Modified: trunk/dports/security/gpg-agent/Portfile
===================================================================
--- trunk/dports/security/gpg-agent/Portfile	2014-11-17 22:34:04 UTC (rev 128274)
+++ trunk/dports/security/gpg-agent/Portfile	2014-11-17 23:23:34 UTC (rev 128275)
@@ -6,7 +6,7 @@
 # When updating gpg-agent, update gnupg2 also if applicable.
 name                gpg-agent
 version             2.0.26
-revision            3
+revision            4
 categories          security mail
 maintainers         ionic openmaintainer
 license             GPL-3+
@@ -55,28 +55,16 @@
 #configure.cflags-append -g3 -ggdb3 -gdwarf-2 -O0
 
 platform darwin {
-    if {![variant_isset no_pinentry]} {
-      # Automatically switch between pinentry and pinentry-mac, with pinentry-mac being
-      # preferred.
-      # 10.7 and below are not supported by pinentry-mac, though, and will default to
-      # pinentry. Just like pure darwin without OS X will.
-      set pinentry            pinentry-mac
-      if {${os.subplatform} ne "macosx" ||
-          ${os.major} < 12 || ([catch "registry_active pinentry"] &&
-                               ![catch "registry_active pinentry-mac"])} {
-          set pinentry        pinentry
-      }
-
-      set pinentry_binary     ""
-
-      if {${pinentry} eq "pinentry"} {
-          set pinentry_binary "${prefix}/bin/${pinentry}"
-      } else {
-          set pinentry_binary "${applications_dir}/${pinentry}.app/Contents/MacOS/${pinentry}"
-      }
-
-      depends_lib-append      port:${pinentry}
-      configure.args-append   --with-pinentry-pgm=${pinentry_binary}
+    # Automatically switch between pinentry and pinentry-mac, with pinentry-mac being
+    # preferred.
+    # 10.7 and below are not supported by pinentry-mac, though, and will default to
+    # pinentry. Just like pure darwin without OS X will.
+    if {${os.subplatform} ne "macosx" ||
+        ${os.major} < 12 || ([catch "registry_active pinentry"] &&
+                             ![catch "registry_active pinentry-mac"])} {
+        default_variants-append +pinentry
+    } else {
+        default_variants-append +pinentry_mac
     }
 
 
@@ -162,10 +150,20 @@
     }
 }
 
-# FIXME: switch to (default on) pinentry variant.
-variant no_pinentry description {Do not use pinentry to handle user input} {
+# Remove after 11-17-2015.
+variant no_pinentry conflicts pinentry pinentry_mac description {Legacy compatibility variant for disabling pinentry. Will be removed soon.} {
 }
 
+variant pinentry conflicts pinentry_mac no_pinentry description {Handle user input via pinentry.} {
+    depends_lib-append      port:pinentry
+    configure.args-append   --with-pinentry-pgm=${prefix}/bin/pinentry
+}
+
+variant pinentry_mac conflicts pinentry no_pinentry description {Handle user input via pinentry-mac. Only compatible with OS X 10.8+.} {
+    depends_lib-append      port:pinentry-mac
+    configure.args-append   --with-pinentry-pgm=${applications_dir}/pinentry-mac.app/Contents/MacOS/pinentry-mac
+}
+
 livecheck.type      regex
 livecheck.url       ftp://ftp.gnupg.org/gcrypt/gnupg/
 livecheck.regex     gnupg-(\\d+\\.\\d+\\.\\d+)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141117/01cfcbfb/attachment.html>


More information about the macports-changes mailing list