View | Details | Raw Unified | Return to bug 166646
Collapse All | Expand All

(-)ports/sysutils/squashfs-tools/Makefile (-2 / +4 lines)
Lines 6-12 Link Here
6
#
6
#
7
7
8
PORTNAME=	squashfs-tools
8
PORTNAME=	squashfs-tools
9
PORTVERSION=	4.0
9
PORTVERSION=	4.2
10
CATEGORIES=	sysutils
10
CATEGORIES=	sysutils
11
MASTER_SITES=	SF/squashfs/squashfs/${DISTNAME}/
11
MASTER_SITES=	SF/squashfs/squashfs/${DISTNAME}/
12
DISTNAME=	squashfs${PORTVERSION}
12
DISTNAME=	squashfs${PORTVERSION}
Lines 23-31 Link Here
23
LICENSE=	GPLv2
23
LICENSE=	GPLv2
24
LICENSE_FILE=	${WRKSRC}/../COPYING
24
LICENSE_FILE=	${WRKSRC}/../COPYING
25
25
26
USE_GMAKE=	yes
27
26
.ifndef NOPORTDOCS
28
.ifndef NOPORTDOCS
27
PORTDOCS=	ACKNOWLEDGEMENTS CHANGES COPYING \
29
PORTDOCS=	ACKNOWLEDGEMENTS CHANGES COPYING \
28
		PERFORMANCE.README README README-4.0
30
		PERFORMANCE.README README README-4.2
29
.endif
31
.endif
30
32
31
post-patch:
33
post-patch:
(-)ports/sysutils/squashfs-tools/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (squashfs4.0.tar.gz) = 18948edbe06bac2c4307eea99bfb962643e4b82e5b7edd541b4d743748e12e21
1
SHA256 (squashfs4.2.tar.gz) = d9e0195aa922dbb665ed322b9aaa96e04a476ee650f39bbeadb0d00b24022e96
2
SIZE (squashfs4.0.tar.gz) = 103979
2
SIZE (squashfs4.2.tar.gz) = 133173
(-)ports/sysutils/squashfs-tools/files/patch-squashfs-tools_Makefile (-9 / +34 lines)
Lines 1-12 Link Here
1
$FreeBSD: ports/sysutils/squashfs-tools/files/patch-squashfs-tools_Makefile,v 1.2 2010/09/14 16:19:16 ashish Exp $
1
Index: Makefile
2
2
@@ -26,7 +26,7 @@
3
--- Makefile	2010-04-29 17:40:26.000000000 +0200
3
 # To build using XZ Utils liblzma - install the library and uncomment
4
+++ Makefile	2010-04-29 17:43:19.000000000 +0200
4
 # the XZ_SUPPORT line below.
5
@@ -3,6 +3,6 @@
5
 #
6
 INCLUDEDIR = .
6
-#XZ_SUPPORT = 1
7
+XZ_SUPPORT = 1
7
 
8
 
8
-CFLAGS := -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -O2
9
+CFLAGS := -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -O2 -DFNM_EXTMATCH=0 -Wall -Werror
10
 
9
 
11
 all: mksquashfs unsquashfs
10
 ############ Building LZO support ##############
11
@@ -57,7 +57,7 @@
12
 # work) - download and unpack it, uncomment and set LZMA_DIR to unpacked source,
13
 # and uncomment the LZMA_SUPPORT line below.
14
 #
15
-#LZMA_XZ_SUPPORT = 1
16
+LZMA_XZ_SUPPORT = 1
17
 #LZMA_SUPPORT = 1
18
 #LZMA_DIR = ../../../../LZMA/lzma465
12
 
19
 
20
@@ -78,7 +78,7 @@
21
 # If your C library or build/target environment doesn't support XATTRs then
22
 # comment out the next line to build Mksquashfs and Unsquashfs without XATTR
23
 # support
24
-XATTR_SUPPORT = 1
25
+#XATTR_SUPPORT = 1
26
 
27
 # Select whether you wish xattrs to be stored by Mksquashfs and extracted
28
 # by Unsquashfs by default.  If selected users can disable xattr support by
29
@@ -104,7 +104,7 @@
30
 CFLAGS ?= -O2
