# -*- 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.10 v
revision            0
checksums           rmd160  825ce3794ffcf9029580ead2ad95dc8d3723cc81 \
                    sha256  832cf4f7cf676b59582ed3b1bbd90a8d0e0ddbc3b11cb3b2096c5177ce39cc47 \
                    size    1229219

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
