# -*- 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
PortGroup                   meson 1.0

# readlinkat
legacysupport.newest_darwin_requires_legacy 13

name                        pkgconf
version                     3.0.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  3ea5a1d07c2fe2a2e7fd31b527846418fc70afb4 \
                            sha256  5105aa1c8a524e27a20cbacfe39125e6fe8501a3e8e8ad0fb3c4282ccf10f8ba \
                            size    609033

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

# These are intended in order to filter ${prefix}/include and ${prefix}/lib
# See: https://trac.macports.org/ticket/73393
configure.args-append       -Dwith-pkg-config-dir="${prefix}/lib/pkgconfig:/usr/lib/pkgconfig" \
                            -Dwith-system-includedir=${configure.sdkroot}/usr/include \
                            -Dwith-system-libdir=/usr/lib

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 'x.x.90+' (development) releases
livecheck.regex             {pkgconf-(\d+\.\d+\.(?!9[0-9])\d+)}