31
 CFLAGS += $(EXTRA_CFLAGS) $(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 \
32
 	-D_LARGEFILE_SOURCE -D_GNU_SOURCE -DCOMP_DEFAULT=\"$(COMP_DEFAULT)\" \
33
-	-Wall
34
+	-DFNM_EXTMATCH=0 -Wall -Werror
35
 
36
 LIBS = -lpthread -lm
37
 ifeq ($(GZIP_SUPPORT),1)
(-)ports/sysutils/squashfs-tools/files/patch-squashfs-tools_unsquashfs.c (-7 / +10 lines)
Lines 1-10 Link Here
1
$FreeBSD: ports/sysutils/squashfs-tools/files/patch-squashfs-tools_unsquashfs.c,v 1.2 2010/09/14 16:19:16 ashish Exp $
1
Index: unsquashfs.c
2
2
@@ -29,9 +29,16 @@
3
--- unsquashfs.c	2009-04-05 23:23:06.000000000 +0200
3
 #include "compressor.h"
4
+++ unsquashfs.c	2010-04-29 17:48:22.000000000 +0200
4
 #include "xattr.h"
5
@@ -26,6 +26,10 @@
5
 
6
 #include "squashfs_compat.h"
6
+#ifndef __FreeBSD__
7
 #include "read_fs.h"
7
 #include <sys/sysinfo.h>
8
+#endif
9
+
10
 #include <sys/types.h>
8
 
11
 
9
+#ifdef __FreeBSD__
12
+#ifdef __FreeBSD__
10
+#include <sys/sysctl.h>
13
+#include <sys/sysctl.h>
(-)ports/sysutils/squashfs-tools/files/patch-warnings (-324 lines)
Lines 1-324 Link Here
1
--- mksquashfs.c	2009-04-05 17:22:48.000000000 -0400
2
+++ mksquashfs.c	2010-09-11 16:04:26.000000000 -0400
3
@@ -1746,10 +1746,11 @@
4
 
5
 
6
-int add_pending_fragment(struct file_buffer *write_buffer, int c_byte,
7
+static void
8
+add_pending_fragment(struct file_buffer *write_buffer, int c_byte,
9
 	int fragment)
10
 {
11
 	struct frag_locked *entry = malloc(sizeof(struct frag_locked));
12
 	if(entry == NULL)
13
-		return FALSE;
14
+		return;
15
 	entry->buffer = write_buffer;
16
 	entry->c_byte = c_byte;
17
@@ -1825,6 +1826,4 @@
18
 	char cbuffer[(SQUASHFS_METADATA_SIZE << 2) + 2];
19
 	
20
-	long long obytes = bytes;
21
-
22
 	for(i = 0; i < meta_blocks; i++) {
23
 		int avail_bytes = length > SQUASHFS_METADATA_SIZE ?
24
@@ -3400,5 +3399,5 @@
25
 	struct pseudo_entry *pseudo_ent;
26
 	struct stat buf;
27
-	static pseudo_ino = 1;
28
+	static int pseudo_ino = 1;
29
 	
30
 	if(dir == NULL && (dir = scan1_opendir("")) == NULL)
31
@@ -3483,5 +3482,6 @@
32
 					INFO("file %s, uncompressed size %lld "
33
 						"bytes %s\n", filename,
34
-						buf->st_size, duplicate_file ?
35
+						(long long)buf->st_size,
36
+						duplicate_file ?
37
 						"DUPLICATE" : "");
38
 					break;
39
@@ -3558,5 +3558,5 @@
40
 							"size %lld bytes LINK"
41
 							"\n", filename,
42
-							buf->st_size);
43
+							(long long)buf->st_size);
44
 					break;
45
 				case SQUASHFS_SYMLINK_TYPE:
46
--- read_fs.c	2009-03-31 00:23:14.000000000 -0400
47
+++ read_fs.c	2010-09-11 16:07:48.000000000 -0400
48
@@ -559,5 +559,8 @@
49
 
50
 	for(i = 0; i < indexes; i++) {
51
-		int length = read_block(fd, fragment_table_index[i], NULL,
52
+#ifdef SQUASHFS_TRACE
53
+		int length =
54
+#endif
55
+		read_block(fd, fragment_table_index[i], NULL,
56
 			((unsigned char *) *fragment_table) +
57
 			(i * SQUASHFS_METADATA_SIZE), sBlk);
58
@@ -595,5 +598,8 @@
59
 
60
 	for(i = 0; i <  indexes; i++) {
61
-		int length = read_block(fd, index[i], NULL,
62
+#ifdef SQUASHFS_TRACE
63
+		int length =
64
+#endif
65
+		read_block(fd, index[i], NULL,
66
 			((unsigned char *) *inode_lookup_table) +
67
 			(i * SQUASHFS_METADATA_SIZE), sBlk);
68
--- sort.c	2009-03-31 00:25:53.000000000 -0400
69
+++ sort.c	2010-09-11 16:10:16.000000000 -0400
70
@@ -255,5 +255,5 @@
71
 				INFO("file %s, uncompressed size %lld bytes %s"
72
 					"\n", entry->dir->pathname,
73
-					entry->dir->inode->buf.st_size,
74
+					(long long)entry->dir->inode->buf.st_size,
75
 					duplicate_file ? "DUPLICATE" : "");
76
 				entry->dir->inode->inode = inode;
77
@@ -262,5 +262,5 @@
78
 				INFO("file %s, uncompressed size %lld bytes "
79
 					"LINK\n", entry->dir->pathname,
80
-					entry->dir->inode->buf.st_size);
81
+					(long long)entry->dir->inode->buf.st_size);
82
 		}
83
 }
84
--- pseudo.c	2009-04-04 22:01:58.000000000 -0400
85
+++ pseudo.c	2010-09-11 16:11:23.000000000 -0400
86
@@ -100,5 +104,5 @@
87
 {
88
 	char targname[1024];
89
-	int i, error;
90
+	int i;
91
 
92
 	target = get_component(target, targname);
93
--- squashfs_compat.h	2009-03-16 00:27:27.000000000 -0400
94
+++ squashfs_compat.h	2010-09-11 16:19:18.000000000 -0400
95
@@ -195,13 +195,5 @@
96
  */
97
 
98
-#define SQUASHFS_SWAP_START \
99
-	int bits;\
100
-	int b_pos;\
101
-	unsigned long long val;\
102
-	unsigned char *s;\
103
-	unsigned char *d;
104
-
105
 #define SQUASHFS_SWAP_SUPER_BLOCK_3(s, d) {\
106
-	SQUASHFS_SWAP_START\
107
 	SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_super_block_3));\
108
 	SQUASHFS_SWAP((s)->s_magic, d, 0, 32);\
109
@@ -243,10 +235,8 @@
110
 
111
 #define SQUASHFS_SWAP_BASE_INODE_HEADER_3(s, d, n) {\
112
-	SQUASHFS_SWAP_START\
113
 	SQUASHFS_SWAP_BASE_INODE_CORE_3(s, d, n)\
114
 }
115
 
116
 #define SQUASHFS_SWAP_IPC_INODE_HEADER_3(s, d) {\
117
-	SQUASHFS_SWAP_START\
118
 	SQUASHFS_SWAP_BASE_INODE_CORE_3(s, d, \
119
 			sizeof(struct squashfs_ipc_inode_header_3))\
120
@@ -255,5 +245,4 @@
121
 
122
 #define SQUASHFS_SWAP_DEV_INODE_HEADER_3(s, d) {\
123
-	SQUASHFS_SWAP_START\
124
 	SQUASHFS_SWAP_BASE_INODE_CORE_3(s, d, \
125
 			sizeof(struct squashfs_dev_inode_header_3)); \
126
@@ -263,5 +252,4 @@
127
 
128
 #define SQUASHFS_SWAP_SYMLINK_INODE_HEADER_3(s, d) {\
129
-	SQUASHFS_SWAP_START\
130
 	SQUASHFS_SWAP_BASE_INODE_CORE_3(s, d, \
131
 			sizeof(struct squashfs_symlink_inode_header_3));\
132
@@ -271,5 +259,4 @@
133
 
134
 #define SQUASHFS_SWAP_REG_INODE_HEADER_3(s, d) {\
135
-	SQUASHFS_SWAP_START\
136
 	SQUASHFS_SWAP_BASE_INODE_CORE_3(s, d, \
137
 			sizeof(struct squashfs_reg_inode_header_3));\
138
@@ -281,5 +268,4 @@
139
 
140
 #define SQUASHFS_SWAP_LREG_INODE_HEADER_3(s, d) {\
141
-	SQUASHFS_SWAP_START\
142
 	SQUASHFS_SWAP_BASE_INODE_CORE_3(s, d, \
143
 			sizeof(struct squashfs_lreg_inode_header_3));\
144
@@ -292,5 +278,4 @@
145
 
146
 #define SQUASHFS_SWAP_DIR_INODE_HEADER_3(s, d) {\
147
-	SQUASHFS_SWAP_START\
148
 	SQUASHFS_SWAP_BASE_INODE_CORE_3(s, d, \
149
 			sizeof(struct squashfs_dir_inode_header_3));\
150
@@ -303,5 +288,4 @@
151
 
152
 #define SQUASHFS_SWAP_LDIR_INODE_HEADER_3(s, d) {\
153
-	SQUASHFS_SWAP_START\
154
 	SQUASHFS_SWAP_BASE_INODE_CORE_3(s, d, \
155
 			sizeof(struct squashfs_ldir_inode_header_3));\
156
@@ -315,5 +299,4 @@
157
 
158
 #define SQUASHFS_SWAP_DIR_INDEX_3(s, d) {\
159
-	SQUASHFS_SWAP_START\
160
 	SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_index_3));\
