# -*- 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           cmake 1.1
PortGroup           github 1.0

github.setup        gccxml gccxml dcd36c5c16a82511d5d25c6759678357726751d2
name                gccxml-devel
version             20170109
categories          lang
# On x86 llvm-gcc is used, which does not build on 10.11+
platforms           {darwin < 15}
supported_archs     i386 ppc ppc64 x86_64
# See http://www.gccxml.org/HTML/Copyright.html for license details
license             {GPL-2 BSD}
maintainers         nomaintainer

description         generates XML description of C++ code
long_description    generates an XML description of a C++ program from GCC's \
                    internal representation
homepage            http://www.gccxml.org/

universal_variant   no

checksums           rmd160  12ed0709c1e91e803298d692ba7e45f609e212f3 \
                    sha256  83ad569757a515f0df5420bf440c755737985a46e8ec635f385f1f4cb7746bc1 \
                    size    12458295
github.tarball_from archive

# Source uses macros which gcc does not define.
patchfiles-append   patch-fix-host-darwin.diff

# gcxxml can be compiled with clang, but can't simulate clang. It should be able
# to simulate gcc*, but on x86 gets confused by header files in /usr/include.
# The default compiler it uses is the one used to compile it, so to get gccxml
# working without having to set any options it seems easier to do this:
platform darwin i386 {
    configure.compiler \
                    llvm-gcc-4.2
    # Xcode 5 doesn't include llvm-gcc-4.2, so make sure it is installed
    depends_build-append \
                    bin:llvm-gcc-4.2:llvm-gcc42
    # Also need this compiler at runtime
    depends_run-append \
                    bin:llvm-gcc-4.2:llvm-gcc42
}
