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

github.setup        ivmai bdwgc 8.2.12 v
revision            0
checksums           rmd160  dc1504fdb9da1808664a34f5f9ad38d983571b9c \
                    sha256  42e5194ad06ab6ffb806c83eb99c03462b495d979cda782f3c72c08af833cd4e \
                    size    1231996

name                boehmgc
categories          devel
maintainers         nomaintainer
license             Permissive

description         The Boehm-Demers-Weiser conservative C/C++ Garbage Collector
long_description \
    The Boehm-Demers-Weiser conservative garbage collector can be used as \
    a garbage collecting replacement for C malloc or C++ new. It is also used \
    by a number of programming language implementations that use C as \
    intermediate code.

github.tarball_from releases
distname            gc-${version}

# gc_atomic_ops.h: warning: implicit declaration of function '__atomic_compare_exchange_n'
# gc_atomic_ops.h: error: '__ATOMIC_RELAXED' undeclared (first use in this function)
compiler.c_standard 2011

configure.args  --enable-cplusplus \
                --enable-static \
                --enable-large-config \
                --with-libatomic-ops=none

variant redirect description {Redirect malloc and friends to GC routines} {
    configure.args-append  \
                --enable-redirect-malloc
}

test.run        yes
test.target     check
