# -*- 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.4.1 github.tarball_from archive revision 0 categories lang supported_archs x86_64 arm64 license Apache-2 maintainers {outlook.com:mohd.akram @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 14 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 # 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 08bda39d6c037f3df9059ebfe405d29be9a8d7db \ sha256 97466656adede19943619e18af030c1d542c2c3dd1f36f3a422310bd8b53f5e0 \ size 2880860 \ ${name}-${cr_full_ver}-${os.platform}-universal${extract.suffix} \ rmd160 724257b84e792e2f79070fab1b7c9b673c4e2d12 \ sha256 e7f9b3e1e866dc909a0a310238907182f1ee8b3c09bd8da5ecd0072d99c1fc5c \ size 46117308 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.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 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" } test.run yes test.target spec test.env ${llvm_config} destroot.target-append install_docs destroot.args -o docs PREFIX=${prefix}