# -*- 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 crystal-lang crystal 1.14.0 github.tarball_from archive revision 0 categories lang supported_archs x86_64 arm64 license Apache-2 maintainers {makr @mohd-akram} openmaintainer description Crystal programming language long_description Crystal is a fast, compiled programming language with a \ Ruby-inspired syntax. homepage https://crystal-lang.org set llvm_version 19 # pkg-config is used when compiling user programs depends_lib port:boehmgc \ port:gmp \ port:libevent \ port:libiconv \ port:libxml2 \ port:libyaml \ port:llvm-${llvm_version} \ path:lib/libssl.dylib:openssl \ port:pcre \ port:zlib \ port:pkgconfig # dyld: Symbol not found: ____chkstk_darwin # bootstrap binaries use the libpthread # functions that were added in macOS 10.15 platforms {darwin >= 19} # Use a prebuilt version of Crystal to build itself set cr_ver ${version} set cr_full_ver ${cr_ver}-1 master_sites-append https://github.com/crystal-lang/${name}/releases/download/${cr_ver}/:bootstrap distfiles-append ${name}-${cr_full_ver}-${os.platform}-universal${extract.suffix}:bootstrap checksums ${distname}${extract.suffix} \ rmd160 c55dd41ac3af04bc36185b376b3b36edc5341644 \ sha256 85c74d8654a0e111e2eaec6de38470bc9cb6762bc5b799dd3693d18cce4bc807 \ size 3726474 \ ${name}-${cr_full_ver}-${os.platform}-universal${extract.suffix} \ rmd160 2dfc00e913665c47f0040b6e02ed5fd92fee561c \ sha256 2a934dedba10c42838589d1c97c917bb55d5a444c4900ff55afbc7c2cc1e2f7a \ size 57977773 patchfiles patch-static.diff post-patch { file copy -force ${worksrcpath}/src/lib_c/x86_64-openbsd/c/iconv.cr \ ${worksrcpath}/src/lib_c/aarch64-darwin/c/iconv.cr file copy -force ${worksrcpath}/src/lib_c/x86_64-openbsd/c/iconv.cr \ ${worksrcpath}/src/lib_c/x86_64-darwin/c/iconv.cr } configure.ldflags-append -Wl,-rpath,${prefix}/libexec/llvm-${llvm_version}/lib configure.cmd env | grep -E '^(CC?|CPP|CXX|LD)(FLAGS)?=' configure.pre_args > Makefile.local set llvm_config LLVM_CONFIG=llvm-config-mp-${llvm_version} compiler.cxx_standard 2014 build.args release=1 interpreter=1 FLAGS=--no-debug \ CRYSTAL_CONFIG_LIBRARY_PATH=${prefix}/lib build.env ${llvm_config} \ CRYSTAL=${workpath}/${name}-${cr_full_ver}/bin/${name} post-build { system -W ${worksrcpath} "${llvm_config} ${build.cmd} docs" } destroot.target-append install_docs destroot.args -o docs PREFIX=${prefix} destroot.env ${llvm_config} test.run yes test.target spec test.env ${llvm_config}