1DOLLY 72PACKAGE tmux3REQUIRES HOST runtime@04REQUIRES HOST pty@05REQUIRES HOST sockets@067# tmux from upstream's release archive over the libevent and libterminfo8# packages. tmux takes Dolly's port (README.md): a patch and its operating9# system file.10FROM /v0.1.4/demos/tools/Dollyfile-tools-build 81e1c1bc8b06c83b1daead6c8f09bc8b1382e8fe165f896a98109396b58bb30511USE /v0.1.4/Dollyfile-libdolly-sockets 53258b5e913671f33fe70294b3ae9f164f2c38e68c13c45b7e5ba29e4526c49712USE /v0.1.4/demos/tmux/Dollyfile-libevent a5c0d1124ce6c2e55963bdfdac63e8eb522f3132abe4baea418e33b4fbdbd3b213USE /v0.1.4/demos/tmux/Dollyfile-libterminfo c42e6397cc80bf6082b067114ee31c0ab431a86578d602bb5332189d7ee29dad1415REQUIRES HEADER libc16REQUIRES HEADER event17REQUIRES HEADER event218REQUIRES HEADER term19REQUIRES LIB event_core20REQUIRES LIB terminfo21REQUIRES TOOL cc22REQUIRES TOOL cp23REQUIRES TOOL grep24REQUIRES TOOL gzip25REQUIRES TOOL make26REQUIRES TOOL mkdir27REQUIRES TOOL patch28REQUIRES TOOL sleep29REQUIRES TOOL tar30REQUIRES TOOL text-page3132SOURCE /v0.1.4/dist/static/tmux/tmux-3.8.tar.gz e79c699c7e949dccd0a4a125e17b8d1261e311b16979dbc8eb34542f3966d82e /tmp/tmux.tar.gz33SOURCE /v0.1.4/dist/static/tmux/port.tar cc83eaa1e2ae12ac98e2415ebd136650eef0997e840394ff4eb3dfbcb46e0296 /tmp/tmux-port.tar34SLOP gzip -dc /tmp/tmux.tar.gz | tar -xf - -C /tmp35SLOP tar -xf /tmp/tmux-port.tar -C /36SLOP patch -p1 -d /tmp/tmux-3.8 -i /tmp/tmux-3.8/tmux-dolly.patch3738# tty.c includes <curses.h> and takes nothing from it. There is no curses39# here: tmux calls libterminfo, which <term.h> declares.40FILE /tmp/tmux-3.8/curses.h41    /* No curses library: see the recipe. */4243FILE /tmp/tmux.mk44    .RECIPEPREFIX := >45    .DELETE_ON_ERROR:46    MAKEFLAGS += -r47    T := /tmp/tmux-3.848    all: /usr/bin/tmux49    50    # tmux: HAVE is what its configure would define here and COMPAT the51    # functions it would replace. Not claimed: SO_PEERCRED, which sockets@052    # refuses (tmux then answers the one user itself). TMUX_SOCK_PERM is53    # upstream's knob: Dolly has no permission bits to check on /tmp/tmux-0.54    # TMUX_TERM is configure's pick among the names libterminfo knows.55    HAVE := DIRENT_H FCNTL_H INTTYPES_H PATHS_H PTY_H STDINT_H SYS_DIR_H \56      EVENT2_EVENT_H ERR_H DIRFD FLOCK SYSCONF ASPRINTF CFMAKERAW CLOCK_GETTIME \57      EXPLICIT_BZERO GETLINE MEMMEM SETENV STRCASESTR STRLCAT STRLCPY STRNDUP \58      STRNLEN STRSEP FORKPTY TIPARM59    COMPAT := base64 closefrom daemon fdforkpty freezero getdtablecount getdtablesize \60      getopt_long getpeereid getprogname htonll imsg imsg-buffer ntohll recallocarray \61      setproctitle strtonum unvis vis62    SOURCES := $(filter-out $(T)/osdep-%.c $(T)/image.c $(T)/image-sixel.c,$(wildcard $(T)/*.c)) \63      $(T)/osdep-dolly.c $(addprefix $(T)/compat/,$(addsuffix .c,$(COMPAT)))64    CPPFLAGS := -D_GNU_SOURCE $(addprefix -DHAVE_,$(HAVE)) '-DTMUX_VERSION="3.8"' \65      '-DTMUX_CONF="/etc/tmux.conf:~/.tmux.conf:$$XDG_CONFIG_HOME/tmux/tmux.conf:~/.config/tmux/tmux.conf"' \66      '-DTMUX_LOCK_CMD="lock -np"' '-DTMUX_TERM="tmux-256color"' -DTMUX_MOUSE=1 \67      -DTMUX_SOCK_PERM=0 -I$(T)68    $(T)/%.o: $(T)/%.c69    >cc -O2 -std=gnu99 $(CPPFLAGS) -c $< -o $@70    /usr/bin/tmux: $(SOURCES:.c=.o)71    >cc $^ -levent_core -lterminfo -ldolly-sockets -ldolly-pty -o $@72SLOP make -j4 -f /tmp/tmux.mk73SLOP mkdir -p /usr/share/licenses/tmux74SLOP cp /tmp/tmux-3.8/COPYING /usr/share/licenses/tmux/COPYING75SLOP text-page /tmp/tmux-3.8/tmux.17677# The server tmux starts, one pane on a pseudo-terminal, a command typed into78# its shell, the file that command wrote, and the server's end.79FILE /tmp/tmux-check.slop80    tmux -S /tmp/tmux-check.sock new-session -d -x 80 -y 2481    tmux -S /tmp/tmux-check.sock send-keys 'echo $((6 * 7)) > /tmp/tmux-check.out' Enter82    for attempt in 1 2 3 4 5 6 7 8 9 10; do test -s /tmp/tmux-check.out || sleep 1; done83    tmux -S /tmp/tmux-check.sock kill-server84    server='running [^ ]*tmux -D -S /tmp/tmux-check.sock$'85    for attempt in 1 2 3 4 5; do ! grep -q "$server" /proc/processes || sleep 1; done86    ! grep -q "$server" /proc/processes87    grep -qx 42 /tmp/tmux-check.out88SLOP tmux -V | grep -qx 'tmux 3.8'89SLOP slop -e /tmp/tmux-check.slop9091# Dolly's termcap programs (less) know one terminal, the display's92# (/etc/termcap): a pane is that one to them.93FILE /etc/tmux.conf94    set -g default-terminal xterm-256color9596EXPORTS TOOL tmux97FILE /usr/share/licenses/tmux/COPYING98# tmux links libevent and libterminfo statically and carries their licences.99FILE /usr/share/licenses/libevent/LICENSE100FILE /usr/share/licenses/netbsd-curses/COPYING101FILE /usr/share/man/cat1/tmux.1102