# -*- 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 PortGroup legacysupport 1.1 legacysupport.use_static yes github.setup ziglang zig 0.13.0 github.tarball_from archive revision 0 categories lang license MIT maintainers nomaintainer platforms {darwin >= 20} description Zig programming language long_description Zig is a general-purpose programming language designed for \ robustness, optimality, and maintainability. homepage https://ziglang.org/ set llvm_version 18 depends_lib-append port:ncurses \ port:libxml2 \ port:zlib \ port:zstd depends_build-append \ port:llvm-${llvm_version} \ port:clang-${llvm_version} checksums rmd160 6d81a7d1f3e6f67ebfffc453b5a45b39f88ae641 \ sha256 d3912858003e340f315224bf177d0f441d86b81f62854f5c141b6d51ab6b5516 \ size 26656532 set llvm_config LLVM_CONFIG=llvm-config-mp-${llvm_version} compiler.whitelist macports-clang-${llvm_version} cmake.module_path ${prefix}/libexec/llvm-${llvm_version} \ ${prefix} cmake_share_module_dir \ ${prefix}/libexec/llvm-${llvm_version} cmake.install_rpath-append \ ${prefix}/libexec/llvm-${llvm_version}/lib # We need to link LLVM statically until a way is found to force zig to link the system libc++ dynamically. configure.args-append -DZIG_STATIC_LLVM=ON platform darwin { # due to the new linker (which was introduced in Xcode 15: https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes), # this port requires '-ld_classic' to build successfully with the toolchains from Xcode 15 or Command Line Tools 15. # # TODO: This is a temporary solution, the classic linker will be removed in a future release by Apple. if { ${os.major} == 23 && ( [vercmp ${xcodeversion} 15 ] >= 0 ) || ( [vercmp ${xcodecltversion} 15 ] >= 0 ) } { configure.ldflags-append \ -Wl,-ld_classic } }