Archived
1
0
This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
archive/tools/squashfs4/patches/110-allow_static_liblzma.patch
Felix Fietkau f7ffd9787d tools/squashfs4: update to version 4.2 (adds support for xz compression)
Based on a patch by Jonas Gorski

SVN-Revision: 26422
2011-04-03 01:02:00 +00:00

31 lines
666 B
Diff

--- a/squashfs-tools/Makefile
+++ b/squashfs-tools/Makefile
@@ -129,7 +129,6 @@ ifeq ($(LZMA_XZ_SUPPORT),1)
CFLAGS += -DLZMA_SUPPORT
MKSQUASHFS_OBJS += lzma_xz_wrapper.o
UNSQUASHFS_OBJS += lzma_xz_wrapper.o
-LIBS += -llzma
COMPRESSORS += lzma
endif
@@ -137,10 +136,18 @@ ifeq ($(XZ_SUPPORT),1)
CFLAGS += -DXZ_SUPPORT
MKSQUASHFS_OBJS += xz_wrapper.o
UNSQUASHFS_OBJS += xz_wrapper.o
-LIBS += -llzma
COMPRESSORS += xz
endif
+ifneq ($(LZMA_XZ_SUPPORT)$(XZ_SUPPORT),)
+ifneq ($(LZMA_LIB),)
+MKSQUASHFS_OBJS += $(LZMA_LIB)
+UNSQUASHFS_OBJS += $(LZMA_LIB)
+else
+LIBS += -llzma
+endif
+endif
+
ifeq ($(LZO_SUPPORT),1)
CFLAGS += -DLZO_SUPPORT
ifdef LZO_DIR