1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
--- Makefile.orig 2019-08-29 01:58:04 UTC
+++ Makefile
@@ -97,7 +97,7 @@ COMP_DEFAULT = gzip
# If your C library or build/target environment doesn't support XATTRs then
# comment out the next line to build Mksquashfs and Unsquashfs without XATTR
# support
-XATTR_SUPPORT = 1
+# XATTR_SUPPORT = 1
# Select whether you wish xattrs to be stored by Mksquashfs and extracted
# by Unsquashfs by default. If selected users can disable xattr support by
@@ -105,7 +105,7 @@ XATTR_SUPPORT = 1
#
# If unselected, Mksquashfs/Unsquashfs won't store and extract xattrs by
# default. Users can enable xattrs by using the -xattrs option.
-XATTR_DEFAULT = 1
+# XATTR_DEFAULT = 1
###############################################
@@ -160,7 +160,7 @@ UNSQUASHFS_OBJS = unsquashfs.o unsquash-1.o unsquash-2
CFLAGS ?= -O2
CFLAGS += $(EXTRA_CFLAGS) $(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 \
- -D_LARGEFILE_SOURCE -D_GNU_SOURCE -DCOMP_DEFAULT=\"$(COMP_DEFAULT)\" \
+ -D_LARGEFILE_SOURCE -DFNM_EXTMATCH=0 -D_GNU_SOURCE -DCOMP_DEFAULT=\"$(COMP_DEFAULT)\" \
-Wall
LIBS = -lpthread -lm
@@ -200,6 +200,7 @@ endif
ifeq ($(LZO_SUPPORT),1)
CFLAGS += -DLZO_SUPPORT
+INCLUDEDIR += -I$(LOCALBASE)/include
MKSQUASHFS_OBJS += lzo_wrapper.o
UNSQUASHFS_OBJS += lzo_wrapper.o
LIBS += $(LZO_LIBDIR) -llzo2
@@ -208,17 +209,19 @@ endif
ifeq ($(LZ4_SUPPORT),1)
CFLAGS += -DLZ4_SUPPORT
+INCLUDEDIR += -I$(LOCALBASE)/include
MKSQUASHFS_OBJS += lz4_wrapper.o
UNSQUASHFS_OBJS += lz4_wrapper.o
-LIBS += -llz4
+LIBS += -L$(LOCALBASE)/lib -llz4
COMPRESSORS += lz4
endif
ifeq ($(ZSTD_SUPPORT),1)
CFLAGS += -DZSTD_SUPPORT
+INCLUDEDIR += -I$(LOCALBASE)/include
MKSQUASHFS_OBJS += zstd_wrapper.o
UNSQUASHFS_OBJS += zstd_wrapper.o
-LIBS += -lzstd
+LIBS += -L$(LOCALBASE)/lib -lzstd
COMPRESSORS += zstd
endif
@@ -360,6 +363,6 @@ clean:
.PHONY: install
install: mksquashfs unsquashfs
- mkdir -p $(INSTALL_DIR)
- cp mksquashfs $(INSTALL_DIR)
- cp unsquashfs $(INSTALL_DIR)
+ mkdir -p $(DESTDIR)$(PREFIX)/bin
+ ${BSD_INSTALL_PROGRAM} mksquashfs $(DESTDIR)$(PREFIX)/bin
+ ${BSD_INSTALL_PROGRAM} unsquashfs $(DESTDIR)$(PREFIX)/bin
|