@daugasauron/dolly-package-tmux 0.0.0-stage → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Dollyfile-cc +29 -0
- package/Dollyfile-curl +57 -0
- package/Dollyfile-display +34 -0
- package/Dollyfile-ghostty-build +185 -0
- package/Dollyfile-git +155 -0
- package/Dollyfile-gzip +19 -0
- package/Dollyfile-libdolly-display +24 -0
- package/Dollyfile-libdolly-input +24 -0
- package/Dollyfile-libdolly-pty +24 -0
- package/Dollyfile-libdolly-sockets +24 -0
- package/Dollyfile-make +11 -0
- package/Dollyfile-mandoc +131 -0
- package/Dollyfile-system-build +364 -0
- package/Dollyfile-system-tools +205 -0
- package/Dollyfile-vi +67 -0
- package/Dollyfile-zig-build +154 -0
- package/Dollyfile-zlib +48 -0
- package/README.md +11 -2
- package/amy-index.txt +1 -0
- package/demos/cmake/Dollyfile-cmake +80 -0
- package/demos/cmake/Dollyfile-cmake-build +15 -0
- package/demos/cmake/Dollyfile-libuv +44 -0
- package/demos/tmux/Dollyfile-libevent +144 -0
- package/demos/tmux/Dollyfile-libterminfo +78 -0
- package/demos/tmux/Dollyfile-tmux +102 -0
- package/demos/tools/Dollyfile-tools-build +22 -0
- package/dist/dolly-cc-system-snapshot.json +1918 -0
- package/dist/dolly-cmake-build-system-snapshot.json +6588 -0
- package/dist/dolly-cmake-system-snapshot.json +4434 -0
- package/dist/dolly-curl-system-snapshot.json +73 -0
- package/dist/dolly-display-system-snapshot.json +111 -0
- package/dist/dolly-ghostty-build-system-snapshot.json +3541 -0
- package/dist/dolly-git-system-snapshot.json +137 -0
- package/dist/dolly-gzip-system-snapshot.json +69 -0
- package/dist/dolly-images.json +871 -0
- package/dist/dolly-libdolly-display-system-snapshot.json +57 -0
- package/dist/dolly-libdolly-input-system-snapshot.json +57 -0
- package/dist/dolly-libdolly-pty-system-snapshot.json +57 -0
- package/dist/dolly-libdolly-sockets-system-snapshot.json +57 -0
- package/dist/dolly-libevent-system-snapshot.json +164 -0
- package/dist/dolly-libterminfo-system-snapshot.json +148 -0
- package/dist/dolly-libuv-system-snapshot.json +162 -0
- package/dist/dolly-make-system-snapshot.json +57 -0
- package/dist/dolly-mandoc-system-snapshot.json +152 -0
- package/dist/dolly-system-build-system-snapshot.json +1947 -0
- package/dist/dolly-system-tools-system-snapshot.json +2275 -0
- package/dist/dolly-tmux-system-snapshot.json +276 -0
- package/dist/dolly-tools-build-system-snapshot.json +6609 -0
- package/dist/dolly-vi-system-snapshot.json +82 -0
- package/dist/dolly-zig-build-system-snapshot.json +3417 -0
- package/dist/dolly-zlib-system-snapshot.json +59 -0
- package/dist/packs/7026f8e001e3e0a68dd389200dfd417a548c0852a31a29558d3f02b44d4d8393.snapshot.gz +0 -0
- package/package.json +12 -4
package/Dollyfile-mandoc
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
DOLLY 8
|
|
2
|
+
PACKAGE mandoc
|
|
3
|
+
REQUIRES HOST runtime@0
|
|
4
|
+
|
|
5
|
+
# mandoc, the formatter of manual pages, from upstream's release archive,
|
|
6
|
+
# unchanged: it turns a page of man or mdoc macros into text. Slop does not
|
|
7
|
+
# run its configure, so config.h says what that script would find here. The
|
|
8
|
+
# man, apropos and makewhatis the same program can be are not installed: man
|
|
9
|
+
# is the core's, and prints a page of text. A package that ships upstream's
|
|
10
|
+
# pages uses this one to format them with text-page when it is built.
|
|
11
|
+
FROM /Dollyfile-system-tools 7dc08859cff6c590c9bf42278822be15b530cc9d18438481449469995c2bf8fe
|
|
12
|
+
USE /Dollyfile-zlib acf8f8daaba24468b5b521bbb4d4ba3e034fe28d7a2d92fc680d2e39a1cea971
|
|
13
|
+
|
|
14
|
+
REQUIRES HEADER libc
|
|
15
|
+
REQUIRES HEADER zlib
|
|
16
|
+
REQUIRES LIB z
|
|
17
|
+
REQUIRES TOOL awk
|
|
18
|
+
REQUIRES TOOL basename
|
|
19
|
+
REQUIRES TOOL cc
|
|
20
|
+
REQUIRES TOOL cp
|
|
21
|
+
REQUIRES TOOL grep
|
|
22
|
+
REQUIRES TOOL gzip
|
|
23
|
+
REQUIRES TOOL make
|
|
24
|
+
REQUIRES TOOL mkdir
|
|
25
|
+
REQUIRES TOOL rm
|
|
26
|
+
REQUIRES TOOL tar
|
|
27
|
+
REQUIRES TOOL test
|
|
28
|
+
|
|
29
|
+
SOURCE /dist/static/default/mandoc-1.14.6.tar.gz 8bf0d570f01e70a6e124884088870cbed7537f36328d512909eb10cd53179d9c /tmp/mandoc.tar.gz
|
|
30
|
+
SLOP gzip -dc /tmp/mandoc.tar.gz | tar -xf - -C /tmp
|
|
31
|
+
|
|
32
|
+
# Not found here: fts, getprogname, recallocarray, strtonum, ohash, BSD's
|
|
33
|
+
# word boundaries in regcomp, pledge and sandbox_init; the archive's own
|
|
34
|
+
# replacements are compiled for the first five.
|
|
35
|
+
FILE /tmp/mandoc-1.14.6/config.h
|
|
36
|
+
#define _GNU_SOURCE
|
|
37
|
+
#include <sys/types.h>
|
|
38
|
+
#define MAN_CONF_FILE "/etc/man.conf"
|
|
39
|
+
#define MANPATH_BASE "/usr/share/man"
|
|
40
|
+
#define MANPATH_DEFAULT "/usr/share/man"
|
|
41
|
+
#define OSENUM MANDOC_OS_OTHER
|
|
42
|
+
#define UTF8_LOCALE "C.UTF-8"
|
|
43
|
+
#define EFTYPE EINVAL
|
|
44
|
+
#define HAVE_DIRENT_NAMLEN 0
|
|
45
|
+
#define HAVE_ENDIAN 1
|
|
46
|
+
#define HAVE_ERR 1
|
|
47
|
+
#define HAVE_FTS 0
|
|
48
|
+
#define HAVE_FTS_COMPARE_CONST 0
|
|
49
|
+
#define HAVE_GETLINE 1
|
|
50
|
+
#define HAVE_GETSUBOPT 1
|
|
51
|
+
#define HAVE_ISBLANK 1
|
|
52
|
+
#define HAVE_LESS_T 1
|
|
53
|
+
#define HAVE_MKDTEMP 1
|
|
54
|
+
#define HAVE_MKSTEMPS 1
|
|
55
|
+
#define HAVE_NTOHL 1
|
|
56
|
+
#define HAVE_PLEDGE 0
|
|
57
|
+
#define HAVE_PROGNAME 0
|
|
58
|
+
#define HAVE_REALLOCARRAY 1
|
|
59
|
+
#define HAVE_RECALLOCARRAY 0
|
|
60
|
+
#define HAVE_REWB_BSD 0
|
|
61
|
+
#define HAVE_REWB_SYSV 1
|
|
62
|
+
#define HAVE_SANDBOX_INIT 0
|
|
63
|
+
#define HAVE_STRCASESTR 1
|
|
64
|
+
#define HAVE_STRINGLIST 0
|
|
65
|
+
#define HAVE_STRLCAT 1
|
|
66
|
+
#define HAVE_STRLCPY 1
|
|
67
|
+
#define HAVE_STRNDUP 1
|
|
68
|
+
#define HAVE_STRPTIME 1
|
|
69
|
+
#define HAVE_STRSEP 1
|
|
70
|
+
#define HAVE_STRTONUM 0
|
|
71
|
+
#define HAVE_SYS_ENDIAN 0
|
|
72
|
+
#define HAVE_VASPRINTF 1
|
|
73
|
+
#define HAVE_WCHAR 1
|
|
74
|
+
#define HAVE_OHASH 0
|
|
75
|
+
#define NEED_XPG4_2 0
|
|
76
|
+
#define BINM_APROPOS "apropos"
|
|
77
|
+
#define BINM_CATMAN "catman"
|
|
78
|
+
#define BINM_MAKEWHATIS "makewhatis"
|
|
79
|
+
#define BINM_MAN "man"
|
|
80
|
+
#define BINM_SOELIM "soelim"
|
|
81
|
+
#define BINM_WHATIS "whatis"
|
|
82
|
+
#define BINM_PAGER "less"
|
|
83
|
+
extern const char *getprogname(void);
|
|
84
|
+
extern void setprogname(const char *);
|
|
85
|
+
extern void *recallocarray(void *, size_t, size_t, size_t);
|
|
86
|
+
extern long long strtonum(const char *, long long, long long, const char **);
|
|
87
|
+
FILE /tmp/mandoc.mk
|
|
88
|
+
.RECIPEPREFIX := >
|
|
89
|
+
S := /tmp/mandoc-1.14.6
|
|
90
|
+
BIN := /usr/bin
|
|
91
|
+
# The objects of upstream's Makefile for mandoc: every source but
|
|
92
|
+
# configure's tests, the archive's other programs and the replacements of
|
|
93
|
+
# what libc has.
|
|
94
|
+
SOURCES := $(filter-out $S/test-% $S/compat_% $(addprefix $S/,cgi.c catman.c mandocd.c demandoc.c soelim.c), \
|
|
95
|
+
$(wildcard $S/*.c)) $(addprefix $S/compat_,fts.c ohash.c progname.c recallocarray.c strtonum.c)
|
|
96
|
+
$(BIN)/mandoc: $(SOURCES:.c=.o)
|
|
97
|
+
>cc $^ -lz -o $@
|
|
98
|
+
$S/%.o: $S/%.c $S/config.h
|
|
99
|
+
>cc -O2 -c $< -o $@
|
|
100
|
+
SLOP make -j4 -f /tmp/mandoc.mk
|
|
101
|
+
SLOP mkdir -p /usr/share/licenses/mandoc
|
|
102
|
+
SLOP cp /tmp/mandoc-1.14.6/LICENSE /usr/share/licenses/mandoc/LICENSE
|
|
103
|
+
|
|
104
|
+
# man prints /usr/share/man/cat1/NAME.1 as it is, before the page of macros
|
|
105
|
+
# in man1. mandoc marks bold and underlined words by overstriking; a reader
|
|
106
|
+
# without a pager, an agent among them, wants the words alone, so awk takes
|
|
107
|
+
# the overstrikes out.
|
|
108
|
+
FILE /usr/bin/text-page
|
|
109
|
+
#!/bin/slop
|
|
110
|
+
# text-page PAGE...: each manual page as plain text in /usr/share/man/cat1.
|
|
111
|
+
for page in "$@"; do
|
|
112
|
+
text="/usr/share/man/cat1/$(basename "$page")"
|
|
113
|
+
mandoc -T utf8 "$page" | LC_ALL=C.UTF-8 awk '{ gsub(/.\b/, ""); print }' > "$text"
|
|
114
|
+
test -s "$text" || exit 1
|
|
115
|
+
done
|
|
116
|
+
|
|
117
|
+
# A letter outside ASCII loses its overstrike whole.
|
|
118
|
+
FILE /tmp/text-page-check.1
|
|
119
|
+
.TH CHECK 1
|
|
120
|
+
.SH NAME
|
|
121
|
+
check \- caf\['e]
|
|
122
|
+
.SH DESCRIPTION
|
|
123
|
+
\fBcaf\['e]\fR
|
|
124
|
+
SLOP text-page /tmp/text-page-check.1 && grep -c 'café' /usr/share/man/cat1/text-page-check.1 | grep -qx 2
|
|
125
|
+
SLOP rm /usr/share/man/cat1/text-page-check.1
|
|
126
|
+
SLOP text-page /tmp/mandoc-1.14.6/mandoc.1 && grep -q 'format manual pages' /usr/share/man/cat1/mandoc.1
|
|
127
|
+
|
|
128
|
+
EXPORTS TOOL mandoc
|
|
129
|
+
EXPORTS TOOL text-page
|
|
130
|
+
FILE /usr/share/licenses/mandoc/LICENSE
|
|
131
|
+
FILE /usr/share/man/cat1/mandoc.1
|
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
DOLLY 8
|
|
2
|
+
TOOLCHAIN system-build
|
|
3
|
+
REQUIRES HOST runtime@0
|
|
4
|
+
|
|
5
|
+
# This is the first step. It has no requirements: its exact compiler commands
|
|
6
|
+
# and C headers are the externally supplied bootstrap seed. How those headers
|
|
7
|
+
# eventually map to the lower-level machine contract is deliberately open.
|
|
8
|
+
SOURCE /include/dolly/runtime.h d57f5242814e516035781cc4fb23c6c5d6c8c6b1b89eafc7447f566fe0b7ad21 /usr/include/dolly/runtime.h
|
|
9
|
+
SOURCE /include/dolly/process.h 48ee65d4ed5513e197d8cc6e9e7b2265fc510084931d3620290ccbc7075dfba6 /usr/include/dolly/process.h
|
|
10
|
+
SOURCE /include/dolly/host.h 9737f9b15bd65f5732e16bd942fe593132c7c886c3076dfda89a529a23fee08a /usr/include/dolly/host.h
|
|
11
|
+
SOURCE /include/dolly/host-abi.h 3f2d26426bb088d61a0cc18b6c464697e98c83d8d34ffaf1d063768e619eb766 /usr/include/dolly/host-abi.h
|
|
12
|
+
|
|
13
|
+
# /usr/include also holds the headers of the modules whose clients the seed
|
|
14
|
+
# holds (host/README.md); every other module's are in its package.
|
|
15
|
+
EXPORTS HEADER libc /usr/include
|
|
16
|
+
EXPORTS HEADER runtime /usr/include/dolly/runtime.h
|
|
17
|
+
EXPORTS HEADER process /usr/include/dolly/process.h
|
|
18
|
+
EXPORTS HEADER host /usr/include/dolly/host.h
|
|
19
|
+
EXPORTS HEADER host-abi /usr/include/dolly/host-abi.h
|
|
20
|
+
EXPORTS LIB compiler-rt /usr/lib/libclang_rt.builtins.a
|
|
21
|
+
|
|
22
|
+
# These are the complete externally seeded compiler dependencies, not ambient
|
|
23
|
+
# additions to every boot. Images retain them by re-exporting these objects.
|
|
24
|
+
EXPORTS FOLDER process-sdk /usr/lib/dolly/process
|
|
25
|
+
EXPORTS FOLDER clang-headers /usr/lib/clang/24/include
|
|
26
|
+
EXPORTS FILE compiler /usr/libexec/dolly/process-bin/compiler
|
|
27
|
+
EXPORTS FILE kernel-plugin-abi /usr/lib/dolly/dolly-kernel-plugin-0.wasm
|
|
28
|
+
|
|
29
|
+
# Every program links the process libc: Emscripten's musl.
|
|
30
|
+
SOURCE /dist/static/default/licenses/musl b870108ec5e7790e9f9919064f1b9421d62d5f9b0e6c230c6adf7ea2da62e97b /usr/share/licenses/musl/COPYRIGHT
|
|
31
|
+
SOURCE /dist/static/default/licenses/emscripten 620a78084fc7ca97c0b5dea9abf891f3ffcadfdbf305276f099c9c4e12fc1d86 /usr/share/licenses/emscripten/LICENSE
|
|
32
|
+
FILE /usr/share/licenses/musl/COPYRIGHT
|
|
33
|
+
FILE /usr/share/licenses/emscripten/LICENSE
|
|
34
|
+
|
|
35
|
+
# cc, c++, ld and ar forward to the seed compiler. Only that compiler exists at
|
|
36
|
+
# this point, so RUN starts it for them; every later recipe step uses SLOP.
|
|
37
|
+
SOURCE /dist/static/default/commands/cc.c 3009db3c344eebe44c1f3cdba7adf1c6c90a6268dc42c02e5030cd0311fbe819 /tmp/process-tools/cc.c
|
|
38
|
+
SOURCE /dist/static/default/commands/cxx.c e590097529a894fe768f046188bb3e949377ae8b4fecc41093dd3adac5ca820a /tmp/process-tools/cxx.c
|
|
39
|
+
SOURCE /dist/static/default/commands/ld.c 3bf4f5ed66fefbcb1a40bf98bc175e1e10775e7f99c756507d97ee8d95cfee5c /tmp/process-tools/ld.c
|
|
40
|
+
SOURCE /dist/static/default/commands/ar.c b8d9b3d57607f48f7c817e4828c35e9aa5cf9e5a92334876fd6081bfea6dcb98 /tmp/process-tools/ar.c
|
|
41
|
+
SOURCE /dist/static/default/commands/toolchain.h e3e12fa1eabbf433c25bc3db0ef71256667f21669a93ee2dcb0ac20ce18f6fa5 /tmp/process-tools/toolchain.h
|
|
42
|
+
SOURCE /dist/static/default/commands/toolchain.c 0339818db3f343c2258b9fd64c4182c3c36b4b40692cfe8f8def4cbc2e4910b6 /tmp/process-tools/toolchain.c
|
|
43
|
+
RUN /usr/libexec/dolly/process-bin/compiler --dolly-toolchain-mode=c -O1 /tmp/process-tools/cc.c /tmp/process-tools/toolchain.c -o /bin/cc
|
|
44
|
+
RUN /usr/libexec/dolly/process-bin/compiler --dolly-toolchain-mode=c -O1 /tmp/process-tools/cxx.c /tmp/process-tools/toolchain.c -o /bin/c++
|
|
45
|
+
RUN /usr/libexec/dolly/process-bin/compiler --dolly-toolchain-mode=c -O1 /tmp/process-tools/ld.c /tmp/process-tools/toolchain.c -o /bin/ld
|
|
46
|
+
RUN /usr/libexec/dolly/process-bin/compiler --dolly-toolchain-mode=c -O1 /tmp/process-tools/ar.c /tmp/process-tools/toolchain.c -o /bin/ar
|
|
47
|
+
|
|
48
|
+
EXPORTS ENV CC cc
|
|
49
|
+
EXPORTS ENV AR ar
|
|
50
|
+
EXPORTS ENV PATH /bin:/usr/bin
|
|
51
|
+
|
|
52
|
+
# These programs are linked against the seeded process adapter, so their
|
|
53
|
+
# complete input identity is the image build ID rather than this recipe
|
|
54
|
+
# alone. They are still validated as dolly-process-0 executables when loaded.
|
|
55
|
+
# /bin/dollyfile is the engine running this recipe; the bootstrap compiles it.
|
|
56
|
+
EXPORTS TOOL cc
|
|
57
|
+
EXPORTS TOOL c++
|
|
58
|
+
EXPORTS TOOL ld
|
|
59
|
+
EXPORTS TOOL ar
|
|
60
|
+
EXPORTS TOOL dollyfile
|
|
61
|
+
# Slop runs every SLOP step, so it is built before any shell exists: RUN
|
|
62
|
+
# starts the seed compiler alone.
|
|
63
|
+
REQUIRES HEADER libc
|
|
64
|
+
REQUIRES HEADER runtime
|
|
65
|
+
|
|
66
|
+
SOURCE /dist/static/default/slop.c 64729b60961f13bc719c710a61118cc2d66029661d5a513245ae66892013c050 /tmp/slop/slop.c
|
|
67
|
+
# Slop runs the code of the system's test, [, echo and printf itself.
|
|
68
|
+
SOURCE /dist/static/default/commands/test.c f8c6d9618f2f78a85eb8c177df0bb565e9f611f849cbc05401a4a888ce98c5f9 /tmp/slop/commands/test.c
|
|
69
|
+
SOURCE /dist/static/default/commands/echo.c 41f0735133bdae9226bf41909009e6db7fc298a0c9a9e1ee16934c09ad244335 /tmp/slop/commands/echo.c
|
|
70
|
+
SOURCE /dist/static/default/commands/printf.c 67ec89acb4cd3a1f5657e8ec8d54d58f1d796f6e2eb461545e34a884cce962dc /tmp/slop/commands/printf.c
|
|
71
|
+
RUN /usr/libexec/dolly/process-bin/compiler --dolly-toolchain-mode=c -O1 -DDOLLY_SHELL_UTILITY /tmp/slop/slop.c \
|
|
72
|
+
/tmp/slop/commands/test.c /tmp/slop/commands/echo.c /tmp/slop/commands/printf.c -o /bin/slop
|
|
73
|
+
|
|
74
|
+
EXPORTS TOOL slop
|
|
75
|
+
EXPORTS ENV SHELL /bin/slop
|
|
76
|
+
REQUIRES TOOL cc
|
|
77
|
+
|
|
78
|
+
# Dolly's own small commands, from programs/commands. Each TOOL export names the
|
|
79
|
+
# compiled result.
|
|
80
|
+
SOURCE /dist/static/default/commands/path.h 48c3a1e853aa273106234c8cdbbcae7d54c2f68f477373e0712d5e4748a9b788 /tmp/core-tools/path.h
|
|
81
|
+
SOURCE /dist/static/default/commands/mkdir.c 0713179c0b44c92e30d2fd22c87a930ca23f5417b1b3392b3997547648617ad6 /tmp/core-tools/mkdir.c
|
|
82
|
+
SOURCE /dist/static/default/commands/rm.c 2adb95ed560a55f22b91eda217fdbfc4108bd14ebe71b143ef706869d88a1997 /tmp/core-tools/rm.c
|
|
83
|
+
SOURCE /dist/static/default/commands/foreground.c e926c3c87764e44064744fc1d3cba008c46666ed7a06d351824ce67792bcdd76 /tmp/core-tools/foreground.c
|
|
84
|
+
SOURCE /dist/static/default/commands/help.c 5051d2894cf4733b35ee0a128bbccbc428ffd232314465123360b0fba866c70d /tmp/core-tools/help.c
|
|
85
|
+
SOURCE /dist/static/default/commands/man.c cd13cdece7706188e083a1754187cb19b7627e9cb8d2b294ba21cd2f88ff39d8 /tmp/core-tools/man.c
|
|
86
|
+
SOURCE /dist/static/default/commands/pwd.c 61b2840bfba274f511c3777f5b800bcdfff1947bef13b771c5d9a98eb5d03d3d /tmp/core-tools/pwd.c
|
|
87
|
+
SOURCE /dist/static/default/commands/cat.c 43eabd1e83f6c56cd5b5a7d8e5f9621e214c35e9407dea6bbce34120cb9da723 /tmp/core-tools/cat.c
|
|
88
|
+
SOURCE /dist/static/default/commands/echo.c 41f0735133bdae9226bf41909009e6db7fc298a0c9a9e1ee16934c09ad244335 /tmp/core-tools/echo.c
|
|
89
|
+
SOURCE /dist/static/default/commands/printf.c 67ec89acb4cd3a1f5657e8ec8d54d58f1d796f6e2eb461545e34a884cce962dc /tmp/core-tools/printf.c
|
|
90
|
+
SOURCE /dist/static/default/commands/touch.c 1eb3737abe39d9efe0c66d9e84a7bf6445fa2c07c12b46ad107cd799f2f0747c /tmp/core-tools/touch.c
|
|
91
|
+
SOURCE /dist/static/default/commands/clear.c f2e6915b3fe34393087ec7d04e61d090c0d62e551b86b36e8c3ff6bfff72598d /tmp/core-tools/clear.c
|
|
92
|
+
SOURCE /dist/static/default/commands/ls.c 7b1f4a0cdfb7e568b9a8e4ab9b9d784d52d034103915e11b1a25472bbe86d225 /tmp/core-tools/ls.c
|
|
93
|
+
SOURCE /dist/static/default/commands/stat.c 716e40d4db491a766b738e21c780d4f386641be93daccc4481b4d71b603110c2 /tmp/core-tools/stat.c
|
|
94
|
+
SOURCE /dist/static/default/commands/file.c 3fd871ab9da0233ab738683f3ae45ab8cac3b37df3be92359575448137b4ec37 /tmp/core-tools/file.c
|
|
95
|
+
SOURCE /dist/static/default/commands/test.c f8c6d9618f2f78a85eb8c177df0bb565e9f611f849cbc05401a4a888ce98c5f9 /tmp/core-tools/test.c
|
|
96
|
+
SOURCE /dist/static/default/commands/mv.c 9c14fbc337cd41f6d7733fb3a36346d845e14223e6207d427a74123a00ea6504 /tmp/core-tools/mv.c
|
|
97
|
+
SOURCE /dist/static/default/commands/cp.c 97eaeb0da4d284fa222de163bb99b86086398c4c76cdb6a77d0a06c699e7d2e9 /tmp/core-tools/cp.c
|
|
98
|
+
SOURCE /dist/static/default/commands/sleep.c 7723af4c2a4feb4a3393482fe3e58beaba36b2b0d83fcc67787b339a87e031e6 /tmp/core-tools/sleep.c
|
|
99
|
+
SLOP cc \
|
|
100
|
+
-O2 \
|
|
101
|
+
/tmp/core-tools/foreground.c \
|
|
102
|
+
-o /bin/foreground
|
|
103
|
+
SLOP cc \
|
|
104
|
+
-O2 \
|
|
105
|
+
/tmp/core-tools/help.c \
|
|
106
|
+
-o /bin/help
|
|
107
|
+
SLOP cc \
|
|
108
|
+
-O2 \
|
|
109
|
+
/tmp/core-tools/man.c \
|
|
110
|
+
-o /bin/man
|
|
111
|
+
SLOP cc \
|
|
112
|
+
-O2 \
|
|
113
|
+
/tmp/core-tools/pwd.c \
|
|
114
|
+
-o /bin/pwd
|
|
115
|
+
SLOP cc \
|
|
116
|
+
-O2 \
|
|
117
|
+
/tmp/core-tools/cat.c \
|
|
118
|
+
-o /bin/cat
|
|
119
|
+
SLOP cc \
|
|
120
|
+
-O2 \
|
|
121
|
+
/tmp/core-tools/echo.c \
|
|
122
|
+
-o /bin/echo
|
|
123
|
+
SLOP cc \
|
|
124
|
+
-O2 \
|
|
125
|
+
/tmp/core-tools/printf.c \
|
|
126
|
+
-o /bin/printf
|
|
127
|
+
SLOP cc \
|
|
128
|
+
-O2 \
|
|
129
|
+
/tmp/core-tools/touch.c \
|
|
130
|
+
-o /bin/touch
|
|
131
|
+
SLOP cc \
|
|
132
|
+
-O2 \
|
|
133
|
+
/tmp/core-tools/clear.c \
|
|
134
|
+
-o /bin/clear
|
|
135
|
+
SLOP cc \
|
|
136
|
+
-O2 \
|
|
137
|
+
/tmp/core-tools/ls.c \
|
|
138
|
+
-o /bin/ls
|
|
139
|
+
SLOP cc \
|
|
140
|
+
-O2 \
|
|
141
|
+
/tmp/core-tools/stat.c \
|
|
142
|
+
-o /bin/stat
|
|
143
|
+
SLOP cc \
|
|
144
|
+
-O2 \
|
|
145
|
+
/tmp/core-tools/file.c \
|
|
146
|
+
-o /bin/file
|
|
147
|
+
SLOP cc \
|
|
148
|
+
-O2 \
|
|
149
|
+
/tmp/core-tools/test.c \
|
|
150
|
+
-o /bin/test
|
|
151
|
+
SLOP cc \
|
|
152
|
+
-O2 \
|
|
153
|
+
/tmp/core-tools/test.c \
|
|
154
|
+
-o /bin/[
|
|
155
|
+
SLOP cc \
|
|
156
|
+
-O2 \
|
|
157
|
+
/tmp/core-tools/mv.c \
|
|
158
|
+
-o /bin/mv
|
|
159
|
+
SLOP cc \
|
|
160
|
+
-O2 \
|
|
161
|
+
/tmp/core-tools/cp.c \
|
|
162
|
+
-o /bin/cp
|
|
163
|
+
SLOP cc \
|
|
164
|
+
-O2 \
|
|
165
|
+
/tmp/core-tools/mkdir.c \
|
|
166
|
+
-o /bin/mkdir
|
|
167
|
+
SLOP cc \
|
|
168
|
+
-O2 \
|
|
169
|
+
/tmp/core-tools/rm.c \
|
|
170
|
+
-o /bin/rm
|
|
171
|
+
SLOP cc \
|
|
172
|
+
-O2 \
|
|
173
|
+
/tmp/core-tools/sleep.c \
|
|
174
|
+
-o /bin/sleep
|
|
175
|
+
EXPORTS TOOL mkdir
|
|
176
|
+
EXPORTS TOOL rm
|
|
177
|
+
EXPORTS TOOL foreground
|
|
178
|
+
EXPORTS TOOL help
|
|
179
|
+
EXPORTS TOOL man
|
|
180
|
+
EXPORTS TOOL pwd
|
|
181
|
+
EXPORTS TOOL cat
|
|
182
|
+
EXPORTS TOOL echo
|
|
183
|
+
EXPORTS TOOL printf
|
|
184
|
+
EXPORTS TOOL touch
|
|
185
|
+
EXPORTS TOOL clear
|
|
186
|
+
EXPORTS TOOL ls
|
|
187
|
+
EXPORTS TOOL stat
|
|
188
|
+
EXPORTS TOOL file
|
|
189
|
+
EXPORTS TOOL test
|
|
190
|
+
EXPORTS TOOL [
|
|
191
|
+
EXPORTS TOOL mv
|
|
192
|
+
EXPORTS TOOL cp
|
|
193
|
+
EXPORTS TOOL sleep
|
|
194
|
+
|
|
195
|
+
# A page is a file under /usr/share/man. One of Dolly's own commands has a
|
|
196
|
+
# single text: the page is what NAME --help prints, captured when it is built.
|
|
197
|
+
SLOP mkdir \
|
|
198
|
+
-p \
|
|
199
|
+
/usr/share/man/cat1 \
|
|
200
|
+
/usr/share/man/man1
|
|
201
|
+
SLOP for name in ar c++ cat cc clear cp dollyfile file foreground help ld ls man mkdir mv pwd rm sleep slop stat touch; do \
|
|
202
|
+
"/bin/$name" --help > "/usr/share/man/cat1/$name.1"; \
|
|
203
|
+
done
|
|
204
|
+
SLOP help >> /usr/share/man/cat1/slop.1
|
|
205
|
+
# echo prints its operands, --help among them, as POSIX says.
|
|
206
|
+
FILE /usr/share/man/cat1/echo.1
|
|
207
|
+
usage: echo [-n] [ARG ...]
|
|
208
|
+
Print the ARGs separated by spaces and a newline; -n as the first ARG omits the newline.
|
|
209
|
+
Backslashes are printed as they are: printf interprets escapes.
|
|
210
|
+
# printf takes a FORMAT, so --help is one too.
|
|
211
|
+
FILE /usr/share/man/cat1/printf.1
|
|
212
|
+
usage: printf FORMAT [ARG ...]
|
|
213
|
+
Write FORMAT, reused while ARGs remain. FORMAT's escapes are \\ \a \b \f \n \r \t \v,
|
|
214
|
+
\e, \xHH and \NNN in octal; \c ends the output. Each conversion takes the next ARG,
|
|
215
|
+
or an empty one: %s, %c, %b (the ARG's escapes, octal as \0NNN), %d %i %o %u %x %X,
|
|
216
|
+
whose ARG is a C integer constant or a quote and a character, and %e %f %g %a and
|
|
217
|
+
their capitals; flags - + space # 0, a width and a .precision, each may be *. %% is %.
|
|
218
|
+
FILE /usr/share/man/cat1/test.1
|
|
219
|
+
usage: test EXPRESSION
|
|
220
|
+
[ EXPRESSION ]
|
|
221
|
+
Exit 0 when EXPRESSION is true, 1 when it is false or missing, 2 when it is malformed.
|
|
222
|
+
-e FILE FILE exists (-r and -w are the same: there are no permission bits)
|
|
223
|
+
-f FILE FILE is a regular file
|
|
224
|
+
-d FILE FILE is a directory
|
|
225
|
+
-x FILE FILE is a regular file or a directory
|
|
226
|
+
-h FILE, -L FILE FILE is a symbolic link
|
|
227
|
+
-s FILE FILE is not empty
|
|
228
|
+
-b, -c, -p, -S FILE FILE is a block or character device, a FIFO, a socket
|
|
229
|
+
-g, -u, -k FILE the set-group-ID, set-user-ID, sticky bit of the fixed modes stat reports
|
|
230
|
+
-t FD descriptor FD is a terminal
|
|
231
|
+
-n STRING STRING is not empty (so is a lone STRING)
|
|
232
|
+
-z STRING STRING is empty
|
|
233
|
+
A = B, A != B the strings are equal (== is the same), differ
|
|
234
|
+
A < B, A > B A sorts before, after B
|
|
235
|
+
M -eq N the integers are equal; also -ne -lt -le -gt -ge
|
|
236
|
+
F -nt G, F -ot G F was modified after, before G (a missing file is older)
|
|
237
|
+
F -ef G F and G are the same file
|
|
238
|
+
! E, E -a E, E -o E, ( E ) not, and, or, grouping; up to four arguments
|
|
239
|
+
count, as POSIX says, so test "$x" = -a compares strings
|
|
240
|
+
example: test -d /tmp && [ "$HOME" != / ]
|
|
241
|
+
SLOP cp /usr/share/man/cat1/test.1 '/usr/share/man/cat1/[.1'
|
|
242
|
+
|
|
243
|
+
SLOP rm \
|
|
244
|
+
-rf \
|
|
245
|
+
/tmp/core-tools
|
|
246
|
+
REQUIRES TOOL rm
|
|
247
|
+
|
|
248
|
+
# Dolly's deliberately small ustar extractor.
|
|
249
|
+
SOURCE /dist/static/default/commands/tar.c 9e01d3df0905b893afe02232c713d5feafbead706392f7fc62967bdffad1779f /tmp/bootstrap/tar.c
|
|
250
|
+
SLOP cc \
|
|
251
|
+
/tmp/bootstrap/tar.c \
|
|
252
|
+
-o /bin/tar
|
|
253
|
+
|
|
254
|
+
EXPORTS TOOL tar
|
|
255
|
+
|
|
256
|
+
SLOP tar --help > /usr/share/man/cat1/tar.1
|
|
257
|
+
|
|
258
|
+
SLOP rm \
|
|
259
|
+
-rf \
|
|
260
|
+
/tmp/bootstrap
|
|
261
|
+
REQUIRES TOOL mkdir
|
|
262
|
+
REQUIRES TOOL tar
|
|
263
|
+
|
|
264
|
+
SOURCE /dist/static/default/make-4.4.1.tar 243b31e6a2d662ae9713910b8b2e326aecf7edfb9d16c5f736292055de8d3f37 /tmp/make-4.4.1.tar
|
|
265
|
+
SLOP tar \
|
|
266
|
+
-xf /tmp/make-4.4.1.tar \
|
|
267
|
+
-C /
|
|
268
|
+
SLOP mkdir \
|
|
269
|
+
-p \
|
|
270
|
+
/usr/bin
|
|
271
|
+
# The sources of upstream's build (dolly-sources.txt) in one cc.
|
|
272
|
+
SLOP CWD /usr/src/make cc \
|
|
273
|
+
-O1 \
|
|
274
|
+
-std=gnu11 \
|
|
275
|
+
-DHAVE_CONFIG_H \
|
|
276
|
+
-I /usr/src/make \
|
|
277
|
+
-I /usr/src/make/src \
|
|
278
|
+
-I /usr/src/make/lib \
|
|
279
|
+
'-DLIBDIR="/usr/lib"' \
|
|
280
|
+
'-DLOCALEDIR="/usr/share/locale"' \
|
|
281
|
+
$(cat dolly-sources.txt) \
|
|
282
|
+
-o /usr/bin/make
|
|
283
|
+
|
|
284
|
+
EXPORTS TOOL make
|
|
285
|
+
|
|
286
|
+
SLOP make \
|
|
287
|
+
--version
|
|
288
|
+
SLOP make --help > /usr/share/man/cat1/make.1
|
|
289
|
+
# FOLDER keeps the members a directory has at this row: the last page is written.
|
|
290
|
+
FOLDER /usr/share/man
|
|
291
|
+
|
|
292
|
+
FILE /usr/share/licenses/make/COPYING
|
|
293
|
+
|
|
294
|
+
SLOP rm \
|
|
295
|
+
-rf \
|
|
296
|
+
/tmp/make-4.4.1.tar \
|
|
297
|
+
/usr/src/make
|
|
298
|
+
# libc++, libc++abi and libunwind are Emscripten's copy, compiled here from its
|
|
299
|
+
# pinned source with the flags of its own build (tools/system_libs.py,
|
|
300
|
+
# -ww-wasmexcept; its -mt-wasmexcept build is the same bytes) for the headers
|
|
301
|
+
# installed beside them. Every C++ link takes them, including explicit
|
|
302
|
+
# -lc++/-lc++abi; the links above this point are C and need none.
|
|
303
|
+
REQUIRES TOOL c++
|
|
304
|
+
REQUIRES TOOL cc
|
|
305
|
+
REQUIRES TOOL ar
|
|
306
|
+
REQUIRES TOOL make
|
|
307
|
+
|
|
308
|
+
SOURCE /dist/static/default/libcxx-headers.tar 5e558f6f862d4a3fb22cc3c5b62c5e2652bf699f176fa349eeecb85d1a946735 /tmp/cpp/libcxx-headers.tar
|
|
309
|
+
SOURCE /dist/static/default/libcxx.tar 2dff834a9e5e907476841437518cfdd568563e922e7a22f3261da114e1b1a1e8 /tmp/cpp/libcxx.tar
|
|
310
|
+
SOURCE /dist/static/default/licenses/libcxx 539dd7aed86e8a4f12cbdd0e6c50c189c7d74847e4fecc64ce2c6ee3a01da38b /usr/share/licenses/libcxx/LICENSE
|
|
311
|
+
SOURCE /dist/static/default/licenses/libcxxabi e2b35be49f7284a45b7baca8fc7b3ab7440e7902392b2528a457816b5bb2a15c /usr/share/licenses/libcxxabi/LICENSE
|
|
312
|
+
|
|
313
|
+
SLOP tar \
|
|
314
|
+
-xf /tmp/cpp/libcxx-headers.tar \
|
|
315
|
+
-C /
|
|
316
|
+
SLOP tar \
|
|
317
|
+
-xf /tmp/cpp/libcxx.tar \
|
|
318
|
+
-C /
|
|
319
|
+
|
|
320
|
+
FILE /tmp/cpp/Makefile
|
|
321
|
+
.RECIPEPREFIX := >
|
|
322
|
+
S := /tmp/cpp/system/lib
|
|
323
|
+
L := /usr/lib/dolly/process
|
|
324
|
+
# Static code with hidden symbols, as for a program. The directory is the one
|
|
325
|
+
# Emscripten's build names, so the code and data are its archives' bytes.
|
|
326
|
+
FLAGS := -Oz -g -fno-pic -fvisibility=hidden -ffile-prefix-map=/tmp/cpp=/emsdk/emscripten -DNDEBUG
|
|
327
|
+
COMPILE := c++ $(FLAGS) -std=c++23 -D_LIBCPP_BUILDING_LIBRARY -I$S/libcxx/src -I/tmp/cpp/system/include
|
|
328
|
+
LIBCXX := $(filter-out %/int128_builtins.cpp,$(wildcard $S/libcxx/src/*.cpp $S/libcxx/src/filesystem/*.cpp \
|
|
329
|
+
$S/libcxx/src/ryu/*.cpp)) $(addprefix $S/libcxx/src/experimental/,chrono_exception.cpp keep.cpp log_hardening_failure.cpp)
|
|
330
|
+
LIBCXXABI := $(addprefix $S/libcxxabi/src/,abort_message.cpp cxa_aux_runtime.cpp cxa_default_handlers.cpp \
|
|
331
|
+
cxa_demangle.cpp cxa_guard.cpp cxa_handlers.cpp cxa_virtual.cpp cxa_thread_atexit.cpp fallback_malloc.cpp \
|
|
332
|
+
stdlib_new_delete.cpp stdlib_exception.cpp stdlib_stdexcept.cpp stdlib_typeinfo.cpp private_typeinfo.cpp \
|
|
333
|
+
cxa_exception_js_utils.cpp cxa_exception_storage.cpp cxa_exception.cpp cxa_personality.cpp)
|
|
334
|
+
objects = $(sort $(addprefix /tmp/cpp/$1/,$(addsuffix .o,$(basename $(notdir $2)))))
|
|
335
|
+
all: $L/libc++-ww-wasmexcept.a $L/libc++abi-ww-wasmexcept.a $L/libunwind-ww-wasmexcept.a
|
|
336
|
+
$L/libc++-ww-wasmexcept.a: $(call objects,libc++,$(LIBCXX))
|
|
337
|
+
$L/libc++abi-ww-wasmexcept.a: $(call objects,libc++abi,$(LIBCXXABI))
|
|
338
|
+
$L/libunwind-ww-wasmexcept.a: /tmp/cpp/libunwind/Unwind-wasm.o
|
|
339
|
+
$L/%.a:
|
|
340
|
+
>ar rc $@ $^
|
|
341
|
+
define compile
|
|
342
|
+
/tmp/cpp/$1/$(basename $(notdir $2)).o: $2
|
|
343
|
+
>$3 -c $$< -o $$@
|
|
344
|
+
endef
|
|
345
|
+
$(foreach source,$(LIBCXX),$(eval $(call compile,libc++,$(source),$(COMPILE) -DLIBCXX_BUILDING_LIBCXXABI=1 \
|
|
346
|
+
-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -DLIBC_NAMESPACE=__llvm_libc -I$S/llvm-libc)))
|
|
347
|
+
$(foreach source,$(LIBCXXABI),$(eval $(call compile,libc++abi,$(source),$(COMPILE) -D_LIBCXXABI_USE_FUTEX \
|
|
348
|
+
-D_LIBCXXABI_BUILDING_LIBRARY -DLIBCXXABI_NON_DEMANGLING_TERMINATE -I$S/libunwind/include)))
|
|
349
|
+
$(eval $(call compile,libunwind,$S/libunwind/src/Unwind-wasm.c,cc $(FLAGS) -D_LIBUNWIND_HIDE_SYMBOLS \
|
|
350
|
+
-I$S/libunwind/include))
|
|
351
|
+
SLOP mkdir /tmp/cpp/libc++ /tmp/cpp/libc++abi /tmp/cpp/libunwind
|
|
352
|
+
SLOP make -C /tmp/cpp -j2
|
|
353
|
+
|
|
354
|
+
EXPORTS HEADER cpp /usr/include/c++/v1
|
|
355
|
+
EXPORTS LIB c++ /usr/lib/dolly/process/libc++-ww-wasmexcept.a
|
|
356
|
+
EXPORTS LIB c++abi /usr/lib/dolly/process/libc++abi-ww-wasmexcept.a
|
|
357
|
+
EXPORTS ENV CXX c++
|
|
358
|
+
|
|
359
|
+
FILE /usr/share/licenses/libcxx/LICENSE
|
|
360
|
+
FILE /usr/share/licenses/libcxxabi/LICENSE
|
|
361
|
+
|
|
362
|
+
SLOP rm \
|
|
363
|
+
-rf \
|
|
364
|
+
/tmp/cpp
|