summaryrefslogtreecommitdiff
path: root/filesystems
diff options
context:
space:
mode:
Diffstat (limited to 'filesystems')
-rw-r--r--filesystems/squashfs/Makefile16
-rw-r--r--filesystems/squashfs/PLIST40
-rw-r--r--filesystems/squashfs/distinfo5
-rw-r--r--filesystems/squashfs/options.mk27
-rw-r--r--filesystems/squashfs/patches/patch-Makefile41
5 files changed, 92 insertions, 37 deletions
diff --git a/filesystems/squashfs/Makefile b/filesystems/squashfs/Makefile
index 10f8e398977..e1305105c4b 100644
--- a/filesystems/squashfs/Makefile
+++ b/filesystems/squashfs/Makefile
@@ -1,8 +1,10 @@
-# $NetBSD: Makefile,v 1.2 2016/10/01 13:00:42 joerg Exp $
+# $NetBSD: Makefile,v 1.3 2017/02/09 18:16:07 scole Exp $
+VERSION= 4.3
DISTNAME= squashfs${VERSION}
PKGNAME= squashfs-${VERSION}
-VERSION= 4.3
+
+PKGREVISION= 1
CATEGORIES= filesystems
MASTER_SITES= http://downloads.sourceforge.net/project/squashfs/squashfs/${DISTNAME}/
@@ -19,13 +21,13 @@ USE_LANGUAGES= c
USE_TOOLS+= gmake
INSTALLATION_DIRS= bin \
- share/doc/${PKGNAME} \
- share/doc/${PKGNAME}/OLD-READMEs \
- share/examples/${PKGNAME}
+ share/doc/squashfs \
+ share/doc/squashfs/OLD-READMEs \
+ share/examples/squashfs
SQUASH_DIR= ${WRKDIR}/${DISTNAME}
WRKSRC= ${SQUASH_DIR}/squashfs-tools
-SQUASH_PKG_DOC= ${DESTDIR}${PREFIX}/share/doc/${PKGNAME}
+SQUASH_PKG_DOC= ${DESTDIR}${PREFIX}/share/doc/squashfs
do-build:
cd ${WRKSRC} && env EXTRA_LDFLAGS="-L${PREFIX}/lib ${COMPILER_RPATH_FLAG}${PREFIX}/lib" \
@@ -43,6 +45,6 @@ do-install:
${INSTALL_DATA} ${SQUASH_DIR}/README ${SQUASH_PKG_DOC}
${INSTALL_DATA} ${SQUASH_DIR}/README-4.3 ${SQUASH_PKG_DOC}
${INSTALL_DATA} ${SQUASH_DIR}/OLD-READMEs/* ${SQUASH_PKG_DOC}/OLD-READMEs/
- ${INSTALL_DATA} ${SQUASH_DIR}/pseudo-file.example ${DESTDIR}${PREFIX}/share/examples/${PKGNAME}/
+ ${INSTALL_DATA} ${SQUASH_DIR}/pseudo-file.example ${DESTDIR}${PREFIX}/share/examples/squashfs/
.include "../../mk/bsd.pkg.mk"
diff --git a/filesystems/squashfs/PLIST b/filesystems/squashfs/PLIST
index 94b93f5ba45..6e720d18aa3 100644
--- a/filesystems/squashfs/PLIST
+++ b/filesystems/squashfs/PLIST
@@ -1,22 +1,22 @@
-@comment $NetBSD: PLIST,v 1.1 2016/09/09 15:40:17 scole Exp $
+@comment $NetBSD: PLIST,v 1.2 2017/02/09 18:16:07 scole Exp $
bin/mksquashfs
bin/unsquashfs
-share/doc/${PKGNAME}/ACKNOWLEDGEMENTS
-share/doc/${PKGNAME}/CHANGES
-share/doc/${PKGNAME}/COPYING
-share/doc/${PKGNAME}/DONATIONS
-share/doc/${PKGNAME}/INSTALL
-share/doc/${PKGNAME}/PERFORMANCE.README
-share/doc/${PKGNAME}/README
-share/doc/${PKGNAME}/README-4.3
-share/doc/${PKGNAME}/OLD-READMEs/README-2.0
-share/doc/${PKGNAME}/OLD-READMEs/README-2.1
-share/doc/${PKGNAME}/OLD-READMEs/README-3.0
-share/doc/${PKGNAME}/OLD-READMEs/README-3.1
-share/doc/${PKGNAME}/OLD-READMEs/README-3.2
-share/doc/${PKGNAME}/OLD-READMEs/README-3.3
-share/doc/${PKGNAME}/OLD-READMEs/README-4.0
-share/doc/${PKGNAME}/OLD-READMEs/README-4.1
-share/doc/${PKGNAME}/OLD-READMEs/README-4.2
-share/doc/${PKGNAME}/OLD-READMEs/README-AMD64
-share/examples/${PKGNAME}/pseudo-file.example
+share/doc/squashfs/ACKNOWLEDGEMENTS
+share/doc/squashfs/CHANGES
+share/doc/squashfs/COPYING
+share/doc/squashfs/DONATIONS
+share/doc/squashfs/INSTALL
+share/doc/squashfs/PERFORMANCE.README
+share/doc/squashfs/README
+share/doc/squashfs/README-4.3
+share/doc/squashfs/OLD-READMEs/README-2.0
+share/doc/squashfs/OLD-READMEs/README-2.1
+share/doc/squashfs/OLD-READMEs/README-3.0
+share/doc/squashfs/OLD-READMEs/README-3.1
+share/doc/squashfs/OLD-READMEs/README-3.2
+share/doc/squashfs/OLD-READMEs/README-3.3
+share/doc/squashfs/OLD-READMEs/README-4.0
+share/doc/squashfs/OLD-READMEs/README-4.1
+share/doc/squashfs/OLD-READMEs/README-4.2
+share/doc/squashfs/OLD-READMEs/README-AMD64
+share/examples/squashfs/pseudo-file.example
diff --git a/filesystems/squashfs/distinfo b/filesystems/squashfs/distinfo
index f31ccd81216..963c1958beb 100644
--- a/filesystems/squashfs/distinfo
+++ b/filesystems/squashfs/distinfo
@@ -1,11 +1,12 @@
-$NetBSD: distinfo,v 1.1 2016/09/09 15:40:17 scole Exp $
+$NetBSD: distinfo,v 1.2 2017/02/09 18:16:07 scole Exp $
SHA1 (squashfs4.3.tar.gz) = a615979db9cee82e4a934a1455577f597d290b41
RMD160 (squashfs4.3.tar.gz) = fc91627c0757205c4a0fbe2037913cec1cefb1fd
SHA512 (squashfs4.3.tar.gz) = 854ed7acc99920f24ecf11e0da807e5a2a162eeda55db971aba63a03f0da2c13b20ec0564a906c4b0e415bd8258b273a10208c7abc0704f2ceea773aa6148a79
Size (squashfs4.3.tar.gz) = 182550 bytes
-SHA1 (patch-Makefile) = ec62b7beb0a741f48a2392900e6655b7bfbdb438
+SHA1 (patch-Makefile) = e9701425da11a12157407f6212ad0e1cd7fed536
SHA1 (patch-action.c) = d0fc02e79f93a125f20992362214b359460bdce2
SHA1 (patch-fnm__extmatch.h) = 167c9b473c78f3e10d7536791d63e42c39794e4a
SHA1 (patch-mksquashfs.c) = 8e91a84b4bfd0de4aef79d9165ff41f17e5b8c41
+SHA1 (patch-pseudo.c) = 6c4e94d8f559404f7b6e155c71267ce7fd6c1456
SHA1 (patch-unsquashfs.c) = 1e02204097129fdd0309124d2a664c2e081db2f0
diff --git a/filesystems/squashfs/options.mk b/filesystems/squashfs/options.mk
index 64e9ff28c1c..fb70f87fd61 100644
--- a/filesystems/squashfs/options.mk
+++ b/filesystems/squashfs/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.1 2016/09/09 15:40:17 scole Exp $
+# $NetBSD: options.mk,v 1.2 2017/02/09 18:16:07 scole Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.squashfs
PKG_SUPPORTED_OPTIONS= zlib lz4 lzo xz xattr
@@ -21,23 +21,48 @@ PKG_FAIL_REASON= "need at least one compression algorithm selected"
.if !empty(PKG_OPTIONS:Mzlib)
.include "../../devel/zlib/buildlink3.mk"
BUILD_MAKE_FLAGS+= GZIP_SUPPORT=1
+SQUASH_COMPRESSORS+= gzip
+.else
+BUILD_MAKE_FLAGS+= GZIP_SUPPORT=0
.endif
.if !empty(PKG_OPTIONS:Mlz4)
.include "../../archivers/lz4/buildlink3.mk"
BUILD_MAKE_FLAGS+= LZ4_SUPPORT=1
+SQUASH_COMPRESSORS+= lz4
+.else
+BUILD_MAKE_FLAGS+= LZ4_SUPPORT=0
.endif
.if !empty(PKG_OPTIONS:Mlzo)
.include "../../archivers/lzo/buildlink3.mk"
BUILD_MAKE_FLAGS+= LZO_SUPPORT=1
+SQUASH_COMPRESSORS+= lzo
+.else
+BUILD_MAKE_FLAGS+= LZO_SUPPORT=0
.endif
.if !empty(PKG_OPTIONS:Mxz)
.include "../../archivers/xz/buildlink3.mk"
BUILD_MAKE_FLAGS+= XZ_SUPPORT=1
+SQUASH_COMPRESSORS+= xz
+.else
+BUILD_MAKE_FLAGS+= XZ_SUPPORT=0
.endif
.if !empty(PKG_OPTIONS:Mxattr)
BUILD_MAKE_FLAGS+= XATTR_SUPPORT=1
+.else
+BUILD_MAKE_FLAGS+= XATTR_SUPPORT=0
+.endif
+
+# XXX is this ok with pkgsrc framework?
+# if default compressor specified (e.g. "bmake COMP_DEFAULT=xz")
+# use that, else use gzip, else use first on list not including xattr
+.if empty(COMP_DEFAULT)
+.if !empty(PKG_OPTIONS:Mzlib)
+BUILD_MAKE_FLAGS+= COMP_DEFAULT=gzip
+.else
+BUILD_MAKE_FLAGS+= COMP_DEFAULT=${SQUASH_COMPRESSORS:Nxattr:[1]}
+.endif
.endif
diff --git a/filesystems/squashfs/patches/patch-Makefile b/filesystems/squashfs/patches/patch-Makefile
index cc097dd1335..3adab6f7484 100644
--- a/filesystems/squashfs/patches/patch-Makefile
+++ b/filesystems/squashfs/patches/patch-Makefile
@@ -1,8 +1,8 @@
-$NetBSD: patch-Makefile,v 1.1 2016/09/09 15:40:17 scole Exp $
-Add fnm_extmatch.h dependency
+$NetBSD: patch-Makefile,v 1.2 2017/02/09 18:16:08 scole Exp $
+Add fnm_extmatch.h dependency, use options framework
---- Makefile.orig 2014-05-11 18:56:00.000000000 +0000
-+++ Makefile
+--- Makefile.orig 2014-05-11 11:56:00.000000000 -0700
++++ Makefile 2017-02-06 12:08:05.000000000 -0800
@@ -15,7 +15,7 @@
# Obviously, you must select at least one of the available gzip, lzma, lzo
# compression types.
@@ -12,7 +12,34 @@ Add fnm_extmatch.h dependency
########### Building XZ support #############
#
-@@ -229,7 +229,8 @@ mksquashfs: $(MKSQUASHFS_OBJS)
+@@ -81,7 +81,7 @@
+ # in Mksquashfs. Obviously the compression algorithm must have been
+ # selected to be built
+ #
+-COMP_DEFAULT = gzip
++#COMP_DEFAULT = gzip
+
+ ###############################################
+ # Extended attribute (XATTRs) build options #
+@@ -92,7 +92,7 @@
+ # If your C library or build/target environment doesn't support XATTRs then
+ # comment out the next line to build Mksquashfs and Unsquashfs without XATTR
+ # support
+-XATTR_SUPPORT = 1
++#XATTR_SUPPORT = 1
+
+ # Select whether you wish xattrs to be stored by Mksquashfs and extracted
+ # by Unsquashfs by default. If selected users can disable xattr support by
+@@ -100,7 +100,7 @@
+ #
+ # If unselected, Mksquashfs/Unsquashfs won't store and extract xattrs by
+ # default. Users can enable xattrs by using the -xattrs option.
+-XATTR_DEFAULT = 1
++#XATTR_DEFAULT = 1
+
+
+ ###############################################
+@@ -229,7 +229,8 @@
mksquashfs.o: Makefile mksquashfs.c squashfs_fs.h squashfs_swap.h mksquashfs.h \
sort.h pseudo.h compressor.h xattr.h action.h error.h progressbar.h \
@@ -22,7 +49,7 @@ Add fnm_extmatch.h dependency
read_fs.o: read_fs.c squashfs_fs.h squashfs_swap.h compressor.h xattr.h \
error.h mksquashfs.h
-@@ -247,7 +248,7 @@ xattr.o: xattr.c squashfs_fs.h squashfs_
+@@ -247,7 +248,7 @@
read_xattrs.o: read_xattrs.c squashfs_fs.h squashfs_swap.h xattr.h error.h
@@ -31,7 +58,7 @@ Add fnm_extmatch.h dependency
progressbar.o: progressbar.c error.h
-@@ -279,7 +280,7 @@ unsquashfs: $(UNSQUASHFS_OBJS)
+@@ -279,7 +280,7 @@
$(CC) $(LDFLAGS) $(EXTRA_LDFLAGS) $(UNSQUASHFS_OBJS) $(LIBS) -o $@
unsquashfs.o: unsquashfs.h unsquashfs.c squashfs_fs.h squashfs_swap.h \