# -*- 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.1
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  db66f42f4359ffee7b4da1247b33f530e6e43b8e \
                            sha256  ab89d59810d9cad5dfcd508f25efab8ea0b1c8e7bad91c2b6351f13e6a5940d8 \
                            size    477734

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

#skip '.9' (development) releases
livecheck.regex             {pkgconf-((?!\d+\.9\y)\d+(?:\.\d+)*)}
