Index: head/sysutils/squashfs-tools/Makefile =================================================================== --- head/sysutils/squashfs-tools/Makefile (revision 547040) +++ head/sysutils/squashfs-tools/Makefile (revision 547041) @@ -1,63 +1,67 @@ # Created by: Ashish SHUKLA # $FreeBSD$ PORTNAME= squashfs-tools PORTVERSION= 4.3 PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= SF/squashfs/squashfs/${DISTNAME}/ DISTNAME= squashfs${PORTVERSION} DISTFILES= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= ashish@FreeBSD.org COMMENT= Set of tools to manipulate squashfs images LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/../COPYING +USES= alias cpe gmake + PLIST_FILES= bin/mksquashfs \ bin/unsquashfs OPTIONS_DEFINE= XZ LZO LZMA DOCS OPTIONS_DEFAULT= XZ LZO LZMA XZ_DESC= Build with XZ support LZO_DESC= Build with LZO support LZMA_DESC= Build with LZMA support WRKSRC= ${WRKDIR}/${DISTNAME}/squashfs-tools -USE_CSTD= gnu89 - -USES= alias cpe gmake CPE_PRODUCT= squashfs CPE_VENDOR= phillip_lougher + +USE_CSTD= gnu89 + +# Fix build with clang11 +CFLAGS+= -fcommon .include PORTDOCS= ACKNOWLEDGEMENTS CHANGES COPYING \ PERFORMANCE.README README README-${PORTVERSION} .if ${PORT_OPTIONS:MXZ} MAKE_ARGS+= XZ_SUPPORT=1 .endif .if ${PORT_OPTIONS:MLZO} MAKE_ARGS+= LZO_SUPPORT=1 LZO_DIR=${LOCALBASE} LIB_DEPENDS+= liblzo2.so:archivers/lzo2 .endif .if ${PORT_OPTIONS:MLZMA} MASTER_SITES+= SF/sevenzip/LZMA%20SDK/:lzma DISTFILES+= lzma922.tar.bz2:lzma MAKE_ARGS+= LZMA_SUPPORT=1 LZMA_DIR=${WRKDIR} EXTRA_CFLAGS="-D_7ZIP_ST" .endif post-patch: @${REINPLACE_CMD} -e "s|^\(XATTR\)|# \1|g" \ ${WRKSRC}/Makefile post-install: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC:H}/|} ${STAGEDIR}${DOCSDIR} .include Index: head/sysutils/squashfs-tools/files/patch-squashfs-tools_pseudo.c =================================================================== --- head/sysutils/squashfs-tools/files/patch-squashfs-tools_pseudo.c (revision 547040) +++ head/sysutils/squashfs-tools/files/patch-squashfs-tools_pseudo.c (nonexistent) @@ -1,13 +0,0 @@ ---- pseudo.c 2009-04-05 04:01:58.000000000 +0200 -+++ pseudo.c 2010-04-29 17:45:49.000000000 +0200 -@@ -31,6 +31,10 @@ - #include - #include - -+#ifdef __FreeBSD__ -+#include -+#endif -+ - #include "pseudo.h" - - #ifdef SQUASHFS_TRACE Property changes on: head/sysutils/squashfs-tools/files/patch-squashfs-tools_pseudo.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/squashfs-tools/files/patch-squashfs-tools_unsquashfs.c =================================================================== --- head/sysutils/squashfs-tools/files/patch-squashfs-tools_unsquashfs.c (revision 547040) +++ head/sysutils/squashfs-tools/files/patch-squashfs-tools_unsquashfs.c (nonexistent) @@ -1,17 +0,0 @@ ---- unsquashfs.c.orig -+++ unsquashfs.c -@@ -31,7 +31,14 @@ - #include "unsquashfs_info.h" - #include "stdarg.h" - -+#ifdef __linux__ - #include -+#endif -+ -+#ifdef __FreeBSD__ -+#include -+#endif -+ - #include - #include - #include Property changes on: head/sysutils/squashfs-tools/files/patch-squashfs-tools_unsquashfs.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/squashfs-tools/files/patch-squashfs-tools_Makefile =================================================================== --- head/sysutils/squashfs-tools/files/patch-squashfs-tools_Makefile (revision 547040) +++ head/sysutils/squashfs-tools/files/patch-squashfs-tools_Makefile (nonexistent) @@ -1,30 +0,0 @@ ---- Makefile.orig 2011-02-28 17:04:15.000000000 -0300 -+++ Makefile 2014-05-08 11:03:24.000000000 -0300 -@@ -38,7 +38,7 @@ - # installation prefix. - # - #LZO_SUPPORT = 1 --#LZO_DIR = /usr/local -+#LZO_DIR = $(LOCALBASE) - - ########### Building LZMA support ############# - # -@@ -103,7 +103,7 @@ - - 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 -@@ -253,6 +253,6 @@ - - .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 Property changes on: head/sysutils/squashfs-tools/files/patch-squashfs-tools_Makefile ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/squashfs-tools/files/patch-Makefile =================================================================== --- head/sysutils/squashfs-tools/files/patch-Makefile (nonexistent) +++ head/sysutils/squashfs-tools/files/patch-Makefile (revision 547041) @@ -0,0 +1,30 @@ +--- Makefile.orig 2014-05-11 18:56:00 UTC ++++ Makefile +@@ -38,7 +38,7 @@ GZIP_SUPPORT = 1 + # installation prefix. + # + #LZO_SUPPORT = 1 +-#LZO_DIR = /usr/local ++#LZO_DIR = $(LOCALBASE) + + + ########### Building LZ4 support ############# +@@ -119,7 +119,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 +@@ -300,6 +300,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 Property changes on: head/sysutils/squashfs-tools/files/patch-Makefile ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sysutils/squashfs-tools/files/patch-action.c =================================================================== --- head/sysutils/squashfs-tools/files/patch-action.c (revision 547040) +++ head/sysutils/squashfs-tools/files/patch-action.c (revision 547041) @@ -1,17 +1,17 @@ Hack for lack of strdupa() in BSD libc ---- action.c.orig +--- action.c.orig 2014-05-10 04:54:13 UTC +++ action.c @@ -44,6 +44,12 @@ #include "action.h" #include "error.h" +#ifndef strdupa +#include // required for str*() +#include // required for alloca +#define strdupa(foo) (strncpy( alloca( strlen(foo) + 1 ), foo, strlen( foo ) + 1 )) +#endif + /* * code to parse actions */ Index: head/sysutils/squashfs-tools/files/patch-pseudo.c =================================================================== --- head/sysutils/squashfs-tools/files/patch-pseudo.c (nonexistent) +++ head/sysutils/squashfs-tools/files/patch-pseudo.c (revision 547041) @@ -0,0 +1,13 @@ +--- pseudo.c.orig 2014-05-10 04:54:13 UTC ++++ pseudo.c +@@ -34,6 +34,10 @@ + #include + #include + ++#ifdef __FreeBSD__ ++#include ++#endif ++ + #include "pseudo.h" + #include "error.h" + #include "progressbar.h" Property changes on: head/sysutils/squashfs-tools/files/patch-pseudo.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sysutils/squashfs-tools/files/patch-unsquashfs.c =================================================================== --- head/sysutils/squashfs-tools/files/patch-unsquashfs.c (nonexistent) +++ head/sysutils/squashfs-tools/files/patch-unsquashfs.c (revision 547041) @@ -0,0 +1,17 @@ +--- unsquashfs.c.orig 2014-05-12 22:18:35 UTC ++++ unsquashfs.c +@@ -31,7 +31,14 @@ + #include "unsquashfs_info.h" + #include "stdarg.h" + ++#ifdef __linux__ + #include ++#endif ++ ++#ifdef __FreeBSD__ ++#include ++#endif ++ + #include + #include + #include Property changes on: head/sysutils/squashfs-tools/files/patch-unsquashfs.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property