pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/51058: new package filesystems/squashfs
Here are some updates to use the options.mk framework. Sorry I just
included the files as I'm not that familiar with git.
modified: Makefile
modified: patches/patch-aa
new file: options.mk
Feel free to change in any way. It should be simple now to change
to whatever darwin should use.
Thanks
###############################################################
Makefile
# $NetBSD$
DISTNAME= squashfs${VERSION}
PKGNAME= squashfs-${VERSION}
VERSION= 4.3
CATEGORIES= filesystems
MASTER_SITES= http://downloads.sourceforge.net/project/squashfs/squashfs/${DISTNAME}/
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
HOMEPAGE= http://squashfs.sourceforge.net/
COMMENT= Tools for squashfs archives
LICENSE= gnu-gpl-v2
.include "../../mk/bsd.prefs.mk"
.include "options.mk"
USE_LANGUAGES= c
USE_TOOLS+= gmake
INSTALLATION_DIRS= bin \
share/doc/${PKGNAME} \
share/doc/${PKGNAME}/OLD-READMEs \
share/examples/${PKGNAME}
SQUASH_DIR= ${WRKDIR}/${DISTNAME}
WRKSRC= ${SQUASH_DIR}/squashfs-tools
SQUASH_PKG_DOC= ${DESTDIR}${PREFIX}/share/doc/${PKGNAME}
do-build:
cd ${WRKSRC} && env EXTRA_LDFLAGS="${COMPILER_RPATH_FLAG}${PREFIX}/lib" \
${GMAKE} ${BUILD_MAKE_FLAGS}
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/mksquashfs ${DESTDIR}${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/unsquashfs ${DESTDIR}${PREFIX}/bin
${INSTALL_DATA} ${SQUASH_DIR}/ACKNOWLEDGEMENTS ${SQUASH_PKG_DOC}
${INSTALL_DATA} ${SQUASH_DIR}/CHANGES ${SQUASH_PKG_DOC}
${INSTALL_DATA} ${SQUASH_DIR}/COPYING ${SQUASH_PKG_DOC}
${INSTALL_DATA} ${SQUASH_DIR}/DONATIONS ${SQUASH_PKG_DOC}
${INSTALL_DATA} ${SQUASH_DIR}/INSTALL ${SQUASH_PKG_DOC}
${INSTALL_DATA} ${SQUASH_DIR}/PERFORMANCE.README ${SQUASH_PKG_DOC}
${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}/
.include "../../mk/bsd.pkg.mk"
###############################################################
patches/patch-aa
$NetBSD$
Use pkgsrc frame for compression options and add
fnm_extmatch.h include file dependency.
--- Makefile.orig 2016-04-27 14:49:03.000000000 -0400
+++ Makefile 2016-04-27 14:52:27.000000000 -0400
@@ -15,7 +15,7 @@
# Obviously, you must select at least one of the available gzip, lzma, lzo
# compression types.
#
-GZIP_SUPPORT = 1
+#GZIP_SUPPORT = 1
########### Building XZ support #############
#
@@ -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 \
- info.h caches-queues-lists.h read_fs.h restore.h process_fragments.h
+ info.h caches-queues-lists.h read_fs.h restore.h process_fragments.h \
+ fnm_extmatch.h
read_fs.o: read_fs.c squashfs_fs.h squashfs_swap.h compressor.h xattr.h \
error.h mksquashfs.h
@@ -247,7 +248,7 @@
read_xattrs.o: read_xattrs.c squashfs_fs.h squashfs_swap.h xattr.h error.h
-action.o: action.c squashfs_fs.h mksquashfs.h action.h error.h
+action.o: action.c squashfs_fs.h mksquashfs.h action.h error.h fnm_extmatch.h
progressbar.o: progressbar.c error.h
@@ -279,7 +280,7 @@
$(CC) $(LDFLAGS) $(EXTRA_LDFLAGS) $(UNSQUASHFS_OBJS) $(LIBS) -o $@
unsquashfs.o: unsquashfs.h unsquashfs.c squashfs_fs.h squashfs_swap.h \
- squashfs_compat.h xattr.h read_fs.h compressor.h
+ squashfs_compat.h xattr.h read_fs.h compressor.h fnm_extmatch.h
unsquash-1.o: unsquashfs.h unsquash-1.c squashfs_fs.h squashfs_compat.h
###############################################################
options.mk:
# $NetBSD$
PKG_OPTIONS_VAR= PKG_OPTIONS.squashfs
PKG_SUPPORTED_OPTIONS= gzip lzo lz4 xz xattr
PKG_SUGGESTED_OPTIONS= gzip lzo lz4 xz
.include "../../mk/bsd.options.mk"
# XXX adjust this to make sense for other OS
.if ${OPSYS} == "Linux"
PKG_SUGGESTED_OPTIONS+= xattr
.endif
.if !empty(PKG_OPTIONS:Mgzip)
.include "../../devel/zlib/buildlink3.mk"
BUILD_MAKE_FLAGS+= GZIP_SUPPORT=1
.else
BUILD_MAKE_FLAGS+= GZIP_SUPPORT=0
.endif
.if !empty(PKG_OPTIONS:Mlzo)
.include "../../archivers/lzo/buildlink3.mk"
BUILD_MAKE_FLAGS+= LZO_SUPPORT=1
.else
BUILD_MAKE_FLAGS+= LZO_SUPPORT=0
.endif
.if !empty(PKG_OPTIONS:Mxz)
.include "../../archivers/xz/buildlink3.mk"
BUILD_MAKE_FLAGS+= XZ_SUPPORT=1
.else
BUILD_MAKE_FLAGS+= XZ_SUPPORT=0
.endif
.if !empty(PKG_OPTIONS:Mlz4)
.include "../../archivers/lz4/buildlink3.mk"
BUILD_MAKE_FLAGS+= LZ4_SUPPORT=1
.else
BUILD_MAKE_FLAGS+= LZ4_SUPPORT=0
.endif
.if !empty(PKG_OPTIONS:Mxattr)
BUILD_MAKE_FLAGS+= XATTR_SUPPORT=1
BUILD_MAKE_FLAGS+= XATTR_DEFAULT=1
.else
BUILD_MAKE_FLAGS+= XATTR_SUPPORT=0
BUILD_MAKE_FLAGS+= XATTR_DEFAULT=0
.endif
# make gzip default else take first on list that is not xattr
.if !empty(PKG_OPTIONS:Mgzip)
BUILD_MAKE_FLAGS+= COMP_DEFAULT=gzip
.else
BUILD_MAKE_FLAGS+= COMP_DEFAULT=${PKG_OPTIONS:Nxattr:[1]}
.endif
.if empty(PKG_OPTIONS:Nxattr)
PKG_FAIL_REASON+= "Need at least one compression algorithm"
.endif
###############################################################
Home |
Main Index |
Thread Index |
Old Index