# -*- 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 compiler_blacklist_versions 1.0 PortGroup github 1.0 PortGroup legacysupport 1.1 PortGroup makefile 1.0 github.setup janet-lang janet 1.32.0 v revision 0 categories lang platforms darwin license MIT maintainers {@tsujp wz.ht:jc+macports} openmaintainer description A dynamic language and bytecode vm long_description Janet is a functional and imperative programming \ language and bytecode interpreter. It is a lisp-like \ language, but lists are replaced by other data structures. \ The language also supports bridging to native code written in C, \ meta-programming with macros, and bytecode assembly. homepage https://janet-lang.org/ checksums rmd160 0ebe89b01b96d708bb85fd5176a2442f84661079 \ sha256 ec6dfd0a81b1ddb8587527502f92e02a72b6f9b8418dee9e384e90c052384c2e \ size 557022 # Fixes passing correct link flags to boot_strap janet # and incorrect use of environ on macOS. patch.pre_args -p1 # We're using a seperate directory for jpm so we need to patch # the Makefile such that Janet resolves jpm packages # installed there (either globally or via MacPorts). patchfiles-append patch-jpm-location.diff # Fixes linking of boot strap binary on older systems. patchfiles-append fix-janet_boot-link-legacysupport.diff compiler.c_standard 2011 # stdatomic.h compiler.blacklist-append {clang < 700} destroot.keepdirs ${destroot}${prefix}/lib/${name} pre-destroot { xinstall -d -m 0755 ${destroot}${prefix}/lib/${name} } post-destroot { # Need libjanet.a for all possible jpm behaviour. file copy ${destroot}${prefix}/lib/libjanet.a \ ${destroot}${prefix}/lib/janet } test.run yes notes " Janet has a package ecosystem (similar to how Nodejs does) and\ these packages are managed by the package manager jpm. However\ jpm is not installed by default. You have a few options which\ are not mutually exclusive. In both cases MacPorts will install jpm itself but you can then\ choose whether or not to use globally installed jpm packages as\ in (1) and/or you can install local versions of jpm\ packages as in (2) using the --local flag of jpm. (1) Use jpm packages managed by MacPorts. These are available\ with prefix 'janet-' so the package 'joy' is on MacPorts\ as 'janet-joy' etc. e.g. \$ port install janet-joy (2) Use jpm packages via jpm itself. It is _not_ recommended\ to install packages globally as they would be unmanaged by\ MacPorts meaning if you uninstall jpm these files would\ remain on disk and not be cleaned up as you might expect.\ Luckily jpm has functionality to install packages into\ a custom directory (e.g. local to your janet project).\ This is toggled via the --local flag when invoking jpm\ See the installation notes for jpm for more information\ beyond the basic example below. e.g. \$ port install jpm \$ cd ~/projects/foo && jpm install --local joy Note: use of sudo in the above commands depends on whether your\ MacPorts is installed to a directory owned by the root user. "