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

# for strndup and other functions
legacysupport.newest_darwin_requires_legacy 10

github.setup        jamesodhunt procenv 0.60
github.tarball_from archive

revision            0
categories          sysutils
license             GPL-3
maintainers         {harens @harens} openmaintainer
description         Command-line utility to show process environment
long_description    ${name} is a simple command-line utility, written in C and \
                    licensed under the GPL, that dumps all attributes of the environment \
                    in which it runs, in well-structured plain ASCII, JSON (YAML), XML or CSV.

checksums           rmd160  a8776f70ad3957b0009aea52ae9ba31c128e48db \
                    sha256  fac0438bf08ed73b10ace78d85acb83cf81ade5ecf866762c2c6e92e41dbde43 \
                    size    255149

compiler.c_standard 1999

use_autoreconf      yes
autoreconf.args     -fvi

configure.args      --disable-silent-rules \
                    --enable-reproducible-build

depends_build-append \
                    path:bin/pkg-config:pkgconfig

# cc1: error: unrecognized command line option "-flto"
# https://github.com/jamesodhunt/procenv/issues/28
if {[string match *gcc-4.* ${configure.compiler}]} {
    patchfiles-append \
                    patch-Xcode-gcc.diff
}
