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

(-)b/sysutils/squashfs-tools/Makefile (-9 / +14 lines)
Lines 2-11 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	squashfs-tools
4
PORTNAME=	squashfs-tools
5
PORTVERSION=	4.3
5
PORTVERSION=	4.4
6
PORTREVISION=	1
7
CATEGORIES=	sysutils
6
CATEGORIES=	sysutils
8
MASTER_SITES=	SF/squashfs/squashfs/${DISTNAME}/
7
MASTER_SITES=	GH
9
DISTNAME=	squashfs${PORTVERSION}
8
DISTNAME=	squashfs${PORTVERSION}
10
DISTFILES=	${DISTNAME}${EXTRACT_SUFX}
9
DISTFILES=	${DISTNAME}${EXTRACT_SUFX}
11
10
Lines 16-21 LICENSE= GPLv2 Link Here
16
LICENSE_FILE=	${WRKSRC}/../COPYING
15
LICENSE_FILE=	${WRKSRC}/../COPYING
17
16
18
USES=		alias cpe gmake
17
USES=		alias cpe gmake
18
USE_GITHUB=	yes
19
GH_ACCOUNT=	plougher
20
WRKSRC_SUBDIR=	${PORTNAME}
19
21
20
PLIST_FILES=	bin/mksquashfs \
22
PLIST_FILES=	bin/mksquashfs \
21
		bin/unsquashfs
23
		bin/unsquashfs
Lines 26-33 XZ_DESC= Build with XZ support Link Here
26
LZO_DESC=	Build with LZO support
28
LZO_DESC=	Build with LZO support
27
LZMA_DESC=	Build with LZMA support
29
LZMA_DESC=	Build with LZMA support
28
30
29
WRKSRC=		${WRKDIR}/${DISTNAME}/squashfs-tools
30
31
CPE_PRODUCT=	squashfs
31
CPE_PRODUCT=	squashfs
32
CPE_VENDOR=	phillip_lougher
32
CPE_VENDOR=	phillip_lougher
33
33
Lines 38-52 CFLAGS+= -fcommon Link Here
38
38
39
.include <bsd.port.options.mk>
39
.include <bsd.port.options.mk>
40
40
41
PORTDOCS=	ACKNOWLEDGEMENTS CHANGES COPYING \
41
PORTDOCS=	CHANGES PERFORMANCE.README README
42
		PERFORMANCE.README README README-${PORTVERSION}
43
42
44
.if ${PORT_OPTIONS:MXZ}
43
.if ${PORT_OPTIONS:MXZ}
45
MAKE_ARGS+=	XZ_SUPPORT=1
44
MAKE_ARGS+=	XZ_SUPPORT=1
46
.endif
45
.endif
47
46
48
.if ${PORT_OPTIONS:MLZO}
47
.if ${PORT_OPTIONS:MLZO}
49
MAKE_ARGS+=	LZO_SUPPORT=1 LZO_DIR=${LOCALBASE}
48
MAKE_ARGS+=	LZO_SUPPORT=1 LZO_LIBDIR=-L${LOCALBASE}/lib EXTRA_CFLAGS="-I${LOCALBASE}/lib"
50
LIB_DEPENDS+=	liblzo2.so:archivers/lzo2
49
LIB_DEPENDS+=	liblzo2.so:archivers/lzo2
51
.endif
50
.endif
52
51
Lines 60-67 post-patch: Link Here
60
	@${REINPLACE_CMD} -e "s|^\(XATTR\)|# \1|g" \
59
	@${REINPLACE_CMD} -e "s|^\(XATTR\)|# \1|g" \
61
		${WRKSRC}/Makefile
60
		${WRKSRC}/Makefile
62
61
62
do-install:
63
	${INSTALL_PROGRAM} ${WRKSRC}/mksquashfs ${STAGEDIR}${PREFIX}/bin/
64
	${INSTALL_PROGRAM} ${WRKSRC}/unsquashfs ${STAGEDIR}${PREFIX}/bin/
65
63
post-install:
66
post-install:
64
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
67
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
65
	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC:H}/|} ${STAGEDIR}${DOCSDIR}
68
	${INSTALL_DATA} ${WRKSRC:H}/README ${WRKSRC:H}/CHANGES \
69
		${WRKSRC:H}/RELEASE-READMEs/PERFORMANCE.README \
70
	    ${STAGEDIR}${DOCSDIR}
