commit 6cf4b47
hovercats
·
2024-10-04 10:54:54 +0000 UTC
parent eb1e713
squashfs-tools-ng: import from oasis
7 files changed,
+241,
-0
+3,
-0
1@@ -300,3 +300,6 @@
2 path = pkg/fuse/src
3 url = https://github.com/libfuse/libfuse
4 ignore = all
5+[submodule "pkg/squashfs-tools-ng/src"]
6+ path = pkg/squashfs-tools-ng/src
7+ url = https://github.com/AgentD/squashfs-tools-ng
+1,
-0
1@@ -82,6 +82,7 @@ subgen 'scdoc'
2 subgen 'sdhcp'
3 subgen 'skeleton'
4 subgen 'smu'
5+subgen 'squashfs-tools-ng'
6 subgen 'st'
7 subgen 'strace'
8 subgen 'swc'
+43,
-0
1@@ -0,0 +1,43 @@
2+#define WITH_GZIP 1
3+#define WITH_ZSTD 1
4+#define NO_CUSTOM_ALLOC 1
5+
6+#define HAVE_ALLOCA_H 1
7+/* #undef HAVE_BZLIB_H */
8+#define HAVE_DLFCN_H 1
9+#define HAVE_FNMATCH 1
10+#define HAVE_GETOPT 1
11+#define HAVE_GETOPT_LONG 1
12+#define HAVE_GETSUBOPT 1
13+#define HAVE_INTTYPES_H 1
14+#define HAVE_MEMORY_H 1
15+#define HAVE_PTHREAD_PRIO_INHERIT 1
16+/* #undef HAVE_SELINUX_LABEL_H */
17+/* #undef HAVE_SELINUX_SELINUX_H */
18+#define HAVE_STDINT_H 1
19+#define HAVE_STDLIB_H 1
20+#define HAVE_STRINGS_H 1
21+#define HAVE_STRING_H 1
22+#define HAVE_STRNDUP 1
23+#define HAVE_SYS_STAT_H 1
24+#define HAVE_SYS_SYSINFO_H 1
25+#define HAVE_SYS_TYPES_H 1
26+#define HAVE_SYS_XATTR_H 1
27+#define HAVE_UNISTD_H 1
28+#define HAVE_ZSTD_STREAM 1
29+#define LT_OBJDIR ".libs/"
30+#define PACKAGE "squashfs-tools-ng"
31+#define PACKAGE_BUGREPORT "goliath@infraroot.at"
32+#define PACKAGE_NAME "squashfs-tools-ng"
33+#define PACKAGE_STRING "squashfs-tools-ng 1.1.3"
34+#define PACKAGE_TARNAME "squashfs-tools-ng"
35+#define PACKAGE_URL ""
36+#define PACKAGE_VERSION "1.1.3"
37+/* #undef PTHREAD_CREATE_JOINABLE */
38+#define STDC_HEADERS 1
39+#define VERSION "1.1.3"
40+#ifndef _DARWIN_USE_64_BIT_INODE
41+# define _DARWIN_USE_64_BIT_INODE 1
42+#endif
43+/* #undef _FILE_OFFSET_BITS */
44+/* #undef _LARGE_FILES */
+191,
-0
1@@ -0,0 +1,191 @@
2+cflags{
3+ '-std=c99', '-Wall', '-Wpedantic',
4+ '-Wno-discarded-qualifiers',
5+ '-D _GNU_SOURCE',
6+ '-I $srcdir',
7+ '-I $srcdir/include',
8+ '-I $dir',
9+}
10+
11+pkg.deps = {}
12+
13+local cfg = {}
14+for line in iterlines('config.h', 1) do
15+ local var = line:match('^#define (WITH_[%w_]+)')
16+ if var then
17+ cfg[var] = true
18+ end
19+end
20+
21+local srcs = paths[[
22+ lib/sqfs/(
23+ id_table.c super.c
24+ readdir.c xattr/xattr.c
25+ write_table.c meta_writer.c
26+ read_super.c meta_reader.c
27+ read_inode.c write_inode.c
28+ dir_writer.c xattr/xattr_reader.c
29+ read_table.c comp/compressor.c
30+ dir_reader.c read_tree.c
31+ inode.c xattr/xattr_writer.c
32+ xattr/xattr_writer_flush.c
33+ xattr/xattr_writer_record.c
34+ write_super.c data_reader.c
35+ block_processor/frontend.c
36+ block_processor/block_processor.c
37+ block_processor/backend.c
38+ frag_table.c
39+ block_writer.c
40+ misc.c
41+
42+ unix/io_file.c
43+ )
44+ lib/util/threadpool.c
45+ libutil.a
46+]]
47+
48+if cfg.WITH_GZIP then
49+ cflags{'-isystem $builddir/pkg/zlib/include'}
50+ table.insert(pkg.deps, 'pkg/zlib/headers')
51+ table.insert(srcs, {
52+ 'lib/sqfs/comp/gzip.c',
53+ '$builddir/pkg/zlib/libz.a',
54+ })
55+end
56+
57+if cfg.WITH_ZSTD then
58+ cflags{'-isystem $builddir/pkg/zstd/include'}
59+ table.insert(pkg.deps, 'pkg/zstd/headers')
60+ table.insert(srcs, {
61+ 'lib/sqfs/comp/zstd.c',
62+ '$builddir/pkg/zstd/libzstd.a',
63+ })
64+end
65+
66+lib('libsquashfs.a', srcs)
67+
68+lib('libcommon.a', [[
69+ lib/common/(
70+ inode_stat.c hardlink.c
71+ print_version.c data_reader_dump.c
72+ compress.c comp_opt.c
73+ data_writer.c
74+ get_path.c data_writer_ostream.c
75+ perror.c
76+ mkdir_p.c parse_size.c
77+ print_size.c
78+ writer/(
79+ init.c cleanup.c
80+ serialize_fstree.c
81+ finish.c
82+ )
83+ )
84+ libsquashfs.a.d
85+ libfstream.a
86+ libfstree.a.d
87+]])
88+
89+lib('libfstream.a', [[
90+ lib/fstream/(
91+ ostream.c printf.c
92+ istream.c get_line.c
93+ compressor.c
94+ compress/(
95+ ostream_compressor.c
96+ gzip.c
97+ zstd.c
98+ )
99+ uncompress/(
100+ istream_compressor.c
101+ autodetect.c
102+ gzip.c
103+ zstd.c
104+ )
105+ unix/(ostream.c istream.c)
106+ )
107+]])
108+
109+lib('libfstree.a', [[
110+ lib/fstree/(
111+ fstree.c fstree_from_file.c
112+ fstree_sort.c hardlink.c
113+ post_process.c get_path.c
114+ mknode.c fstree_from_dir.c
115+ add_by_path.c get_by_path.c
116+ source_date_epoch.c
117+ canonicalize_name.c
118+ filename_sane.c
119+ )
120+ libfstream.a
121+]])
122+
123+lib('libtar.a', [[
124+ lib/tar/(
125+ read_header.c write_header.c
126+ number.c checksum.c cleanup.c
127+ read_sparse_map.c read_sparse_map_old.c
128+ base64.c urldecode.c
129+ padd_file.c record_to_memory.c
130+ pax_header.c read_sparse_map_new.c
131+ )
132+]])
133+
134+lib('libutil.a', [[
135+ lib/util/(
136+ str_table.c alloc.c
137+ rbtree.c
138+ array.c
139+ xxhash.c hash_table.c
140+ threadpool_serial.c
141+ is_memory_zero.c
142+ )
143+]])
144+
145+exe('gensquashfs', [[
146+ bin/gensquashfs/(mkfs.c options.c selinux.c dirscan_xattr.c)
147+ libcommon.a.d
148+]])
149+file('bin/gensquashfs', '755', '$outdir/gensquashfs')
150+man{'bin/gensquashfs/gensquashfs.1'}
151+
152+exe('rdsquashfs', [[
153+ bin/rdsquashfs/(
154+ rdsquashfs.c
155+ list_files.c options.c
156+ restore_fstree.c describe.c
157+ fill_files.c dump_xattrs.c
158+ stat.c
159+ )
160+ libcommon.a.d
161+]])
162+file('bin/rdsquashfs', '755', '$outdir/rdsquashfs')
163+man{'bin/rdsquashfs/rdsquashfs.1'}
164+
165+exe('sqfsdiff', [[
166+ bin/sqfsdiff/(
167+ sqfsdiff.c
168+ util.c options.c
169+ compare_dir.c node_compare.c
170+ compare_files.c super.c
171+ extract.c
172+ )
173+ libcommon.a.d
174+]])
175+file('bin/sqfsdiff', '755', '$outdir/sqfsdiff')
176+man{'bin/sqfsdiff/sqfsdiff.1'}
177+
178+exe('sqfs2tar', [[
179+ bin/sqfs2tar/(sqfs2tar.c options.c write_tree.c xattr.c)
180+ libcommon.a.d libtar.a
181+]])
182+file('bin/sqfs2tar', '755', '$outdir/sqfs2tar')
183+man{'bin/sqfs2tar/sqfs2tar.1'}
184+
185+exe('tar2sqfs', [[
186+ bin/tar2sqfs/(tar2sqfs.c options.c process_tarball.c)
187+ libcommon.a.d libtar.a
188+]])
189+file('bin/tar2sqfs', '755', '$outdir/tar2sqfs')
190+man{'bin/tar2sqfs/tar2sqfs.1'}
191+
192+fetch 'git'
+1,
-0
1@@ -0,0 +1 @@
2+Subproject commit 11dfe80e867f199bbf40a3bdcffa77b4aa6429f6
+1,
-0
1@@ -0,0 +1 @@
2+1.1.3 r0
M
sets.lua
+1,
-0
1@@ -31,6 +31,7 @@ return {
2 'netbsd-curses',
3 'openntpd',
4 'openssh',
5+ 'squashfs-tools-ng',
6 'tz',
7 'util-linux',
8 'vis',