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

epoch               3
name                libgcc
version             10.0
revision            0

conflicts           libgcc-devel

categories          lang
maintainers         nomaintainer

distfiles

use_configure       no

description         Provides the appropriate gcc runtime.
long_description    {*}${description} \
                    Picks the version to use based on macOS version.

license             BSD
platforms           any

homepage            https://www.macports.org/

variant universal   { }

# Pick the gcc version that provides the primary runtime.
# NOTE : The logic here must match that in the gccX ports *and*
# that in _resources/port1.0/group/compilers-1.0.tcl
set gcc_version 15

depends_lib port:libgcc${gcc_version}

build { }

destroot {
   xinstall -d ${destroot}${prefix}/share/doc/${name}
   system "echo 'libgcc runtime is provided by libgcc${gcc_version}' > ${destroot}${prefix}/share/doc/${name}/README"
}

#post-deactivate {
#    # When this port is deactivated, the associated libgccX should also be.
#    if {![catch {set installed [lindex [registry_active libgcc${gcc_version}] 0]}]} {
#        registry_deactivate_composite libgcc${gcc_version} "" [list ports_nodepcheck 1]
#    }
#}