66
71
67
.include <bsd.port.mk>
72
.include <bsd.port.mk>
(-)b/sysutils/squashfs-tools/distinfo (-3 / +5 lines)
Lines 1-5 Link Here
1
TIMESTAMP = 1467029943
1
TIMESTAMP = 1615833238
2
SHA256 (squashfs4.3.tar.gz) = 0d605512437b1eb800b4736791559295ee5f60177e102e4d4ccd0ee241a5f3f6
2
SHA256 (plougher-squashfs-tools-4.4_GH0.tar.gz) = a7fa4845e9908523c38d4acf92f8a41fdfcd19def41bd5090d7ad767a6dc75c3
3
SIZE (squashfs4.3.tar.gz) = 182550
3
SIZE (plougher-squashfs-tools-4.4_GH0.tar.gz) = 241842
4
SHA256 (lzma922.tar.bz2) = 9aade84f229fb25f7aef39d8866b375fe6d35a9e18098d7cd86a99e294902944
4
SHA256 (lzma922.tar.bz2) = 9aade84f229fb25f7aef39d8866b375fe6d35a9e18098d7cd86a99e294902944
5
SIZE (lzma922.tar.bz2) = 546148
5
SIZE (lzma922.tar.bz2) = 546148
6
SHA256 (plougher-squashfs-tools-4.4_GH0.tar.gz) = a7fa4845e9908523c38d4acf92f8a41fdfcd19def41bd5090d7ad767a6dc75c3
7
SIZE (plougher-squashfs-tools-4.4_GH0.tar.gz) = 241842
(-)b/sysutils/squashfs-tools/files/patch-Makefile (-18 / +16 lines)
Lines 1-15 Link Here
1
--- Makefile.orig	2014-05-11 18:56:00 UTC
1
--- Makefile.orig	2021-03-15 19:10:08 UTC
2
+++ Makefile
2
+++ Makefile
3
@@ -38,7 +38,7 @@ GZIP_SUPPORT = 1
3
@@ -149,7 +149,7 @@ REPRODUCIBLE_DEFAULT = 1
4
 # installation prefix.
4
 ###############################################
5
 #
6
 #LZO_SUPPORT = 1
7
-#LZO_DIR = /usr/local
8
+#LZO_DIR = $(LOCALBASE)
9
 
5
 
6
 INCLUDEDIR = -I.
7
-INSTALL_DIR = /usr/local/bin
8
+INSTALL_DIR = $(DESTDIR)$(PREFIX)/bin
10
 
9
 
11
 ########### Building LZ4 support #############
10
 MKSQUASHFS_OBJS = mksquashfs.o read_fs.o action.o swap.o pseudo.o compressor.o \
12
@@ -119,7 +119,7 @@ UNSQUASHFS_OBJS = unsquashfs.o unsquash-1.o unsquash-2
11
 	sort.o progressbar.o read_file.o info.o restore.o process_fragments.o \
12
@@ -160,7 +160,7 @@ UNSQUASHFS_OBJS = unsquashfs.o unsquash-1.o unsquash-2
13
 
13
 
14
 CFLAGS ?= -O2
14
 CFLAGS ?= -O2
