FreeBSD Bugzilla – Attachment 223305 Details for
Bug 254316
sysutils/squashfs-tools: Update to 4.4
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to update
squashfs-tools.diff (text/plain), 7.35 KB, created by
Chris Rees
on 2021-03-15 19:27:54 UTC
(
hide
)
Description:
Patch to update
Filename:
MIME Type:
Creator:
Chris Rees
Created:
2021-03-15 19:27:54 UTC
Size:
7.35 KB
patch
obsolete
>diff --git a/sysutils/squashfs-tools/Makefile b/sysutils/squashfs-tools/Makefile >index e2a8bfcd2609..aad7ff2dc1f5 100644 >--- a/sysutils/squashfs-tools/Makefile >+++ b/sysutils/squashfs-tools/Makefile >@@ -2,10 +2,9 @@ > # $FreeBSD$ > > PORTNAME= squashfs-tools >-PORTVERSION= 4.3 >-PORTREVISION= 1 >+PORTVERSION= 4.4 > CATEGORIES= sysutils >-MASTER_SITES= SF/squashfs/squashfs/${DISTNAME}/ >+MASTER_SITES= GH > DISTNAME= squashfs${PORTVERSION} > DISTFILES= ${DISTNAME}${EXTRACT_SUFX} > >@@ -16,6 +15,9 @@ LICENSE= GPLv2 > LICENSE_FILE= ${WRKSRC}/../COPYING > > USES= alias cpe gmake >+USE_GITHUB= yes >+GH_ACCOUNT= plougher >+WRKSRC_SUBDIR= ${PORTNAME} > > PLIST_FILES= bin/mksquashfs \ > bin/unsquashfs >@@ -26,8 +28,6 @@ XZ_DESC= Build with XZ support > LZO_DESC= Build with LZO support > LZMA_DESC= Build with LZMA support > >-WRKSRC= ${WRKDIR}/${DISTNAME}/squashfs-tools >- > CPE_PRODUCT= squashfs > CPE_VENDOR= phillip_lougher > >@@ -38,15 +38,14 @@ CFLAGS+= -fcommon > > .include <bsd.port.options.mk> > >-PORTDOCS= ACKNOWLEDGEMENTS CHANGES COPYING \ >- PERFORMANCE.README README README-${PORTVERSION} >+PORTDOCS= CHANGES PERFORMANCE.README README > > .if ${PORT_OPTIONS:MXZ} > MAKE_ARGS+= XZ_SUPPORT=1 > .endif > > .if ${PORT_OPTIONS:MLZO} >-MAKE_ARGS+= LZO_SUPPORT=1 LZO_DIR=${LOCALBASE} >+MAKE_ARGS+= LZO_SUPPORT=1 LZO_LIBDIR=-L${LOCALBASE}/lib EXTRA_CFLAGS="-I${LOCALBASE}/lib" > LIB_DEPENDS+= liblzo2.so:archivers/lzo2 > .endif > >@@ -60,8 +59,14 @@ post-patch: > @${REINPLACE_CMD} -e "s|^\(XATTR\)|# \1|g" \ > ${WRKSRC}/Makefile > >+do-install: >+ ${INSTALL_PROGRAM} ${WRKSRC}/mksquashfs ${STAGEDIR}${PREFIX}/bin/ >+ ${INSTALL_PROGRAM} ${WRKSRC}/unsquashfs ${STAGEDIR}${PREFIX}/bin/ >+ > post-install: > @${MKDIR} ${STAGEDIR}${DOCSDIR} >- ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC:H}/|} ${STAGEDIR}${DOCSDIR} >+ ${INSTALL_DATA} ${WRKSRC:H}/README ${WRKSRC:H}/CHANGES \ >+ ${WRKSRC:H}/RELEASE-READMEs/PERFORMANCE.README \ >+ ${STAGEDIR}${DOCSDIR} > > .include <bsd.port.mk> >diff --git a/sysutils/squashfs-tools/distinfo b/sysutils/squashfs-tools/distinfo >index 47a951eab2b8..fca4f76b123d 100644 >--- a/sysutils/squashfs-tools/distinfo >+++ b/sysutils/squashfs-tools/distinfo >@@ -1,5 +1,7 @@ >-TIMESTAMP = 1467029943 >-SHA256 (squashfs4.3.tar.gz) = 0d605512437b1eb800b4736791559295ee5f60177e102e4d4ccd0ee241a5f3f6 >-SIZE (squashfs4.3.tar.gz) = 182550 >+TIMESTAMP = 1615833238 >+SHA256 (plougher-squashfs-tools-4.4_GH0.tar.gz) = a7fa4845e9908523c38d4acf92f8a41fdfcd19def41bd5090d7ad767a6dc75c3 >+SIZE (plougher-squashfs-tools-4.4_GH0.tar.gz) = 241842 > SHA256 (lzma922.tar.bz2) = 9aade84f229fb25f7aef39d8866b375fe6d35a9e18098d7cd86a99e294902944 > SIZE (lzma922.tar.bz2) = 546148 >+SHA256 (plougher-squashfs-tools-4.4_GH0.tar.gz) = a7fa4845e9908523c38d4acf92f8a41fdfcd19def41bd5090d7ad767a6dc75c3 >+SIZE (plougher-squashfs-tools-4.4_GH0.tar.gz) = 241842 >diff --git a/sysutils/squashfs-tools/files/patch-Makefile b/sysutils/squashfs-tools/files/patch-Makefile >index 0a4c58c61755..d26926cee908 100644 >--- a/sysutils/squashfs-tools/files/patch-Makefile >+++ b/sysutils/squashfs-tools/files/patch-Makefile >@@ -1,15 +1,15 @@ >---- Makefile.orig 2014-05-11 18:56:00 UTC >+--- Makefile.orig 2021-03-15 19:10:08 UTC > +++ Makefile >-@@ -38,7 +38,7 @@ GZIP_SUPPORT = 1 >- # installation prefix. >- # >- #LZO_SUPPORT = 1 >--#LZO_DIR = /usr/local >-+#LZO_DIR = $(LOCALBASE) >+@@ -149,7 +149,7 @@ REPRODUCIBLE_DEFAULT = 1 >+ ############################################### > >+ INCLUDEDIR = -I. >+-INSTALL_DIR = /usr/local/bin >++INSTALL_DIR = $(DESTDIR)$(PREFIX)/bin > >- ########### Building LZ4 support ############# >-@@ -119,7 +119,7 @@ UNSQUASHFS_OBJS = unsquashfs.o unsquash-1.o unsquash-2 >+ MKSQUASHFS_OBJS = mksquashfs.o read_fs.o action.o swap.o pseudo.o compressor.o \ >+ sort.o progressbar.o read_file.o info.o restore.o process_fragments.o \ >+@@ -160,7 +160,7 @@ UNSQUASHFS_OBJS = unsquashfs.o unsquash-1.o unsquash-2 > > CFLAGS ?= -O2 > CFLAGS += $(EXTRA_CFLAGS) $(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 \ >@@ -18,13 +18,11 @@ > -Wall > > LIBS = -lpthread -lm >-@@ -300,6 +300,6 @@ clean: >+@@ -200,6 +200,7 @@ endif > >- .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 >+ 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 >diff --git a/sysutils/squashfs-tools/files/patch-action.c b/sysutils/squashfs-tools/files/patch-action.c >index 2c07b6980c84..f6e3c9a58f83 100644 >--- a/sysutils/squashfs-tools/files/patch-action.c >+++ b/sysutils/squashfs-tools/files/patch-action.c >@@ -1,10 +1,10 @@ > Hack for lack of strdupa() in BSD libc > >---- action.c.orig 2014-05-10 04:54:13 UTC >+--- action.c.orig 2019-08-29 01:58:04 UTC > +++ action.c > @@ -44,6 +44,12 @@ >- #include "action.h" > #include "error.h" >+ #include "fnmatch_compat.h" > > +#ifndef strdupa > +#include <string.h> // required for str*() >diff --git a/sysutils/squashfs-tools/files/patch-mksquashfs.c b/sysutils/squashfs-tools/files/patch-mksquashfs.c >new file mode 100644 >index 000000000000..dbf9c700a021 >--- /dev/null >+++ b/sysutils/squashfs-tools/files/patch-mksquashfs.c >@@ -0,0 +1,38 @@ >+This doesn't need proc mounted on FreeBSD, so should not fail >+ >+--- mksquashfs.c.orig 2021-03-15 18:43:44 UTC >++++ mksquashfs.c >+@@ -35,7 +35,6 @@ >+ #include <stddef.h> >+ #include <sys/types.h> >+ #include <sys/stat.h> >+-#include <sys/sysmacros.h> >+ #include <fcntl.h> >+ #include <errno.h> >+ #include <dirent.h> >+@@ -50,7 +49,6 @@ >+ #include <sys/wait.h> >+ #include <limits.h> >+ #include <ctype.h> >+-#include <sys/sysinfo.h> >+ >+ #ifndef linux >+ #define __BYTE_ORDER BYTE_ORDER >+@@ -5194,17 +5192,6 @@ int get_physical_memory() >+ long long num_pages = sysconf(_SC_PHYS_PAGES); >+ long long page_size = sysconf(_SC_PAGESIZE); >+ int phys_mem; >+- >+- if(num_pages == -1 || page_size == -1) { >+- struct sysinfo sys; >+- int res = sysinfo(&sys); >+- >+- if(res == -1) >+- return 0; >+- >+- num_pages = sys.totalram; >+- page_size = sys.mem_unit; >+- } >+ >+ phys_mem = num_pages * page_size >> 20; >+ >diff --git a/sysutils/squashfs-tools/files/patch-pseudo.c b/sysutils/squashfs-tools/files/patch-pseudo.c >index 3639ca3e0c1a..a98f857d0f55 100644 >--- a/sysutils/squashfs-tools/files/patch-pseudo.c >+++ b/sysutils/squashfs-tools/files/patch-pseudo.c >@@ -1,7 +1,7 @@ >---- pseudo.c.orig 2014-05-10 04:54:13 UTC >+--- pseudo.c.orig 2019-08-29 01:58:04 UTC > +++ pseudo.c >-@@ -34,6 +34,10 @@ >- #include <sys/wait.h> >+@@ -35,6 +35,10 @@ >+ #include <sys/stat.h> > #include <ctype.h> > > +#ifdef __FreeBSD__ >diff --git a/sysutils/squashfs-tools/files/patch-unsquashfs.c b/sysutils/squashfs-tools/files/patch-unsquashfs.c >index c3da83377b97..118d2eee0c62 100644 >--- a/sysutils/squashfs-tools/files/patch-unsquashfs.c >+++ b/sysutils/squashfs-tools/files/patch-unsquashfs.c >@@ -1,17 +1,12 @@ >---- unsquashfs.c.orig 2014-05-12 22:18:35 UTC >+--- unsquashfs.c.orig 2019-08-29 01:58:04 UTC > +++ unsquashfs.c >-@@ -31,7 +31,14 @@ >- #include "unsquashfs_info.h" >+@@ -32,8 +32,7 @@ > #include "stdarg.h" >+ #include "fnmatch_compat.h" > >-+#ifdef __linux__ >- #include <sys/sysinfo.h> >-+#endif >-+ >-+#ifdef __FreeBSD__ >+-#include <sys/sysinfo.h> >+-#include <sys/sysmacros.h> > +#include <sys/sysctl.h> >-+#endif >-+ > #include <sys/types.h> > #include <sys/time.h> > #include <sys/resource.h>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 254316
: 223305