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

# clock_gettime
legacysupport.newest_darwin_requires_legacy 15

github.setup        manugarg pacparser 1.5.0 v
revision            0
categories          net devel
license             LGPL-3
maintainers         {judaew @judaew} openmaintainer

description         library to parse proxy auto-config (PAC) files
long_description    A {*}${description}.
homepage            https://pacparser.manugarg.com

checksums           rmd160  332dcf751586ef7038f257ed0021576830191c06 \
                    sha256  2601a0e58e87caba6f4866aebefde2f5a44a277c05f01f17541ba8857c7a566e \
                    size    586068
github.tarball_from archive

worksrcdir          ${worksrcpath}/src

compiler.c_standard 2011

if {[string match *gcc* ${configure.compiler}] && ${configure.build_arch} in [list arm i386 ppc]} {
     configure.ldflags-append \
                    -latomic
}

build.cmd-prepend   CFLAGS="${configure.cflags} [get_canonical_archflags cc]" \
                    LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]"

destroot.args       PREFIX=${destroot}${prefix}