161
 	SQUASHFS_SWAP((s)->index, d, 0, 32);\
162
@@ -323,5 +306,4 @@
163
 
164
 #define SQUASHFS_SWAP_DIR_HEADER_3(s, d) {\
165
-	SQUASHFS_SWAP_START\
166
 	SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_header_3));\
167
 	SQUASHFS_SWAP((s)->count, d, 0, 8);\
168
@@ -331,5 +313,4 @@
169
 
170
 #define SQUASHFS_SWAP_DIR_ENTRY_3(s, d) {\
171
-	SQUASHFS_SWAP_START\
172
 	SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_entry_3));\
173
 	SQUASHFS_SWAP((s)->offset, d, 0, 13);\
174
@@ -344,5 +325,4 @@
175
 	int entry;\
176
 	int bit_position;\
177
-	SQUASHFS_SWAP_START\
178
 	SQUASHFS_MEMSET(s, d, n * 2);\
179
 	for(entry = 0, bit_position = 0; entry < n; entry++, bit_position += \
180
@@ -354,5 +334,4 @@
181
 	int entry;\
182
 	int bit_position;\
183
-	SQUASHFS_SWAP_START\
184
 	SQUASHFS_MEMSET(s, d, n * 4);\
185
 	for(entry = 0, bit_position = 0; entry < n; entry++, bit_position += \
186
@@ -364,5 +343,4 @@
187
 	int entry;\
188
 	int bit_position;\
189
-	SQUASHFS_SWAP_START\
190
 	SQUASHFS_MEMSET(s, d, n * 8);\
191
 	for(entry = 0, bit_position = 0; entry < n; entry++, bit_position += \
192
@@ -374,5 +352,4 @@
193
 	int entry;\
194
 	int bit_position;\
195
-	SQUASHFS_SWAP_START\
196
 	SQUASHFS_MEMSET(s, d, n * bits / 8);\
197
 	for(entry = 0, bit_position = 0; entry < n; entry++, bit_position += \
198
@@ -385,5 +362,4 @@
199
 
200
 #define SQUASHFS_SWAP_FRAGMENT_ENTRY_3(s, d) {\
201
-	SQUASHFS_SWAP_START\
202
 	SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_fragment_entry_3));\
203
 	SQUASHFS_SWAP((s)->start_block, d, 0, 64);\
204
@@ -494,10 +470,8 @@
205
 
206
 #define SQUASHFS_SWAP_BASE_INODE_HEADER_1(s, d, n) {\
207
-	SQUASHFS_SWAP_START\
208
 	SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, n)\
209
 }
