# -*- 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               github 1.0
PortGroup               legacysupport 1.1
PortGroup               makefile 1.0
PortGroup               openssl 1.0

# See: https://trac.macports.org/ticket/69047
legacysupport.use_mp_libcxx yes

github.setup            ProcursusTeam ldid 2.1.5-procursus7 v
github.tarball_from     archive
name                    ldid-procursus
revision                2
categories              devel
license                 AGPL-3
conflicts               ldid
maintainers             {@TheRealKeto procurs.us:team} openmaintainer

description             Put real or fake signatures in a Mach-O
long_description        {*}${description}.

checksums               rmd160  648697e84ac2b71fff24fdc1241f90d7390124d5 \
                        sha256  04e461c6f02765e48fc9cc0b68d4dc353a9c46bc1c4d8bac0695509d1af1ff5e \
                        size    53532

patch.pre_args-replace  -p0 -p1
patchfiles-append       fix-memory-issues-with-various-entitlements.patch

depends_build-append    path:bin/pkg-config:pkgconfig
depends_lib-append      path:lib/libplist-2.0.dylib:libplist

compiler.cxx_standard   2011

compiler.blacklist-append \
                        {clang < 1100}

post-destroot {
    set zsh_comp_path ${destroot}${prefix}/share/zsh/site-functions
    xinstall -d ${zsh_comp_path}
    xinstall -m 0644 ${worksrcpath}/_ldid ${zsh_comp_path}

    set docpath ${destroot}${prefix}/share/doc/${name}
    xinstall -d ${docpath}
    xinstall -m 0644 -W ${worksrcpath} README.md COPYING ${docpath}
}
