Files

55 lines
2.3 KiB
Tcl

# -*- 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
github.setup apple container 1.0.0
github.tarball_from archive
revision 0
categories devel
license Apache-2
maintainers nomaintainer
description A tool to create and run Linux containers on your Mac
long_description container is a tool that you can use to create and run Linux \
containers as lightweight virtual machines on your Mac. \
The tool consumes and produces OCI-compatible container images, \
so you can pull and run images from any standard container \
registry. You can push images that you build to those registries \
as well, and run the images in any other OCI-compatible application.
checksums rmd160 40cd973eac96c2d2e06cef3f9c2c765ad7edc99e \
sha256 9f5379d400d23b6f296b7bae8f71f982dfdc1d52bf072ac81318472a734d21f7 \
size 993889
# The version number for macosx is the darwin version number (os.major)
platforms {macosx >= 25}
supported_archs arm64
if {${os.platform} eq "darwin" && (${os.major} < 25 || ${os.arch} ne "arm")} {
known_fail yes
pre-fetch {
ui_error "${name} requires macOS 26 or later on Apple Silicon (arm64)."
return -code error "incompatible macOS version or architecture"
}
}
use_configure no
use_parallel_build no
installs_libs no
build.target build
# Disable the swift sandbox since the port build already runs in a sandbox
build.pre_args BUILD_CONFIGURATION=release SWIFT_CONFIGURATION="--disable-sandbox --cache-path ${workpath}/.swiftpm/cache --security-path ${workpath}/.swiftpm/security --config-path ${workpath}/.swiftpm/config" ${build.target}
destroot.target install
destroot.pre_args BUILD_CONFIGURATION=release DEST_DIR="${destroot}${prefix}/" RELEASE_VERSION=${version} SUDO= ${destroot.target}
post-destroot {
# Remove the unnecessary uninstall script
file delete -force ${destroot}${prefix}/bin/uninstall-container.sh
# Remove the unnecessary update script
file delete -force ${destroot}${prefix}/bin/update-container.sh
}