# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 # $Id$ PortSystem 1.0 # When updating gpg-agent, update gnupg2 also if applicable. name gpg-agent version 2.0.30 revision 0 categories security mail maintainers ionic openmaintainer license GPL-3+ installs_libs no description GPG key agent long_description gpg-agent is a key management agent similar \ in function to ssh-agent. homepage http://www.gnupg.org platforms darwin freebsd sunos distname gnupg-${version} dist_subdir gnupg2 master_sites gnupg:gnupg conflicts gnupg21 use_bzip2 yes checksums rmd160 7d682c3e0e1c188d026519b0511ecde6a0cc6bd7 \ sha256 e329785a4f366ba5d72c2c678a7e388b0892ac8440c2f4e6810042123c235d71 startupitem.location \ LaunchAgents set launchd_dir ${prefix}/etc/${startupitem.location}/${startupitem.uniquename}/ configure.args --enable-agent-only depends_lib port:libiconv \ port:gettext \ port:zlib \ port:bzip2 \ port:bison \ port:libassuan \ port:libksba \ port:libgcrypt \ port:libgpg-error \ port:pth patchfiles patch-po_Makevars.diff # Recent clang versions include the system stdint.h header # and we don't need quirks for "esoteric" systems, so just # we simply include the system header. patchfiles-append patch-gl_stdint__h.diff # DO NOT USE. Maintainer-only helper for debugging purposes. DO NOT USE. #configure.cflags-append -g3 -ggdb3 -gdwarf-2 -O0 platform darwin { if {![variant_isset pinentry] && ![variant_isset pinentry_mac]} { # 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" || ${xcodeversion} eq "none" || [vercmp ${xcodeversion} {5.0}] < 0 || ${os.major} < 12 || (![catch {registry_active pinentry}] && [catch {registry_active pinentry-mac}])} { default_variants-append +pinentry } else { default_variants-append +pinentry_mac } } patchfiles-append patch-agent_gpg-agent.c-launchd.diff configure.cflags-append -F/System/Library/Frameworks/CoreFoundation.framework \ -D__APPLE_LAUNCHD__ if {${os.major} < 11} { patchfiles-append patch-agent_agent.h-strndup-compat-10.6.diff } if { [tbool startupitem.install] } { notes-append " A startup item has been installed that will aid in\ starting ${name} with launchd. It is disabled by\ default. Execute the following command to launch\ ${name} at user login: launchctl load -w /Library/${startupitem.location}/${startupitem.plist} To actually start ${name}, log out and back in. " } else { notes-append " A startup item was not installed for ${name}.\ Some programs which depend on ${name} might not\ function properly, most notably eMail clients.\ Execute the following command to launch ${name} at user login: launchctl load -w ${launchd_dir}/${startupitem.plist} To actually start ${name}, log out and back in. " } } post-extract { xinstall -m 644 -W ${filespath} gpg-agent.plist.default ${worksrcpath} } post-configure { reinplace -W "${worksrcpath}" "s|@PREFIX@|${prefix}|g" gpg-agent.plist.default reinplace -W "${worksrcpath}" "s|@LABEL@|${startupitem.uniquename}|g" gpg-agent.plist.default if {${os.platform} eq "darwin"} { if {[variant_isset ssh_agent]} { # Remove lines with @SSH_SUPPORT@ in them. # Uncomments sections. reinplace -W "${worksrcpath}" "/@SSH_SUPPORT@/d" gpg-agent.plist.default } else { # Simply remove all @SSH_SUPPORT@ strings to comment out these sections. reinplace -W "${worksrcpath}" "s|@SSH_SUPPORT@||g" gpg-agent.plist.default } } } post-destroot { # Prevent conflict with gnupg2 port. delete ${destroot}${prefix}/share/doc/gnupg/README if {${os.platform} eq "darwin"} { xinstall -m 755 -d \ ${destroot}${launchd_dir} xinstall -m 444 \ ${worksrcpath}/gpg-agent.plist.default \ ${destroot}${launchd_dir}${startupitem.plist}.default } } post-activate { if {${os.platform} eq "darwin"} { xinstall -m 644 \ ${launchd_dir}${startupitem.plist}.default \ ${launchd_dir}${startupitem.plist} # install the plist, if startupitem.install is set if {[tbool startupitem.install]} { ln -sf "${launchd_dir}${startupitem.plist}" "/Library/${startupitem.location}" } } } post-deactivate { if {${os.platform} eq "darwin"} { delete ${launchd_dir}${startupitem.plist} if { [tbool startupitem.install] } { delete "/Library/${startupitem.location}/${startupitem.plist}" } } } variant pinentry conflicts pinentry_mac 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 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 } variant ssh_agent description {Enables SSH agent support.} { notes-append " You have enabled the optional SSH agent feature. This only has an effect on Darwin-based platforms. It is your responsiblity to disable any other SSH agent\ so that this feature has a chance to actually work. Please note that this feature is untested. " } livecheck.type regex livecheck.url ftp://ftp.gnupg.org/gcrypt/gnupg/ livecheck.regex gnupg-(2\\.0\\.\\d+)