1DOLLY 72PACKAGE zsh3REQUIRES HOST runtime@045# zsh from upstream's release, ported to spawn: Dolly has no fork or exec6# (README.md, zsh-dolly.patch). It is configured outside, as Emacs is7# (prepare-zsh.sh); Dolly compiles every object and links in the modules8# zsh links statically, through Binaryen's cast emulation: zsh calls its9# hooks, builtins and callbacks through pointers of a common type.10FROM /v0.1.4/demos/tools/Dollyfile-tools-build 81e1c1bc8b06c83b1daead6c8f09bc8b1382e8fe165f896a98109396b58bb30511USE /v0.1.4/demos/tmux/Dollyfile-libterminfo c42e6397cc80bf6082b067114ee31c0ab431a86578d602bb5332189d7ee29dad12USE /v0.1.4/demos/tools/Dollyfile-binaryen cd48f69ce9313510b9d9841a27dafa3612b28b373aa533e09c63a61ceb68d1cd1314REQUIRES HEADER libc15REQUIRES HEADER termcap16REQUIRES LIB    terminfo17REQUIRES TOOL   cat18REQUIRES TOOL   cc19REQUIRES TOOL   cmp20REQUIRES TOOL   cp21REQUIRES TOOL   gzip22REQUIRES TOOL   head23REQUIRES TOOL   ls24REQUIRES TOOL   make25REQUIRES TOOL   mkdir26REQUIRES TOOL   printenv27REQUIRES TOOL   sleep28REQUIRES TOOL   sort29REQUIRES TOOL   tail30REQUIRES TOOL   tar31REQUIRES TOOL   text-page32REQUIRES TOOL   tr33REQUIRES TOOL   wasm-opt3435SOURCE /v0.1.4/dist/static/zsh/zsh.tar.gz 15da8e93daa5adc5b065ce24fb0e158a19706624926be49811ec3a7ffa53d4d3 /tmp/zsh.tar.gz36SLOP gzip -dc /tmp/zsh.tar.gz | tar -xf - -C /3738FILE /tmp/zsh.mk39    .RECIPEPREFIX := >40    .DELETE_ON_ERROR:41    MAKEFLAGS += -r42    S := /tmp/zsh/Src43    # zsh's objects and the modules configure links in (Src/Makemod and the44    # modules' Makefiles), compiled as its COMPILE rule does, with the GNU45    # extensions zsh turns on for Linux and musl (setresuid, setresgid).46    MAIN := main builtin compat cond context exec glob hashtable hashnameddir hist init input \47      jobs lex linklist loop math mem module options params parse pattern prompt signals \48      signames sort string subst text utils openssh_bsd_setres_id49    MODULES := Builtins/rlimits Builtins/sched Modules/datetime Modules/langinfo \50      Modules/parameter Modules/termcap Modules/zutil Zle/compctl Zle/complete Zle/compcore \51      Zle/compmatch Zle/compresult Zle/complist Zle/computil Zle/zleparameter \52      $(addprefix Zle/,zle_bindings zle_hist zle_keymap zle_main zle_misc zle_move zle_params \53        zle_refresh zle_thingy zle_tricky zle_utils zle_vi zle_word textobjects)54    all: /usr/bin/zsh55    $(S)/%.o: $(S)/%.c56    >cc -c -I$(dir $<) -I$(S) -I$(S)/Zle -DHAVE_CONFIG_H -D_GNU_SOURCE -O2 -o $@ $<57    /usr/bin/zsh: $(addprefix $(S)/,$(addsuffix .o,$(MAIN) $(MODULES)))58    >cc --dolly-cast-emulation $^ -lterminfo -lm -o $@59SLOP make -j4 -f /tmp/zsh.mk6061# What a fork did, by spawn: programs, pipelines through builtins and62# programs, command substitution, a function in a pipeline, a subshell that63# keeps its directory, a background job, exec; assignments for one command64# stay out of the shell, and a missing command is a status.65FILE /tmp/zsh-check.zsh66    ls -d /tmp /usr; print "after ls $?"67    print -l c a b | sort | head -n 268    x=$(print inside); print "subst $x"69    FOO=bar printenv FOO; print "FOO here [$FOO]"70    nosuchcommand 2> /dev/null; print "status $?"71    print to-file > /tmp/zsh-check.txt; cat /tmp/zsh-check.txt72    f() { print "in f $1" }; f arg | tr a-z A-Z73    (cd /usr && pwd); [[ $PWD != /usr ]] && print "outer stays"74    for i in 1 2 3; do print $i; done | tail -n 175    ls /usr | while read d; do n=$((n + 1)); done; (( n > 0 )) && print "read in the shell"76    sleep 1 & wait; print waited77    zsh -fc 'exec print exec-done'78FILE /tmp/zsh-check.expected79    /tmp80    /usr81    after ls 082    a83    b84    subst inside85    bar86    FOO here []87    status 12788    to-file89    IN F ARG90    /usr91    outer stays92    393    read in the shell94    waited95    exec-done96SLOP zsh -f /tmp/zsh-check.zsh > /tmp/zsh-check.out 2>&1 && cmp /tmp/zsh-check.out /tmp/zsh-check.expected9798# The functions zsh looks for in its FPATH: completion, prompts, line editing.99SLOP mkdir -p /usr/share/zsh/5.9.2/functions100SLOP cp /tmp/zsh/Completion/compinit /tmp/zsh/Completion/compaudit /tmp/zsh/Completion/compdump /tmp/zsh/Completion/compinstall /usr/share/zsh/5.9.2/functions/101SLOP for f in /tmp/zsh/Completion/Base/*/* /tmp/zsh/Completion/Unix/*/* /tmp/zsh/Completion/Zsh/*/* /tmp/zsh/Functions/Misc/* /tmp/zsh/Functions/Prompts/* /tmp/zsh/Functions/Zle/*; do cp $f /usr/share/zsh/5.9.2/functions/; done102SLOP zsh -fc 'autoload -Uz compinit && compinit -D && (( ${#_comps} > 1000 ))'103104SLOP mkdir -p /usr/share/licenses/zsh105SLOP cp /tmp/zsh/LICENCE /usr/share/licenses/zsh/LICENCE106SLOP text-page /tmp/zsh/Doc/zsh.1107EXPORTS TOOL zsh108EXPORTS FOLDER zsh-functions /usr/share/zsh/5.9.2/functions109FILE /usr/share/licenses/zsh/LICENCE110# zsh links libterminfo statically and carries its licence.111FILE /usr/share/licenses/netbsd-curses/COPYING112FILE /usr/share/man/cat1/zsh.1113