15
 CFLAGS += $(EXTRA_CFLAGS) $(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 \
15
 CFLAGS += $(EXTRA_CFLAGS) $(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 \
Lines 18-30 Link Here
18
 	-Wall
18
 	-Wall
19
 
19
 
20
 LIBS = -lpthread -lm
20
 LIBS = -lpthread -lm
21
@@ -300,6 +300,6 @@ clean:
21
@@ -200,6 +200,7 @@ endif
22
 
22
 
23
 .PHONY: install
23
 ifeq ($(LZO_SUPPORT),1)
24
 install: mksquashfs unsquashfs
24
 CFLAGS += -DLZO_SUPPORT
25
-	mkdir -p $(INSTALL_DIR)
25
+INCLUDEDIR += -I$(LOCALBASE)/include
26
-	cp mksquashfs $(INSTALL_DIR)
26
 MKSQUASHFS_OBJS += lzo_wrapper.o
27
-	cp unsquashfs $(INSTALL_DIR)
27
 UNSQUASHFS_OBJS += lzo_wrapper.o
28
+	mkdir -p $(DESTDIR)$(PREFIX)/bin
28
 LIBS += $(LZO_LIBDIR) -llzo2
29
+	${BSD_INSTALL_PROGRAM} mksquashfs $(DESTDIR)$(PREFIX)/bin
30
+	${BSD_INSTALL_PROGRAM} unsquashfs $(DESTDIR)$(PREFIX)/bin
(-)b/sysutils/squashfs-tools/files/patch-action.c (-2 / +2 lines)
Lines 1-10 Link Here
1
Hack for lack of strdupa() in BSD libc
1
Hack for lack of strdupa() in BSD libc
2
2
3
--- action.c.orig	2014-05-10 04:54:13 UTC
3
--- action.c.orig	2019-08-29 01:58:04 UTC
4
+++ action.c
4
+++ action.c
5
@@ -44,6 +44,12 @@
5
@@ -44,6 +44,12 @@
6
 #include "action.h"
7
 #include "error.h"
6
 #include "error.h"
7
 #include "fnmatch_compat.h"
8
 
8
 
9
+#ifndef strdupa
9
+#ifndef strdupa
10
+#include <string.h>  // required for str*()
10
+#include <string.h>  // required for str*()
(-)b/sysutils/squashfs-tools/files/patch-mksquashfs.c (+38 lines)
Added Link Here
1
This doesn't need proc mounted on FreeBSD, so should not fail
2
3
--- mksquashfs.c.orig	2021-03-15 18:43:44 UTC
4
+++ mksquashfs.c
5
@@ -35,7 +35,6 @@
6
 #include <stddef.h>
7
 #include <sys/types.h>
8
 #include <sys/stat.h>
9
-#include <sys/sysmacros.h>
10
 #include <fcntl.h>
11
 #include <errno.h>
12
 #include <dirent.h>
13
@@ -50,7 +49,6 @@
14
 #include <sys/wait.h>
15
 #include <limits.h>
16
 #include <ctype.h>
17
-#include <sys/sysinfo.h>
18
 
19
 #ifndef linux
20
 #define __BYTE_ORDER BYTE_ORDER
21
@@ -5194,17 +5192,6 @@ int get_physical_memory()
22
 	long long num_pages = sysconf(_SC_PHYS_PAGES);
23
 	long long page_size = sysconf(_SC_PAGESIZE);
24
 	int phys_mem;
25
-
26
-	if(num_pages == -1 || page_size == -1) {
27
-		struct sysinfo sys;
28
-		int res = sysinfo(&sys);
29
-
30
-		if(res == -1)
31
-			return 0;
32
-
33
-		num_pages = sys.totalram;
34
-		page_size = sys.mem_unit;
35
-	}
36
 
37
 	phys_mem = num_pages * page_size >> 20;
38
 
(-)b/sysutils/squashfs-tools/files/patch-pseudo.c (-3 / +3 lines)
Lines 1-7 Link Here
1
--- pseudo.c.orig	2014-05-10 04:54:13 UTC
1
--- pseudo.c.orig	2019-08-29 01:58:04 UTC
2
+++ pseudo.c
2
+++ pseudo.c
3
@@ -34,6 +34,10 @@
3
@@ -35,6 +35,10 @@
4
 #include <sys/wait.h>
4
 #include <sys/stat.h>
5
 #include <ctype.h>
5
 #include <ctype.h>
6
 
6
 
7
+#ifdef __FreeBSD__
7
+#ifdef __FreeBSD__
(-)b/sysutils/squashfs-tools/files/patch-unsquashfs.c (-10 / +5 lines)
Lines 1-17 Link Here
1
--- unsquashfs.c.orig	2014-05-12 22:18:35 UTC
1
--- unsquashfs.c.orig	2019-08-29 01:58:04 UTC
2
+++ unsquashfs.c
2
+++ unsquashfs.c
3
@@ -31,7 +31,14 @@
3
@@ -32,8 +32,7 @@
4
 #include "unsquashfs_info.h"
5
 #include "stdarg.h"
4
 #include "stdarg.h"
5
 #include "fnmatch_compat.h"
6
 
6
 
7
+#ifdef __linux__
7
-#include <sys/sysinfo.h>
8
 #include <sys/sysinfo.h>
8
-#include <sys/sysmacros.h>
9
+#endif
10
+
11
+#ifdef __FreeBSD__
12
+#include <sys/sysctl.h>
9
+#include <sys/sysctl.h>
13
+#endif
14
+
15
 #include <sys/types.h>
10
 #include <sys/types.h>
16
 #include <sys/time.h>
11
 #include <sys/time.h>
17
 #include <sys/resource.h>
12
 #include <sys/resource.h>

Return to bug 254316