# -*- 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

PortSystem          1.0
PortGroup           xcode 1.0

name                gpgme-objc
set rname           GPGME
version             1.0.2
revision            6
categories          devel security
license             LGPL-2.1+
maintainers         nomaintainer
description         GnuPG Made Easy is an Objective-C framework wrapping libgpgme
long_description    GnuPG Made Easy (GPGME) is an Objective-C framework wrapping \
                    libgpgme, a C language library, that allows to add support \
                    for cryptography to a program. It is designed to make access \
                    to crypto engines like GnuPG or GpgSM easier for applications.  \
                    GPGME provides a high-level crypto API for encryption,      \
                    decryption, signing, signature verification and key management.
homepage            http://macgpg.sourceforge.net
master_sites        sourceforge:macgpg
extract.suffix      .tgz
distname            ${rname}-${version}
dist_subdir         macgpg
checksums           md5 9f6fc9eb6d36c298c045178703041314            \
                    sha1 ff02efeac01253c9df797ec314ef0e4fc537964e

patchfiles          patch-GPGME.xcode-project.pbxproj.diff

post-patch {
    if {[vercmp $xcodeversion 4.0] >= 0} {
        copy -force ${filespath}/project.pbxproj ${worksrcpath}/GPGME.xcode/
    }
    reinplace s|__PREFIX__|${prefix}|g ${worksrcpath}/GPGME.xcode/project.pbxproj
}

depends_lib         port:gpgme \
                    port:libgpg-error

xcode.project       ${rname}.xcode
xcode.target        ${rname}
xcode.configuration EmbDeployment
xcode.destroot.type framework
destroot.args-append SKIP_INSTALL=NO

livecheck.distname  GPGME