210
 
211
 #define SQUASHFS_SWAP_IPC_INODE_HEADER_1(s, d) {\
212
-	SQUASHFS_SWAP_START\
213
 	SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, \
214
 			sizeof(struct squashfs_ipc_inode_header_1));\
215
@@ -507,5 +481,4 @@
216
 
217
 #define SQUASHFS_SWAP_DEV_INODE_HEADER_1(s, d) {\
218
-	SQUASHFS_SWAP_START\
219
 	SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, \
220
 			sizeof(struct squashfs_dev_inode_header_1));\
221
@@ -514,5 +487,4 @@
222
 
223
 #define SQUASHFS_SWAP_SYMLINK_INODE_HEADER_1(s, d) {\
224
-	SQUASHFS_SWAP_START\
225
 	SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, \
226
 			sizeof(struct squashfs_symlink_inode_header_1));\
227
@@ -521,5 +493,4 @@
228
 
229
 #define SQUASHFS_SWAP_REG_INODE_HEADER_1(s, d) {\
230
-	SQUASHFS_SWAP_START\
231
 	SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, \
232
 			sizeof(struct squashfs_reg_inode_header_1));\
233
@@ -530,5 +501,4 @@
234
 
235
 #define SQUASHFS_SWAP_DIR_INODE_HEADER_1(s, d) {\
