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

github.setup        Mcrich23 Container-Compose 1.1.0
github.tarball_from archive
name                container-compose

categories          sysutils
supported_archs     arm64
license             MIT
platforms           {darwin >= 25}
maintainers         {sub-pop.net:link @subpop} \
                    openmaintainer

description         Docker Compose-like tool for Apple Container

long_description    Container-Compose brings (limited) Docker Compose support to \
                    Apple Container, allowing you to define and orchestrate \
                    multi-container applications on Apple platforms using \
                    familiar Compose files. It parses docker-compose.yml files \
                    and supports .env files, service dependencies, and volume \
                    and network mapping on top of Apple's native container runtime.

checksums           rmd160  5b3110f554012668b1a1415f3e17cc0d5defe0d4 \
                    sha256  f78ad4dfb518264eabbfbf287e44d569cc35e707436167689ac37a1df0617ab5 \
                    size    73340

# SwiftPM fetches build dependencies (swift-argument-parser, container,
# Yams, Rainbow) from GitHub during the build phase.
use_configure            no
use_xcode                yes
minimum_xcodeversions    {25 26.0}

build.cmd           swift
build.target        build
build.args          --configuration release \
                    --disable-sandbox

destroot {
    xinstall -m 0755 ${worksrcpath}/.build/release/container-compose \
        ${destroot}${prefix}/bin/
}

notes "
Container-Compose orchestrates containers through Apple's \"container\" runtime,
which must be installed separately (https://github.com/apple/container).
Forwarding DNS names of containers requires macOS 26 (Tahoe) or later.
"
