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

# readlinkat
legacysupport.newest_darwin_requires_legacy 13

name                        pkgconf
version                     2.5.0
revision                    0
categories                  devel
license                     ISC
maintainers                 {mcalhoun @MarcusCalhoun-Lopez} openmaintainer
description                 a program which helps to configure compiler and linker flags for development libraries
long_description            pkgconf is ${description}. \
                            It is similar to pkg-config from freedesktop.org.

homepage                    https://github.com/pkgconf/pkgconf
master_sites                https://distfiles.ariadne.space/pkgconf/

checksums                   rmd160  a6d326a9abfe7f3a98c0627e87fdab5d0eb432ef \
                            sha256  fafa613fee321790b04e960ba0d67a98461f3cb915ba732f5572b59ab8ef90d2 \
                            size    477704

# both ports install ${prefix}/share/aclocal/pkg.m4
conflicts                   pkgconfig

# See: https://trac.macports.org/wiki/WimplicitFunctionDeclaration#AddnamestowhitelistviaPortfile
configure.checks.implicit_function_declaration.whitelist-append strchr

post-destroot {
    # since ports already conflict, follow https://github.com/pkgconf/pkgconf/#pkg-config-symlink
    ln -s pkgconf ${destroot}${prefix}/bin/pkg-config
    ln -s pkgconf.1 ${destroot}${prefix}/share/man/man1/pkg-config.1
}