236
-	SQUASHFS_SWAP_START\
237
 	SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, \
238
 			sizeof(struct squashfs_dir_inode_header_1));\
239
@@ -666,5 +636,4 @@
240
 
241
 #define SQUASHFS_SWAP_BASE_INODE_HEADER_2(s, d, n) {\
242
-	SQUASHFS_SWAP_START\
243
 	SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, n)\
244
 }
245
@@ -674,5 +643,4 @@
246
 
247
 #define SQUASHFS_SWAP_DEV_INODE_HEADER_2(s, d) {\
248
-	SQUASHFS_SWAP_START\
249
 	SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, \
250
 			sizeof(struct squashfs_dev_inode_header_2)); \
251
@@ -681,5 +649,4 @@
252
 
253
 #define SQUASHFS_SWAP_SYMLINK_INODE_HEADER_2(s, d) {\
254
-	SQUASHFS_SWAP_START\
255
 	SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, \
256
 			sizeof(struct squashfs_symlink_inode_header_2));\
257
@@ -688,5 +655,4 @@
258
 
259
 #define SQUASHFS_SWAP_REG_INODE_HEADER_2(s, d) {\
260
-	SQUASHFS_SWAP_START\
261
 	SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, \
262
 			sizeof(struct squashfs_reg_inode_header_2));\
263
@@ -699,5 +665,4 @@
264
 
265
 #define SQUASHFS_SWAP_DIR_INODE_HEADER_2(s, d) {\
266
-	SQUASHFS_SWAP_START\
267
 	SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, \
268
 			sizeof(struct squashfs_dir_inode_header_2));\
269
@@ -709,5 +674,4 @@
270
 
271
 #define SQUASHFS_SWAP_LDIR_INODE_HEADER_2(s, d) {\
272
-	SQUASHFS_SWAP_START\
273
 	SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, \
274
 			sizeof(struct squashfs_ldir_inode_header_2));\
275
@@ -720,5 +684,4 @@
276
 
277
 #define SQUASHFS_SWAP_DIR_INDEX_2(s, d) {\
278
-	SQUASHFS_SWAP_START\
279
 	SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_index_2));\
280
 	SQUASHFS_SWAP((s)->index, d, 0, 27);\
281
@@ -727,5 +690,4 @@
282
 }
283
 #define SQUASHFS_SWAP_DIR_HEADER_2(s, d) {\
284
-	SQUASHFS_SWAP_START\
285
 	SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_header_2));\
286
 	SQUASHFS_SWAP((s)->count, d, 0, 8);\
287
@@ -734,5 +696,4 @@
288
 
289
 #define SQUASHFS_SWAP_DIR_ENTRY_2(s, d) {\
290
-	SQUASHFS_SWAP_START\
291
 	SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_entry_2));\
292
 	SQUASHFS_SWAP((s)->offset, d, 0, 13);\
293
@@ -742,5 +703,4 @@
294
 
295
 #define SQUASHFS_SWAP_FRAGMENT_ENTRY_2(s, d) {\
296
-	SQUASHFS_SWAP_START\
297
 	SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_fragment_entry_2));\
298
 	SQUASHFS_SWAP((s)->start_block, d, 0, 32);\
299
--- unsquashfs.c	2009-04-05 17:23:06.000000000 -0400
300
+++ unsquashfs.c	2010-09-11 16:16:07.000000000 -0400
301
@@ -1939,5 +1943,4 @@
302
 	int data_buffer_size = DATA_BUFFER_DEFAULT;
303
 	char *b;
304
-	struct winsize winsize;
305
 
306
 	pthread_mutex_init(&screen_mutex, NULL);
307
--- unsquash-3.c	2009-03-31 00:35:10.000000000 -0400
308
+++ unsquash-3.c	2010-09-11 16:24:16.000000000 -0400
309
@@ -37,5 +37,5 @@
310
 
311
 	if(sBlk.fragments == 0)
312
-		return;
313
+		return 0;
314
 
315
 	if((fragment_table = malloc(sBlk.fragments *
316
--- unsquash-4.c	2009-03-31 00:38:31.000000000 -0400
317
+++ unsquash-4.c	2010-09-11 16:25:18.000000000 -0400
318
@@ -39,5 +39,5 @@
319
 
320
 	if(sBlk.fragments == 0)
321
-		return;
322
+		return 0;
323
 
324
 	if((fragment_table = malloc(sBlk.fragments *

Return to bug 166646