# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4 PortSystem 1.0 PortGroup compiler_blacklist_versions 1.0 PortGroup legacysupport 1.1 # strnlen, arc4random_buf, clock_gettime legacysupport.newest_darwin_requires_legacy 15 name MoarVM version 2024.06 revision 1 categories lang devel license Artistic-2 BSD ISC MIT public-domain maintainers {@barracuda156 gmail.com:vital.had} openmaintainer description A virtual machine for NQP and Rakudo long_description MoarVM is a modern virtual machine built for the Rakudo \ compiler implementing the Raku programming language, \ and the NQP compiler toolchain. homepage https://moarvm.org/ master_sites https://moarvm.org/releases/ checksums rmd160 51d754c2e56ebb66634a71f3cb43ff2568895209 \ sha256 24ecedd1220e215742cbfa9228797812f6f281ba87bf5dc58e8caac0c0d404d0 \ size 14956672 depends_build-append \ port:perl5 \ path:bin/pkg-config:pkgconfig # libatomic_ops: https://trac.macports.org/ticket/53171 depends_lib-append port:dyncall \ port:libatomic_ops \ port:libtommath patchfiles patch-Configure.diff \ patch-dyncall.diff \ patch-setup.pm.diff if ![variant_isset macports_libuv] { patchfiles-append patch-libuv-includes-path.diff \ patch-libuv-legacy.diff \ patch-moar.pc.diff } if {[string match *gcc* ${configure.compiler}]} { patchfiles-append patch-gcc.diff } post-patch { reinplace "s,/usr/local,${prefix},g" ${worksrcpath}/Configure.pl # The following are not built, but better have them fixed nevertheless: reinplace "s,/usr/local,${prefix},g" ${worksrcpath}/3rdparty/dyncall/configure reinplace "s,/usr/local,${prefix},g" ${worksrcpath}/3rdparty/dyncall/configure.rc reinplace "s,/usr/local,${prefix},g" ${worksrcpath}/3rdparty/libatomicops/configure reinplace "s,/usr/local,${prefix},g" ${worksrcpath}/3rdparty/libtommath/makefile.unix reinplace "s,/usr/local,${prefix},g" ${worksrcpath}/3rdparty/libtommath/makefile_include.mk } # Building nqp on PPC results in malloc errors (though build still succeeds): # malloc: *** error for object: incorrect checksum for freed object - object was probably modified after being freed. legacysupport.redirect_bins moar # https://trac.macports.org/ticket/53950 compiler.blacklist cc gcc-* apple-gcc-* llvm-gcc-* # uv-common.h:41:11: fatal error: 'stdatomic.h' file not found compiler.blacklist-append \ {clang < 700} configure.cmd ${prefix}/bin/perl Configure.pl configure.args --cc=${configure.cc} \ --has-dyncall \ --has-libatomic_ops \ --has-libtommath \ --no-mimalloc configure.cflags-append \ -I${prefix}/include/libtommath # libuv/src/unix/fs.c:478:34: error: passing argument 3 of 'scandir' from incompatible pointer type configure.cflags-append \ -Wno-error=incompatible-pointer-types # The dylib machinery uses -rpath, not available on Tiger platform darwin 8 { patchfiles-append patch-build-setup-tiger.diff } # The build system puts CPPFLAGS and LDFLAGS before its own flags which leads to # build failures if MacPorts libuv is installed. The right -I and -L flags are # inserted later by the build system so the ones MacPorts adds are not needed. # https://github.com/MoarVM/MoarVM/issues/1818 configure.cppflags-delete -I${prefix}/include configure.ldflags-delete -L${prefix}/lib # Disable silent rules build.args-append NOISY=1 # https://github.com/MoarVM/MoarVM/issues/414 universal_variant no # Unsupported by Configure.pl # configure.universal_args-delete --disable-dependency-tracking variant macports_libuv description "Use MacPorts' libuv" { # Once libuv is updated, this should be changed to path-style dependency: depends_lib-append port:libuv-devel configure.args-append \ --has-libuv } variant mimalloc description "Build with mimalloc support" { configure.args-delete \ --no-mimalloc } # stats.c:569:31: error: variable has incomplete type 'struct mach_task_basic_info' # mimalloc code uses the API available on macOS 10.8+ # not enabled at will by the maintainer, possibly to be fixed on older systems #if {${os.platform} eq "darwin" && ${os.major} > 11} { # default_variants +mimalloc #} # This can be enabled once libuv port is updated. # See: https://trac.macports.org/ticket/68464 # default_variants-append macports_libuv