aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorashish <ashish@FreeBSD.org>2012-05-06 11:04:23 +0800
committerashish <ashish@FreeBSD.org>2012-05-06 11:04:23 +0800
commit070f84e2c5ef41f4f34d3067ca9410ce0da2d95c (patch)
tree365f3827e285f7b8909e3be5f61fa85fb89208d0 /sysutils
parent0ecc02d8f412811647660344acf350bb4cb66671 (diff)
downloadfreebsd-ports-graphics-070f84e2c5ef41f4f34d3067ca9410ce0da2d95c.tar.gz
freebsd-ports-graphics-070f84e2c5ef41f4f34d3067ca9410ce0da2d95c.tar.zst
freebsd-ports-graphics-070f84e2c5ef41f4f34d3067ca9410ce0da2d95c.zip
- Update to 4.2[1]
- Add OPTIONS - Add LICENSE information - Fix building on clang - Remove patch-warnings (integrated upstream)[1] PR: ports/166646[1] Submitted by: Alex Kozlov <soam@rm-rf.kiev.ua>[1]
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/squashfs-tools/Makefile30
-rw-r--r--sysutils/squashfs-tools/distinfo4
-rw-r--r--sysutils/squashfs-tools/files/patch-squashfs-tools_Makefile19
-rw-r--r--sysutils/squashfs-tools/files/patch-squashfs-tools_unsquashfs.c16
-rw-r--r--sysutils/squashfs-tools/files/patch-warnings324
5 files changed, 50 insertions, 343 deletions
diff --git a/sysutils/squashfs-tools/Makefile b/sysutils/squashfs-tools/Makefile
index 42ef7cc8e5c..16d829a38cf 100644
--- a/sysutils/squashfs-tools/Makefile
+++ b/sysutils/squashfs-tools/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= squashfs-tools
-PORTVERSION= 4.0
+PORTVERSION= 4.2
CATEGORIES= sysutils
MASTER_SITES= SF/squashfs/squashfs/${DISTNAME}/
DISTNAME= squashfs${PORTVERSION}
@@ -14,22 +14,44 @@ DISTNAME= squashfs${PORTVERSION}
MAINTAINER= ashish@FreeBSD.org
COMMENT= Set of tools to manipulate squashfs images
+LICENSE= GPLv2
+LICENSE_FILE= ${WRKSRC}/../COPYING
+
PLIST_FILES= bin/mksquashfs \
bin/unsquashfs
+OPTIONS= XZ "Build with XZ support" On \
+ LZO "Build with LZO support" On
+
MAKE_JOBS_SAFE= yes
WRKSRC= ${WRKDIR}/${DISTNAME}/squashfs-tools
-LICENSE= GPLv2
-LICENSE_FILE= ${WRKSRC}/../COPYING
+USE_CSTD= gnu89
+
+USE_GMAKE= yes
.ifndef NOPORTDOCS
PORTDOCS= ACKNOWLEDGEMENTS CHANGES COPYING \
- PERFORMANCE.README README README-4.0
+ PERFORMANCE.README README README-${PORTVERSION}
+.endif
+
+.include <bsd.port.options.mk>
+
+.ifdef WITH_XZ
+MAKE_ARGS+= XZ_SUPPORT=1
+.if ${OSVERSION} < 900012 && ${OSVERSION} < 800505
+LIB_DEPENDS+= lzma.5:${PORTSDIR}/archivers/xz
+.endif
+.endif
+
+.ifdef WITH_LZO
+MAKE_ARGS+= LZO_SUPPORT=1 LZO_DIR=${LOCALBASE}
+LIB_DEPENDS+= lzo2.2:${PORTSDIR}/archivers/lzo2
.endif
post-patch:
@${REINPLACE_CMD} -e "s|/usr/local|${PREFIX}|g" \
+ -e "s|^\(XATTR\)|# \1|g" \
${WRKSRC}/Makefile
.ifndef NOPORTDOCS
diff --git a/sysutils/squashfs-tools/distinfo b/sysutils/squashfs-tools/distinfo
index 4f1c1ad8da1..e89cf9bd33c 100644
--- a/sysutils/squashfs-tools/distinfo
+++ b/sysutils/squashfs-tools/distinfo
@@ -1,2 +1,2 @@
-SHA256 (squashfs4.0.tar.gz) = 18948edbe06bac2c4307eea99bfb962643e4b82e5b7edd541b4d743748e12e21
-SIZE (squashfs4.0.tar.gz) = 103979
+SHA256 (squashfs4.2.tar.gz) = d9e0195aa922dbb665ed322b9aaa96e04a476ee650f39bbeadb0d00b24022e96
+SIZE (squashfs4.2.tar.gz) = 133173
diff --git a/sysutils/squashfs-tools/files/patch-squashfs-tools_Makefile b/sysutils/squashfs-tools/files/patch-squashfs-tools_Makefile
index e337e5ca9ec..f5e94fbe311 100644
--- a/sysutils/squashfs-tools/files/patch-squashfs-tools_Makefile
+++ b/sysutils/squashfs-tools/files/patch-squashfs-tools_Makefile
@@ -1,12 +1,15 @@
+
$FreeBSD$
---- Makefile 2010-04-29 17:40:26.000000000 +0200
-+++ Makefile 2010-04-29 17:43:19.000000000 +0200
-@@ -3,6 +3,6 @@
- INCLUDEDIR = .
-
--CFLAGS := -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -O2
-+CFLAGS := -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -O2 -DFNM_EXTMATCH=0 -Wall -Werror
+--- Makefile.orig
++++ Makefile
+@@ -103,8 +103,8 @@
- all: mksquashfs unsquashfs
+ 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
+ ifeq ($(GZIP_SUPPORT),1)
diff --git a/sysutils/squashfs-tools/files/patch-squashfs-tools_unsquashfs.c b/sysutils/squashfs-tools/files/patch-squashfs-tools_unsquashfs.c
index 5f151a9d785..a67b8778678 100644
--- a/sysutils/squashfs-tools/files/patch-squashfs-tools_unsquashfs.c
+++ b/sysutils/squashfs-tools/files/patch-squashfs-tools_unsquashfs.c
@@ -1,10 +1,16 @@
$FreeBSD$
---- unsquashfs.c 2009-04-05 23:23:06.000000000 +0200
-+++ unsquashfs.c 2010-04-29 17:48:22.000000000 +0200
-@@ -26,6 +26,10 @@
- #include "squashfs_compat.h"
- #include "read_fs.h"
+--- unsquashfs.c.orig 2010-09-20 03:14:38.000000000 +0530
++++ unsquashfs.c 2010-09-29 09:34:43.000000000 +0530
+@@ -29,9 +29,16 @@
+ #include "compressor.h"
+ #include "xattr.h"
+
++#ifdef __linux__
+ #include <sys/sysinfo.h>
++#endif
++
+ #include <sys/types.h>
+#ifdef __FreeBSD__
+#include <sys/sysctl.h>
diff --git a/sysutils/squashfs-tools/files/patch-warnings b/sysutils/squashfs-tools/files/patch-warnings
deleted file mode 100644
index 949f8a8a05f..00000000000
--- a/sysutils/squashfs-tools/files/patch-warnings
+++ /dev/null
@@ -1,324 +0,0 @@
---- mksquashfs.c 2009-04-05 17:22:48.000000000 -0400
-+++ mksquashfs.c 2010-09-11 16:04:26.000000000 -0400
-@@ -1746,10 +1746,11 @@
-
-
--int add_pending_fragment(struct file_buffer *write_buffer, int c_byte,
-+static void
-+add_pending_fragment(struct file_buffer *write_buffer, int c_byte,
- int fragment)
- {
- struct frag_locked *entry = malloc(sizeof(struct frag_locked));
- if(entry == NULL)
-- return FALSE;
-+ return;
- entry->buffer = write_buffer;
- entry->c_byte = c_byte;
-@@ -1825,6 +1826,4 @@
- char cbuffer[(SQUASHFS_METADATA_SIZE << 2) + 2];
-
-- long long obytes = bytes;
--
- for(i = 0; i < meta_blocks; i++) {
- int avail_bytes = length > SQUASHFS_METADATA_SIZE ?
-@@ -3400,5 +3399,5 @@
- struct pseudo_entry *pseudo_ent;
- struct stat buf;
-- static pseudo_ino = 1;
-+ static int pseudo_ino = 1;
-
- if(dir == NULL && (dir = scan1_opendir("")) == NULL)
-@@ -3483,5 +3482,6 @@
- INFO("file %s, uncompressed size %lld "
- "bytes %s\n", filename,
-- buf->st_size, duplicate_file ?
-+ (long long)buf->st_size,
-+ duplicate_file ?
- "DUPLICATE" : "");
- break;
-@@ -3558,5 +3558,5 @@
- "size %lld bytes LINK"
- "\n", filename,
-- buf->st_size);
-+ (long long)buf->st_size);
- break;
- case SQUASHFS_SYMLINK_TYPE:
---- read_fs.c 2009-03-31 00:23:14.000000000 -0400
-+++ read_fs.c 2010-09-11 16:07:48.000000000 -0400
-@@ -559,5 +559,8 @@
-
- for(i = 0; i < indexes; i++) {
-- int length = read_block(fd, fragment_table_index[i], NULL,
-+#ifdef SQUASHFS_TRACE
-+ int length =
-+#endif
-+ read_block(fd, fragment_table_index[i], NULL,
- ((unsigned char *) *fragment_table) +
- (i * SQUASHFS_METADATA_SIZE), sBlk);
-@@ -595,5 +598,8 @@
-
- for(i = 0; i < indexes; i++) {
-- int length = read_block(fd, index[i], NULL,
-+#ifdef SQUASHFS_TRACE
-+ int length =
-+#endif
-+ read_block(fd, index[i], NULL,
- ((unsigned char *) *inode_lookup_table) +
- (i * SQUASHFS_METADATA_SIZE), sBlk);
---- sort.c 2009-03-31 00:25:53.000000000 -0400
-+++ sort.c 2010-09-11 16:10:16.000000000 -0400
-@@ -255,5 +255,5 @@
- INFO("file %s, uncompressed size %lld bytes %s"
- "\n", entry->dir->pathname,
-- entry->dir->inode->buf.st_size,
-+ (long long)entry->dir->inode->buf.st_size,
- duplicate_file ? "DUPLICATE" : "");
- entry->dir->inode->inode = inode;
-@@ -262,5 +262,5 @@
- INFO("file %s, uncompressed size %lld bytes "
- "LINK\n", entry->dir->pathname,
-- entry->dir->inode->buf.st_size);
-+ (long long)entry->dir->inode->buf.st_size);
- }
- }
---- pseudo.c 2009-04-04 22:01:58.000000000 -0400
-+++ pseudo.c 2010-09-11 16:11:23.000000000 -0400
-@@ -100,5 +104,5 @@
- {
- char targname[1024];
-- int i, error;
-+ int i;
-
- target = get_component(target, targname);
---- squashfs_compat.h 2009-03-16 00:27:27.000000000 -0400
-+++ squashfs_compat.h 2010-09-11 16:19:18.000000000 -0400
-@@ -195,13 +195,5 @@
- */
-
--#define SQUASHFS_SWAP_START \
-- int bits;\
-- int b_pos;\
-- unsigned long long val;\
-- unsigned char *s;\
-- unsigned char *d;
--
- #define SQUASHFS_SWAP_SUPER_BLOCK_3(s, d) {\
-- SQUASHFS_SWAP_START\
- SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_super_block_3));\
- SQUASHFS_SWAP((s)->s_magic, d, 0, 32);\
-@@ -243,10 +235,8 @@
-
- #define SQUASHFS_SWAP_BASE_INODE_HEADER_3(s, d, n) {\
-- SQUASHFS_SWAP_START\
- SQUASHFS_SWAP_BASE_INODE_CORE_3(s, d, n)\
- }
-
- #define SQUASHFS_SWAP_IPC_INODE_HEADER_3(s, d) {\
-- SQUASHFS_SWAP_START\
- SQUASHFS_SWAP_BASE_INODE_CORE_3(s, d, \
- sizeof(struct squashfs_ipc_inode_header_3))\
-@@ -255,5 +245,4 @@
-
- #define SQUASHFS_SWAP_DEV_INODE_HEADER_3(s, d) {\
-- SQUASHFS_SWAP_START\
- SQUASHFS_SWAP_BASE_INODE_CORE_3(s, d, \
- sizeof(struct squashfs_dev_inode_header_3)); \
-@@ -263,5 +252,4 @@
-
- #define SQUASHFS_SWAP_SYMLINK_INODE_HEADER_3(s, d) {\
-- SQUASHFS_SWAP_START\
- SQUASHFS_SWAP_BASE_INODE_CORE_3(s, d, \
- sizeof(struct squashfs_symlink_inode_header_3));\
-@@ -271,5 +259,4 @@
-
- #define SQUASHFS_SWAP_REG_INODE_HEADER_3(s, d) {\
-- SQUASHFS_SWAP_START\
- SQUASHFS_SWAP_BASE_INODE_CORE_3(s, d, \
- sizeof(struct squashfs_reg_inode_header_3));\
-@@ -281,5 +268,4 @@
-
- #define SQUASHFS_SWAP_LREG_INODE_HEADER_3(s, d) {\
-- SQUASHFS_SWAP_START\
- SQUASHFS_SWAP_BASE_INODE_CORE_3(s, d, \
- sizeof(struct squashfs_lreg_inode_header_3));\
-@@ -292,5 +278,4 @@
-
- #define SQUASHFS_SWAP_DIR_INODE_HEADER_3(s, d) {\
-- SQUASHFS_SWAP_START\
- SQUASHFS_SWAP_BASE_INODE_CORE_3(s, d, \
- sizeof(struct squashfs_dir_inode_header_3));\
-@@ -303,5 +288,4 @@
-
- #define SQUASHFS_SWAP_LDIR_INODE_HEADER_3(s, d) {\
-- SQUASHFS_SWAP_START\
- SQUASHFS_SWAP_BASE_INODE_CORE_3(s, d, \
- sizeof(struct squashfs_ldir_inode_header_3));\
-@@ -315,5 +299,4 @@
-
- #define SQUASHFS_SWAP_DIR_INDEX_3(s, d) {\
-- SQUASHFS_SWAP_START\
- SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_index_3));\
- SQUASHFS_SWAP((s)->index, d, 0, 32);\
-@@ -323,5 +306,4 @@
-
- #define SQUASHFS_SWAP_DIR_HEADER_3(s, d) {\
-- SQUASHFS_SWAP_START\
- SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_header_3));\
- SQUASHFS_SWAP((s)->count, d, 0, 8);\
-@@ -331,5 +313,4 @@
-
- #define SQUASHFS_SWAP_DIR_ENTRY_3(s, d) {\
-- SQUASHFS_SWAP_START\
- SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_entry_3));\
- SQUASHFS_SWAP((s)->offset, d, 0, 13);\
-@@ -344,5 +325,4 @@
- int entry;\
- int bit_position;\
-- SQUASHFS_SWAP_START\
- SQUASHFS_MEMSET(s, d, n * 2);\
- for(entry = 0, bit_position = 0; entry < n; entry++, bit_position += \
-@@ -354,5 +334,4 @@
- int entry;\
- int bit_position;\
-- SQUASHFS_SWAP_START\
- SQUASHFS_MEMSET(s, d, n * 4);\
- for(entry = 0, bit_position = 0; entry < n; entry++, bit_position += \
-@@ -364,5 +343,4 @@
- int entry;\
- int bit_position;\
-- SQUASHFS_SWAP_START\
- SQUASHFS_MEMSET(s, d, n * 8);\
- for(entry = 0, bit_position = 0; entry < n; entry++, bit_position += \
-@@ -374,5 +352,4 @@
- int entry;\
- int bit_position;\
-- SQUASHFS_SWAP_START\
- SQUASHFS_MEMSET(s, d, n * bits / 8);\
- for(entry = 0, bit_position = 0; entry < n; entry++, bit_position += \
-@@ -385,5 +362,4 @@
-
- #define SQUASHFS_SWAP_FRAGMENT_ENTRY_3(s, d) {\
-- SQUASHFS_SWAP_START\
- SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_fragment_entry_3));\
- SQUASHFS_SWAP((s)->start_block, d, 0, 64);\
-@@ -494,10 +470,8 @@
-
- #define SQUASHFS_SWAP_BASE_INODE_HEADER_1(s, d, n) {\
-- SQUASHFS_SWAP_START\
- SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, n)\
- }
-
- #define SQUASHFS_SWAP_IPC_INODE_HEADER_1(s, d) {\
-- SQUASHFS_SWAP_START\
- SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, \
- sizeof(struct squashfs_ipc_inode_header_1));\
-@@ -507,5 +481,4 @@
-
- #define SQUASHFS_SWAP_DEV_INODE_HEADER_1(s, d) {\
-- SQUASHFS_SWAP_START\
- SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, \
- sizeof(struct squashfs_dev_inode_header_1));\
-@@ -514,5 +487,4 @@
-
- #define SQUASHFS_SWAP_SYMLINK_INODE_HEADER_1(s, d) {\
-- SQUASHFS_SWAP_START\
- SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, \
- sizeof(struct squashfs_symlink_inode_header_1));\
-@@ -521,5 +493,4 @@
-
- #define SQUASHFS_SWAP_REG_INODE_HEADER_1(s, d) {\
-- SQUASHFS_SWAP_START\
- SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, \
- sizeof(struct squashfs_reg_inode_header_1));\
-@@ -530,5 +501,4 @@
-
- #define SQUASHFS_SWAP_DIR_INODE_HEADER_1(s, d) {\
-- SQUASHFS_SWAP_START\
- SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, \
- sizeof(struct squashfs_dir_inode_header_1));\
-@@ -666,5 +636,4 @@
-
- #define SQUASHFS_SWAP_BASE_INODE_HEADER_2(s, d, n) {\
-- SQUASHFS_SWAP_START\
- SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, n)\
- }
-@@ -674,5 +643,4 @@
-
- #define SQUASHFS_SWAP_DEV_INODE_HEADER_2(s, d) {\
-- SQUASHFS_SWAP_START\
- SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, \
- sizeof(struct squashfs_dev_inode_header_2)); \
-@@ -681,5 +649,4 @@
-
- #define SQUASHFS_SWAP_SYMLINK_INODE_HEADER_2(s, d) {\
-- SQUASHFS_SWAP_START\
- SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, \
- sizeof(struct squashfs_symlink_inode_header_2));\
-@@ -688,5 +655,4 @@
-
- #define SQUASHFS_SWAP_REG_INODE_HEADER_2(s, d) {\
-- SQUASHFS_SWAP_START\
- SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, \
- sizeof(struct squashfs_reg_inode_header_2));\
-@@ -699,5 +665,4 @@
-
- #define SQUASHFS_SWAP_DIR_INODE_HEADER_2(s, d) {\
-- SQUASHFS_SWAP_START\
- SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, \
- sizeof(struct squashfs_dir_inode_header_2));\
-@@ -709,5 +674,4 @@
-
- #define SQUASHFS_SWAP_LDIR_INODE_HEADER_2(s, d) {\
-- SQUASHFS_SWAP_START\
- SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, \
- sizeof(struct squashfs_ldir_inode_header_2));\
-@@ -720,5 +684,4 @@
-
- #define SQUASHFS_SWAP_DIR_INDEX_2(s, d) {\
-- SQUASHFS_SWAP_START\
- SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_index_2));\
- SQUASHFS_SWAP((s)->index, d, 0, 27);\
-@@ -727,5 +690,4 @@
- }
- #define SQUASHFS_SWAP_DIR_HEADER_2(s, d) {\
-- SQUASHFS_SWAP_START\
- SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_header_2));\
- SQUASHFS_SWAP((s)->count, d, 0, 8);\
-@@ -734,5 +696,4 @@
-
- #define SQUASHFS_SWAP_DIR_ENTRY_2(s, d) {\
-- SQUASHFS_SWAP_START\
- SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_entry_2));\
- SQUASHFS_SWAP((s)->offset, d, 0, 13);\
-@@ -742,5 +703,4 @@
-
- #define SQUASHFS_SWAP_FRAGMENT_ENTRY_2(s, d) {\
-- SQUASHFS_SWAP_START\
- SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_fragment_entry_2));\
- SQUASHFS_SWAP((s)->start_block, d, 0, 32);\
---- unsquashfs.c 2009-04-05 17:23:06.000000000 -0400
-+++ unsquashfs.c 2010-09-11 16:16:07.000000000 -0400
-@@ -1939,5 +1943,4 @@
- int data_buffer_size = DATA_BUFFER_DEFAULT;
- char *b;
-- struct winsize winsize;
-
- pthread_mutex_init(&screen_mutex, NULL);
---- unsquash-3.c 2009-03-31 00:35:10.000000000 -0400
-+++ unsquash-3.c 2010-09-11 16:24:16.000000000 -0400
-@@ -37,5 +37,5 @@
-
- if(sBlk.fragments == 0)
-- return;
-+ return 0;
-
- if((fragment_table = malloc(sBlk.fragments *
---- unsquash-4.c 2009-03-31 00:38:31.000000000 -0400
-+++ unsquash-4.c 2010-09-11 16:25:18.000000000 -0400
-@@ -39,5 +39,5 @@
-
- if(sBlk.fragments == 0)
-- return;
-+ return 0;
-
- if((fragment_table = malloc(sBlk.fragments *