# -*- 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.8 v
revision            1
checksums           rmd160  e2db8df0e04077681988b8283032febbfc17ce1f \
                    sha256  7649020621cb26325e1fb5c8742590d92fb48ce5c259b502faf7d9fb5dabb160 \
                    size    1219553

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
