# -*- 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.4.3
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  64ef5d57908267686c1946ab786d63d833c0877a \
                            sha256  cf6be37c79265802f2cb1dfc412e18de23a35b5204fc5868bc09fcfd092ac225 \
                            size    468948

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